UNPKG

reblendjs

Version:

ReblendJs uses Reactjs pradigm to build UI components, with isolated state for each components.

1 lines 65.3 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class e extends Error{constructor(e){super(e??"Null object not accepted")}}class t{static instance;static getInstance(){return new t}defaultConfigs={noDefering:!1,deferTimeout:0,noPreloader:!1,preloaderDeferTimeout:1e3,placeholderDeferTimeout:100,lazyComponentDeferTimeout:500,diffConfig:{keyThreshold:50,depthThreshold:3,treatInstancesAsEqual:[Node],excludeKeys:["ref"]}};configs=this.defaultConfigs;constructor(){if(t.instance)return t.instance;t.instance=this}update(e){return e&&Object.assign(this.configs,e),this.configs}reset(){this.configs=this.defaultConfigs}}function n(e,t){const o=[...t];if(o.length<=0||!e)return e;const r=o.shift();return r?n(e[r],o):e}const o=e=>e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)).substring(1),r=e=>{let t="";for(const[n,o]of Object.entries(e))t+=`${n}: ${void 0===o?"initial":o}; \n`;return t.trim()},a=e=>{const t=/([a-zA-Z-]+)\s*:\s*([^;]+)/g,n={};let o;for(;null!==(o=t.exec(e));){const e=o[1].trim(),t=o[2].trim();n[e]=t}return n};function i(e){return e.charAt(0).toUpperCase()+e.slice(1)}const s=(e=1234,t=9876)=>Math.floor(Math.random()*(t-e+1))+e,c=e=>{if("function"!=typeof e)return!1;try{if(Function.prototype.toString.call(e).startsWith("class"))return!1}catch(e){return!1}return!0},l=(e,t,n)=>{if(!e)return null;const o=Array.from(e),r=o.indexOf(t);return-1!==r?o.splice(r,1,n):o.push(n),e instanceof Set?new Set(o):o},d=()=>t.getInstance().configs,p=()=>d().noDefering,u="reblendcomponent",h="reblendwrapperforreactcomponent",f="reblendchildrenwrapperforreactcomponent";var m=Object.freeze({__proto__:null,CUSTOM_TAGNAME:"customTagName",REBLEND_CHILDREN_WRAPPER_FOR_REACT_COMPONENT:f,REBLEND_COMPONENT:u,REBLEND_WRAPPER_FOR_REACT_COMPONENT:h,appendChildren:(t,...n)=>{if(!t)throw new e;for(const e of n)t.appendChild(e);return t},capitalize:i,cssObjectFromString:a,cssString:r,donotDeffer:p,escapeRegExp:function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},getConfig:d,getDefinedValuesFrom:function(e){const t={};for(const n in e){const o=e[n];null!=o&&null!=o&&(t[n]=o)}return t},getObjectField:n,isCallable:c,objectEquals:function e(t,n){if(t===n)return!0;if("object"!=typeof t||null==t||"object"!=typeof n||null==n)return!1;const o=Object.keys(t),r=Object.keys(n);if(o.length!==r.length)return!1;for(const a of o)if(!r.includes(a)||!e(t[a],n[a]))return!1;return!0},rand:s,registerElement:function(e,t){if(!t)throw new Error("Element to register is null");const n=o(e);if(!customElements.get(n))try{customElements.define(n,t)}catch(e){console.warn(e.message)}return t},removeLastChild:t=>{if(!t)throw new e;return t.removeChild(t.lastChild)},replaceOrAddItemToList:l,shallowRemoveDuplicates:e=>{const t=new Set,n=e?.filter((e=>!(!e||t.has(e))&&(t.add(e),!0)));return n},snakeCase:o,spreadTo:(e,t)=>{if(!t||!e)return e;const n=Object.keys(t),o=Object.values(t);for(let t=0;t<n.length;t++){const r=n[t],a=o[t];e[r]=a}return e},sumField:function(e,...t){if(!e||Array.isArray(e)&&e.length<=0)return 0;let o=0;for(const r of e){let e=n(r,t);e&&("string"==typeof e&&(e=parseInt(e)),"number"==typeof e&&(o+=e))}return o}});class y{static instance;elementStyles={[`[${u}], [${h}], [${f}]`]:{display:"contents !important"}};styleElement;constructor(){if(y.instance)return y.instance;this.init(),y.instance=this}init(){this.styleElement=document.createElement("style"),document.head.appendChild(this.styleElement),this.refresh()}update(e,t){if(!e)throw new Error("Invalid query selector or style");const n="string"==typeof t?a(t):t;this.elementStyles[e]={...this.elementStyles[e],...n},this.refresh()}remove(e,t){this.elementStyles[e]&&delete this.elementStyles[e][t],this.refresh()}refresh(){const e=[];for(const[t,n]of Object.entries(this.elementStyles))e.push(`${t} {${r(n)}}\n\n`);this.styleElement.textContent=e.join("")}}const g={accept:"accept",acceptCharset:"accept-charset",accessKey:"accesskey",action:"action",allowFullScreen:"allowfullscreen",allowTransparency:"allowtransparency",alt:"alt",async:"async",autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",capture:"capture",cellPadding:"cellpadding",cellSpacing:"cellspacing",charSet:"charset",checked:"checked",cite:"cite",class:"class",classID:"classid",cols:"cols",colSpan:"colspan",contentEditable:"contenteditable",contextMenu:"contextmenu",controls:"controls",coords:"coords",crossOrigin:"crossorigin",data:"data",dateTime:"datetime",default:"default",defer:"defer",dir:"dir",disabled:"disabled",download:"download",draggable:"draggable",encType:"enctype",form:"form",formAction:"formaction",formEncType:"formenctype",formMethod:"formmethod",formNoValidate:"formnovalidate",formTarget:"formtarget",frameBorder:"frameborder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hrefLang:"hreflang",htmlFor:"for",httpEquiv:"http-equiv",id:"id",inputMode:"inputmode",integrity:"integrity",is:"is",keyParams:"keyparams",keyType:"keytype",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginHeight:"marginheight",marginWidth:"marginwidth",max:"max",maxLength:"maxlength",media:"media",mediaGroup:"mediagroup",method:"method",min:"min",minLength:"minlength",multiple:"multiple",muted:"muted",name:"name",nonce:"nonce",noValidate:"novalidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsInline:"playsinline",poster:"poster",preload:"preload",radioGroup:"radiogroup",readOnly:"readonly",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowSpan:"rowspan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",slot:"slot",span:"span",spellCheck:"spellcheck",src:"src",srcDoc:"srcdoc",srcLang:"srclang",srcSet:"srcset",start:"start",step:"step",style:"style",summary:"summary",tabIndex:"tabindex",target:"target",title:"title",translate:"translate",type:"type",useMap:"usemap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",referrerPolicy:"referrerpolicy",defaultChecked:"checked",defaultValue:"value",suppressContentEditableWarning:"suppresscontenteditablewarning",suppressHydrationWarning:"suppresshydrationwarning",about:"about",datatype:"datatype",inlist:"inlist",prefix:"prefix",property:"property",resource:"resource",typeof:"typeof",vocab:"vocab",itemProp:"itemprop",itemScope:"itemscope",itemType:"itemtype",itemID:"itemid",itemRef:"itemref",autoCapitalize:"autocapitalize",autoCorrect:"autocorrect",autoSave:"autosave",color:"color",results:"results",security:"security",unselectable:"unselectable",className:"class",dangerouslySetInnerHTML:{name:"innerHTML"},children:null,onCopy:"oncopy",oncopy:"oncopy",onCut:"oncut",oncut:"oncut",onPaste:"onpaste",onpaste:"onpaste",onCompositionEnd:"oncompositionend",oncompositionend:"oncompositionend",onCompositionStart:"oncompositionstart",oncompositionstart:"oncompositionstart",onCompositionUpdate:"oncompositionupdate",oncompositionupdate:"oncompositionupdate",onFocus:"onfocus",onfocus:"onfocus",onBlur:"onblur",onblur:"onblur",onChange:"onchange",onchange:"onchange",onInput:"oninput",oninput:"oninput",onReset:"onreset",onreset:"onreset",onSubmit:"onsubmit",onsubmit:"onsubmit",onInvalid:"oninvalid",oninvalid:"oninvalid",onLoad:"onload",onload:"onload",onError:"onerror",onerror:"onerror",onKeyDown:"onkeydown",onkeydown:"onkeydown",onKeyPress:"onkeypress",onkeypress:"onkeypress",onKeyUp:"onkeyup",onkeyup:"onkeyup",onAbort:"onabort",onabort:"onabort",onCanPlay:"oncanplay",oncanplay:"oncanplay",onCanPlayThrough:"oncanplaythrough",oncanplaythrough:"oncanplaythrough",onDurationChange:"ondurationchange",ondurationchange:"ondurationchange",onEmptied:"onemptied",onemptied:"onemptied",onEncrypted:"onencrypted",onencrypted:"onencrypted",onEnded:"onended",onended:"onended",onLoadedData:"onloadeddata",onloadeddata:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onloadedmetadata:"onloadedmetadata",onLoadStart:"onloadstart",onloadstart:"onloadstart",onPause:"onpause",onpause:"onpause",onPlay:"onplay",onplay:"onplay",onPlaying:"onplaying",onplaying:"onplaying",onProgress:"onprogress",onprogress:"onprogress",onRateChange:"onratechange",onratechange:"onratechange",onSeeked:"onseeked",onseeked:"onseeked",onSeeking:"onseeking",onseeking:"onseeking",onStalled:"onstalled",onstalled:"onstalled",onSuspend:"onsuspend",onsuspend:"onsuspend",onTimeUpdate:"ontimeupdate",ontimeupdate:"ontimeupdate",onVolumeChange:"onvolumechange",onvolumechange:"onvolumechange",onWaiting:"onwaiting",onwaiting:"onwaiting",onAuxClick:"onauxclick",onauxclick:"onauxclick",onClick:"onclick",onclick:"onclick",onContextMenu:"oncontextmenu",oncontextmenu:"oncontextmenu",onDoubleClick:"ondoubleclick",ondoubleclick:"ondoubleclick",onDrag:"ondrag",ondrag:"ondrag",onDragEnd:"ondragend",ondragend:"ondragend",onDragEnter:"ondragenter",ondragenter:"ondragenter",onDragExit:"ondragexit",ondragexit:"ondragexit",onDragLeave:"ondragleave",ondragleave:"ondragleave",onDragOver:"ondragover",ondragover:"ondragover",onDragStart:"ondragstart",ondragstart:"ondragstart",onDrop:"ondrop",ondrop:"ondrop",onMouseDown:"onmousedown",onmousedown:"onmousedown",onMouseEnter:"onmouseenter",onmouseenter:"onmouseenter",onMouseLeave:"onmouseleave",onmouseleave:"onmouseleave",onMouseMove:"onmousemove",onmousemove:"onmousemove",onMouseOut:"onmouseout",onmouseout:"onmouseout",onMouseOver:"onmouseover",onmouseover:"onmouseover",onMouseUp:"onmouseup",onmouseup:"onmouseup",onSelect:"onselect",onselect:"onselect",onTouchCancel:"ontouchcancel",ontouchcancel:"ontouchcancel",onTouchEnd:"ontouchend",ontouchend:"ontouchend",onTouchMove:"ontouchmove",ontouchmove:"ontouchmove",onTouchStart:"ontouchstart",ontouchstart:"ontouchstart",onPointerDown:"onpointerdown",onpointerdown:"onpointerdown",onPointerMove:"onpointermove",onpointermove:"onpointermove",onPointerUp:"onpointerup",onpointerup:"onpointerup",onPointerCancel:"onpointercancel",onpointercancel:"onpointercancel",onPointerEnter:"onpointerenter",onpointerenter:"onpointerenter",onPointerLeave:"onpointerleave",onpointerleave:"onpointerleave",onPointerOver:"onpointerover",onpointerover:"onpointerover",onPointerOut:"onpointerout",onpointerout:"onpointerout",onGotPointerCapture:"ongotpointercapture",ongotpointercapture:"ongotpointercapture",onLostPointerCapture:"onlostpointercapture",onlostpointercapture:"onlostpointercapture",onScroll:"onscroll",onscroll:"onscroll",onWheel:"onwheel",onwheel:"onwheel",onAnimationStart:"onanimationstart",onanimationstart:"onanimationstart",onAnimationEnd:"onanimationend",onanimationend:"onanimationend",onAnimationIteration:"onanimationiteration",onanimationiteration:"onanimationiteration",onTransitionEnd:"ontransitionend",ontransitionend:"ontransitionend",onAbortCapture:"onabortcapture",onCanPlayCapture:"oncanplaycapture",onCanPlayThroughCapture:"oncanplaythroughcapture",onDurationChangeCapture:"ondurationchangecapture",onEmptiedCapture:"onemptiedcapture",onEncryptedCapture:"onencryptedcapture",onEndedCapture:"onendedcapture",onLoadedDataCapture:"onloadeddatacapture",onLoadedMetadataCapture:"onloadedmetadatacapture",onLoadStartCapture:"onloadstartcapture",onPauseCapture:"onpausecapture",onPlayCapture:"onplaycapture",onPlayingCapture:"onplayingcapture",onProgressCapture:"onprogresscapture",onRateChangeCapture:"onratechangecapture",onSeekedCapture:"onseekedcapture",onSeekingCapture:"onseekingcapture",onStalledCapture:"onstalledcapture",onSuspendCapture:"onsuspendcapture",onTimeUpdateCapture:"ontimeupdatecapture",onVolumeChangeCapture:"onvolumechangecapture",onWaitingCapture:"onwaitingcapture",onAuxClickCapture:"onauxclickcapture",onClickCapture:"onclickcapture",onContextMenuCapture:"oncontextmenucapture",onDoubleClickCapture:"ondoubleclickcapture",onDragCapture:"ondragcapture",onDragEndCapture:"ondragendcapture",onDragEnterCapture:"ondragentercapture",onDragExitCapture:"ondragexitcapture",onDragLeaveCapture:"ondragleavecapture",onDragOverCapture:"ondragovercapture",onDragStartCapture:"ondragstartcapture",onDropCapture:"ondropcapture",onMouseDownCapture:"onmousedowncapture",onMouseEnterCapture:"onmouseentercapture",onMouseLeaveCapture:"onmouseleavecapture",onMouseMoveCapture:"onmousemovecapture",onMouseOutCapture:"onmouseoutcapture",onMouseOverCapture:"onmouseovercapture",onMouseUpCapture:"onmouseupcapture",onSelectCapture:"onselectcapture",onTouchCancelCapture:"ontouchcancelcapture",onTouchEndCapture:"ontouchendcapture",onTouchMoveCapture:"ontouchmovecapture",onTouchStartCapture:"ontouchstartcapture",onPointerDownCapture:"onpointerdowncapture",onPointerMoveCapture:"onpointermovecapture",onPointerUpCapture:"onpointerupcapture",onPointerCancelCapture:"onpointercancelcapture",onPointerEnterCapture:"onpointerentercapture",onPointerLeaveCapture:"onpointerleavecapture",onPointerOverCapture:"onpointerovercapture",onPointerOutCapture:"onpointeroutcapture",onGotPointerCaptureCapture:"ongotpointercapturecapture",onLostPointerCaptureCapture:"onlostpointercapturecapture",onScrollCapture:"onscrollcapture",onWheelCapture:"onwheelcapture",onAnimationStartCapture:"onanimationstartcapture",onAnimationEndCapture:"onanimationendcapture",onAnimationIterationCapture:"onanimationiterationcapture",onTransitionEndCapture:"ontransitionendcapture",accentHeight:"accent-height",accumulate:"accumulate",additive:"additive",alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicForm:"arabic-form",ascent:"ascent",attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:"azimuth",baseFrequency:"baseFrequency",baselineShift:"baseline-shift",baseProfile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcMode:"calcMode",capHeight:"cap-height",clip:"clip",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",decelerate:"decelerate",descent:"descent",diffuseConstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantBaseline:"dominant-baseline",dur:"dur",dx:"dx",dy:"dy",edgeMode:"edgeMode",elevation:"elevation",enableBackground:"enable-background",end:"end",exponent:"exponent",externalResourcesRequired:"externalResourcesRequired",fill:"fill",fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:"filter",filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:"focusable",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:"hanging",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:"ideographic",imageRendering:"image-rendering",in2:"in2",in:"in",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:"kerning",keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:"local",markerEnd:"marker-end",markerHeight:"markerHeight",markerMid:"marker-mid",markerStart:"marker-start",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:"mask",maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:"mathematical",mode:"mode",numOctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:"points",pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:"r",radius:"radius",refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:"restart",result:"result",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",seed:"seed",shapeRendering:"shape-rendering",slope:"slope",spacing:"spacing",specularConstant:"specularConstant",specularExponent:"specularExponent",speed:"speed",spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:"string",stroke:"stroke",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:"to",transform:"transform",u1:"u1",u2:"u2",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:"unicode",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",values:"values",vectorEffect:"vector-effect",version:"version",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",vHanging:"v-hanging",vIdeographic:"v-ideographic",viewBox:"viewBox",viewTarget:"viewTarget",visibility:"visibility",vMathematical:"v-mathematical",widths:"widths",wordSpacing:"word-spacing",writingMode:"writing-mode",x:"x",xHeight:"x-height",x1:"x1",x2:"x2",xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlns:"xmlns",xmlnsXlink:"xmlns:xlink",xmlSpace:"xml:space",y:"y",y1:"y1",y2:"y2",yChannelSelector:"yChannelSelector",z:"z",zoomAndPan:"zoomAndPan"},E=["value","checked","selected","disabled"],b=e=>{if(e.includes(":")||e.includes("data-"))return!0;const t=g[e];return!(!t||t instanceof Object||t.startsWith("on")||t.startsWith("aria")||E.includes(e))},C=e=>{const t=g[e];return void 0===t?e:t instanceof Object?t?.name||e:null===t||t.startsWith("aria-")?e:t.startsWith("on")?e.toLowerCase():t};var w,S,R;exports.ChildrenPropsUpdateType=void 0,(w=exports.ChildrenPropsUpdateType||(exports.ChildrenPropsUpdateType={}))[w.NON_CHILDREN=0]="NON_CHILDREN",w[w.CHILDREN=1]="CHILDREN",exports.PatchTypeAndOrder=void 0,(S=exports.PatchTypeAndOrder||(exports.PatchTypeAndOrder={}))[S.NONE=0]="NONE",S[S.REMOVE=1]="REMOVE",S[S.TEXT=2]="TEXT",S[S.CREATE=3]="CREATE",S[S.REPLACE=4]="REPLACE",S[S.UPDATE=5]="UPDATE",exports.EffectType=void 0,(R=exports.EffectType||(exports.EffectType={})).BEFORE="BEFORE",R.AFTER="AFTER";const v="ReblendPrimitive",A={ReblendNode:Symbol("Reblend.Node"),ReblendVNode:Symbol("Reblend.VNode"),ReblendLazyNode:Symbol("Reblend.Lazy.Node"),ReblendLazyVNode:Symbol("Reblend.Lazy.VNode"),ReactToReblendNode:Symbol("React.Reblend.Node"),ReactToReblendVNode:Symbol("React.Reblend.VNode"),ReblendNodeStandard:Symbol("Reblend.Node.Standard"),ReblendVNodeStandard:Symbol("Reblend.VNode.Standard")};var T;function N(e,t){const n=A[e];return!(!t||!n)&&(t[n]=!0,t[n])}function O(e){return e&&"object"==typeof e&&e[A.ReblendNode]}function P(e){return e&&"object"==typeof e&&e[A.ReblendVNode]}function x(e){return e&&"object"==typeof e&&e[A.ReblendLazyVNode]}function k(e){return e&&"object"==typeof e&&e[A.ReblendNodeStandard]}function _(e){return e&&"object"==typeof e&&e[A.ReblendVNodeStandard]}function L(e){return e&&"object"==typeof e&&e[A.ReactToReblendNode]}function M(e){return e&&"object"==typeof e&&e[A.ReactToReblendVNode]}function D(e){return!I(e)&&e.displayName===v}function I(e){const t=typeof e;return["string","number","boolean","bigint","null","undefined","symbol"].some((n=>n===(null===e?"null":t)))}function j(e){return e&&("object"==typeof e||"function"==typeof e)&&!("construct"in e&&"mountOn"in e&&"createInnerHtmlElements"in e.prototype)&&("$$typeof"in e||e.prototype&&e.prototype.isReactComponent)}function z(e){return e&&"object"==typeof e&&e instanceof Promise}function U(e){return!!e&&(k(e)||D(e))}function F(e){return e?.nodeType===Node.TEXT_NODE}function V(e){return null==e}function H(e,t){const n=Object.getPrototypeOf(t);n&&n!==Object.prototype&&H(e,n);const o=Object.getOwnPropertyDescriptors(t);for(const t in o)if(Object.prototype.hasOwnProperty.call(o,t)){if("constructor"===t)continue;const n=o[t];Object.defineProperty(e,t,n)}}function G(e){if(!e)return[];e instanceof Set||Array.isArray(e)||(e=[e]);const t=[];for(const n of e)n instanceof Set||Array.isArray(n)?t.push(...G(n)):t.push(n);return t}function W(e,t=[]){if(!e)return[];if(Array.isArray(e)||(e=[e]),(e.length||e.size)<1)return[];for(const n of e)n instanceof Set||Array.isArray(n)?W(n,t):t.push(n);return t}!function(e){e.ReblendNode="ReblendNode",e.ReblendVNode="ReblendVNode",e.ReblendLazyNode="ReblendLazyNode",e.ReblendLazyVNode="ReblendLazyVNode",e.ReactToReblendNode="ReactToReblendNode",e.ReactToReblendVNode="ReactToReblendVNode",e.ReblendNodeStandard="ReblendNodeStandard",e.ReblendVNodeStandard="ReblendVNodeStandard"}(T||(T={}));const B={ReblendPlaceholder:!0,defaultReblendPlaceholderStyle:!0};function q(e,t){const n=[],o=["displaystyle","scriptlevel","mathvariant","mathsize","lspace","rspace"];for(const[r,a]of Object.entries(t))r.startsWith("xmlns:")?e.setAttributeNS("http://www.w3.org/2000/xmlns/",r,a):"xmlns"===r?e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",a):e instanceof SVGElement&&n.includes(r)?e.setAttributeNS("http://www.w3.org/2000/svg",r,a):e instanceof Element&&o.includes(r)?e.setAttributeNS("http://www.w3.org/1998/Math/MathML",r,a):r.startsWith("xlink:")?e.setAttributeNS("http://www.w3.org/1999/xlink",r,a):e.setAttribute(r,a)}async function Y(e,t=[]){if(!e)return t;e instanceof Set||Array.isArray(e)||(e=[e]);for(const o of e instanceof Set?Array.from(e):e)if(Array.isArray(o))await Y(o,t);else if(!I(o)&&"construct"in o&&"mountOn"in o&&"createInnerHtmlElements"in o.prototype)await Y(fe.construct(o,{}),t);else{if(!(c(o)||o instanceof me||o instanceof Node||I(o)||M(o)||z(o)||x(o)||P(o)||(n=o,n&&"object"==typeof n&&n[A.ReblendVNodeStandard])))throw new TypeError("Invalid child node in children");{const e=G(await X(o));e&&t.push(...e)}}var n;return t}async function X(e){if(e instanceof me||e instanceof Node)return e.displayName||(e.displayName=i(e.tagName),H(e,me.prototype),N(T.ReblendNodeStandard,e),e._constructor()),[e];if(Array.isArray(e))return await Y(e);if(I(e))return[$()?.setData(e)];c(e)&&(e=e({}));const t=e;if("construct"in t&&"mountOn"in t&&"createInnerHtmlElements"in t.prototype)return await Y(fe.construct(t,{}));let{displayName:n}=e;c(n)&&(n=await n(e.props));const o=n;if(n instanceof me||n instanceof Node)return o.displayName||(o.displayName=i(o.tagName),H(o,me.prototype),N(T.ReblendNodeStandard,o),o._constructor()),e?.props&&(o.props||(o.props={}),o.props={...o.props,...e.props}),[o];if(_(o)||P(o)||M(o)||M(o)||x(o))return e?.props&&(o.props||(o.props={}),o.props={...o.props,...e.props}),await X(o);let r=n;const a="string"==typeof n,s=j(n),l=z(e)||z(n);let p;if(p=l?T.ReblendLazyNode:a?n:j(r)?r.displayName:"Fragment"===r?.ELEMENT_NAME?r.name:r?.ELEMENT_NAME||"Anonymous",!a&&!l){if("Reblend"===n?.ELEMENT_NAME&&"Reblend"===n?.name)return[...n?.children||[]];r.ELEMENT_NAME=p}s&&(r=ue,r.ELEMENT_NAME=i(`${n.displayName}`));const f=["svg","path","circle","rect","line","text","use","g","defs","clipPath","polygon","polyline","image","symbol"].includes(m=a?n:"div")?document.createElementNS("http://www.w3.org/2000/svg",m):["math","mi","mn","mo","ms","mtext"].includes(m)?document.createElementNS("http://www.w3.org/1998/Math/MathML",m):["xml","xmlns"].includes(m)?document.createElementNS("http://www.w3.org/XML/1998/namespace",m):document.createElement(m);var m;let y;if(y=l?T.ReblendLazyNode:s?T.ReactToReblendNode:a?T.ReblendNodeStandard:T.ReblendNode,N(y,f),f.displayName=p,a||s)H(f,me.prototype);else{const t=l?e?.config:r.config;H(f,l?me.prototype:r.prototype),t&&Object.entries(t).forEach((([e,t])=>{B[e]?f[e]=t:console.warn(`Unsupported key \`${e}\` found in component configuration.`)}))}if(l&&(f.initState=(async()=>await(n||e)).bind(f)),s&&(f.ReactClass=n,H(f,ue.prototype)),f._constructor(),!a){const e=process.env.REBLEND_ENVIRONEMENT_PRODUCTION;s?f.setAttribute(h,e?"":p):f.setAttribute(u,e?"":p)}if(a&&"ref"in e.props&&e.props.ref){const t=e.props.ref;"function"==typeof t?t(f):t.current=f,f.ref=t}if(e?.props?.isPlaceholder||f.isPlaceholder||U(f)||s)await Z(e.props,f,!0),await f.populateHtmlElements();else{const t=async()=>{const t=await Z(l?{}:e.props,f,!0);void 0!==t&&(f.html=async()=>fe.construct(t,l?e.props:{})),f.awaitingInitState&&(f.awaitingInitState=!1,ie(f))},n=d();n.noDefering?await t():l?(f.initStateRunning=!0,setTimeout((()=>{t()}),n.lazyComponentDeferTimeout)):t()}return[f]}function $(){const e=document.createTextNode("");return H(e,me.prototype),e.displayName=v,e.setData=function(e){if(this.reblendPrimitiveData=e,void 0!==this.reblendPrimitiveData&&null!==this.reblendPrimitiveData){const e=`${this.reblendPrimitiveData}`;this.nodeValue=e}else this.nodeValue="";return this},e.getData=function(){return this.reblendPrimitiveData},e}function K(e,t){return n=>{if(t)if("function"==typeof t)t.call(e,n);else{if("string"!=typeof t)throw new Error("Event callback must be a function or a string, but received: "+typeof t);new Function("e",t).call(e,n)}}}async function Z(e,t,n){if(!t)return;if(n&&t.initProps?await t.initProps(e):t.props={...t.props||{},...e||{}},k(t))for(const n in e){const o=C(n),r=e[n];if("dangerouslySetInnerHTML"==n)t.innerHTML=r?.__html;else if(n.startsWith("on"))t[o]=K(t,r);else if("style"===o)t.addStyle(r);else{const e=b(o);try{e?q(t,{[o]:r}):t[o]=r}catch{}}}let o;return n&&t.initState&&(t.initStateRunning=!0,o=await t.initState(),t.initStateRunning=!1),o}function J(e,t){if(e&&t){t.props={...t.props,...e};for(const n in e){const o=C(n),r=b(n);try{r?(t.removeAttribute(o),delete t?.props[o]):(t[o]=e[n],delete t[o])}catch{}}}}function Q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ee,te={};var ne=function(){if(ee)return te;function e(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function t(n,o,r={}){if(e(n)&&e(o))return n===o;if("function"==typeof n&&"function"==typeof o)return function(e,t,n){if(e===t)return!0;if(e.name&&t.name&&e.name!==t.name)return!1;if(e.toString()!==t.toString())return!1;if(!n(Object.getPrototypeOf(e),Object.getPrototypeOf(t)))return!1;const o=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];if(!n(o,[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)]))return!1;for(const r of o)if(!n(e[r],t[r]))return!1;return!0}(n,o,t);if(n===o)return!0;if(e(n)||e(o)||n?.constructor!==o?.constructor)return!1;if("undefined"!=typeof Node&&n instanceof Node&&o instanceof Node)return!0;if(r.shouldIgnoreObject?.(n))return!0;const a=[{a:n,b:o,depth:0}],i=new WeakMap;for(;a.length;){const{a:t,b:n,depth:o}=a.pop();if(t===n)continue;if(e(t)||e(n)||t?.constructor!==n?.constructor)return!1;if("undefined"!=typeof Node&&t instanceof Node&&n instanceof Node)continue;if(i.has(t)){if(i.get(t)!==n)return!1;continue}i.set(t,n);const s=Object.keys(t).filter((e=>"ref"!==e&&!r.shouldIgnoreKey?.(e,t,n))),c=Object.keys(n).filter((e=>"ref"!==e&&!r.shouldIgnoreKey?.(e,t,n)));if(r.keyThreshold&&(s.length>r.keyThreshold||c.length>r.keyThreshold)){if(t!==n)return!1}else if(r.depthThreshold&&o>r.depthThreshold){if(t!==n)return!1}else{if(s.length!==c.length)return!1;for(const e of s){if(!Object.prototype.hasOwnProperty.call(n,e))return!1;a.push({a:t[e],b:n[e],depth:o+1})}}}return!0}return ee=1,Object.defineProperty(te,"__esModule",{value:!0}),te.deepEqualIterative=t,te.default=t,te}(),oe=Q(ne);async function re(e){I(e)||(e.disconnectedCallback?p()?await e.disconnectedCallback():e.disconnectedCallback():(e.parentElement&&(e.outerHTML=""),e.innerHTML="",e?.remove()))}async function ae(e){if(!I(e))for(const t of new Set([...e.childNodes,...e.elementChildren?.values()||[]]))p()?await re(t):re(t)}async function ie(e){e&&e.connectedCallback&&await e.connectedCallback()}async function se(e,t){let n=t;Array.isArray(e)||(e=[e]);const o=document.createDocumentFragment();for(const r of e)t.directParent&&!t.directParent.elementChildren?.has(r)&&(t.directParent.elementChildren||(t.directParent.elementChildren=new Set),t.directParent.elementChildren=l(t.directParent.elementChildren,n,r)),o.appendChild(r),p()?await ie(r):ie(r),n=r;t.after(o),t.remove(),t.directParent?.elementChildren?.delete(t)}function ce(e,t,n){const o=[];return!I(t)&&Object.hasOwn(t,"reblendPrimitiveData")&&t.reblendPrimitiveData==n?[]:(t?n||o.push({type:exports.PatchTypeAndOrder.REMOVE,parent:e,oldNode:t}):o.push({type:exports.PatchTypeAndOrder.CREATE,parent:e,newNode:n}),o)}function le(e,t,n){const o=[];if(c(n))return o.push({type:exports.PatchTypeAndOrder.REPLACE,parent:e,newNode:n,oldNode:t}),o;if(I(t)&&I(n))o.push({type:exports.PatchTypeAndOrder.CREATE,parent:e,newNode:n});else if(I(t)&&!I(n))o.push({type:exports.PatchTypeAndOrder.CREATE,parent:e,newNode:n});else if(D(t)&&I(n))t.getData()!==n&&t.setData(n);else if(D(t)&&!I(n))o.push({type:exports.PatchTypeAndOrder.REPLACE,parent:e,newNode:n,oldNode:t});else if(F(t)&&I(n))t.textContent!==n&&o.push({type:exports.PatchTypeAndOrder.TEXT,newNode:n,oldNode:t});else if(F(t)&&!I(n))o.push({type:exports.PatchTypeAndOrder.REPLACE,parent:e,newNode:n,oldNode:t});else if(!D(t)&&I(n))o.push({type:exports.PatchTypeAndOrder.REPLACE,parent:e,newNode:n,oldNode:t});else if(V(t)&&!V(n))o.push({type:exports.PatchTypeAndOrder.CREATE,parent:e,newNode:n});else if(!V(t)&&V(n))o.push({type:exports.PatchTypeAndOrder.REMOVE,parent:e,oldNode:t});else if(t?.props?.key!==n?.props?.key)o.push({type:exports.PatchTypeAndOrder.REPLACE,parent:e,newNode:n,oldNode:t});else if("displayName"in t&&"displayName"in n){const r=t.displayName.toLowerCase();let a="";if(I(n.displayName)?a=n.displayName:n.displayName.ELEMENT_NAME?a=n.displayName.ELEMENT_NAME:n.displayName.displayName&&(a=n.displayName.displayName),a="string"==typeof a?a?.toLowerCase():"",c(n.displayName)||r&&a&&r!==a)o.push({type:exports.PatchTypeAndOrder.REPLACE,parent:e,newNode:n,oldNode:t});else{const e=function(e,t){const n=["key","children","ref"],o=[],r=t?.props||{},a={...r,...e?.props||{}},i=O(t),s=d().diffConfig||void 0;for(const e in a)if(!n.includes(e)||"children"===e&&i){let n=r[e],i=a[e];(!oe(n,i,"children"===e?{...s,depthThreshold:void 0,keyThreshold:void 0}:s)||"select"===t.displayName&&"value"===e&&t.value!==i)&&(n=null,i=null,o.push({type:"UPDATE",node:t,key:e,propValue:a[e]}))}for(const e in r)(!n.includes(e)||"children"===e&&i)&&(e in a||o.push({type:"REMOVE",node:t,key:e,propValue:void 0}));return o}(n,t);e&&e.length>0&&o.push({type:exports.PatchTypeAndOrder.UPDATE,patches:e}),t.childrenInitialize&&o.push(...function(e,t,n){if(!U(t)&&!L(t))return[];const o=[...t.elementChildren?.values()||[]],r=G(n?.props?.children||[]),a=[],i=Math.max(o.length,r.length);for(let t=0;t<i;t++){const n=o[t],i=r[t];void 0===n||void 0===i?a.push(...ce(e,n,i)):a.push(...le(e,n,i))}t?.props&&(t.props.children=r);return a}(t,t,n))}}return o}async function de(e){const t=Array.isArray(e)?e.flat():e||[],n=new Map,o=new Map,r=new Set,a=new Set,i=d();t.forEach((({type:e,node:t,key:i,propValue:s})=>{"UPDATE"===e?(n.has(t)||n.set(t,{}),n.get(t)[i]=s):"REMOVE"===e&&(o.has(t)||o.set(t,new Set),o.get(t).add(i)),L(t)?("children"===i?t.childrenPropsUpdate?.add(exports.ChildrenPropsUpdateType.CHILDREN):t.childrenPropsUpdate?.add(exports.ChildrenPropsUpdateType.NON_CHILDREN),r.add(t)):O(t)&&t.attached&&a.add(t)}));for(const[e,t]of n.entries())Z(t,e,!1);for(const[e,t]of o.entries()){const n={};for(const e of t)n[e]=void 0;J(n,e)}for(const e of r)e?.checkPropsChange();if(a.size>0)if(i.noDefering)for(const e of a)await e.onStateChange();else setTimeout((()=>{for(const e of a)e.onStateChange()}),i.deferTimeout)}async function pe(e,t,n){n&&(e.directParent?.elementChildren?.delete(e),e.remove()),p()?(await t(),await re(e)):t().then((()=>requestIdleCallback((()=>{re(e)}))))}class ue{static async getChildrenWrapperForReact(e){let t;try{t=require("react")}catch(e){throw new Error("React is not available. Please ensure React is properly installed.")}const n=Array.from(e).map((e=>{const n=L(e),o=O(e),r=D(e),a=n||o?"div":r?"span":e.displayName;return t.createElement(a,{[f]:e.displayName||"",...void 0!==e.props?.value?{value:e.props.value}:{},ref:async t=>{t?t.contains(e)||(t.appendChild(e),e.attached||ie(e)):e.remove()}},null)}));return n?.length&&n.length<2?n.pop():n}html(){return this.props.children}async checkPropsChange(){for(const e of Array.from(this.childrenPropsUpdate||[]).sort())switch(this.childrenPropsUpdate?.delete(e),e){case exports.ChildrenPropsUpdateType.CHILDREN:await this.onStateChange();break;case exports.ChildrenPropsUpdateType.NON_CHILDREN:this.reactReblendMount();break;default:throw new Error("Invalid props update type provided")}}async initRoot(){try{const e=require("react-dom/client");this.reactDomCreateRoot_root&&Object.values(this.reactDomCreateRoot_root)[0]||(this.reactDomCreateRoot_root=e.createRoot(this))}catch(e){throw new Error("ReactDOM is not available. Please ensure React and ReactDOM are properly installed.")}}async reactReblendMount(){let e;try{e=require("react")}catch(e){throw new Error("React is not available. Please ensure React is properly installed.")}if(!this.ReactClass)return;const t=this.props?.children&&this.props?.children?.length?await ue.getChildrenWrapperForReact(this.elementChildren):void 0;await this.initRoot();const n={...this.props};void 0!==n.children&&delete n.children,this.reactDomCreateRoot_root?.render(e.createElement(this.ReactClass,n,...Array.isArray(t)?t:t?[t]:[]))}cleanUp(){this.reactDomCreateRoot_root?.unmount(),this.reactDomCreateRoot_root=null}}const he=new Error("State Identifier/Key not specified");class fe{static ELEMENT_NAME="BaseComponent";static props;static config;static async wrapChildrenToReact(e){const t=await X(e);return await ue.getChildrenWrapperForReact(t)}static construct(e,t,...n){if(Array.isArray(e))return e;if(_(e)||P(e)||M(e)||M(e)||x(e)){const o={...e,props:{...e?.props||{},...t}};return(e?.props?.children||t?.children||n.length)&&(o.props.children=[...e?.props?.children||[],...t?.children||[],...n||[]]),o}if(O(e)||k(e)||L(e)||(o=e)&&"object"==typeof o&&o[A.ReblendLazyNode]){const o={...e?.props||{},...t};return(e?.props?.children||t?.children||n.length)&&(o.children=[...e?.props?.children||[],...t?.children||[],...n||[]]),e.props=o,e}var o;if(z(e)){const o={displayName:e,props:{...t}};return(t?.children||n.length)&&(o.props.children=[...e?.props?.children||[],...t?.children||[],...n||[]]),N(T.ReblendLazyVNode,o),o}const r=e,a="string"==typeof e;if(!a&&("Fragment"===r?.ELEMENT_NAME&&"Fragment"===r?.name||"Reblend"===r?.ELEMENT_NAME&&"Reblend"===r?.name))return n||[];if(r?.props?.children&&!Array.isArray(r?.props?.children)||t?.children&&!Array.isArray(t?.children))throw new Error("Children props must be an array of ReblendNode or HTMLElement");const i={...!a&&r?.props?r.props:{},...t};(r?.props?.children||t?.children||n.length)&&(i.children=[...r?.props?.children||[],...t?.children||[],...n||[]]);const s={displayName:r||e,props:i};let c;return c=a?T.ReblendVNodeStandard:j(r)?T.ReactToReblendVNode:z(r)?T.ReblendLazyVNode:T.ReblendVNode,N(c,s),s}static async renderToString(e,t){const n=(await X(fe.construct("div",{},fe.construct(e,t||{})))).pop();await ie(n);return n.innerHTML}static async mountOn(e,n,o){let r="string"==typeof e?document.getElementById(e):e;if(!r)throw new Error("Invalid root or root id");if(r=(await X(r)).pop(),!r)throw new Error("Invalid root or root id");let a=r.style.display||"initial";new y;const i=t.getInstance().update(o);let s;if(!i.noDefering&&!i.noPreloader){let e=document.createElement("div");e.setAttribute("preloaderParent","");const t=()=>{document.body.appendChild(e),r.style.display="none",e.style.display="initial"},n=async(e,t)=>{for(const n of t)e.appendChild(n),ie(n),await new Promise((e=>requestAnimationFrame(e)))},c=o?.preloader;let l=c?fe.construct(c,{}):fe.construct((await Promise.resolve().then((function(){return Ce}))).Preloader,{}),d=await Y(Array.isArray(l)?l:[l]);await n(e,d),t(),s=async()=>{r.style.display=a,e.style.display="none",e.remove(),d.forEach((e=>{re(e)})),e=void 0,a=void 0,l=void 0,d=void 0},await new Promise((e=>{setTimeout((()=>requestAnimationFrame(e)),i.preloaderDeferTimeout)}))}return r.html=()=>n,r.attached?await r.onStateChange():(r.isRootComponent=!0,await r.populateHtmlElements(),await ie(r)),s&&s(),Array.from((r.elementChildren||new Set).values())}static createRef(e){return fe.prototype.useRef.call(null,...arguments)}async createInnerHtmlElements(){let e=await this.html();c(e)&&(e=e(this.props)),Array.isArray(e)||(e=[e]),e=W(e);return await Y(e)}async populateHtmlElements(){if(this.hasDisconnected)return[];const e=d();let t=[];try{const n=L(this);if(n&&(this.elementChildren?.size||this.reactElementChildrenWrapper))return[];if(t=await this.createInnerHtmlElements(),t.forEach((e=>e.directParent=this)),this.elementChildren=new Set(t),this.removePlaceholder&&(await new Promise((t=>{setTimeout(t,e.placeholderDeferTimeout)})),this.removePlaceholder&&await this.removePlaceholder()),n)e.noDefering?this.reactReblendMount&&await this.reactReblendMount():this.reactReblendMount&&this.reactReblendMount();else{for(const n of t)this.appendChild(n),e.noDefering?await ie(n):ie(n);this.isPlaceholder&&this.directParent?.awaitingInitState&&!this.directParent?.initStateRunning&&(e.noDefering?(await ie(this.directParent),this.directParent.awaitingInitState=!1):setTimeout((()=>{ie(this.directParent),this.directParent.awaitingInitState=!1}),e.deferTimeout))}this.childrenInitialize=!0,this.awaitingReRender&&(e.noDefering?await this.onStateChange():this.onStateChange())}catch(e){this.handleError(e)}return t}async connectedCallback(){if(this.initStateRunning){if(this.awaitingInitState=!0,this.isPlaceholder)return;if(this.ReblendPlaceholder){let e;e="function"==typeof this.ReblendPlaceholder?fe.construct(this.ReblendPlaceholder,{}):this.ReblendPlaceholder;const t=await X(e);if(!this.childrenInitialize){if(this.placeholderAttached)return;this.placeholderAttached=!0,t.forEach((e=>{if(!this.initStateRunning)return requestIdleCallback((()=>re(e)));e.directParent=this,e.isPlaceholder=!0,this.appendChild(e),ie(e)})),this.initStateRunning&&(this.removePlaceholder=async()=>{t.forEach((e=>re(e))),this.removePlaceholder=void 0})}}else{const e=d(),t=fe.construct(e.placeholder||(await Promise.resolve().then((function(){return Ee}))).Placeholder,{style:this.defaultReblendPlaceholderStyle}),n=await X(t);if(!this.childrenInitialize){if(this.placeholderAttached)return;this.placeholderAttached=!0,n.forEach((e=>{if(!this.initStateRunning)return requestIdleCallback((()=>re(e)));e.directParent=this,e.isPlaceholder=!0,this.appendChild(e),ie(e)})),this.initStateRunning&&(this.removePlaceholder=async()=>{n.forEach((e=>re(e))),this.removePlaceholder=void 0})}}}else await async function(e){e.hasDisconnected||e.attached||(e.attached=!0,await e.componentDidMount(),await e.mountEffects())}(this)}addHookDisconnectedEffect(e){this.hookDisconnectedEffects?.add(e)}addStyle(e){if(e)if("string"==typeof e)this.setAttribute("style",e);else if(Array.isArray(e)){const t=e.join(";");this.setAttribute("style",t)}else for(const[t,n]of Object.entries(e))this.style[t]=n}async initState(){}async initProps(e){this.props=e||{}}componentDidMount(){}setState(e){this.state=e,this.onStateChange()}async applyEffects(e){for(const t of this.effectsState.values()||[]){if(t.type!==e)continue;const n=t.effect&&await t.effect();"function"==typeof n&&(t.disconnectEffect=n)}}handleError(e){if(this.renderingErrorHandler)this.renderingErrorHandler((e.component=this,e));else if(this.state?.renderingErrorHandler&&"function"==typeof this.state.renderingErrorHandler)this.state.renderingErrorHandler(e);else{if(!this.directParent)throw e;this.directParent.handleError(e)}}async onStateChange(){if(!this.attached||this.hasDisconnected)return;if(U(this)&&!this.isRootComponent)return;if(this.stateEffectRunning)return;if(this.onStateChangeRunning||this.initStateRunning||this.numAwaitingUpdates)return void this.numAwaitingUpdates++;const e=[];let t;try{if(this.stateEffectRunning=!0,await this.applyEffects(exports.EffectType.BEFORE),this.stateEffectRunning=!1,this.forceEffects=!1,this.onStateChangeRunning=!0,this.childrenInitialize){t=await this.html(),c(t)&&(t=t(this.props)),Array.isArray(t)||(t=[t]),t=W(t);const n=[...this.elementChildren?.values()||[]],o=Math.max(n.length||0,t.length);for(let r=0;r<o;r++){const o=t[r],a=n[r];e.push(...le(this,a,o))}}else this.awaitingReRender=!0}catch(e){this.handleError(e)}finally{if(await async function(e){const t=new Set;e=Array.from(e||[]);const n=d(),o=new Map,r=[],a=[],i=[],s=[];for(const c of e)switch(c.type){case exports.PatchTypeAndOrder.CREATE:{if(!c.parent)break;const e=await X(c.newNode);if(!e.length)break;if(e.forEach((e=>e.directParent=c.parent)),c.parent.elementChildren)for(const t of e)c.parent.elementChildren.add(t);else c.parent.elementChildren=new Set(e);if(L(c.parent))t.add(c.parent);else{let t=o.get(c.parent);t||(t=document.createDocumentFragment(),o.set(c.parent,t));for(const o of e)t.appendChild(o),i.push((async()=>{n.noDefering?await ie(o):ie(o)}))}break}case exports.PatchTypeAndOrder.REMOVE:c.oldNode&&r.push(c.oldNode);break;case exports.PatchTypeAndOrder.REPLACE:if(c.oldNode){const e=await X(c.newNode);e.forEach((e=>e.directParent=c.oldNode?.directParent)),a.push({oldNode:c.oldNode,newNodeElements:e})}break;case exports.PatchTypeAndOrder.TEXT:c.oldNode&&(c.oldNode.textContent=c.newNode);break;case exports.PatchTypeAndOrder.UPDATE:c.patches&&s.push(c.patches)}s.length>0&&(n.noDefering?await de(s):de(s));for(const[e,t]of o.entries())e.appendChild(t);for(const e of r)await pe(e,(async()=>{}),!0);for(const{oldNode:e,newNodeElements:t}of a)await pe(e,(async()=>{for(const n of t)n.directParent=e.directParent;p()?await se(t,e):se(t,e)}));for(const e of i)await e();for(const e of t)L(e)&&(n.noDefering?e.reactReblendMount&&await e.reactReblendMount():setTimeout((()=>{e.reactReblendMount&&e.reactReblendMount()}),n.deferTimeout))}(e),await this.applyEffects(exports.EffectType.AFTER),this.onStateChangeRunning=!1,this.numAwaitingUpdates){this.numAwaitingUpdates=0;const e=d();e.noDefering?await this.onStateChange():setTimeout((()=>this.onStateChange()),e.deferTimeout)}t=null}}async html(){return null}async mountEffects(){this.stateEffectRunning=!0,D(this)||(this.mountingEffects=!0,await this.applyEffects(exports.EffectType.BEFORE),this.mountingEffects=!1),this.stateEffectRunning=!1,"Placeholder"===this.displayName||this.props?.isPlaceholder||this.isPlaceholder||U(this)||L(this)||(await this.populateHtmlElements(),this.mountingAfterEffects=!0,await this.applyEffects(exports.EffectType.AFTER),this.mountingAfterEffects=!1)}async disconnectedCallback(e=!1){await async function(e,t=!1){if(e.hasDisconnected)return;const n=d();if(!t&&await e.cleanUp(),e.componentWillUnmount&&await e.componentWillUnmount(),!D(e))for(const t of e.effectsState?.values()||[])t.disconnectEffect&&await t.disconnectEffect(),t.cache=null,t.cacher=null,t.effect=null,t.disconnectEffect=null;e.hookDisconnectedEffects?.forEach((e=>{e()})),n.noDefering?await ae(e):ae(e);for(const t of e.elementChildren?.values()||[])n.noDefering?await re(t):re(t);if(e.directParent?.elementChildren?.delete(e),e.innerHTML="",e.parentElement){e.outerHTML="";try{HTMLElement.prototype.remove.call(e)}catch{e.parentElement.removeChild(e)}}n.noDefering?await(e.reactElementChildrenWrapper?.disconnectedCallback()):e.reactElementChildrenWrapper?.disconnectedCallback(),e.props=null,e.reactElementChildrenWrapper=null,e.elementChildren=null,e.effectsState=null,e.hookDisconnectedEffects=null,e.directParent=null,e.state=null,e.renderingError=null,e.renderingErrorHandler=null,e.nearestStandardParent=null,e.ReactClass=null,e.ref=null,e.childrenPropsUpdate=null;for(const t in e)if(e[t])try{e[t]=null}catch{}e.hasDisconnected=!0}(this,e)}cleanUp(){}componentWillUnmount(){}dependenciesChanged(e,t){return!oe(e,t,d().diffConfig||{})}generateId(){const e=s(1e4,999999)+"_effectId";return this.effectsState.get(e)?this.generateId():e}getCacher(e){return()=>{let t=e;for(;"function"==typeof t;)t=t();return t}}useState(e,t){if(!t)throw he;"function"==typeof e&&(e=e.bind(this)()),e instanceof Promise?e.then((e=>this.state[t]=e)):this.state[t]=e;return[e,(async(e,n=!1)=>{if("function"==typeof e?e=await e(this.state[t]):e instanceof Promise&&(e=await e),(n||this.state[t]!==e)&&(this.state[t]=e,this.attached)){n&&(this.forceEffects=!0);const e=d();e.noDefering?await this.onStateChange():setTimeout((()=>this.onStateChange()),e.deferTimeout)}}).bind(this)]}useEffect(e,t){e=e.bind(this);const n=this.generateId(),o=this.getCacher(t),r={cache:o(),cacher:o,type:exports.EffectType.BEFORE};this.effectsState.set(n,r);const a=(async()=>{const n=o();if(this.forceEffects||!t||this.mountingEffects||this.dependenciesChanged(n,r.cache)){const t=await e(r.cache,n);return r.cache=n,t}}).bind(this);r.effect=a}useEffectAfter(e,t){e=e.bind(this);const n=this.generateId(),o=this.getCacher(t),r={cache:o(),cacher:o,type:exports.EffectType.AFTER};this.effectsState.set(n,r);const a=(async()=>{const n=o();if(this.forceEffects||!t||this.mountingAfterEffects||this.dependenciesChanged(n,r.cache)){const t=await e(r.cache,n);return r.cache=n,t}}).bind(this);r.effect=a}useProps(e){e=e.bind(this);const t=this.generateId(),n=this.getCacher((()=>this.props)),o={cache:n(),cacher:n,type:exports.EffectType.AFTER};this.effectsState.set(t,o);const r=(async()=>{const t=n();if(this.forceEffects||this.mountingAfterEffects||this.dependenciesChanged(t,o.cache)){const n=await e(o.cache,t);return o.cache=t,n}}).bind(this);o.effect=r}useReducer(e,t,n){if(e=e.bind(this),!n)throw he;const[o,r]=this.useState(t,n);this.state[n]=o;const a=(async(t,o)=>{let a;a="function"==typeof t?await e(this.state[n],await t(this.state[n])):await e(this.state[n],t),await r(a,o)}).bind(this);return[this.state[n],a]}useMemo(e,t,n){if(e=e.bind(this),!t)throw he;const o=this.getCacher(n),r=o(),a=e(r,r);a instanceof Promise?a.then((e=>this.state[t]=e)):this.state[t]=a;const i=this.generateId(),s={cache:r,cacher:o,type:exports.EffectType.BEFORE};this.effectsState.set(i,s);return s.effect=async()=>{const r=o();(this.forceEffects||!n||this.mountingEffects||this.dependenciesChanged(r,s.cache))&&(this.state[t]=await e(s.cache,r),s.cache=r)},a}useRef(e){return{current:e}}useCallback(e){return e.bind(this)}_constructor(){this.state={},this.childrenPropsUpdate=new Set,this.hookDisconnectedEffects=new Set,this.numAwaitingUpdates=0,this.effectsState=new Map,this.hasDisconnected=!1}}class me extends fe{static ELEMENT_NAME="Fragment";static version="10.2.2";constructor(){super()}async html(){return this?.props?.children}}class ye extends me{static ELEMENT_NAME="Placeholder";constructor(){super()}async initState(){}async initProps({style:e,children:t,isPlaceholder:n=!0}){this.props={},this.props.style=e,this.props.children=t,this.props.isPlaceholder=n}async html(){return me.construct.bind(this)("div",{style:ge.placeholder},me.construct.bind(this)("div",{style:{...ge.loadingBar,...this.props.style||{}}},this.props.children),me.construct.bind(this)("style",null,"\n @keyframes loading {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n }\n "))}}ye.props={isPlaceholder:!0};const ge={placeholder:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:"10px"},loadingBar:{width:"100%",minHeight:"10px",height:"100%",alignItems:"center",display:"flex",justifyContent:"center",background:"linear-gradient(90deg, #f0f0f0 25%,rgb(178, 175, 175) 50%, #f0f0f0 75%)",backgroundSize:"200% 100%",animation:"loading 1.5s infinite"}};var Ee=Object.freeze({__proto__:null,Placeholder:ye});class be extends me{static ELEMENT_NAME="Preloader";constructor(){super()}async initState(){}async initProps(){this.props={}}async html(){return me.construct.bind(this)("div",{className:"App"},me.construct.bind(this)("style",null,"\n .App {\n text-align: center;\n }\n\n .App-logo {\n height: calc(30px + 20vmin);;\n pointer-events: none;\n }\n\n @media (prefers-reduced-motion: no-preference) {\n .App-logo {\n animation: App-logo-spin infinite 4s cubic-bezier(0.4, 0, 0.43, 0.99);\n }\n }\n\n .App-header {\n background-color: white;\n min-height: 100vh;\n display: f