From aabfbd2ea4e07e26be228c3655cd74bcb6f1cc98 Mon Sep 17 00:00:00 2001 From: rmorshea Date: Fri, 7 May 2021 21:37:43 -0700 Subject: [PATCH] delete accidentally added files --- asd/README.md | 3 - .../pkg/common/htm.module-dd7abb54.js | 3 - asd/_snowpack/pkg/common/index-21e68f69.js | 348 ---------- asd/_snowpack/pkg/common/index-379e2340.js | 631 ------------------ asd/_snowpack/pkg/common/index-6ed86a98.js | 159 ----- asd/_snowpack/pkg/fast-json-patch.js | 1 - asd/_snowpack/pkg/htm.js | 2 - asd/_snowpack/pkg/idom-client-react.js | 337 ---------- asd/_snowpack/pkg/import-map.json | 9 - asd/_snowpack/pkg/react-dom.js | 18 - asd/_snowpack/pkg/react.js | 34 - asd/idom-logo-square-small.svg | 45 -- asd/index.html | 16 - asd/package-lock.json | 591 ---------------- asd/package.json | 26 - asd/packages/idom-client-react/README.md | 2 - .../idom-client-react/package-lock.json | 24 - asd/packages/idom-client-react/package.json | 30 - .../idom-client-react/src/event-to-object.js | 135 ---- asd/packages/idom-client-react/src/index.js | 168 ----- asd/packages/idom-client-react/src/utils.js | 37 - asd/src/index.js | 124 ---- asd/src/user-packages.js | 1 - 23 files changed, 2744 deletions(-) delete mode 100644 asd/README.md delete mode 100644 asd/_snowpack/pkg/common/htm.module-dd7abb54.js delete mode 100644 asd/_snowpack/pkg/common/index-21e68f69.js delete mode 100644 asd/_snowpack/pkg/common/index-379e2340.js delete mode 100644 asd/_snowpack/pkg/common/index-6ed86a98.js delete mode 100644 asd/_snowpack/pkg/fast-json-patch.js delete mode 100644 asd/_snowpack/pkg/htm.js delete mode 100644 asd/_snowpack/pkg/idom-client-react.js delete mode 100644 asd/_snowpack/pkg/import-map.json delete mode 100644 asd/_snowpack/pkg/react-dom.js delete mode 100644 asd/_snowpack/pkg/react.js delete mode 100644 asd/idom-logo-square-small.svg delete mode 100644 asd/index.html delete mode 100644 asd/package-lock.json delete mode 100644 asd/package.json delete mode 100644 asd/packages/idom-client-react/README.md delete mode 100644 asd/packages/idom-client-react/package-lock.json delete mode 100644 asd/packages/idom-client-react/package.json delete mode 100644 asd/packages/idom-client-react/src/event-to-object.js delete mode 100644 asd/packages/idom-client-react/src/index.js delete mode 100644 asd/packages/idom-client-react/src/utils.js delete mode 100644 asd/src/index.js delete mode 100644 asd/src/user-packages.js diff --git a/asd/README.md b/asd/README.md deleted file mode 100644 index 1cfd1079e..000000000 --- a/asd/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# IDOM Client - -An ES6 Javascript client for IDOM diff --git a/asd/_snowpack/pkg/common/htm.module-dd7abb54.js b/asd/_snowpack/pkg/common/htm.module-dd7abb54.js deleted file mode 100644 index d6a570103..000000000 --- a/asd/_snowpack/pkg/common/htm.module-dd7abb54.js +++ /dev/null @@ -1,3 +0,0 @@ -var n=function(t,s,r,e){var u;s[0]=0;for(var h=1;h=5&&((e||!n&&5===r)&&(h.push(r,0,e,s),r=6),n&&(h.push(r,n,0,s),r=6)),e="";},a=0;a"===t?(r=1,e=""):e=t+e[0]:u?t===u?u="":e+=t:'"'===t||"'"===t?u=t:">"===t?(p(),r=1):r&&("="===t?(r=5,s=e,e=""):"/"===t&&(r<5||">"===n[a][l+1])?(p(),3===r&&(h=h[0]),r=h,(h=h[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(p(),r=2):e+=t),3===r&&"!--"===e&&(r=4,h=h[0]);}return p(),h}(s)),r),arguments,[])).length>1?r:r[0]} - -export { htm as h }; diff --git a/asd/_snowpack/pkg/common/index-21e68f69.js b/asd/_snowpack/pkg/common/index-21e68f69.js deleted file mode 100644 index 4f70e2872..000000000 --- a/asd/_snowpack/pkg/common/index-21e68f69.js +++ /dev/null @@ -1,348 +0,0 @@ -import { c as createCommonjsModule, r as react, o as objectAssign } from './index-6ed86a98.js'; - -var scheduler_production_min = createCommonjsModule(function (module, exports) { -var f,g,h,k,l; -if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null;}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0));};g=function(a,b){q=setTimeout(a,b);};h=function(){clearTimeout(q);};k=function(){return !1};l=exports.unstable_forceFrameRate=function(){};}else {var w=window.performance,x=window.Date, -y=window.setTimeout,z=window.clearTimeout;if("undefined"!==typeof console){var A=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");"function"!==typeof A&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");}if("object"=== -typeof w&&"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else {var B=x.now();exports.unstable_now=function(){return x.now()-B};}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1; -function V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O);}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else {var b=L(O);null!==b&&g(W,b.startTime-a);}} -function X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b);}else M(N);Q=L(N);}if(null!==Q)var m=!0;else {var n=L(O);null!==n&&g(W,n.startTime-b);m=!1;}return m}finally{Q=null,R=c,S=!1;}} -function Y(a){switch(a){case 1:return -1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null;};exports.unstable_continueExecution=function(){T||S||(T=!0,f(X));}; -exports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R;}var c=R;R=b;try{return a()}finally{R=c;}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=Z;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3;}var c=R;R=a;try{return b()}finally{R=c;}}; -exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a}; -exports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTimeb}return !1}function v(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;}var C={}; -"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){C[a]=new v(a,0,!1,a,null,!1);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];C[b]=new v(b,1,!1,a[1],null,!1);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){C[a]=new v(a,2,!1,a.toLowerCase(),null,!1);}); -["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){C[a]=new v(a,2,!1,a,null,!1);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){C[a]=new v(a,3,!1,a.toLowerCase(),null,!1);}); -["checked","multiple","muted","selected"].forEach(function(a){C[a]=new v(a,3,!0,a,null,!1);});["capture","download"].forEach(function(a){C[a]=new v(a,4,!1,a,null,!1);});["cols","rows","size","span"].forEach(function(a){C[a]=new v(a,6,!1,a,null,!1);});["rowSpan","start"].forEach(function(a){C[a]=new v(a,5,!1,a.toLowerCase(),null,!1);});var Ua=/[\-:]([a-z])/g;function Va(a){return a[1].toUpperCase()} -"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(Ua, -Va);C[b]=new v(b,1,!1,a,null,!1);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1);});["tabIndex","crossOrigin"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!1);}); -C.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!0);});var Wa=react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty("ReactCurrentDispatcher")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty("ReactCurrentBatchConfig")||(Wa.ReactCurrentBatchConfig={suspense:null}); -function Xa(a,b,c,d){var e=C.hasOwnProperty(b)?C[b]:null;var f=null!==e?0===e.type:d?!1:!(2=c.length))throw Error(u(93));c=c[0];}b=c;}null==b&&(b="");c=b;}a._wrapperState={initialValue:rb(c)};} -function Kb(a,b){var c=rb(b.value),d=rb(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d);}function Lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b);}var Mb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}; -function Nb(a){switch(a){case "svg":return "http://www.w3.org/2000/svg";case "math":return "http://www.w3.org/1998/Math/MathML";default:return "http://www.w3.org/1999/xhtml"}}function Ob(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Nb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} -var Pb,Qb=function(a){return "undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)});}:a}(function(a,b){if(a.namespaceURI!==Mb.svg||"innerHTML"in a)a.innerHTML=b;else {Pb=Pb||document.createElement("div");Pb.innerHTML=""+b.valueOf().toString()+"";for(b=Pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild);}}); -function Rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b;}function Sb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Tb={animationend:Sb("Animation","AnimationEnd"),animationiteration:Sb("Animation","AnimationIteration"),animationstart:Sb("Animation","AnimationStart"),transitionend:Sb("Transition","TransitionEnd")},Ub={},Vb={}; -ya&&(Vb=document.createElement("div").style,"AnimationEvent"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),"TransitionEvent"in window||delete Tb.transitionend.transition);function Wb(a){if(Ub[a])return Ub[a];if(!Tb[a])return a;var b=Tb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Vb)return Ub[a]=b[c];return a} -var Xb=Wb("animationend"),Yb=Wb("animationiteration"),Zb=Wb("animationstart"),$b=Wb("transitionend"),ac="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),bc=new ("function"===typeof WeakMap?WeakMap:Map);function cc(a){var b=bc.get(a);void 0===b&&(b=new Map,bc.set(a,b));return b} -function dc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else {a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function ec(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function fc(a){if(dc(a)!==a)throw Error(u(188));} -function gc(a){var b=a.alternate;if(!b){b=dc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return fc(e),a;if(f===d)return fc(e),b;f=f.sibling;}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else {for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling;}if(!g){for(h=f.child;h;){if(h=== -c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling;}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function hc(a){a=gc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else {if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return;}b.sibling.return=b.return;b=b.sibling;}}return null} -function ic(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function jc(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a);}var kc=null; -function lc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;dpc.length&&pc.push(a);} -function rc(a,b,c,d){if(pc.length){var e=pc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return {topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}} -function sc(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else {for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo;}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=tc(d);}while(c);for(c=0;c=b)return {node:c,offset:b-a};a=d;}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode;}c=void 0;}c=ud(c);}} -function wd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wd(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xd(){for(var a=window,b=td();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href;}catch(d){c=!1;}if(c)a=b.contentWindow;else break;b=td(a.document);}return b} -function yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}var zd="$",Ad="/$",Bd="$?",Cd="$!",Dd=null,Ed=null;function Fd(a,b){switch(a){case "button":case "input":case "select":case "textarea":return !!b.autoFocus}return !1} -function Gd(a,b){return "textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Hd="function"===typeof setTimeout?setTimeout:void 0,Id="function"===typeof clearTimeout?clearTimeout:void 0;function Jd(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a} -function Kd(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===zd||c===Cd||c===Bd){if(0===b)return a;b--;}else c===Ad&&b++;}a=a.previousSibling;}return null}var Ld=Math.random().toString(36).slice(2),Md="__reactInternalInstance$"+Ld,Nd="__reactEventHandlers$"+Ld,Od="__reactContainere$"+Ld; -function tc(a){var b=a[Md];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Od]||c[Md]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Kd(a);null!==a;){if(c=a[Md])return c;a=Kd(a);}return b}a=c;c=a.parentNode;}return null}function Nc(a){a=a[Md]||a[Od];return !a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pd(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function Qd(a){return a[Nd]||null} -function Rd(a){do a=a.return;while(a&&5!==a.tag);return a?a:null} -function Sd(a,b){var c=a.stateNode;if(!c)return null;var d=la(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1;}if(a)return null;if(c&&"function"!==typeof c)throw Error(u(231, -b,typeof c));return c}function Td(a,b,c){if(b=Sd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a);}function Ud(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Rd(b);for(b=c.length;0this.eventPool.length&&this.eventPool.push(a);}function de(a){a.eventPool=[];a.getPooled=ee;a.release=fe;}var ge=G.extend({data:null}),he=G.extend({data:null}),ie=[9,13,27,32],je=ya&&"CompositionEvent"in window,ke=null;ya&&"documentMode"in document&&(ke=document.documentMode); -var le=ya&&"TextEvent"in window&&!ke,me=ya&&(!je||ke&&8=ke),ne=String.fromCharCode(32),oe={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart", -captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},pe=!1; -function qe(a,b){switch(a){case "keyup":return -1!==ie.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return !0;default:return !1}}function re(a){a=a.detail;return "object"===typeof a&&"data"in a?a.data:null}var se=!1;function te(a,b){switch(a){case "compositionend":return re(b);case "keypress":if(32!==b.which)return null;pe=!0;return ne;case "textInput":return a=b.data,a===ne&&pe?null:a;default:return null}} -function ue(a,b){if(se)return "compositionend"===a||!je&&qe(a,b)?(a=ae(),$d=Zd=Yd=null,se=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},ef=null,ff=null,gf=null,hf=!1; -function jf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(hf||null==ef||ef!==td(c))return null;c=ef;"selectionStart"in c&&yd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return gf&&bf(gf,c)?null:(gf=c,a=G.getPooled(df.select,ff,a,b),a.type="select",a.target=ef,Xd(a),a)} -var kf={eventTypes:df,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=cc(e);f=wa.onSelect;for(var g=0;gzf||(a.current=yf[zf],yf[zf]=null,zf--);} -function I(a,b){zf++;yf[zf]=a.current;a.current=b;}var Af={},J={current:Af},K={current:!1},Bf=Af;function Cf(a,b){var c=a.type.contextTypes;if(!c)return Af;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a} -function Df(){H(K);H(J);}function Ef(a,b,c){if(J.current!==Af)throw Error(u(168));I(J,b);I(K,c);}function Ff(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,pb(b)||"Unknown",e));return objectAssign({},c,{},d)}function Gf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Af;Bf=J.current;I(J,a);I(K,K.current);return !0} -function Hf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(a=Ff(a,b,Bf),d.__reactInternalMemoizedMergedChildContext=a,H(K),H(J),I(J,a)):H(K);I(K,c);} -var If=scheduler.unstable_runWithPriority,Jf=scheduler.unstable_scheduleCallback,Kf=scheduler.unstable_cancelCallback,Lf=scheduler.unstable_requestPaint,Mf=scheduler.unstable_now,Nf=scheduler.unstable_getCurrentPriorityLevel,Of=scheduler.unstable_ImmediatePriority,Pf=scheduler.unstable_UserBlockingPriority,Qf=scheduler.unstable_NormalPriority,Rf=scheduler.unstable_LowPriority,Sf=scheduler.unstable_IdlePriority,Tf={},Uf=scheduler.unstable_shouldYield,Vf=void 0!==Lf?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1E4>Zf?Mf:function(){return Mf()-Zf}; -function ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u(332));}}function bg(a){switch(a){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u(332));}}function cg(a,b){a=bg(a);return If(a,b)}function dg(a,b,c){a=bg(a);return Jf(a,b,c)}function eg(a){null===Wf?(Wf=[a],Xf=Jf(Of,fg)):Wf.push(a);return Tf}function gg(){if(null!==Xf){var a=Xf;Xf=null;Kf(a);}fg();} -function fg(){if(!Yf&&null!==Wf){Yf=!0;var a=0;try{var b=Wf;cg(99,function(){for(;a=b&&(rg=!0),a.firstContext=null);} -function sg(a,b){if(mg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)mg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===lg){if(null===kg)throw Error(u(308));lg=b;kg.dependencies={expirationTime:0,firstContext:b,responders:null};}else lg=lg.next=b;}return a._currentValue}var tg=!1;function ug(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null};} -function vg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects});}function wg(a,b){a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null};return a.next=a}function xg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b;}} -function yg(a,b){var c=a.alternate;null!==c&&vg(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b);} -function zg(a,b,c,d){var e=a.updateQueue;tg=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h;}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g));}if(null!==f){h=f.next;var k=e.baseState,l=0,m=null,p=null,x=null;if(null!==h){var z=h;do{g=z.expirationTime;if(gl&&(l=g);}else {null!==x&&(x=x.next={expirationTime:1073741823,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null});Ag(g,z.suspenseConfig);a:{var D=a,t=z;g=b;ca=c;switch(t.tag){case 1:D=t.payload;if("function"===typeof D){k=D.call(ca,k,g);break a}k=D;break a;case 3:D.effectTag=D.effectTag&-4097|64;case 0:D=t.payload;g="function"===typeof D?D.call(ca,k,g):D;if(null===g||void 0===g)break a;k=objectAssign({},k,g);break a;case 2:tg=!0;}}null!==z.callback&& -(a.effectTag|=32,g=e.effects,null===g?e.effects=[z]:g.push(z));}z=z.next;if(null===z||z===h)if(g=e.shared.pending,null===g)break;else z=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null;}while(1)}null===x?m=k:x.next=p;e.baseState=m;e.baseQueue=x;Bg(l);a.expirationTime=l;a.memoizedState=k;}} -function Cg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;by?(A=m,m=null):A=m.sibling;var q=x(e,m,h[y],k);if(null===q){null===m&&(m=A);break}a&& -m&&null===q.alternate&&b(e,m);g=f(q,g,y);null===t?l=q:t.sibling=q;t=q;m=A;}if(y===h.length)return c(e,m),l;if(null===m){for(;yy?(A=t,t=null):A=t.sibling;var D=x(e,t,q.value,l);if(null===D){null===t&&(t=A);break}a&&t&&null===D.alternate&&b(e,t);g=f(D,g,y);null===m?k=D:m.sibling=D;m=D;t=A;}if(q.done)return c(e,t),k;if(null===t){for(;!q.done;y++,q=h.next())q=p(e,q.value,l),null!==q&&(g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);return k}for(t=d(e,t);!q.done;y++,q=h.next())q=z(t,e,y,q.value,l),null!==q&&(a&&null!== -q.alternate&&t.delete(null===q.key?y:q.key),g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);a&&t.forEach(function(a){return b(e,a)});return k}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ab&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Za:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ab){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a, -k.sibling);d=e(k,f.props);d.ref=Pg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling;}f.type===ab?(d=Wg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Ug(f.type,f.key,f.props,null,a.mode,h),h.ref=Pg(a,d,f),h.return=a,a=h);}return g(a);case $a:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else {c(a,d);break}else b(a,d);d= -d.sibling;}d=Vg(f,a.mode,h);d.return=a;a=d;}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Tg(f,a.mode,h),d.return=a,a=d),g(a);if(Og(f))return ca(a,d,f,h);if(nb(f))return D(a,d,f,h);l&&Qg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||"Component"));}return c(a,d)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg}; -function ch(a){if(a===Zg)throw Error(u(174));return a}function dh(a,b){I(bh,b);I(ah,a);I($g,Zg);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ob(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Ob(b,a);}H($g);I($g,b);}function eh(){H($g);H(ah);H(bh);}function fh(a){ch(bh.current);var b=ch($g.current);var c=Ob(b,a.type);b!==c&&(I(ah,a),I($g,c));}function gh(a){ah.current===a&&(H($g),H(ah));}var M={current:0}; -function hh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===Bd||c.data===Cd))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return;}b.sibling.return=b.return;b=b.sibling;}return null}function ih(a,b){return {responder:a,props:b}} -var jh=Wa.ReactCurrentDispatcher,kh=Wa.ReactCurrentBatchConfig,lh=0,N=null,O=null,P=null,mh=!1;function Q(){throw Error(u(321));}function nh(a,b){if(null===b)return !1;for(var c=0;cf))throw Error(u(301));f+=1;P=O=null;b.updateQueue=null;jh.current=rh;a=c(d,e);}while(b.expirationTime===lh)}jh.current=sh;b=null!==O&&null!==O.next;lh=0;P=O=N=null;mh=!1;if(b)throw Error(u(300));return a} -function th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function uh(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null;}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else {if(null===a)throw Error(u(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a;}return P} -function vh(a,b){return "function"===typeof b?b(a):b} -function wh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g;}d.baseQueue=e=f;c.pending=null;}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.expirationTime;if(lN.expirationTime&& -(N.expirationTime=l,Bg(l));}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),Ag(l,k.suspenseConfig),d=k.eagerReducer===a?k.eagerState:a(d,k.action);k=k.next;}while(null!==k&&k!==e);null===h?f=d:h.next=g;$e(d,b.memoizedState)||(rg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d;}return [b.memoizedState,c.dispatch]} -function xh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(rg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f;}return [f,d]} -function yh(a){var b=th();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:a};a=a.dispatch=zh.bind(null,N,a);return [b.memoizedState,a]}function Ah(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a} -function Bh(){return uh().memoizedState}function Ch(a,b,c,d){var e=th();N.effectTag|=a;e.memoizedState=Ah(1|b,c,void 0,void 0===d?null:d);}function Dh(a,b,c,d){var e=uh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&nh(d,g.deps)){Ah(b,c,f,d);return}}N.effectTag|=a;e.memoizedState=Ah(1|b,c,f,d);}function Eh(a,b){return Ch(516,4,a,b)}function Fh(a,b){return Dh(516,4,a,b)}function Gh(a,b){return Dh(4,2,a,b)} -function Hh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null);};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null;}}function Ih(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Dh(4,2,Hh.bind(null,b,a),c)}function Jh(){}function Kh(a,b){th().memoizedState=[a,void 0===b?null:b];return a}function Lh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];c.memoizedState=[a,b];return a} -function Mh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Nh(a,b,c){var d=ag();cg(98>d?98:d,function(){a(!0);});cg(97\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),"select"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Md]=b;a[Nd]=d;ni(a,b,!1,!1);b.stateNode=a;g=pd(e,d);switch(e){case "iframe":case "object":case "embed":F("load", -a);h=d;break;case "video":case "audio":for(h=0;hd.tailExpiration&&1b)&&tj.set(a,b)));}} -function xj(a,b){a.expirationTimea?c:a;return 2>=a&&b!==a?0:a} -function Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=eg(yj.bind(null,a));else {var b=zj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else {var d=Gg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Tf&&Kf(c);}a.callbackExpirationTime= -b;a.callbackPriority=d;b=1073741823===b?eg(yj.bind(null,a)):dg(d,Bj.bind(null,a),{timeout:10*(1073741821-b)-$f()});a.callbackNode=b;}}} -function Bj(a,b){wj=0;if(b)return b=Gg(),Cj(a,b),Z(a),null;var c=zj(a);if(0!==c){b=a.callbackNode;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&c===U||Ej(a,c);if(null!==X){var d=W;W|=fj;var e=Fj();do try{Gj();break}catch(h){Hj(a,h);}while(1);ng();W=d;cj.current=e;if(S===hj)throw b=kj,Ej(a,c),xi(a,c),Z(a),b;if(null===X)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=S,T=null,d){case ti:case hj:throw Error(u(345));case ij:Cj(a,2=c){a.lastPingedTime=c;Ej(a,c);break}}f=zj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Hd(Jj.bind(null,a),e);break}Jj(a);break;case vi:xi(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ij(e));if(oj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Ej(a,c);break}e=zj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime= -d;break}1073741823!==mj?d=10*(1073741821-mj)-$f():1073741823===lj?d=0:(d=10*(1073741821-lj)-5E3,e=$f(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*bj(d/1960))-d,c=d?d=0:(e=g.busyDelayMs|0,f=$f()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10 component higher in the tree to provide a loading indicator or placeholder to display."+qb(g));}S!== -jj&&(S=ij);h=Ai(h,g);p=f;do{switch(p.tag){case 3:k=h;p.effectTag|=4096;p.expirationTime=b;var B=Xi(p,k,b);yg(p,B);break a;case 1:k=h;var w=p.type,ub=p.stateNode;if(0===(p.effectTag&64)&&("function"===typeof w.getDerivedStateFromError||null!==ub&&"function"===typeof ub.componentDidCatch&&(null===aj||!aj.has(ub)))){p.effectTag|=4096;p.expirationTime=b;var vb=$i(p,k,b);yg(p,vb);break a}}p=p.return;}while(null!==p)}X=Pj(X);}catch(Xc){b=Xc;continue}break}while(1)} -function Fj(){var a=cj.current;cj.current=sh;return null===a?sh:a}function Ag(a,b){awi&&(wi=a);}function Kj(){for(;null!==X;)X=Qj(X);}function Gj(){for(;null!==X&&!Uf();)X=Qj(X);}function Qj(a){var b=Rj(a.alternate,a,U);a.memoizedProps=a.pendingProps;null===b&&(b=Pj(a));dj.current=null;return b} -function Pj(a){X=a;do{var b=X.alternate;a=X.return;if(0===(X.effectTag&2048)){b=si(b,X,U);if(1===U||1!==X.childExpirationTime){for(var c=0,d=X.child;null!==d;){var e=d.expirationTime,f=d.childExpirationTime;e>c&&(c=e);f>c&&(c=f);d=d.sibling;}X.childExpirationTime=c;}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=X.firstEffect),null!==X.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=X.firstEffect),a.lastEffect=X.lastEffect),1a?b:a}function Jj(a){var b=ag();cg(99,Sj.bind(null,a,b));return null} -function Sj(a,b){do Dj();while(null!==rj);if((W&(fj|gj))!==V)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Ij(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime= -d-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===T&&(X=T=null,U=0);1h&&(l=h,h=g,g=l),l=vd(q,g),m=vd(q,h),l&&m&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==m.node||w.focusOffset!==m.offset)&&(B=B.createRange(),B.setStart(l.node,l.offset),w.removeAllRanges(),g>h?(w.addRange(B),w.extend(m.node,m.offset)):(B.setEnd(m.node,m.offset),w.addRange(B))))));B=[];for(w=q;w=w.parentNode;)1===w.nodeType&&B.push({element:w,left:w.scrollLeft, -top:w.scrollTop});"function"===typeof q.focus&&q.focus();for(q=0;q=c)return ji(a,b,c);I(M,M.current&1);b=$h(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return mi(a,b,c);b.effectTag|=64;}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current);if(!d)return null}return $h(a,b,c)}rg=!1;}}else rg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Cf(b,J.current);qg(b,c);e=oh(null, -b,d,a,e,c);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(L(d)){var f=!0;Gf(b);}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;ug(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Fg(b,d,g,a);e.updater=Jg;b.stateNode=e;e._reactInternalFiber=b;Ng(b,d,a,c);b=gi(null,b,d,!0,f,c);}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate= -null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;ob(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Xj(e);a=ig(e,a);switch(f){case 0:b=di(null,b,e,a,c);break a;case 1:b=fi(null,b,e,a,c);break a;case 11:b=Zh(null,b,e,a,c);break a;case 14:b=ai(null,b,e,ig(e.type,a),d,c);break a}throw Error(u(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),di(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),fi(a,b,d,e,c); -case 3:hi(b);d=b.updateQueue;if(null===a||null===d)throw Error(u(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;vg(a,b);zg(b,d,null,c);d=b.memoizedState.element;if(d===e)Xh(),b=$h(a,b,c);else {if(e=b.stateNode.hydrate)Ph=Jd(b.stateNode.containerInfo.firstChild),Oh=b,e=Qh=!0;if(e)for(c=Yg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),Xh();b=b.child;}return b;case 5:return fh(b),null===a&&Uh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps: -null,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),ei(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&Uh(b),null;case 13:return ji(a,b,c);case 4:return dh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Xg(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),Zh(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a, -b,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(jg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=$e(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=$h(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!== -k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=wg(c,null),l.tag=2,xg(h,l));h.expirationTime=b&&a<=b}function xi(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;cb||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0);} -function yi(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b));}function Cj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b;} -function bk(a,b,c,d){var e=b.current,f=Gg(),g=Dg.suspense;f=Hg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(dc(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return;}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=Ff(c,k,h);break a}}c=h;}else c=Af;null===b.context?b.context=c:b.pendingContext=c;b=wg(f,g);b.payload={element:a};d=void 0=== -d?null:d;null!==d&&(b.callback=d);xg(e,b);Ig(e,f);return f}function ck(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function dk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime= 48 && charCode <= 57) { - i++; - continue; - } - return false; - } - return true; -} -function escapePathComponent(path) { - if (path.indexOf("/") === -1 && path.indexOf("~") === -1) - return path; - return path.replace(/~/g, "~0").replace(/\//g, "~1"); -} -function unescapePathComponent(path) { - return path.replace(/~1/g, "/").replace(/~0/g, "~"); -} -function hasUndefined(obj) { - if (obj === void 0) { - return true; - } - if (obj) { - if (Array.isArray(obj)) { - for (var i = 0, len = obj.length; i < len; i++) { - if (hasUndefined(obj[i])) { - return true; - } - } - } else if (typeof obj === "object") { - var objKeys = _objectKeys(obj); - var objKeysLength = objKeys.length; - for (var i = 0; i < objKeysLength; i++) { - if (hasUndefined(obj[objKeys[i]])) { - return true; - } - } - } - } - return false; -} -function patchErrorMessageFormatter(message, args) { - var messageParts = [message]; - for (var key in args) { - var value = typeof args[key] === "object" ? JSON.stringify(args[key], null, 2) : args[key]; - if (typeof value !== "undefined") { - messageParts.push(key + ": " + value); - } - } - return messageParts.join("\n"); -} -var PatchError = function(_super) { - __extends(PatchError2, _super); - function PatchError2(message, name, index, operation, tree) { - var _newTarget = this.constructor; - var _this = _super.call(this, patchErrorMessageFormatter(message, {name, index, operation, tree})) || this; - _this.name = name; - _this.index = index; - _this.operation = operation; - _this.tree = tree; - Object.setPrototypeOf(_this, _newTarget.prototype); - _this.message = patchErrorMessageFormatter(message, {name, index, operation, tree}); - return _this; - } - return PatchError2; -}(Error); - -var JsonPatchError = PatchError; -var deepClone = _deepClone; -var objOps = { - add: function(obj, key, document) { - obj[key] = this.value; - return {newDocument: document}; - }, - remove: function(obj, key, document) { - var removed = obj[key]; - delete obj[key]; - return {newDocument: document, removed}; - }, - replace: function(obj, key, document) { - var removed = obj[key]; - obj[key] = this.value; - return {newDocument: document, removed}; - }, - move: function(obj, key, document) { - var removed = getValueByPointer(document, this.path); - if (removed) { - removed = _deepClone(removed); - } - var originalValue = applyOperation(document, {op: "remove", path: this.from}).removed; - applyOperation(document, {op: "add", path: this.path, value: originalValue}); - return {newDocument: document, removed}; - }, - copy: function(obj, key, document) { - var valueToCopy = getValueByPointer(document, this.from); - applyOperation(document, {op: "add", path: this.path, value: _deepClone(valueToCopy)}); - return {newDocument: document}; - }, - test: function(obj, key, document) { - return {newDocument: document, test: _areEquals(obj[key], this.value)}; - }, - _get: function(obj, key, document) { - this.value = obj[key]; - return {newDocument: document}; - } -}; -var arrOps = { - add: function(arr, i, document) { - if (isInteger(i)) { - arr.splice(i, 0, this.value); - } else { - arr[i] = this.value; - } - return {newDocument: document, index: i}; - }, - remove: function(arr, i, document) { - var removedList = arr.splice(i, 1); - return {newDocument: document, removed: removedList[0]}; - }, - replace: function(arr, i, document) { - var removed = arr[i]; - arr[i] = this.value; - return {newDocument: document, removed}; - }, - move: objOps.move, - copy: objOps.copy, - test: objOps.test, - _get: objOps._get -}; -function getValueByPointer(document, pointer) { - if (pointer == "") { - return document; - } - var getOriginalDestination = {op: "_get", path: pointer}; - applyOperation(document, getOriginalDestination); - return getOriginalDestination.value; -} -function applyOperation(document, operation, validateOperation, mutateDocument, banPrototypeModifications, index) { - if (validateOperation === void 0) { - validateOperation = false; - } - if (mutateDocument === void 0) { - mutateDocument = true; - } - if (banPrototypeModifications === void 0) { - banPrototypeModifications = true; - } - if (index === void 0) { - index = 0; - } - if (validateOperation) { - if (typeof validateOperation == "function") { - validateOperation(operation, 0, document, operation.path); - } else { - validator(operation, 0); - } - } - if (operation.path === "") { - var returnValue = {newDocument: document}; - if (operation.op === "add") { - returnValue.newDocument = operation.value; - return returnValue; - } else if (operation.op === "replace") { - returnValue.newDocument = operation.value; - returnValue.removed = document; - return returnValue; - } else if (operation.op === "move" || operation.op === "copy") { - returnValue.newDocument = getValueByPointer(document, operation.from); - if (operation.op === "move") { - returnValue.removed = document; - } - return returnValue; - } else if (operation.op === "test") { - returnValue.test = _areEquals(document, operation.value); - if (returnValue.test === false) { - throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document); - } - returnValue.newDocument = document; - return returnValue; - } else if (operation.op === "remove") { - returnValue.removed = document; - returnValue.newDocument = null; - return returnValue; - } else if (operation.op === "_get") { - operation.value = document; - return returnValue; - } else { - if (validateOperation) { - throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index, operation, document); - } else { - return returnValue; - } - } - } else { - if (!mutateDocument) { - document = _deepClone(document); - } - var path = operation.path || ""; - var keys = path.split("/"); - var obj = document; - var t = 1; - var len = keys.length; - var existingPathFragment = void 0; - var key = void 0; - var validateFunction = void 0; - if (typeof validateOperation == "function") { - validateFunction = validateOperation; - } else { - validateFunction = validator; - } - while (true) { - key = keys[t]; - if (banPrototypeModifications && key == "__proto__") { - throw new TypeError("JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README"); - } - if (validateOperation) { - if (existingPathFragment === void 0) { - if (obj[key] === void 0) { - existingPathFragment = keys.slice(0, t).join("/"); - } else if (t == len - 1) { - existingPathFragment = operation.path; - } - if (existingPathFragment !== void 0) { - validateFunction(operation, 0, document, existingPathFragment); - } - } - } - t++; - if (Array.isArray(obj)) { - if (key === "-") { - key = obj.length; - } else { - if (validateOperation && !isInteger(key)) { - throw new JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", index, operation, document); - } else if (isInteger(key)) { - key = ~~key; - } - } - if (t >= len) { - if (validateOperation && operation.op === "add" && key > obj.length) { - throw new JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", index, operation, document); - } - var returnValue = arrOps[operation.op].call(operation, obj, key, document); - if (returnValue.test === false) { - throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document); - } - return returnValue; - } - } else { - if (key && key.indexOf("~") != -1) { - key = unescapePathComponent(key); - } - if (t >= len) { - var returnValue = objOps[operation.op].call(operation, obj, key, document); - if (returnValue.test === false) { - throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document); - } - return returnValue; - } - } - obj = obj[key]; - } - } -} -function applyPatch(document, patch, validateOperation, mutateDocument, banPrototypeModifications) { - if (mutateDocument === void 0) { - mutateDocument = true; - } - if (banPrototypeModifications === void 0) { - banPrototypeModifications = true; - } - if (validateOperation) { - if (!Array.isArray(patch)) { - throw new JsonPatchError("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY"); - } - } - if (!mutateDocument) { - document = _deepClone(document); - } - var results = new Array(patch.length); - for (var i = 0, length_1 = patch.length; i < length_1; i++) { - results[i] = applyOperation(document, patch[i], validateOperation, true, banPrototypeModifications, i); - document = results[i].newDocument; - } - results.newDocument = document; - return results; -} -function applyReducer(document, operation, index) { - var operationResult = applyOperation(document, operation); - if (operationResult.test === false) { - throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document); - } - return operationResult.newDocument; -} -function validator(operation, index, document, existingPathFragment) { - if (typeof operation !== "object" || operation === null || Array.isArray(operation)) { - throw new JsonPatchError("Operation is not an object", "OPERATION_NOT_AN_OBJECT", index, operation, document); - } else if (!objOps[operation.op]) { - throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index, operation, document); - } else if (typeof operation.path !== "string") { - throw new JsonPatchError("Operation `path` property is not a string", "OPERATION_PATH_INVALID", index, operation, document); - } else if (operation.path.indexOf("/") !== 0 && operation.path.length > 0) { - throw new JsonPatchError('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID", index, operation, document); - } else if ((operation.op === "move" || operation.op === "copy") && typeof operation.from !== "string") { - throw new JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", index, operation, document); - } else if ((operation.op === "add" || operation.op === "replace" || operation.op === "test") && operation.value === void 0) { - throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", index, operation, document); - } else if ((operation.op === "add" || operation.op === "replace" || operation.op === "test") && hasUndefined(operation.value)) { - throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED", index, operation, document); - } else if (document) { - if (operation.op == "add") { - var pathLen = operation.path.split("/").length; - var existingPathLen = existingPathFragment.split("/").length; - if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) { - throw new JsonPatchError("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD", index, operation, document); - } - } else if (operation.op === "replace" || operation.op === "remove" || operation.op === "_get") { - if (operation.path !== existingPathFragment) { - throw new JsonPatchError("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE", index, operation, document); - } - } else if (operation.op === "move" || operation.op === "copy") { - var existingValue = {op: "_get", path: operation.from, value: void 0}; - var error = validate([existingValue], document); - if (error && error.name === "OPERATION_PATH_UNRESOLVABLE") { - throw new JsonPatchError("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE", index, operation, document); - } - } - } -} -function validate(sequence, document, externalValidator) { - try { - if (!Array.isArray(sequence)) { - throw new JsonPatchError("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY"); - } - if (document) { - applyPatch(_deepClone(document), _deepClone(sequence), externalValidator || true); - } else { - externalValidator = externalValidator || validator; - for (var i = 0; i < sequence.length; i++) { - externalValidator(sequence[i], i, document, void 0); - } - } - } catch (e) { - if (e instanceof JsonPatchError) { - return e; - } else { - throw e; - } - } -} -function _areEquals(a, b) { - if (a === b) - return true; - if (a && b && typeof a == "object" && typeof b == "object") { - var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key; - if (arrA && arrB) { - length = a.length; - if (length != b.length) - return false; - for (i = length; i-- !== 0; ) - if (!_areEquals(a[i], b[i])) - return false; - return true; - } - if (arrA != arrB) - return false; - var keys = Object.keys(a); - length = keys.length; - if (length !== Object.keys(b).length) - return false; - for (i = length; i-- !== 0; ) - if (!b.hasOwnProperty(keys[i])) - return false; - for (i = length; i-- !== 0; ) { - key = keys[i]; - if (!_areEquals(a[key], b[key])) - return false; - } - return true; - } - return a !== a && b !== b; -} - -var core = /*#__PURE__*/Object.freeze({ - __proto__: null, - JsonPatchError: JsonPatchError, - deepClone: deepClone, - getValueByPointer: getValueByPointer, - applyOperation: applyOperation, - applyPatch: applyPatch, - applyReducer: applyReducer, - validator: validator, - validate: validate, - _areEquals: _areEquals -}); - -/*! - * https://github.com/Starcounter-Jack/JSON-Patch - * (c) 2017 Joachim Wester - * MIT license - */ -var beforeDict = new WeakMap(); -var Mirror = function() { - function Mirror2(obj) { - this.observers = new Map(); - this.obj = obj; - } - return Mirror2; -}(); -var ObserverInfo = function() { - function ObserverInfo2(callback, observer) { - this.callback = callback; - this.observer = observer; - } - return ObserverInfo2; -}(); -function getMirror(obj) { - return beforeDict.get(obj); -} -function getObserverFromMirror(mirror, callback) { - return mirror.observers.get(callback); -} -function removeObserverFromMirror(mirror, observer) { - mirror.observers.delete(observer.callback); -} -function unobserve(root, observer) { - observer.unobserve(); -} -function observe(obj, callback) { - var patches = []; - var observer; - var mirror = getMirror(obj); - if (!mirror) { - mirror = new Mirror(obj); - beforeDict.set(obj, mirror); - } else { - var observerInfo = getObserverFromMirror(mirror, callback); - observer = observerInfo && observerInfo.observer; - } - if (observer) { - return observer; - } - observer = {}; - mirror.value = _deepClone(obj); - if (callback) { - observer.callback = callback; - observer.next = null; - var dirtyCheck = function() { - generate(observer); - }; - var fastCheck = function() { - clearTimeout(observer.next); - observer.next = setTimeout(dirtyCheck); - }; - if (typeof window !== "undefined") { - window.addEventListener("mouseup", fastCheck); - window.addEventListener("keyup", fastCheck); - window.addEventListener("mousedown", fastCheck); - window.addEventListener("keydown", fastCheck); - window.addEventListener("change", fastCheck); - } - } - observer.patches = patches; - observer.object = obj; - observer.unobserve = function() { - generate(observer); - clearTimeout(observer.next); - removeObserverFromMirror(mirror, observer); - if (typeof window !== "undefined") { - window.removeEventListener("mouseup", fastCheck); - window.removeEventListener("keyup", fastCheck); - window.removeEventListener("mousedown", fastCheck); - window.removeEventListener("keydown", fastCheck); - window.removeEventListener("change", fastCheck); - } - }; - mirror.observers.set(callback, new ObserverInfo(callback, observer)); - return observer; -} -function generate(observer, invertible) { - if (invertible === void 0) { - invertible = false; - } - var mirror = beforeDict.get(observer.object); - _generate(mirror.value, observer.object, observer.patches, "", invertible); - if (observer.patches.length) { - applyPatch(mirror.value, observer.patches); - } - var temp = observer.patches; - if (temp.length > 0) { - observer.patches = []; - if (observer.callback) { - observer.callback(temp); - } - } - return temp; -} -function _generate(mirror, obj, patches, path, invertible) { - if (obj === mirror) { - return; - } - if (typeof obj.toJSON === "function") { - obj = obj.toJSON(); - } - var newKeys = _objectKeys(obj); - var oldKeys = _objectKeys(mirror); - var deleted = false; - for (var t = oldKeys.length - 1; t >= 0; t--) { - var key = oldKeys[t]; - var oldVal = mirror[key]; - if (hasOwnProperty(obj, key) && !(obj[key] === void 0 && oldVal !== void 0 && Array.isArray(obj) === false)) { - var newVal = obj[key]; - if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null) { - _generate(oldVal, newVal, patches, path + "/" + escapePathComponent(key), invertible); - } else { - if (oldVal !== newVal) { - if (invertible) { - patches.push({op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal)}); - } - patches.push({op: "replace", path: path + "/" + escapePathComponent(key), value: _deepClone(newVal)}); - } - } - } else if (Array.isArray(mirror) === Array.isArray(obj)) { - if (invertible) { - patches.push({op: "test", path: path + "/" + escapePathComponent(key), value: _deepClone(oldVal)}); - } - patches.push({op: "remove", path: path + "/" + escapePathComponent(key)}); - deleted = true; - } else { - if (invertible) { - patches.push({op: "test", path, value: mirror}); - } - patches.push({op: "replace", path, value: obj}); - } - } - if (!deleted && newKeys.length == oldKeys.length) { - return; - } - for (var t = 0; t < newKeys.length; t++) { - var key = newKeys[t]; - if (!hasOwnProperty(mirror, key) && obj[key] !== void 0) { - patches.push({op: "add", path: path + "/" + escapePathComponent(key), value: _deepClone(obj[key])}); - } - } -} -function compare(tree1, tree2, invertible) { - if (invertible === void 0) { - invertible = false; - } - var patches = []; - _generate(tree1, tree2, patches, "", invertible); - return patches; -} - -var duplex = /*#__PURE__*/Object.freeze({ - __proto__: null, - unobserve: unobserve, - observe: observe, - generate: generate, - compare: compare -}); - -Object.assign({}, core, duplex, { - JsonPatchError: PatchError, - deepClone: _deepClone, - escapePathComponent: escapePathComponent, - unescapePathComponent: unescapePathComponent -}); - -export { PatchError as P, _deepClone as _, applyOperation as a, applyPatch as b, applyReducer as c, validate as d, escapePathComponent as e, _areEquals as f, getValueByPointer as g, unobserve as h, generate as i, compare as j, observe as o, unescapePathComponent as u, validator as v }; diff --git a/asd/_snowpack/pkg/common/index-6ed86a98.js b/asd/_snowpack/pkg/common/index-6ed86a98.js deleted file mode 100644 index 36af32d9f..000000000 --- a/asd/_snowpack/pkg/common/index-6ed86a98.js +++ /dev/null @@ -1,159 +0,0 @@ -function createCommonjsModule(fn, basedir, module) { - return module = { - path: basedir, - exports: {}, - require: function (path, base) { - return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); - } - }, fn(module, module.exports), module.exports; -} - -function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); -} - -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -/* eslint-disable no-unused-vars */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; - -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} - -var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; -}; - -var n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113,z=n?Symbol.for("react.memo"):60115,A=n?Symbol.for("react.lazy"): -60116,B="function"===typeof Symbol&&Symbol.iterator;function C(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cQ.length&&Q.push(a);} -function T(a,b,c,e){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0;}}if(g)return c(e,a,""===b?"."+U(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k ({ - clipboardData: event.clipboardData, - }), - composition: (event) => ({ - data: event.data, - }), - keyboard: (event) => ({ - altKey: event.altKey, - charCode: event.charCode, - ctrlKey: event.ctrlKey, - key: event.key, - keyCode: event.keyCode, - locale: event.locale, - location: event.location, - metaKey: event.metaKey, - repeat: event.repeat, - shiftKey: event.shiftKey, - which: event.which, - }), - mouse: (event) => ({ - altKey: event.altKey, - button: event.button, - buttons: event.buttons, - clientX: event.clientX, - clientY: event.clientY, - ctrlKey: event.ctrlKey, - metaKey: event.metaKey, - pageX: event.pageX, - pageY: event.pageY, - screenX: event.screenX, - screenY: event.screenY, - shiftKey: event.shiftKey, - }), - pointer: (event) => ({ - pointerId: event.pointerId, - width: event.width, - height: event.height, - pressure: event.pressure, - tiltX: event.tiltX, - tiltY: event.tiltY, - pointerType: event.pointerType, - isPrimary: event.isPrimary, - }), - touch: (event) => ({ - altKey: event.altKey, - ctrlKey: event.ctrlKey, - metaKey: event.metaKey, - shiftKey: event.shiftKey, - }), - ui: (event) => ({ - detail: event.detail, - }), - wheel: (event) => ({ - deltaMode: event.deltaMode, - deltaX: event.deltaX, - deltaY: event.deltaY, - deltaZ: event.deltaZ, - }), - animation: (event) => ({ - animationName: event.animationName, - pseudoElement: event.pseudoElement, - elapsedTime: event.elapsedTime, - }), - transition: (event) => ({ - propertyName: event.propertyName, - pseudoElement: event.pseudoElement, - elapsedTime: event.elapsedTime, - }), -}; - -const eventTypeCategories = { - clipboard: ["copy", "cut", "paste"], - composition: ["compositionend", "compositionstart", "compositionupdate"], - keyboard: ["keydown", "keypress", "keyup"], - mouse: [ - "click", - "contextmenu", - "doubleclick", - "drag", - "dragend", - "dragenter", - "dragexit", - "dragleave", - "dragover", - "dragstart", - "drop", - "mousedown", - "mouseenter", - "mouseleave", - "mousemove", - "mouseout", - "mouseover", - "mouseup", - ], - pointer: [ - "pointerdown", - "pointermove", - "pointerup", - "pointercancel", - "gotpointercapture", - "lostpointercapture", - "pointerenter", - "pointerleave", - "pointerover", - "pointerout", - ], - selection: ["select"], - touch: ["touchcancel", "touchend", "touchmove", "touchstart"], - ui: ["scroll"], - wheel: ["wheel"], - animation: ["animationstart", "animationend", "animationiteration"], - transition: ["transitionend"], -}; - -const eventTransforms = {}; - -Object.keys(eventTypeCategories).forEach((category) => { - eventTypeCategories[category].forEach((type) => { - eventTransforms[type] = eventCategoryTransforms[category]; - }); -}); - -function applyPatchInplace(doc, path, patch) { - if (!path) { - applyPatch(doc, patch); - } else { - applyPatch(doc, [ - { - op: "replace", - path: path, - value: applyPatch( - getValueByPointer(doc, path), - patch, - false, - false - ).newDocument, - }, - ]); - } -} - -function getPathProperty(obj, prop) { - // properties may be dot seperated strings - const path = prop.split("."); - const firstProp = path.shift(); - let value = obj[firstProp]; - for (let i = 0; i < path.length; i++) { - value = value[path[i]]; - } - return value; -} - -function joinUrl(base, tail) { - return tail.startsWith("./") - ? (base.endsWith("/") ? base.slice(0, -1) : base) + tail.slice(1) - : tail; -} - -const html = htm.bind(react.createElement); -const LayoutConfigContext = react.createContext({}); - -function mountLayout(mountElement, saveUpdateHook, sendEvent, importSourceUrl) { - reactDom.render( - html` - <${Layout} - saveUpdateHook=${saveUpdateHook} - sendEvent=${sendEvent} - importSourceUrl=${importSourceUrl} - /> - `, - mountElement - ); -} - -function Layout({ saveUpdateHook, sendEvent, importSourceUrl }) { - const [model, patchModel] = useInplaceJsonPatch({}); - - react.useEffect(() => saveUpdateHook(patchModel), [patchModel]); - - if (model.tagName) { - return html` - <${LayoutConfigContext.Provider} - value=${{ - sendEvent: sendEvent, - importSourceUrl: importSourceUrl, - }} - > - <${Element} model=${model} /> - - `; - } else { - return html`
`; - } -} - -function Element({ model }) { - if (model.importSource) { - return html`<${ImportedElement} model=${model} />`; - } else { - return html`<${StandardElement} model=${model} />`; - } -} - -function ImportedElement({ model }) { - const config = react.useContext(LayoutConfigContext); - const module = useLazyModule(model.importSource.source, config.importSourceUrl); - if (module) { - const cmpt = getPathProperty(module, model.tagName); - const children = elementChildren(model); - const attributes = elementAttributes(model, config.sendEvent); - return html`<${cmpt} ...${attributes}>${children}`; - } else { - const fallback = model.importSource.fallback; - if (!fallback) { - return html`
`; - } - switch (typeof fallback) { - case "object": - return html`<${Element} model=${fallback} />`; - case "string": - return html`
${fallback}
`; - } - } -} - -function StandardElement({ model }) { - const config = react.useContext(LayoutConfigContext); - const children = elementChildren(model); - const attributes = elementAttributes(model, config.sendEvent); - if (model.children && model.children.length) { - return html`<${model.tagName} ...${attributes}>${children}`; - } else { - return html`<${model.tagName} ...${attributes} />`; - } -} - -function elementChildren(model) { - if (!model.children) { - return []; - } else { - return model.children.map((child) => { - switch (typeof child) { - case "object": - return html`<${Element} model=${child} />`; - case "string": - return child; - } - }); - } -} - -function elementAttributes(model, sendEvent) { - const attributes = Object.assign({}, model.attributes); - - if (model.eventHandlers) { - Object.keys(model.eventHandlers).forEach((eventName) => { - const eventSpec = model.eventHandlers[eventName]; - attributes[eventName] = eventHandler(sendEvent, eventSpec); - }); - } - - return attributes; -} - -function eventHandler(sendEvent, eventSpec) { - return function () { - const data = Array.from(arguments).map((value) => { - if (typeof value === "object" && value.nativeEvent) { - if (eventSpec["preventDefault"]) { - value.preventDefault(); - } - if (eventSpec["stopPropagation"]) { - value.stopPropagation(); - } - return serializeEvent(value); - } else { - return value; - } - }); - new Promise((resolve, reject) => { - const msg = { - data: data, - target: eventSpec["target"], - }; - sendEvent(msg); - resolve(msg); - }); - }; -} - -function useLazyModule(source, sourceUrlBase = "") { - const [module, setModule] = react.useState(null); - if (!module) { - // use eval() to avoid weird build behavior by bundlers like Webpack - eval(`import("${joinUrl(sourceUrlBase, source)}")`).then(setModule); - } - return module; -} - -function useInplaceJsonPatch(doc) { - const ref = react.useRef(doc); - const forceUpdate = useForceUpdate(); - - const applyPatch = react.useCallback( - (path, patch) => { - applyPatchInplace(ref.current, path, patch); - forceUpdate(); - }, - [ref, forceUpdate] - ); - - return [ref.current, applyPatch]; -} - -function useForceUpdate() { - const [, updateState] = react.useState(); - return react.useCallback(() => updateState({}), []); -} - -export { mountLayout }; diff --git a/asd/_snowpack/pkg/import-map.json b/asd/_snowpack/pkg/import-map.json deleted file mode 100644 index b2752266b..000000000 --- a/asd/_snowpack/pkg/import-map.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "imports": { - "fast-json-patch": "./fast-json-patch.js", - "htm": "./htm.js", - "idom-client-react": "./idom-client-react.js", - "react": "./react.js", - "react-dom": "./react-dom.js" - } -} \ No newline at end of file diff --git a/asd/_snowpack/pkg/react-dom.js b/asd/_snowpack/pkg/react-dom.js deleted file mode 100644 index 0bb79b499..000000000 --- a/asd/_snowpack/pkg/react-dom.js +++ /dev/null @@ -1,18 +0,0 @@ -import { r as reactDom } from './common/index-21e68f69.js'; -export { r as __moduleExports, r as default } from './common/index-21e68f69.js'; -import './common/index-6ed86a98.js'; - - - -var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = reactDom.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; -var createPortal = reactDom.createPortal; -var findDOMNode = reactDom.findDOMNode; -var flushSync = reactDom.flushSync; -var hydrate = reactDom.hydrate; -var render = reactDom.render; -var unmountComponentAtNode = reactDom.unmountComponentAtNode; -var unstable_batchedUpdates = reactDom.unstable_batchedUpdates; -var unstable_createPortal = reactDom.unstable_createPortal; -var unstable_renderSubtreeIntoContainer = reactDom.unstable_renderSubtreeIntoContainer; -var version = reactDom.version; -export { __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, createPortal, findDOMNode, flushSync, hydrate, render, unmountComponentAtNode, unstable_batchedUpdates, unstable_createPortal, unstable_renderSubtreeIntoContainer, version }; diff --git a/asd/_snowpack/pkg/react.js b/asd/_snowpack/pkg/react.js deleted file mode 100644 index 1d7bd3491..000000000 --- a/asd/_snowpack/pkg/react.js +++ /dev/null @@ -1,34 +0,0 @@ -import { r as react } from './common/index-6ed86a98.js'; -export { r as __moduleExports, r as default } from './common/index-6ed86a98.js'; - - - -var Children = react.Children; -var Component = react.Component; -var Fragment = react.Fragment; -var Profiler = react.Profiler; -var PureComponent = react.PureComponent; -var StrictMode = react.StrictMode; -var Suspense = react.Suspense; -var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; -var cloneElement = react.cloneElement; -var createContext = react.createContext; -var createElement = react.createElement; -var createFactory = react.createFactory; -var createRef = react.createRef; -var forwardRef = react.forwardRef; -var isValidElement = react.isValidElement; -var lazy = react.lazy; -var memo = react.memo; -var useCallback = react.useCallback; -var useContext = react.useContext; -var useDebugValue = react.useDebugValue; -var useEffect = react.useEffect; -var useImperativeHandle = react.useImperativeHandle; -var useLayoutEffect = react.useLayoutEffect; -var useMemo = react.useMemo; -var useReducer = react.useReducer; -var useRef = react.useRef; -var useState = react.useState; -var version = react.version; -export { Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, cloneElement, createContext, createElement, createFactory, createRef, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, version }; diff --git a/asd/idom-logo-square-small.svg b/asd/idom-logo-square-small.svg deleted file mode 100644 index eb36c7b11..000000000 --- a/asd/idom-logo-square-small.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/asd/index.html b/asd/index.html deleted file mode 100644 index d6139ad21..000000000 --- a/asd/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - IDOM - - -
- - - diff --git a/asd/package-lock.json b/asd/package-lock.json deleted file mode 100644 index 837eedf2c..000000000 --- a/asd/package-lock.json +++ /dev/null @@ -1,591 +0,0 @@ -{ - "name": "idom-react-app", - "version": "0.1.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "idom-react-app", - "version": "0.1.0", - "license": "MIT", - "dependencies": { - "idom-client-react": "file:packages/idom-client-react", - "react": "^16.13.1", - "react-dom": "^16.13.1" - }, - "devDependencies": { - "prettier": "^2.2.1", - "snowpack": "^3.1.0-pre.11" - } - }, - "node_modules/big-integer": { - "version": "1.6.48", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", - "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/bplist-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", - "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", - "dev": true, - "dependencies": { - "big-integer": "^1.6.7" - } - }, - "node_modules/cli-spinners": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz", - "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/default-browser-id": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-2.0.0.tgz", - "integrity": "sha1-AezONxpx6F8VoXF354YwR+c9vn0=", - "dev": true, - "dependencies": { - "bplist-parser": "^0.1.0", - "pify": "^2.3.0", - "untildify": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esbuild": { - "version": "0.8.56", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.56.tgz", - "integrity": "sha512-PTMdAWK3JI2MNW811znGssGP5GR44tQPr++VQ1rPP0n8Z1cTKbCPD3S/kXPLr3ZZDIwAaVm08fuFym6Rp8l/0A==", - "dev": true, - "bin": { - "esbuild": "bin/esbuild" - } - }, - "node_modules/fast-json-patch": { - "version": "3.0.0-1", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.0.0-1.tgz", - "integrity": "sha512-6pdFb07cknxvPzCeLsFHStEy+MysPJPgZQ9LbQ/2O67unQF93SNqfdSqnPPl71YMHX+AD8gbl7iuoGFzHEdDuw==" - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/htm": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/htm/-/htm-3.0.4.tgz", - "integrity": "sha512-VRdvxX3tmrXuT/Ovt59NMp/ORMFi4bceFMDjos1PV4E0mV+5votuID8R60egR9A4U8nLt238R/snlJGz3UYiTQ==" - }, - "node_modules/idom-client-react": { - "resolved": "packages/idom-client-react", - "link": true - }, - "node_modules/is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - } - }, - "node_modules/is-docker": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", - "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, - "node_modules/react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", - "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - } - }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "node_modules/rollup": { - "version": "2.40.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.40.0.tgz", - "integrity": "sha512-WiOGAPbXoHu+TOz6hyYUxIksOwsY/21TRWoO593jgYt8mvYafYqQl+axaA8y1z2HFazNUUrsMSjahV2A6/2R9A==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=10.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.1" - } - }, - "node_modules/scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "node_modules/snowpack": { - "version": "3.1.0-pre.11", - "resolved": "https://registry.npmjs.org/snowpack/-/snowpack-3.1.0-pre.11.tgz", - "integrity": "sha512-2WFbmrEeMX605pm16NIYNhmimMICPiINGbcuE1OeDQizyUdBm4dhEgD1dn82Zyk/OBy0Cq47NFEH0xKYMorHWw==", - "dev": true, - "dependencies": { - "cli-spinners": "^2.5.0", - "default-browser-id": "^2.0.0", - "esbuild": "^0.8.7", - "open": "^7.0.4", - "resolve": "^1.20.0", - "rollup": "^2.34.0" - }, - "bin": { - "snowpack": "index.bin.js", - "sp": "index.bin.js" - }, - "engines": { - "node": ">=10.19.0" - }, - "optionalDependencies": { - "fsevents": "^2.2.0" - } - }, - "node_modules/untildify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-2.1.0.tgz", - "integrity": "sha1-F+soB5h/dpUunASF/DEdBqgmouA=", - "dev": true, - "dependencies": { - "os-homedir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "packages/idom-client-react": { - "version": "0.7.3", - "license": "MIT", - "dependencies": { - "fast-json-patch": "^3.0.0-1", - "htm": "^3.0.3" - }, - "devDependencies": { - "prettier": "^2.2.1" - }, - "peerDependencies": { - "react": "^16.13.1", - "react-dom": "^16.13.1" - } - } - }, - "dependencies": { - "big-integer": { - "version": "1.6.48", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", - "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==", - "dev": true - }, - "bplist-parser": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", - "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", - "dev": true, - "requires": { - "big-integer": "^1.6.7" - } - }, - "cli-spinners": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz", - "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==", - "dev": true - }, - "default-browser-id": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-2.0.0.tgz", - "integrity": "sha1-AezONxpx6F8VoXF354YwR+c9vn0=", - "dev": true, - "requires": { - "bplist-parser": "^0.1.0", - "pify": "^2.3.0", - "untildify": "^2.0.0" - } - }, - "esbuild": { - "version": "0.8.56", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.56.tgz", - "integrity": "sha512-PTMdAWK3JI2MNW811znGssGP5GR44tQPr++VQ1rPP0n8Z1cTKbCPD3S/kXPLr3ZZDIwAaVm08fuFym6Rp8l/0A==", - "dev": true - }, - "fast-json-patch": { - "version": "3.0.0-1", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.0.0-1.tgz", - "integrity": "sha512-6pdFb07cknxvPzCeLsFHStEy+MysPJPgZQ9LbQ/2O67unQF93SNqfdSqnPPl71YMHX+AD8gbl7iuoGFzHEdDuw==" - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "htm": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/htm/-/htm-3.0.4.tgz", - "integrity": "sha512-VRdvxX3tmrXuT/Ovt59NMp/ORMFi4bceFMDjos1PV4E0mV+5votuID8R60egR9A4U8nLt238R/snlJGz3UYiTQ==" - }, - "idom-client-react": { - "version": "file:packages/idom-client-react", - "requires": { - "fast-json-patch": "^3.0.0-1", - "htm": "^3.0.3", - "prettier": "^2.2.1" - } - }, - "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-docker": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", - "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", - "dev": true - }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "requires": { - "is-docker": "^2.0.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dev": true, - "requires": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", - "dev": true - }, - "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, - "react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - } - }, - "react-dom": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", - "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "rollup": { - "version": "2.40.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.40.0.tgz", - "integrity": "sha512-WiOGAPbXoHu+TOz6hyYUxIksOwsY/21TRWoO593jgYt8mvYafYqQl+axaA8y1z2HFazNUUrsMSjahV2A6/2R9A==", - "dev": true, - "requires": { - "fsevents": "~2.3.1" - } - }, - "scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "snowpack": { - "version": "3.1.0-pre.11", - "resolved": "https://registry.npmjs.org/snowpack/-/snowpack-3.1.0-pre.11.tgz", - "integrity": "sha512-2WFbmrEeMX605pm16NIYNhmimMICPiINGbcuE1OeDQizyUdBm4dhEgD1dn82Zyk/OBy0Cq47NFEH0xKYMorHWw==", - "dev": true, - "requires": { - "cli-spinners": "^2.5.0", - "default-browser-id": "^2.0.0", - "esbuild": "^0.8.7", - "fsevents": "^2.2.0", - "open": "^7.0.4", - "resolve": "^1.20.0", - "rollup": "^2.34.0" - } - }, - "untildify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-2.1.0.tgz", - "integrity": "sha1-F+soB5h/dpUunASF/DEdBqgmouA=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0" - } - } - } -} diff --git a/asd/package.json b/asd/package.json deleted file mode 100644 index c77b5d08f..000000000 --- a/asd/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "idom-react-app", - "description": "A client application for IDOM implemented in React", - "version": "0.1.0", - "author": "Ryan Morshead", - "main": "index.js", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/idom-team/idom" - }, - "scripts": { - "build": "snowpack build", - "format": "prettier --write ./src", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "devDependencies": { - "prettier": "^2.2.1", - "snowpack": "^3.1.0-pre.11" - }, - "dependencies": { - "idom-client-react": "file:packages/idom-client-react", - "react": "^16.13.1", - "react-dom": "^16.13.1" - } -} diff --git a/asd/packages/idom-client-react/README.md b/asd/packages/idom-client-react/README.md deleted file mode 100644 index b4366c5c4..000000000 --- a/asd/packages/idom-client-react/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# idom-client-react -A client for IDOM implemented in React diff --git a/asd/packages/idom-client-react/package-lock.json b/asd/packages/idom-client-react/package-lock.json deleted file mode 100644 index 30928efa9..000000000 --- a/asd/packages/idom-client-react/package-lock.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "idom-client-react", - "version": "0.7.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "fast-json-patch": { - "version": "3.0.0-1", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.0.0-1.tgz", - "integrity": "sha512-6pdFb07cknxvPzCeLsFHStEy+MysPJPgZQ9LbQ/2O67unQF93SNqfdSqnPPl71YMHX+AD8gbl7iuoGFzHEdDuw==" - }, - "htm": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/htm/-/htm-3.0.4.tgz", - "integrity": "sha512-VRdvxX3tmrXuT/Ovt59NMp/ORMFi4bceFMDjos1PV4E0mV+5votuID8R60egR9A4U8nLt238R/snlJGz3UYiTQ==" - }, - "prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", - "dev": true - } - } -} diff --git a/asd/packages/idom-client-react/package.json b/asd/packages/idom-client-react/package.json deleted file mode 100644 index 88020495d..000000000 --- a/asd/packages/idom-client-react/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "idom-client-react", - "description": "A client for IDOM implemented in React", - "version": "0.7.3", - "author": "Ryan Morshead", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/idom-team/idom" - }, - "main": "src/index.js", - "files": [ - "src/**/*.js" - ], - "scripts": { - "format": "prettier --print-width 88 --write ./src", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "devDependencies": { - "prettier": "^2.2.1" - }, - "dependencies": { - "fast-json-patch": "^3.0.0-1", - "htm": "^3.0.3" - }, - "peerDependencies": { - "react": "^16.13.1", - "react-dom": "^16.13.1" - } -} diff --git a/asd/packages/idom-client-react/src/event-to-object.js b/asd/packages/idom-client-react/src/event-to-object.js deleted file mode 100644 index 68d8aa896..000000000 --- a/asd/packages/idom-client-react/src/event-to-object.js +++ /dev/null @@ -1,135 +0,0 @@ -function serializeEvent(event) { - const data = {}; - if ("value" in event.target) { - data.value = event.target.value; - } - if (event.type in eventTransforms) { - Object.assign(data, eventTransforms[event.type](event)); - } - return data; -} - -const eventCategoryTransforms = { - clipboard: (event) => ({ - clipboardData: event.clipboardData, - }), - composition: (event) => ({ - data: event.data, - }), - keyboard: (event) => ({ - altKey: event.altKey, - charCode: event.charCode, - ctrlKey: event.ctrlKey, - key: event.key, - keyCode: event.keyCode, - locale: event.locale, - location: event.location, - metaKey: event.metaKey, - repeat: event.repeat, - shiftKey: event.shiftKey, - which: event.which, - }), - mouse: (event) => ({ - altKey: event.altKey, - button: event.button, - buttons: event.buttons, - clientX: event.clientX, - clientY: event.clientY, - ctrlKey: event.ctrlKey, - metaKey: event.metaKey, - pageX: event.pageX, - pageY: event.pageY, - screenX: event.screenX, - screenY: event.screenY, - shiftKey: event.shiftKey, - }), - pointer: (event) => ({ - pointerId: event.pointerId, - width: event.width, - height: event.height, - pressure: event.pressure, - tiltX: event.tiltX, - tiltY: event.tiltY, - pointerType: event.pointerType, - isPrimary: event.isPrimary, - }), - touch: (event) => ({ - altKey: event.altKey, - ctrlKey: event.ctrlKey, - metaKey: event.metaKey, - shiftKey: event.shiftKey, - }), - ui: (event) => ({ - detail: event.detail, - }), - wheel: (event) => ({ - deltaMode: event.deltaMode, - deltaX: event.deltaX, - deltaY: event.deltaY, - deltaZ: event.deltaZ, - }), - animation: (event) => ({ - animationName: event.animationName, - pseudoElement: event.pseudoElement, - elapsedTime: event.elapsedTime, - }), - transition: (event) => ({ - propertyName: event.propertyName, - pseudoElement: event.pseudoElement, - elapsedTime: event.elapsedTime, - }), -}; - -const eventTypeCategories = { - clipboard: ["copy", "cut", "paste"], - composition: ["compositionend", "compositionstart", "compositionupdate"], - keyboard: ["keydown", "keypress", "keyup"], - mouse: [ - "click", - "contextmenu", - "doubleclick", - "drag", - "dragend", - "dragenter", - "dragexit", - "dragleave", - "dragover", - "dragstart", - "drop", - "mousedown", - "mouseenter", - "mouseleave", - "mousemove", - "mouseout", - "mouseover", - "mouseup", - ], - pointer: [ - "pointerdown", - "pointermove", - "pointerup", - "pointercancel", - "gotpointercapture", - "lostpointercapture", - "pointerenter", - "pointerleave", - "pointerover", - "pointerout", - ], - selection: ["select"], - touch: ["touchcancel", "touchend", "touchmove", "touchstart"], - ui: ["scroll"], - wheel: ["wheel"], - animation: ["animationstart", "animationend", "animationiteration"], - transition: ["transitionend"], -}; - -const eventTransforms = {}; - -Object.keys(eventTypeCategories).forEach((category) => { - eventTypeCategories[category].forEach((type) => { - eventTransforms[type] = eventCategoryTransforms[category]; - }); -}); - -export default serializeEvent; diff --git a/asd/packages/idom-client-react/src/index.js b/asd/packages/idom-client-react/src/index.js deleted file mode 100644 index 9bc39624a..000000000 --- a/asd/packages/idom-client-react/src/index.js +++ /dev/null @@ -1,168 +0,0 @@ -import * as react from "../../../_snowpack/pkg/react.js"; -import * as reactDOM from "../../../_snowpack/pkg/react-dom.js"; -import htm from "../../../_snowpack/pkg/htm.js"; - -import serializeEvent from "./event-to-object.js"; - -import { applyPatchInplace, getPathProperty, joinUrl } from "./utils.js"; - -const html = htm.bind(react.createElement); -const LayoutConfigContext = react.createContext({}); - -export function mountLayout(mountElement, saveUpdateHook, sendEvent, importSourceUrl) { - reactDOM.render( - html` - <${Layout} - saveUpdateHook=${saveUpdateHook} - sendEvent=${sendEvent} - importSourceUrl=${importSourceUrl} - /> - `, - mountElement - ); -} - -export default function Layout({ saveUpdateHook, sendEvent, importSourceUrl }) { - const [model, patchModel] = useInplaceJsonPatch({}); - - react.useEffect(() => saveUpdateHook(patchModel), [patchModel]); - - if (model.tagName) { - return html` - <${LayoutConfigContext.Provider} - value=${{ - sendEvent: sendEvent, - importSourceUrl: importSourceUrl, - }} - > - <${Element} model=${model} /> - - `; - } else { - return html`
`; - } -} - -function Element({ model }) { - if (model.importSource) { - return html`<${ImportedElement} model=${model} />`; - } else { - return html`<${StandardElement} model=${model} />`; - } -} - -function ImportedElement({ model }) { - const config = react.useContext(LayoutConfigContext); - const module = useLazyModule(model.importSource.source, config.importSourceUrl); - if (module) { - const cmpt = getPathProperty(module, model.tagName); - const children = elementChildren(model); - const attributes = elementAttributes(model, config.sendEvent); - return html`<${cmpt} ...${attributes}>${children}`; - } else { - const fallback = model.importSource.fallback; - if (!fallback) { - return html`
`; - } - switch (typeof fallback) { - case "object": - return html`<${Element} model=${fallback} />`; - case "string": - return html`
${fallback}
`; - } - } -} - -function StandardElement({ model }) { - const config = react.useContext(LayoutConfigContext); - const children = elementChildren(model); - const attributes = elementAttributes(model, config.sendEvent); - if (model.children && model.children.length) { - return html`<${model.tagName} ...${attributes}>${children}`; - } else { - return html`<${model.tagName} ...${attributes} />`; - } -} - -function elementChildren(model) { - if (!model.children) { - return []; - } else { - return model.children.map((child) => { - switch (typeof child) { - case "object": - return html`<${Element} model=${child} />`; - case "string": - return child; - } - }); - } -} - -function elementAttributes(model, sendEvent) { - const attributes = Object.assign({}, model.attributes); - - if (model.eventHandlers) { - Object.keys(model.eventHandlers).forEach((eventName) => { - const eventSpec = model.eventHandlers[eventName]; - attributes[eventName] = eventHandler(sendEvent, eventSpec); - }); - } - - return attributes; -} - -function eventHandler(sendEvent, eventSpec) { - return function () { - const data = Array.from(arguments).map((value) => { - if (typeof value === "object" && value.nativeEvent) { - if (eventSpec["preventDefault"]) { - value.preventDefault(); - } - if (eventSpec["stopPropagation"]) { - value.stopPropagation(); - } - return serializeEvent(value); - } else { - return value; - } - }); - const sentEvent = new Promise((resolve, reject) => { - const msg = { - data: data, - target: eventSpec["target"], - }; - sendEvent(msg); - resolve(msg); - }); - }; -} - -function useLazyModule(source, sourceUrlBase = "") { - const [module, setModule] = react.useState(null); - if (!module) { - // use eval() to avoid weird build behavior by bundlers like Webpack - eval(`import("${joinUrl(sourceUrlBase, source)}")`).then(setModule); - } - return module; -} - -function useInplaceJsonPatch(doc) { - const ref = react.useRef(doc); - const forceUpdate = useForceUpdate(); - - const applyPatch = react.useCallback( - (path, patch) => { - applyPatchInplace(ref.current, path, patch); - forceUpdate(); - }, - [ref, forceUpdate] - ); - - return [ref.current, applyPatch]; -} - -function useForceUpdate() { - const [, updateState] = react.useState(); - return react.useCallback(() => updateState({}), []); -} diff --git a/asd/packages/idom-client-react/src/utils.js b/asd/packages/idom-client-react/src/utils.js deleted file mode 100644 index 1f3cedee4..000000000 --- a/asd/packages/idom-client-react/src/utils.js +++ /dev/null @@ -1,37 +0,0 @@ -import * as jsonpatch from "../../../_snowpack/pkg/fast-json-patch.js"; - -export function applyPatchInplace(doc, path, patch) { - if (!path) { - jsonpatch.applyPatch(doc, patch); - } else { - jsonpatch.applyPatch(doc, [ - { - op: "replace", - path: path, - value: jsonpatch.applyPatch( - jsonpatch.getValueByPointer(doc, path), - patch, - false, - false - ).newDocument, - }, - ]); - } -} - -export function getPathProperty(obj, prop) { - // properties may be dot seperated strings - const path = prop.split("."); - const firstProp = path.shift(); - let value = obj[firstProp]; - for (let i = 0; i < path.length; i++) { - value = value[path[i]]; - } - return value; -} - -export function joinUrl(base, tail) { - return tail.startsWith("./") - ? (base.endsWith("/") ? base.slice(0, -1) : base) + tail.slice(1) - : tail; -} diff --git a/asd/src/index.js b/asd/src/index.js deleted file mode 100644 index c6f1c269d..000000000 --- a/asd/src/index.js +++ /dev/null @@ -1,124 +0,0 @@ -import { mountLayout } from "../_snowpack/pkg/idom-client-react.js"; -import { unmountComponentAtNode } from "../_snowpack/pkg/react-dom.js"; - -const maxReconnectTimeout = 45; -const initialReconnectTimeoutRange = 5; - -const userPackages = import("./user-packages.js").then((module) => { - for (const pkgName in module.default) { - module.default[pkgName].then((pkg) => { - console.log(`Loaded module '${pkgName}'`); - }); - } -}); - -function defaultWebSocketEndpoint() { - const uri = document.location.hostname + ":" + document.location.port; - const url = (uri + document.location.pathname).split("/").slice(0, -1); - url[url.length - 1] = "stream"; - const secure = document.location.protocol === "https:"; - - let protocol; - if (secure) { - protocol = "wss:"; - } else { - protocol = "ws:"; - } - - return protocol + "//" + url.join("/") + "?" + queryParams.user.toString(); -} - -export function mountLayoutWithWebSocket( - element, - endpoint = defaultWebSocketEndpoint(), - importSourceURL = "./", - mountState = { - everMounted: false, - reconnectAttempts: 0, - reconnectTimeoutRange: initialReconnectTimeoutRange, - } -) { - const socket = new WebSocket(endpoint); - - let resolveUpdateHook = null; - let rejectUpdateHook = null; - const updateHookPromise = new Promise((resolve, reject) => { - resolveUpdateHook = resolve; - rejectUpdateHook = reject; - }); - - socket.onopen = (event) => { - console.log(`Connected.`); - if (mountState.everMounted) { - unmountComponentAtNode(element); - } - mountLayout( - element, - (updateHook) => resolveUpdateHook(updateHook), - (event) => socket.send(JSON.stringify(event)), - importSourceURL - ); - _setOpenMountState(mountState); - }; - - socket.onmessage = (event) => { - updateHookPromise.then((update) => { - const [pathPrefix, patch] = JSON.parse(event.data); - update(pathPrefix, patch); - }); - }; - - socket.onclose = (event) => { - if (!shouldReconnect()) { - console.log(`Connection lost.`); - return; - } - const reconnectTimeout = _nextReconnectTimeout(mountState); - console.log(`Connection lost, reconnecting in ${reconnectTimeout} seconds`); - setTimeout(function () { - mountState.reconnectAttempts++; - mountLayoutWithWebSocket(element, endpoint, importSourceURL, mountState); - }, reconnectTimeout * 1000); - }; -} - -function _setOpenMountState(mountState) { - mountState.everMounted = true; - mountState.reconnectAttempts = 0; - mountState.reconnectTimeoutRange = initialReconnectTimeoutRange; -} - -function _nextReconnectTimeout(mountState) { - const timeout = Math.floor(Math.random() * mountState.reconnectTimeoutRange); - mountState.reconnectTimeoutRange = - (mountState.reconnectTimeoutRange + 5) % maxReconnectTimeout; - if (mountState.reconnectAttempts == 3) { - window.alert( - "Server connection was lost. Attempts to reconnect are being made in the background." - ); - } - return timeout; -} - -function shouldReconnect() { - return queryParams.reserved.get("noReconnect") === null; -} - -const queryParams = (() => { - const reservedParams = new URLSearchParams(); - const userParams = new URLSearchParams(window.location.search); - - const reservedParamNames = ["noReconnect"]; - reservedParamNames.forEach((name) => { - const value = userParams.get(name); - if (value !== null) { - reservedParams.append(name, userParams.get(name)); - userParams.delete(name); - } - }); - - return { - reserved: reservedParams, - user: userParams, - }; -})(); diff --git a/asd/src/user-packages.js b/asd/src/user-packages.js deleted file mode 100644 index ff8b4c563..000000000 --- a/asd/src/user-packages.js +++ /dev/null @@ -1 +0,0 @@ -export default {};