@piedata/pieui 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Chats/ChatCard/ui/components/AttachFileButton.d.ts.map +1 -1
- package/dist/components/Chats/ChatCard/ui/components/ChatCardInput.d.ts +1 -0
- package/dist/components/Chats/ChatCard/ui/components/ChatCardInput.d.ts.map +1 -1
- package/dist/components/Chats/ChatCard/ui/components/Markdown.d.ts.map +1 -1
- package/dist/components/index.esm.js +24 -14
- package/dist/components/index.js +31 -21
- package/dist/index.esm.js +29 -19
- package/dist/index.js +42 -32
- package/package.json +2 -1
- package/src/components/Chats/ChatCard/ui/components/AttachFileButton.tsx +3 -1
- package/src/components/Chats/ChatCard/ui/components/ChatCardInput.tsx +23 -23
- package/src/components/Chats/ChatCard/ui/components/Markdown.tsx +1 -5
|
@@ -1,23 +1,33 @@
|
|
|
1
|
-
var T3=Object.create;var{getPrototypeOf:w3,defineProperty:q5,getOwnPropertyNames:x3}=Object;var E3=Object.prototype.hasOwnProperty;var T=($,Z,J)=>{J=$!=null?T3(w3($)):{};let H=Z||!$||!$.__esModule?q5(J,"default",{value:$,enumerable:!0}):J;for(let Y of x3($))if(!E3.call(H,Y))q5(H,Y,{get:()=>$[Y],enumerable:!0});return H};var I=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var S3=($,Z)=>{for(var J in Z)q5($,J,{get:Z[J],enumerable:!0,configurable:!0,set:(H)=>Z[J]=()=>H})};var v3=($,Z)=>()=>($&&(Z=$($=0)),Z);var u5=I(($9)=>{Object.defineProperty($9,"__esModule",{value:!0});$9.Doctype=$9.CDATA=$9.Tag=$9.Style=$9.Script=$9.Comment=$9.Directive=$9.Text=$9.Root=$9.isTag=$9.ElementType=void 0;var n;(function($){$.Root="root",$.Text="text",$.Directive="directive",$.Comment="comment",$.Script="script",$.Style="style",$.Tag="tag",$.CDATA="cdata",$.Doctype="doctype"})(n=$9.ElementType||($9.ElementType={}));function UJ($){return $.type===n.Tag||$.type===n.Script||$.type===n.Style}$9.isTag=UJ;$9.Root=n.Root;$9.Text=n.Text;$9.Directive=n.Directive;$9.Comment=n.Comment;$9.Script=n.Script;$9.Style=n.Style;$9.Tag=n.Tag;$9.CDATA=n.CDATA;$9.Doctype=n.Doctype});var p5=I((R)=>{var O1=R&&R.__extends||function(){var $=function(Z,J){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(H,Y){H.__proto__=Y}||function(H,Y){for(var Q in Y)if(Object.prototype.hasOwnProperty.call(Y,Q))H[Q]=Y[Q]},$(Z,J)};return function(Z,J){if(typeof J!=="function"&&J!==null)throw TypeError("Class extends value "+String(J)+" is not a constructor or null");$(Z,J);function H(){this.constructor=Z}Z.prototype=J===null?Object.create(J):(H.prototype=J.prototype,new H)}}(),X0=R&&R.__assign||function(){return X0=Object.assign||function($){for(var Z,J=1,H=arguments.length;J<H;J++){Z=arguments[J];for(var Y in Z)if(Object.prototype.hasOwnProperty.call(Z,Y))$[Y]=Z[Y]}return $},X0.apply(this,arguments)};Object.defineProperty(R,"__esModule",{value:!0});R.cloneNode=R.hasChildren=R.isDocument=R.isDirective=R.isComment=R.isText=R.isCDATA=R.isTag=R.Element=R.Document=R.CDATA=R.NodeWithChildren=R.ProcessingInstruction=R.Comment=R.Text=R.DataNode=R.Node=void 0;var p=u5(),c5=function(){function $(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty($.prototype,"parentNode",{get:function(){return this.parent},set:function(Z){this.parent=Z},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"previousSibling",{get:function(){return this.prev},set:function(Z){this.prev=Z},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"nextSibling",{get:function(){return this.next},set:function(Z){this.next=Z},enumerable:!1,configurable:!0}),$.prototype.cloneNode=function(Z){if(Z===void 0)Z=!1;return l5(this,Z)},$}();R.Node=c5;var b0=function($){O1(Z,$);function Z(J){var H=$.call(this)||this;return H.data=J,H}return Object.defineProperty(Z.prototype,"nodeValue",{get:function(){return this.data},set:function(J){this.data=J},enumerable:!1,configurable:!0}),Z}(c5);R.DataNode=b0;var J9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=p.ElementType.Text,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),Z}(b0);R.Text=J9;var H9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=p.ElementType.Comment,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),Z}(b0);R.Comment=H9;var Y9=function($){O1(Z,$);function Z(J,H){var Y=$.call(this,H)||this;return Y.name=J,Y.type=p.ElementType.Directive,Y}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Z}(b0);R.ProcessingInstruction=Y9;var y0=function($){O1(Z,$);function Z(J){var H=$.call(this)||this;return H.children=J,H}return Object.defineProperty(Z.prototype,"firstChild",{get:function(){var J;return(J=this.children[0])!==null&&J!==void 0?J:null},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"childNodes",{get:function(){return this.children},set:function(J){this.children=J},enumerable:!1,configurable:!0}),Z}(c5);R.NodeWithChildren=y0;var Q9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=p.ElementType.CDATA,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),Z}(y0);R.CDATA=Q9;var X9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=p.ElementType.Root,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),Z}(y0);R.Document=X9;var G9=function($){O1(Z,$);function Z(J,H,Y,Q){if(Y===void 0)Y=[];if(Q===void 0)Q=J==="script"?p.ElementType.Script:J==="style"?p.ElementType.Style:p.ElementType.Tag;var X=$.call(this,Y)||this;return X.name=J,X.attribs=H,X.type=Q,X}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"tagName",{get:function(){return this.name},set:function(J){this.name=J},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"attributes",{get:function(){var J=this;return Object.keys(this.attribs).map(function(H){var Y,Q;return{name:H,value:J.attribs[H],namespace:(Y=J["x-attribsNamespace"])===null||Y===void 0?void 0:Y[H],prefix:(Q=J["x-attribsPrefix"])===null||Q===void 0?void 0:Q[H]}})},enumerable:!1,configurable:!0}),Z}(y0);R.Element=G9;function W9($){return(0,p.isTag)($)}R.isTag=W9;function z9($){return $.type===p.ElementType.CDATA}R.isCDATA=z9;function U9($){return $.type===p.ElementType.Text}R.isText=U9;function O9($){return $.type===p.ElementType.Comment}R.isComment=O9;function L9($){return $.type===p.ElementType.Directive}R.isDirective=L9;function B9($){return $.type===p.ElementType.Root}R.isDocument=B9;function fJ($){return Object.prototype.hasOwnProperty.call($,"children")}R.hasChildren=fJ;function l5($,Z){if(Z===void 0)Z=!1;var J;if(U9($))J=new J9($.data);else if(O9($))J=new H9($.data);else if(W9($)){var H=Z?d5($.children):[],Y=new G9($.name,X0({},$.attribs),H);if(H.forEach(function(G){return G.parent=Y}),$.namespace!=null)Y.namespace=$.namespace;if($["x-attribsNamespace"])Y["x-attribsNamespace"]=X0({},$["x-attribsNamespace"]);if($["x-attribsPrefix"])Y["x-attribsPrefix"]=X0({},$["x-attribsPrefix"]);J=Y}else if(z9($)){var H=Z?d5($.children):[],Q=new Q9(H);H.forEach(function(z){return z.parent=Q}),J=Q}else if(B9($)){var H=Z?d5($.children):[],X=new X9(H);if(H.forEach(function(z){return z.parent=X}),$["x-mode"])X["x-mode"]=$["x-mode"];J=X}else if(L9($)){var W=new Y9($.name,$.data);if($["x-name"]!=null)W["x-name"]=$["x-name"],W["x-publicId"]=$["x-publicId"],W["x-systemId"]=$["x-systemId"];J=W}else throw Error("Not implemented yet: ".concat($.type));if(J.startIndex=$.startIndex,J.endIndex=$.endIndex,$.sourceCodeLocation!=null)J.sourceCodeLocation=$.sourceCodeLocation;return J}R.cloneNode=l5;function d5($){var Z=$.map(function(H){return l5(H,!0)});for(var J=1;J<Z.length;J++)Z[J].prev=Z[J-1],Z[J-1].next=Z[J];return Z}});var n5=I((Z1)=>{var VJ=Z1&&Z1.__createBinding||(Object.create?function($,Z,J,H){if(H===void 0)H=J;var Y=Object.getOwnPropertyDescriptor(Z,J);if(!Y||("get"in Y?!Z.__esModule:Y.writable||Y.configurable))Y={enumerable:!0,get:function(){return Z[J]}};Object.defineProperty($,H,Y)}:function($,Z,J,H){if(H===void 0)H=J;$[H]=Z[J]}),DJ=Z1&&Z1.__exportStar||function($,Z){for(var J in $)if(J!=="default"&&!Object.prototype.hasOwnProperty.call(Z,J))VJ(Z,$,J)};Object.defineProperty(Z1,"__esModule",{value:!0});Z1.DomHandler=void 0;var i5=u5(),L1=p5();DJ(p5(),Z1);var F9={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},K9=function(){function $(Z,J,H){if(this.dom=[],this.root=new L1.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof J==="function")H=J,J=F9;if(typeof Z==="object")J=Z,Z=void 0;this.callback=Z!==null&&Z!==void 0?Z:null,this.options=J!==null&&J!==void 0?J:F9,this.elementCB=H!==null&&H!==void 0?H:null}return $.prototype.onparserinit=function(Z){this.parser=Z},$.prototype.onreset=function(){this.dom=[],this.root=new L1.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},$.prototype.onend=function(){if(this.done)return;this.done=!0,this.parser=null,this.handleCallback(null)},$.prototype.onerror=function(Z){this.handleCallback(Z)},$.prototype.onclosetag=function(){this.lastNode=null;var Z=this.tagStack.pop();if(this.options.withEndIndices)Z.endIndex=this.parser.endIndex;if(this.elementCB)this.elementCB(Z)},$.prototype.onopentag=function(Z,J){var H=this.options.xmlMode?i5.ElementType.Tag:void 0,Y=new L1.Element(Z,J,void 0,H);this.addNode(Y),this.tagStack.push(Y)},$.prototype.ontext=function(Z){var J=this.lastNode;if(J&&J.type===i5.ElementType.Text){if(J.data+=Z,this.options.withEndIndices)J.endIndex=this.parser.endIndex}else{var H=new L1.Text(Z);this.addNode(H),this.lastNode=H}},$.prototype.oncomment=function(Z){if(this.lastNode&&this.lastNode.type===i5.ElementType.Comment){this.lastNode.data+=Z;return}var J=new L1.Comment(Z);this.addNode(J),this.lastNode=J},$.prototype.oncommentend=function(){this.lastNode=null},$.prototype.oncdatastart=function(){var Z=new L1.Text(""),J=new L1.CDATA([Z]);this.addNode(J),Z.parent=J,this.lastNode=Z},$.prototype.oncdataend=function(){this.lastNode=null},$.prototype.onprocessinginstruction=function(Z,J){var H=new L1.ProcessingInstruction(Z,J);this.addNode(H)},$.prototype.handleCallback=function(Z){if(typeof this.callback==="function")this.callback(Z,this.dom);else if(Z)throw Z},$.prototype.addNode=function(Z){var J=this.tagStack[this.tagStack.length-1],H=J.children[J.children.length-1];if(this.options.withStartIndices)Z.startIndex=this.parser.startIndex;if(this.options.withEndIndices)Z.endIndex=this.parser.endIndex;if(J.children.push(Z),H)Z.prev=H,H.next=Z;Z.parent=J,this.lastNode=null},$}();Z1.DomHandler=K9;Z1.default=K9});var V9=I((q9)=>{Object.defineProperty(q9,"__esModule",{value:!0});q9.CARRIAGE_RETURN_PLACEHOLDER_REGEX=q9.CARRIAGE_RETURN_PLACEHOLDER=q9.CARRIAGE_RETURN_REGEX=q9.CARRIAGE_RETURN=q9.CASE_SENSITIVE_TAG_NAMES_MAP=q9.CASE_SENSITIVE_TAG_NAMES=void 0;q9.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"];q9.CASE_SENSITIVE_TAG_NAMES_MAP=q9.CASE_SENSITIVE_TAG_NAMES.reduce(function($,Z){return $[Z.toLowerCase()]=Z,$},{});q9.CARRIAGE_RETURN="\r";q9.CARRIAGE_RETURN_REGEX=new RegExp(q9.CARRIAGE_RETURN,"g");q9.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now().toString(),"__");q9.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(q9.CARRIAGE_RETURN_PLACEHOLDER,"g")});var o5=I((P9)=>{Object.defineProperty(P9,"__esModule",{value:!0});P9.formatAttributes=D9;P9.escapeSpecialCharacters=wJ;P9.revertEscapedCharacters=R9;P9.formatDOM=N9;var m0=n5(),G0=V9();function PJ($){return G0.CASE_SENSITIVE_TAG_NAMES_MAP[$]}function D9($){var Z={},J=0,H=$.length;for(;J<H;J++){var Y=$[J];Z[Y.name]=Y.value}return Z}function TJ($){$=$.toLowerCase();var Z=PJ($);if(Z)return Z;return $}function wJ($){return $.replace(G0.CARRIAGE_RETURN_REGEX,G0.CARRIAGE_RETURN_PLACEHOLDER)}function R9($){return $.replace(G0.CARRIAGE_RETURN_PLACEHOLDER_REGEX,G0.CARRIAGE_RETURN)}function N9($,Z,J){var H,Y,Q,X;if(Z===void 0)Z=null;var W=[],G,z=0,U=$.length;for(;z<U;z++){var L=$[z];switch(L.nodeType){case 1:{var K=TJ(L.nodeName);G=new m0.Element(K,D9(L.attributes)),G.children=N9(K==="template"?L.content.childNodes:L.childNodes,G);break}case 3:G=new m0.Text(R9((H=L.nodeValue)!==null&&H!==void 0?H:""));break;case 8:G=new m0.Comment((Y=L.nodeValue)!==null&&Y!==void 0?Y:"");break;default:continue}var q=(Q=W[z-1])!==null&&Q!==void 0?Q:null;if(q)q.next=G;G.parent=Z,G.prev=q,G.next=null,W.push(G)}if(J){if(G=new m0.ProcessingInstruction(J.substring(0,J.indexOf(" ")).toLowerCase(),J),G.next=(X=W[0])!==null&&X!==void 0?X:null,G.parent=Z,W.unshift(G),W[1])W[1].prev=W[0]}return W}});var j9=I((C9)=>{Object.defineProperty(C9,"__esModule",{value:!0});C9.default=gJ;var CJ=o5(),T9="html",w9="head",u0="body",jJ=/<([a-zA-Z]+[0-9]?)/,x9=/<head[^]*>/i,E9=/<body[^]*>/i,c0=function($,Z){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},a5=function($,Z){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},S9=typeof window==="object"&&window.DOMParser;if(typeof S9==="function")r5=new S9,s5="text/html",a5=function($,Z){if(Z)$="<".concat(Z,">").concat($,"</").concat(Z,">");return r5.parseFromString($,s5)},c0=a5;var r5,s5;if(typeof document==="object"&&document.implementation)S1=document.implementation.createHTMLDocument(),c0=function($,Z){if(Z){var J=S1.documentElement.querySelector(Z);if(J)J.innerHTML=$;return S1}return S1.documentElement.innerHTML=$,S1};var S1,d0=typeof document==="object"&&document.createElement("template"),t5;if(d0&&d0.content)t5=function($){return d0.innerHTML=$,d0.content.childNodes};var v9=function(){return document.createDocumentFragment().childNodes};function gJ($){var Z,J,H,Y,Q,X;$=(0,CJ.escapeSpecialCharacters)($);var W=jJ.exec($),G=(Z=W===null||W===void 0?void 0:W[1])===null||Z===void 0?void 0:Z.toLowerCase();switch(G){case T9:{var z=a5($);if(!x9.test($)){var U=z.querySelector(w9);(J=U===null||U===void 0?void 0:U.parentNode)===null||J===void 0||J.removeChild(U)}if(!E9.test($)){var U=z.querySelector(u0);(H=U===null||U===void 0?void 0:U.parentNode)===null||H===void 0||H.removeChild(U)}return z.querySelectorAll(T9)}case w9:case u0:{var L=c0($).querySelectorAll(G);if(E9.test($)&&x9.test($))return(Q=(Y=L[0].parentNode)===null||Y===void 0?void 0:Y.childNodes)!==null&&Q!==void 0?Q:v9();return L}default:{if(t5)return t5($);var U=c0($,u0).querySelector(u0);return(X=U===null||U===void 0?void 0:U.childNodes)!==null&&X!==void 0?X:v9()}}}});var g9=I((W0)=>{var hJ=W0&&W0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(W0,"__esModule",{value:!0});W0.default=mJ;var kJ=hJ(j9()),bJ=o5(),yJ=/<(![a-zA-Z\s]+)>/;function mJ($){if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];var Z=yJ.exec($),J=Z?Z[1]:void 0;return(0,bJ.formatDOM)((0,kJ.default)($),null,J)}});var _9=I((cJ)=>{var uJ=0;cJ.SAME=uJ;var dJ=1;cJ.CAMELCASE=dJ;cJ.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}});var k9=I((JH)=>{function nJ($){return k.hasOwnProperty($)?k[$]:null}function c($,Z,J,H,Y,Q,X){this.acceptsBooleans=Z===2||Z===3||Z===4,this.attributeName=H,this.attributeNamespace=Y,this.mustUseProperty=J,this.propertyName=$,this.type=Z,this.sanitizeURL=Q,this.removeEmptyString=X}var k={},oJ=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];oJ.forEach(($)=>{k[$]=new c($,0,!1,$,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([$,Z])=>{k[$]=new c($,1,!1,Z,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(($)=>{k[$]=new c($,2,!1,$.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(($)=>{k[$]=new c($,2,!1,$,null,!1,!1)});["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(($)=>{k[$]=new c($,3,!1,$.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(($)=>{k[$]=new c($,3,!0,$,null,!1,!1)});["capture","download"].forEach(($)=>{k[$]=new c($,4,!1,$,null,!1,!1)});["cols","rows","size","span"].forEach(($)=>{k[$]=new c($,6,!1,$,null,!1,!1)});["rowSpan","start"].forEach(($)=>{k[$]=new c($,5,!1,$.toLowerCase(),null,!1,!1)});var e5=/[\-\:]([a-z])/g,$6=($)=>$[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"].forEach(($)=>{let Z=$.replace(e5,$6);k[Z]=new c(Z,1,!1,$,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(($)=>{let Z=$.replace(e5,$6);k[Z]=new c(Z,1,!1,$,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(($)=>{let Z=$.replace(e5,$6);k[Z]=new c(Z,1,!1,$,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(($)=>{k[$]=new c($,1,!1,$.toLowerCase(),null,!1,!1)});var aJ="xlinkHref";k[aJ]=new c("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(($)=>{k[$]=new c($,1,!1,$.toLowerCase(),null,!0,!0)});var{CAMELCASE:rJ,SAME:sJ,possibleStandardNames:h9}=_9(),tJ=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",eJ=tJ+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",$H=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+eJ+"]*$")),ZH=Object.keys(h9).reduce(($,Z)=>{let J=h9[Z];if(J===sJ)$[Z]=Z;else if(J===rJ)$[Z.toLowerCase()]=Z;else $[Z]=J;return $},{});JH.BOOLEAN=3;JH.BOOLEANISH_STRING=2;JH.NUMERIC=5;JH.OVERLOADED_BOOLEAN=4;JH.POSITIVE_NUMERIC=6;JH.RESERVED=0;JH.STRING=1;JH.getPropertyInfo=nJ;JH.isCustomAttribute=$H;JH.possibleStandardNames=ZH});var c9=I((IB,d9)=>{var b9=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,BH=/\n/g,FH=/^\s*/,KH=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,qH=/^:\s*/,MH=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,AH=/^[;\s]*/,IH=/^\s+|\s+$/g,fH=`
|
|
2
|
-
`,y9="/",m9="*",V1="",VH="comment",DH="declaration";function RH($,Z){if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];Z=Z||{};var J=1,H=1;function Y(B){var F=B.match(BH);if(F)J+=F.length;var M=B.lastIndexOf(fH);H=~M?B.length-M:H+B.length}function Q(){var B={line:J,column:H};return function(F){return F.position=new X(B),z(),F}}function X(B){this.start=B,this.end={line:J,column:H},this.source=Z.source}X.prototype.content=$;function W(B){var F=Error(Z.source+":"+J+":"+H+": "+B);if(F.reason=B,F.filename=Z.source,F.line=J,F.column=H,F.source=$,Z.silent);else throw F}function G(B){var F=B.exec($);if(!F)return;var M=F[0];return Y(M),$=$.slice(M.length),F}function z(){G(FH)}function U(B){var F;B=B||[];while(F=L())if(F!==!1)B.push(F);return B}function L(){var B=Q();if(y9!=$.charAt(0)||m9!=$.charAt(1))return;var F=2;while(V1!=$.charAt(F)&&(m9!=$.charAt(F)||y9!=$.charAt(F+1)))++F;if(F+=2,V1===$.charAt(F-1))return W("End of comment missing");var M=$.slice(2,F-2);return H+=2,Y(M),$=$.slice(F),H+=2,B({type:VH,comment:M})}function K(){var B=Q(),F=G(KH);if(!F)return;if(L(),!G(qH))return W("property missing ':'");var M=G(MH),P=B({type:DH,property:u9(F[0].replace(b9,V1)),value:M?u9(M[0].replace(b9,V1)):V1});return G(AH),P}function q(){var B=[];U(B);var F;while(F=K())if(F!==!1)B.push(F),U(B);return B}return z(),q()}function u9($){return $?$.replace(IH,V1):V1}d9.exports=RH});var l9=I((z0)=>{var NH=z0&&z0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(z0,"__esModule",{value:!0});z0.default=TH;var PH=NH(c9());function TH($,Z){let J=null;if(!$||typeof $!=="string")return J;let H=(0,PH.default)($),Y=typeof Z==="function";return H.forEach((Q)=>{if(Q.type!=="declaration")return;let{property:X,value:W}=Q;if(Y)Z(X,W,Q);else if(W)J=J||{},J[X]=W}),J}});var o9=I((i9)=>{Object.defineProperty(i9,"__esModule",{value:!0});i9.camelCase=void 0;var wH=/^--[a-zA-Z0-9_-]+$/,xH=/-([a-z])/g,EH=/^[^-]+$/,SH=/^-(webkit|moz|ms|o|khtml)-/,vH=/^-(ms)-/,CH=function($){return!$||EH.test($)||wH.test($)},jH=function($,Z){return Z.toUpperCase()},p9=function($,Z){return"".concat(Z,"-")},gH=function($,Z){if(Z===void 0)Z={};if(CH($))return $;if($=$.toLowerCase(),Z.reactCompat)$=$.replace(vH,p9);else $=$.replace(SH,p9);return $.replace(xH,jH)};i9.camelCase=gH});var r9=I((J6,a9)=>{var _H=J6&&J6.__importDefault||function($){return $&&$.__esModule?$:{default:$}},hH=_H(l9()),kH=o9();function Z6($,Z){var J={};if(!$||typeof $!=="string")return J;return(0,hH.default)($,function(H,Y){if(H&&Y)J[(0,kH.camelCase)(H,Z)]=Y}),J}Z6.default=Z6;a9.exports=Z6});import*as s9 from"react";var H6=I((l)=>{var bH=l&&l.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(l,"__esModule",{value:!0});l.returnFirstArg=l.canTextBeChildOfNode=l.ELEMENTS_WITH_NO_TEXT_CHILDREN=l.PRESERVE_CUSTOM_ATTRIBUTES=void 0;l.isCustomComponent=uH;l.setStyleProp=cH;var yH=bH(r9()),mH=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function uH($,Z){if(!$.includes("-"))return Boolean(Z&&typeof Z.is==="string");if(mH.has($))return!1;return!0}var dH={reactCompat:!0};function cH($,Z){if(typeof $!=="string")return;if(!$.trim()){Z.style={};return}try{Z.style=(0,yH.default)($,dH)}catch(J){Z.style={}}}l.PRESERVE_CUSTOM_ATTRIBUTES=Number(s9.version.split(".")[0])>=16;l.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var lH=function($){return!l.ELEMENTS_WITH_NO_TEXT_CHILDREN.has($.name)};l.canTextBeChildOfNode=lH;var pH=function($){return $};l.returnFirstArg=pH});var Y6=I(($7)=>{Object.defineProperty($7,"__esModule",{value:!0});$7.default=aH;var U0=k9(),t9=H6(),iH=["checked","value"],nH=["input","select","textarea"],oH={reset:!0,submit:!0};function aH($,Z){if($===void 0)$={};var J={},H=Boolean($.type&&oH[$.type]);for(var Y in $){var Q=$[Y];if((0,U0.isCustomAttribute)(Y)){J[Y]=Q;continue}var X=Y.toLowerCase(),W=e9(X);if(W){var G=(0,U0.getPropertyInfo)(W);if(iH.includes(W)&&nH.includes(Z)&&!H)W=e9("default"+X);switch(J[W]=Q,G===null||G===void 0?void 0:G.type){case U0.BOOLEAN:J[W]=!0;break;case U0.OVERLOADED_BOOLEAN:if(Q==="")J[W]=!0;break}continue}if(t9.PRESERVE_CUSTOM_ATTRIBUTES)J[Y]=Q}return(0,t9.setStyleProp)($.style,J),J}function e9($){return U0.possibleStandardNames[$]}});import*as v1 from"react";var J7=I((L0)=>{var sH=L0&&L0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(L0,"__esModule",{value:!0});L0.default=Z7;var tH=sH(Y6()),O0=H6(),eH={cloneElement:v1.cloneElement,createElement:v1.createElement,isValidElement:v1.isValidElement};function Z7($,Z){var J,H,Y,Q,X;if(Z===void 0)Z={};var W=[],G=typeof Z.replace==="function",z=(J=Z.transform)!==null&&J!==void 0?J:O0.returnFirstArg,U=(H=Z.library)!==null&&H!==void 0?H:eH,L=U.cloneElement,K=U.createElement,q=U.isValidElement,B=$.length;for(var F=0;F<B;F++){var M=$[F];if(G){var P=(Y=Z.replace)===null||Y===void 0?void 0:Y.call(Z,M,F);if(q(P)){if(B>1)P=L(P,{key:(Q=P.key)!==null&&Q!==void 0?Q:F});W.push(z(P,M,F));continue}}if(M.type==="text"){var N=!M.data.trim().length;if(N&&M.parent&&!(0,O0.canTextBeChildOfNode)(M.parent))continue;if(Z.trim&&N)continue;W.push(z(M.data,M,F));continue}var D=M,f={};if($Y(D))(0,O0.setStyleProp)(D.attribs.style,D.attribs),f=D.attribs;else if(D.attribs)f=(0,tH.default)(D.attribs,D.name);var E=void 0;switch(M.type){case"script":case"style":if(M.children[0])f.dangerouslySetInnerHTML={__html:M.children[0].data};break;case"tag":if(M.name==="textarea"&&M.children[0])f.defaultValue=M.children[0].data;else if((X=M.children)===null||X===void 0?void 0:X.length)E=Z7(M.children,Z);break;default:continue}if(B>1)f.key=F;W.push(z(K(M.name,f,E),M,F))}return W.length===1?W[0]:W}function $Y($){return O0.PRESERVE_CUSTOM_ATTRIBUTES&&$.type==="tag"&&(0,O0.isCustomComponent)($.name,$.attribs)}});var X6=I((_)=>{var Q6=_&&_.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(_,"__esModule",{value:!0});_.htmlToDOM=_.domToReact=_.attributesToProps=_.Text=_.ProcessingInstruction=_.Element=_.Comment=void 0;_.default=HY;var H7=Q6(g9());_.htmlToDOM=H7.default;var ZY=Q6(Y6());_.attributesToProps=ZY.default;var Y7=Q6(J7());_.domToReact=Y7.default;var l0=n5();Object.defineProperty(_,"Comment",{enumerable:!0,get:function(){return l0.Comment}});Object.defineProperty(_,"Element",{enumerable:!0,get:function(){return l0.Element}});Object.defineProperty(_,"ProcessingInstruction",{enumerable:!0,get:function(){return l0.ProcessingInstruction}});Object.defineProperty(_,"Text",{enumerable:!0,get:function(){return l0.Text}});var JY={lowerCaseAttributeNames:!1};function HY($,Z){var J;if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];return(0,Y7.default)((0,H7.default)($,(J=Z===null||Z===void 0?void 0:Z.htmlparser2)!==null&&J!==void 0?J:JY),Z)}});var K7=I((QF,F7)=>{var NY="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";F7.exports=NY});var I7=I((XF,A7)=>{var PY=K7();function q7(){}function M7(){}M7.resetWarningCache=q7;A7.exports=function(){function $(H,Y,Q,X,W,G){if(G===PY)return;var z=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}$.isRequired=$;function Z(){return $}var J={array:$,bigint:$,bool:$,func:$,number:$,object:$,string:$,symbol:$,any:$,arrayOf:Z,element:$,elementType:$,instanceOf:Z,node:$,objectOf:Z,oneOf:Z,oneOfType:Z,shape:Z,exact:Z,checkPropTypes:M7,resetWarningCache:q7};return J.PropTypes=J,J}});var U6=I((GF,f7)=>{f7.exports=I7()();var TY,wY});function yY($){if(typeof $==="object"&&$!==null){var Z=$.$$typeof;switch(Z){case xY:switch($=$.type,$){case _Y:case hY:case SY:case CY:case vY:case kY:return $;default:switch($=$&&$.$$typeof,$){case gY:case V7:case bY:case D7:case jY:return $;default:return Z}}case EY:return Z}}}var o,xY,EY,SY,vY,CY,jY,gY,_Y,hY,V7,kY,D7,bY,O6,L6=function($){return yY($)===D7};var R7=v3(()=>{o=typeof Symbol==="function"&&Symbol.for,xY=o?Symbol.for("react.element"):60103,EY=o?Symbol.for("react.portal"):60106,SY=o?Symbol.for("react.fragment"):60107,vY=o?Symbol.for("react.strict_mode"):60108,CY=o?Symbol.for("react.profiler"):60114,jY=o?Symbol.for("react.provider"):60109,gY=o?Symbol.for("react.context"):60110,_Y=o?Symbol.for("react.async_mode"):60111,hY=o?Symbol.for("react.concurrent_mode"):60111,V7=o?Symbol.for("react.forward_ref"):60112,kY=o?Symbol.for("react.suspense"):60113,D7=o?Symbol.for("react.memo"):60115,bY=o?Symbol.for("react.lazy"):60116;O6=V7});var B6=I((WF,E7)=>{R7();var uY={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},dY={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},cY={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},lY={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},w7={};w7[O6]=cY;function N7($){if(L6($))return lY;return w7[$.$$typeof]||uY}var{defineProperty:pY,getOwnPropertyNames:iY,getOwnPropertySymbols:P7,getOwnPropertyDescriptor:nY,getPrototypeOf:oY,prototype:T7}=Object;function x7($,Z,J){if(typeof Z!=="string"){if(T7){var H=oY(Z);if(H&&H!==T7)x7($,H,J)}var Y=iY(Z);if(P7)Y=Y.concat(P7(Z));var Q=N7($),X=N7(Z);for(var W=0;W<Y.length;++W){var G=Y[W];if(!dY[G]&&!(J&&J[G])&&!(X&&X[G])&&!(Q&&Q[G])){var z=nY(Z,G);try{pY($,G,z)}catch(U){}}}return $}return $}E7.exports=x7});var n0=I((q6,v7)=>{Object.defineProperty(q6,"__esModule",{value:!0});q6.default=eY;function eY($){return $.charAt(0).toUpperCase()+$.slice(1)}v7.exports=q6.default});var j7=I((M6,C7)=>{Object.defineProperty(M6,"__esModule",{value:!0});M6.default=YQ;var ZQ=n0(),JQ=HQ(ZQ);function HQ($){return $&&$.__esModule?$:{default:$}}function YQ($,Z,J){if($.hasOwnProperty(Z)){var H={},Y=$[Z],Q=(0,JQ.default)(Z),X=Object.keys(J);for(var W=0;W<X.length;W++){var G=X[W];if(G===Z)for(var z=0;z<Y.length;z++)H[Y[z]+Q]=J[Z];H[G]=J[G]}return H}return J}C7.exports=M6.default});var I6=I((A6,g7)=>{Object.defineProperty(A6,"__esModule",{value:!0});A6.default=XQ;function XQ($,Z,J,H,Y){for(var Q=0,X=$.length;Q<X;++Q){var W=$[Q](Z,J,H,Y);if(W)return W}}g7.exports=A6.default});var V6=I((f6,h7)=>{Object.defineProperty(f6,"__esModule",{value:!0});f6.default=WQ;function _7($,Z){if($.indexOf(Z)===-1)$.push(Z)}function WQ($,Z){if(Array.isArray(Z))for(var J=0,H=Z.length;J<H;++J)_7($,Z[J]);else _7($,Z)}h7.exports=f6.default});var R6=I((D6,k7)=>{Object.defineProperty(D6,"__esModule",{value:!0});D6.default=UQ;function UQ($){return $ instanceof Object&&!Array.isArray($)}k7.exports=D6.default});var m7=I((N6,y7)=>{Object.defineProperty(N6,"__esModule",{value:!0});N6.default=IQ;var LQ=j7(),BQ=o0(LQ),FQ=I6(),b7=o0(FQ),KQ=V6(),qQ=o0(KQ),MQ=R6(),AQ=o0(MQ);function o0($){return $&&$.__esModule?$:{default:$}}function IQ($){var{prefixMap:Z,plugins:J}=$;function H(Y){for(var Q in Y){var X=Y[Q];if((0,AQ.default)(X))Y[Q]=H(X);else if(Array.isArray(X)){var W=[];for(var G=0,z=X.length;G<z;++G){var U=(0,b7.default)(J,Q,X[G],Y,Z);(0,qQ.default)(W,U||X[G])}if(W.length>0)Y[Q]=W}else{var L=(0,b7.default)(J,Q,X,Y,Z);if(L)Y[Q]=L;Y=(0,BQ.default)(Z,Q,Y)}}return Y}return H}y7.exports=N6.default});var d7=I((u7,a0)=>{/*!
|
|
1
|
+
var v3=Object.create;var{getPrototypeOf:C3,defineProperty:V5,getOwnPropertyNames:g3}=Object;var j3=Object.prototype.hasOwnProperty;var S=($,Z,H)=>{H=$!=null?v3(C3($)):{};let J=Z||!$||!$.__esModule?V5(H,"default",{value:$,enumerable:!0}):H;for(let Y of g3($))if(!j3.call(J,Y))V5(J,Y,{get:()=>$[Y],enumerable:!0});return J};var I=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var h3=($,Z)=>{for(var H in Z)V5($,H,{get:Z[H],enumerable:!0,configurable:!0,set:(J)=>Z[H]=()=>J})};var _3=($,Z)=>()=>($&&(Z=$($=0)),Z);var u8=I((wf,W0)=>{var m8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $};//! annyang
|
|
2
|
+
//! version : 2.6.1
|
|
3
|
+
//! author : Tal Ater @TalAter
|
|
4
|
+
//! license : MIT
|
|
5
|
+
//! https://www.TalAter.com/annyang/
|
|
6
|
+
//! annyang
|
|
7
|
+
//! version : 2.6.1
|
|
8
|
+
//! author : Tal Ater @TalAter
|
|
9
|
+
//! license : MIT
|
|
10
|
+
//! https://www.TalAter.com/annyang/
|
|
11
|
+
(function($,Z){typeof define=="function"&&define.amd?define([],function(){return $.annyang=Z($)}):(typeof W0>"u"?"undefined":m8(W0))==="object"&&W0.exports?W0.exports=Z($):$.annyang=Z($)})(typeof window<"u"?window:void 0,function($,Z){var H,J=$.SpeechRecognition||$.webkitSpeechRecognition||$.mozSpeechRecognition||$.msSpeechRecognition||$.oSpeechRecognition;if(!J)return null;var Y,Q,X=[],O={start:[],error:[],end:[],soundstart:[],result:[],resultMatch:[],resultNoMatch:[],errorNetwork:[],errorPermissionBlocked:[],errorPermissionDenied:[]},G=0,z=0,W=!1,f="font-weight: bold; color: #00f;",L=!1,B=!1,F=/\s*\((.*?)\)\s*/g,K=/(\(\?:[^)]+\))\?/g,q=/(\(\?)?:\w+/g,x=/\*\w+/g,N=/[\-{}\[\]+?.,\\\^$|#]/g,R=function(V){for(var w=arguments.length,D=Array(1<w?w-1:0),v=1;v<w;v++)D[v-1]=arguments[v];V.forEach(function(_){_.callback.apply(_.context,D)})},M=function(){return Y!==Z},E=function(V,w){V.indexOf("%c")!==-1||w?console.log(V,w||f):console.log(V)},g=function(){M()||H.init({},!1)},F1=function(V,w,D){X.push({command:V,callback:w,originalPhrase:D}),W&&E("Command successfully loaded: %c"+D,f)},g1=function(V){var w;R(O.result,V);for(var D=0;D<V.length;D++){w=V[D].trim(),W&&E("Speech recognized: %c"+w,f);for(var v=0,_=X.length;v<_;v++){var r=X[v],U=r.command.exec(w);if(U){var a1=U.slice(1);return W&&(E("command matched: %c"+r.originalPhrase,f),a1.length&&E("with parameters",a1)),r.callback.apply(this,a1),void R(O.resultMatch,w,r.originalPhrase,V)}}}R(O.resultNoMatch,V)};return H={init:function(V){var w=!(1<arguments.length&&arguments[1]!==Z)||arguments[1];Y&&Y.abort&&Y.abort(),(Y=new J).maxAlternatives=5,Y.continuous=$.location.protocol==="http:",Y.lang="en-US",Y.onstart=function(){B=!0,R(O.start)},Y.onsoundstart=function(){R(O.soundstart)},Y.onerror=function(D){switch(R(O.error,D),D.error){case"network":R(O.errorNetwork,D);break;case"not-allowed":case"service-not-allowed":Q=!1,new Date().getTime()-G<200?R(O.errorPermissionBlocked,D):R(O.errorPermissionDenied,D)}},Y.onend=function(){if(B=!1,R(O.end),Q){var D=new Date().getTime()-G;(z+=1)%10==0&&W&&E("Speech Recognition is repeatedly stopping and starting. See http://is.gd/annyang_restarts for tips."),D<1000?setTimeout(function(){H.start({paused:L})},1000-D):H.start({paused:L})}},Y.onresult=function(D){if(L)return W&&E("Speech heard, but annyang is paused"),!1;for(var v=D.results[D.resultIndex],_=[],r=0;r<v.length;r++)_[r]=v[r].transcript;g1(_)},w&&(X=[]),V.length&&this.addCommands(V)},start:function(V){g(),L=(V=V||{}).paused!==Z&&!!V.paused,Q=V.autoRestart===Z||!!V.autoRestart,V.continuous!==Z&&(Y.continuous=!!V.continuous),G=new Date().getTime();try{Y.start()}catch(w){W&&E(w.message)}},abort:function(){Q=!1,z=0,M()&&Y.abort()},pause:function(){L=!0},resume:function(){H.start()},debug:function(){var V=!(0<arguments.length&&arguments[0]!==Z)||arguments[0];W=!!V},setLanguage:function(V){g(),Y.lang=V},addCommands:function(V){var w,D;for(var v in g(),V)if(V.hasOwnProperty(v))if(typeof(w=$[V[v]]||V[v])=="function")F1((D=(D=v).replace(N,"\\$&").replace(F,"(?:$1)?").replace(q,function(_,r){return r?_:"([^\\s]+)"}).replace(x,"(.*?)").replace(K,"\\s*$1?\\s*"),new RegExp("^"+D+"$","i")),w,v);else{if(!((w===void 0?"undefined":m8(w))==="object"&&w.regexp instanceof RegExp)){W&&E("Can not register command: %c"+v,f);continue}F1(new RegExp(w.regexp.source,"i"),w.callback,v)}},removeCommands:function(V){V===Z?X=[]:(V=Array.isArray(V)?V:[V],X=X.filter(function(w){for(var D=0;D<V.length;D++)if(V[D]===w.originalPhrase)return!1;return!0}))},addCallback:function(V,w,D){var v=$[w]||w;typeof v=="function"&&O[V]!==Z&&O[V].push({callback:v,context:D||this})},removeCallback:function(V,w){var D=function(_){return _.callback!==w};for(var v in O)O.hasOwnProperty(v)&&(V!==Z&&V!==v||(O[v]=w===Z?[]:O[v].filter(D)))},isListening:function(){return B&&!L},getSpeechRecognizer:function(){return Y},trigger:function(V){H.isListening()?(Array.isArray(V)||(V=[V]),g1(V)):W&&E(B?"Speech heard, but annyang is paused":"Cannot trigger while annyang is aborted")}}})});var i5=I((G9)=>{Object.defineProperty(G9,"__esModule",{value:!0});G9.Doctype=G9.CDATA=G9.Tag=G9.Style=G9.Script=G9.Comment=G9.Directive=G9.Text=G9.Root=G9.isTag=G9.ElementType=void 0;var t;(function($){$.Root="root",$.Text="text",$.Directive="directive",$.Comment="comment",$.Script="script",$.Style="style",$.Tag="tag",$.CDATA="cdata",$.Doctype="doctype"})(t=G9.ElementType||(G9.ElementType={}));function LH($){return $.type===t.Tag||$.type===t.Script||$.type===t.Style}G9.isTag=LH;G9.Root=t.Root;G9.Text=t.Text;G9.Directive=t.Directive;G9.Comment=t.Comment;G9.Script=t.Script;G9.Style=t.Style;G9.Tag=t.Tag;G9.CDATA=t.CDATA;G9.Doctype=t.Doctype});var o5=I((T)=>{var q1=T&&T.__extends||function(){var $=function(Z,H){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,Y){J.__proto__=Y}||function(J,Y){for(var Q in Y)if(Object.prototype.hasOwnProperty.call(Y,Q))J[Q]=Y[Q]},$(Z,H)};return function(Z,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");$(Z,H);function J(){this.constructor=Z}Z.prototype=H===null?Object.create(H):(J.prototype=H.prototype,new J)}}(),F0=T&&T.__assign||function(){return F0=Object.assign||function($){for(var Z,H=1,J=arguments.length;H<J;H++){Z=arguments[H];for(var Y in Z)if(Object.prototype.hasOwnProperty.call(Z,Y))$[Y]=Z[Y]}return $},F0.apply(this,arguments)};Object.defineProperty(T,"__esModule",{value:!0});T.cloneNode=T.hasChildren=T.isDocument=T.isDirective=T.isComment=T.isText=T.isCDATA=T.isTag=T.Element=T.Document=T.CDATA=T.NodeWithChildren=T.ProcessingInstruction=T.Comment=T.Text=T.DataNode=T.Node=void 0;var o=i5(),n5=function(){function $(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty($.prototype,"parentNode",{get:function(){return this.parent},set:function(Z){this.parent=Z},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"previousSibling",{get:function(){return this.prev},set:function(Z){this.prev=Z},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"nextSibling",{get:function(){return this.next},set:function(Z){this.next=Z},enumerable:!1,configurable:!0}),$.prototype.cloneNode=function(Z){if(Z===void 0)Z=!1;return a5(this,Z)},$}();T.Node=n5;var i0=function($){q1(Z,$);function Z(H){var J=$.call(this)||this;return J.data=H,J}return Object.defineProperty(Z.prototype,"nodeValue",{get:function(){return this.data},set:function(H){this.data=H},enumerable:!1,configurable:!0}),Z}(n5);T.DataNode=i0;var z9=function($){q1(Z,$);function Z(){var H=$!==null&&$.apply(this,arguments)||this;return H.type=o.ElementType.Text,H}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),Z}(i0);T.Text=z9;var W9=function($){q1(Z,$);function Z(){var H=$!==null&&$.apply(this,arguments)||this;return H.type=o.ElementType.Comment,H}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),Z}(i0);T.Comment=W9;var U9=function($){q1(Z,$);function Z(H,J){var Y=$.call(this,J)||this;return Y.name=H,Y.type=o.ElementType.Directive,Y}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Z}(i0);T.ProcessingInstruction=U9;var p0=function($){q1(Z,$);function Z(H){var J=$.call(this)||this;return J.children=H,J}return Object.defineProperty(Z.prototype,"firstChild",{get:function(){var H;return(H=this.children[0])!==null&&H!==void 0?H:null},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"childNodes",{get:function(){return this.children},set:function(H){this.children=H},enumerable:!1,configurable:!0}),Z}(n5);T.NodeWithChildren=p0;var f9=function($){q1(Z,$);function Z(){var H=$!==null&&$.apply(this,arguments)||this;return H.type=o.ElementType.CDATA,H}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),Z}(p0);T.CDATA=f9;var F9=function($){q1(Z,$);function Z(){var H=$!==null&&$.apply(this,arguments)||this;return H.type=o.ElementType.Root,H}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),Z}(p0);T.Document=F9;var L9=function($){q1(Z,$);function Z(H,J,Y,Q){if(Y===void 0)Y=[];if(Q===void 0)Q=H==="script"?o.ElementType.Script:H==="style"?o.ElementType.Style:o.ElementType.Tag;var X=$.call(this,Y)||this;return X.name=H,X.attribs=J,X.type=Q,X}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"tagName",{get:function(){return this.name},set:function(H){this.name=H},enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,"attributes",{get:function(){var H=this;return Object.keys(this.attribs).map(function(J){var Y,Q;return{name:J,value:H.attribs[J],namespace:(Y=H["x-attribsNamespace"])===null||Y===void 0?void 0:Y[J],prefix:(Q=H["x-attribsPrefix"])===null||Q===void 0?void 0:Q[J]}})},enumerable:!1,configurable:!0}),Z}(p0);T.Element=L9;function B9($){return(0,o.isTag)($)}T.isTag=B9;function K9($){return $.type===o.ElementType.CDATA}T.isCDATA=K9;function q9($){return $.type===o.ElementType.Text}T.isText=q9;function M9($){return $.type===o.ElementType.Comment}T.isComment=M9;function I9($){return $.type===o.ElementType.Directive}T.isDirective=I9;function A9($){return $.type===o.ElementType.Root}T.isDocument=A9;function NH($){return Object.prototype.hasOwnProperty.call($,"children")}T.hasChildren=NH;function a5($,Z){if(Z===void 0)Z=!1;var H;if(q9($))H=new z9($.data);else if(M9($))H=new W9($.data);else if(B9($)){var J=Z?p5($.children):[],Y=new L9($.name,F0({},$.attribs),J);if(J.forEach(function(G){return G.parent=Y}),$.namespace!=null)Y.namespace=$.namespace;if($["x-attribsNamespace"])Y["x-attribsNamespace"]=F0({},$["x-attribsNamespace"]);if($["x-attribsPrefix"])Y["x-attribsPrefix"]=F0({},$["x-attribsPrefix"]);H=Y}else if(K9($)){var J=Z?p5($.children):[],Q=new f9(J);J.forEach(function(z){return z.parent=Q}),H=Q}else if(A9($)){var J=Z?p5($.children):[],X=new F9(J);if(J.forEach(function(z){return z.parent=X}),$["x-mode"])X["x-mode"]=$["x-mode"];H=X}else if(I9($)){var O=new U9($.name,$.data);if($["x-name"]!=null)O["x-name"]=$["x-name"],O["x-publicId"]=$["x-publicId"],O["x-systemId"]=$["x-systemId"];H=O}else throw Error("Not implemented yet: ".concat($.type));if(H.startIndex=$.startIndex,H.endIndex=$.endIndex,$.sourceCodeLocation!=null)H.sourceCodeLocation=$.sourceCodeLocation;return H}T.cloneNode=a5;function p5($){var Z=$.map(function(J){return a5(J,!0)});for(var H=1;H<Z.length;H++)Z[H].prev=Z[H-1],Z[H-1].next=Z[H];return Z}});var s5=I((Q1)=>{var PH=Q1&&Q1.__createBinding||(Object.create?function($,Z,H,J){if(J===void 0)J=H;var Y=Object.getOwnPropertyDescriptor(Z,H);if(!Y||("get"in Y?!Z.__esModule:Y.writable||Y.configurable))Y={enumerable:!0,get:function(){return Z[H]}};Object.defineProperty($,J,Y)}:function($,Z,H,J){if(J===void 0)J=H;$[J]=Z[H]}),TH=Q1&&Q1.__exportStar||function($,Z){for(var H in $)if(H!=="default"&&!Object.prototype.hasOwnProperty.call(Z,H))PH(Z,$,H)};Object.defineProperty(Q1,"__esModule",{value:!0});Q1.DomHandler=void 0;var r5=i5(),M1=o5();TH(o5(),Q1);var V9={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},D9=function(){function $(Z,H,J){if(this.dom=[],this.root=new M1.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof H==="function")J=H,H=V9;if(typeof Z==="object")H=Z,Z=void 0;this.callback=Z!==null&&Z!==void 0?Z:null,this.options=H!==null&&H!==void 0?H:V9,this.elementCB=J!==null&&J!==void 0?J:null}return $.prototype.onparserinit=function(Z){this.parser=Z},$.prototype.onreset=function(){this.dom=[],this.root=new M1.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},$.prototype.onend=function(){if(this.done)return;this.done=!0,this.parser=null,this.handleCallback(null)},$.prototype.onerror=function(Z){this.handleCallback(Z)},$.prototype.onclosetag=function(){this.lastNode=null;var Z=this.tagStack.pop();if(this.options.withEndIndices)Z.endIndex=this.parser.endIndex;if(this.elementCB)this.elementCB(Z)},$.prototype.onopentag=function(Z,H){var J=this.options.xmlMode?r5.ElementType.Tag:void 0,Y=new M1.Element(Z,H,void 0,J);this.addNode(Y),this.tagStack.push(Y)},$.prototype.ontext=function(Z){var H=this.lastNode;if(H&&H.type===r5.ElementType.Text){if(H.data+=Z,this.options.withEndIndices)H.endIndex=this.parser.endIndex}else{var J=new M1.Text(Z);this.addNode(J),this.lastNode=J}},$.prototype.oncomment=function(Z){if(this.lastNode&&this.lastNode.type===r5.ElementType.Comment){this.lastNode.data+=Z;return}var H=new M1.Comment(Z);this.addNode(H),this.lastNode=H},$.prototype.oncommentend=function(){this.lastNode=null},$.prototype.oncdatastart=function(){var Z=new M1.Text(""),H=new M1.CDATA([Z]);this.addNode(H),Z.parent=H,this.lastNode=Z},$.prototype.oncdataend=function(){this.lastNode=null},$.prototype.onprocessinginstruction=function(Z,H){var J=new M1.ProcessingInstruction(Z,H);this.addNode(J)},$.prototype.handleCallback=function(Z){if(typeof this.callback==="function")this.callback(Z,this.dom);else if(Z)throw Z},$.prototype.addNode=function(Z){var H=this.tagStack[this.tagStack.length-1],J=H.children[H.children.length-1];if(this.options.withStartIndices)Z.startIndex=this.parser.startIndex;if(this.options.withEndIndices)Z.endIndex=this.parser.endIndex;if(H.children.push(Z),J)Z.prev=J,J.next=Z;Z.parent=H,this.lastNode=null},$}();Q1.DomHandler=D9;Q1.default=D9});var x9=I((R9)=>{Object.defineProperty(R9,"__esModule",{value:!0});R9.CARRIAGE_RETURN_PLACEHOLDER_REGEX=R9.CARRIAGE_RETURN_PLACEHOLDER=R9.CARRIAGE_RETURN_REGEX=R9.CARRIAGE_RETURN=R9.CASE_SENSITIVE_TAG_NAMES_MAP=R9.CASE_SENSITIVE_TAG_NAMES=void 0;R9.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"];R9.CASE_SENSITIVE_TAG_NAMES_MAP=R9.CASE_SENSITIVE_TAG_NAMES.reduce(function($,Z){return $[Z.toLowerCase()]=Z,$},{});R9.CARRIAGE_RETURN="\r";R9.CARRIAGE_RETURN_REGEX=new RegExp(R9.CARRIAGE_RETURN,"g");R9.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now().toString(),"__");R9.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(R9.CARRIAGE_RETURN_PLACEHOLDER,"g")});var t5=I((C9)=>{Object.defineProperty(C9,"__esModule",{value:!0});C9.formatAttributes=E9;C9.escapeSpecialCharacters=vH;C9.revertEscapedCharacters=S9;C9.formatDOM=v9;var n0=s5(),L0=x9();function EH($){return L0.CASE_SENSITIVE_TAG_NAMES_MAP[$]}function E9($){var Z={},H=0,J=$.length;for(;H<J;H++){var Y=$[H];Z[Y.name]=Y.value}return Z}function SH($){$=$.toLowerCase();var Z=EH($);if(Z)return Z;return $}function vH($){return $.replace(L0.CARRIAGE_RETURN_REGEX,L0.CARRIAGE_RETURN_PLACEHOLDER)}function S9($){return $.replace(L0.CARRIAGE_RETURN_PLACEHOLDER_REGEX,L0.CARRIAGE_RETURN)}function v9($,Z,H){var J,Y,Q,X;if(Z===void 0)Z=null;var O=[],G,z=0,W=$.length;for(;z<W;z++){var f=$[z];switch(f.nodeType){case 1:{var L=SH(f.nodeName);G=new n0.Element(L,E9(f.attributes)),G.children=v9(L==="template"?f.content.childNodes:f.childNodes,G);break}case 3:G=new n0.Text(S9((J=f.nodeValue)!==null&&J!==void 0?J:""));break;case 8:G=new n0.Comment((Y=f.nodeValue)!==null&&Y!==void 0?Y:"");break;default:continue}var B=(Q=O[z-1])!==null&&Q!==void 0?Q:null;if(B)B.next=G;G.parent=Z,G.prev=B,G.next=null,O.push(G)}if(H){if(G=new n0.ProcessingInstruction(H.substring(0,H.indexOf(" ")).toLowerCase(),H),G.next=(X=O[0])!==null&&X!==void 0?X:null,G.parent=Z,O.unshift(G),O[1])O[1].prev=O[0]}return O}});var m9=I((y9)=>{Object.defineProperty(y9,"__esModule",{value:!0});y9.default=bH;var _H=t5(),g9="html",j9="head",a0="body",kH=/<([a-zA-Z]+[0-9]?)/,h9=/<head[^]*>/i,_9=/<body[^]*>/i,r0=function($,Z){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},e5=function($,Z){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},k9=typeof window==="object"&&window.DOMParser;if(typeof k9==="function")$6=new k9,Z6="text/html",e5=function($,Z){if(Z)$="<".concat(Z,">").concat($,"</").concat(Z,">");return $6.parseFromString($,Z6)},r0=e5;var $6,Z6;if(typeof document==="object"&&document.implementation)k1=document.implementation.createHTMLDocument(),r0=function($,Z){if(Z){var H=k1.documentElement.querySelector(Z);if(H)H.innerHTML=$;return k1}return k1.documentElement.innerHTML=$,k1};var k1,o0=typeof document==="object"&&document.createElement("template"),H6;if(o0&&o0.content)H6=function($){return o0.innerHTML=$,o0.content.childNodes};var b9=function(){return document.createDocumentFragment().childNodes};function bH($){var Z,H,J,Y,Q,X;$=(0,_H.escapeSpecialCharacters)($);var O=kH.exec($),G=(Z=O===null||O===void 0?void 0:O[1])===null||Z===void 0?void 0:Z.toLowerCase();switch(G){case g9:{var z=e5($);if(!h9.test($)){var W=z.querySelector(j9);(H=W===null||W===void 0?void 0:W.parentNode)===null||H===void 0||H.removeChild(W)}if(!_9.test($)){var W=z.querySelector(a0);(J=W===null||W===void 0?void 0:W.parentNode)===null||J===void 0||J.removeChild(W)}return z.querySelectorAll(g9)}case j9:case a0:{var f=r0($).querySelectorAll(G);if(_9.test($)&&h9.test($))return(Q=(Y=f[0].parentNode)===null||Y===void 0?void 0:Y.childNodes)!==null&&Q!==void 0?Q:b9();return f}default:{if(H6)return H6($);var W=r0($,a0).querySelector(a0);return(X=W===null||W===void 0?void 0:W.childNodes)!==null&&X!==void 0?X:b9()}}}});var u9=I((B0)=>{var mH=B0&&B0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(B0,"__esModule",{value:!0});B0.default=lH;var uH=mH(m9()),dH=t5(),cH=/<(![a-zA-Z\s]+)>/;function lH($){if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];var Z=cH.exec($),H=Z?Z[1]:void 0;return(0,dH.formatDOM)((0,uH.default)($),null,H)}});var d9=I((nH)=>{var iH=0;nH.SAME=iH;var pH=1;nH.CAMELCASE=pH;nH.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}});var l9=I((XJ)=>{function sH($){return u.hasOwnProperty($)?u[$]:null}function n($,Z,H,J,Y,Q,X){this.acceptsBooleans=Z===2||Z===3||Z===4,this.attributeName=J,this.attributeNamespace=Y,this.mustUseProperty=H,this.propertyName=$,this.type=Z,this.sanitizeURL=Q,this.removeEmptyString=X}var u={},tH=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];tH.forEach(($)=>{u[$]=new n($,0,!1,$,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([$,Z])=>{u[$]=new n($,1,!1,Z,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(($)=>{u[$]=new n($,2,!1,$.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(($)=>{u[$]=new n($,2,!1,$,null,!1,!1)});["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(($)=>{u[$]=new n($,3,!1,$.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(($)=>{u[$]=new n($,3,!0,$,null,!1,!1)});["capture","download"].forEach(($)=>{u[$]=new n($,4,!1,$,null,!1,!1)});["cols","rows","size","span"].forEach(($)=>{u[$]=new n($,6,!1,$,null,!1,!1)});["rowSpan","start"].forEach(($)=>{u[$]=new n($,5,!1,$.toLowerCase(),null,!1,!1)});var J6=/[\-\:]([a-z])/g,Y6=($)=>$[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"].forEach(($)=>{let Z=$.replace(J6,Y6);u[Z]=new n(Z,1,!1,$,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(($)=>{let Z=$.replace(J6,Y6);u[Z]=new n(Z,1,!1,$,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(($)=>{let Z=$.replace(J6,Y6);u[Z]=new n(Z,1,!1,$,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(($)=>{u[$]=new n($,1,!1,$.toLowerCase(),null,!1,!1)});var eH="xlinkHref";u[eH]=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(($)=>{u[$]=new n($,1,!1,$.toLowerCase(),null,!0,!0)});var{CAMELCASE:$J,SAME:ZJ,possibleStandardNames:c9}=d9(),HJ=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",JJ=HJ+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",YJ=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+JJ+"]*$")),QJ=Object.keys(c9).reduce(($,Z)=>{let H=c9[Z];if(H===ZJ)$[Z]=Z;else if(H===$J)$[Z.toLowerCase()]=Z;else $[Z]=H;return $},{});XJ.BOOLEAN=3;XJ.BOOLEANISH_STRING=2;XJ.NUMERIC=5;XJ.OVERLOADED_BOOLEAN=4;XJ.POSITIVE_NUMERIC=6;XJ.RESERVED=0;XJ.STRING=1;XJ.getPropertyInfo=sH;XJ.isCustomAttribute=YJ;XJ.possibleStandardNames=QJ});var r9=I((PF,o9)=>{var i9=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,qJ=/\n/g,MJ=/^\s*/,IJ=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,AJ=/^:\s*/,VJ=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,DJ=/^[;\s]*/,RJ=/^\s+|\s+$/g,NJ=`
|
|
12
|
+
`,p9="/",n9="*",w1="",PJ="comment",TJ="declaration";function wJ($,Z){if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];Z=Z||{};var H=1,J=1;function Y(F){var K=F.match(qJ);if(K)H+=K.length;var q=F.lastIndexOf(NJ);J=~q?F.length-q:J+F.length}function Q(){var F={line:H,column:J};return function(K){return K.position=new X(F),z(),K}}function X(F){this.start=F,this.end={line:H,column:J},this.source=Z.source}X.prototype.content=$;function O(F){var K=Error(Z.source+":"+H+":"+J+": "+F);if(K.reason=F,K.filename=Z.source,K.line=H,K.column=J,K.source=$,Z.silent);else throw K}function G(F){var K=F.exec($);if(!K)return;var q=K[0];return Y(q),$=$.slice(q.length),K}function z(){G(MJ)}function W(F){var K;F=F||[];while(K=f())if(K!==!1)F.push(K);return F}function f(){var F=Q();if(p9!=$.charAt(0)||n9!=$.charAt(1))return;var K=2;while(w1!=$.charAt(K)&&(n9!=$.charAt(K)||p9!=$.charAt(K+1)))++K;if(K+=2,w1===$.charAt(K-1))return O("End of comment missing");var q=$.slice(2,K-2);return J+=2,Y(q),$=$.slice(K),J+=2,F({type:PJ,comment:q})}function L(){var F=Q(),K=G(IJ);if(!K)return;if(f(),!G(AJ))return O("property missing ':'");var q=G(VJ),x=F({type:TJ,property:a9(K[0].replace(i9,w1)),value:q?a9(q[0].replace(i9,w1)):w1});return G(DJ),x}function B(){var F=[];W(F);var K;while(K=L())if(K!==!1)F.push(K),W(F);return F}return z(),B()}function a9($){return $?$.replace(RJ,w1):w1}o9.exports=wJ});var s9=I((K0)=>{var xJ=K0&&K0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(K0,"__esModule",{value:!0});K0.default=SJ;var EJ=xJ(r9());function SJ($,Z){let H=null;if(!$||typeof $!=="string")return H;let J=(0,EJ.default)($),Y=typeof Z==="function";return J.forEach((Q)=>{if(Q.type!=="declaration")return;let{property:X,value:O}=Q;if(Y)Z(X,O,Q);else if(O)H=H||{},H[X]=O}),H}});var Z7=I((e9)=>{Object.defineProperty(e9,"__esModule",{value:!0});e9.camelCase=void 0;var vJ=/^--[a-zA-Z0-9_-]+$/,CJ=/-([a-z])/g,gJ=/^[^-]+$/,jJ=/^-(webkit|moz|ms|o|khtml)-/,hJ=/^-(ms)-/,_J=function($){return!$||gJ.test($)||vJ.test($)},kJ=function($,Z){return Z.toUpperCase()},t9=function($,Z){return"".concat(Z,"-")},bJ=function($,Z){if(Z===void 0)Z={};if(_J($))return $;if($=$.toLowerCase(),Z.reactCompat)$=$.replace(hJ,t9);else $=$.replace(jJ,t9);return $.replace(CJ,kJ)};e9.camelCase=bJ});var J7=I((X6,H7)=>{var yJ=X6&&X6.__importDefault||function($){return $&&$.__esModule?$:{default:$}},mJ=yJ(s9()),uJ=Z7();function Q6($,Z){var H={};if(!$||typeof $!=="string")return H;return(0,mJ.default)($,function(J,Y){if(J&&Y)H[(0,uJ.camelCase)(J,Z)]=Y}),H}Q6.default=Q6;H7.exports=Q6});import*as Y7 from"react";var G6=I((a)=>{var dJ=a&&a.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(a,"__esModule",{value:!0});a.returnFirstArg=a.canTextBeChildOfNode=a.ELEMENTS_WITH_NO_TEXT_CHILDREN=a.PRESERVE_CUSTOM_ATTRIBUTES=void 0;a.isCustomComponent=iJ;a.setStyleProp=nJ;var cJ=dJ(J7()),lJ=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function iJ($,Z){if(!$.includes("-"))return Boolean(Z&&typeof Z.is==="string");if(lJ.has($))return!1;return!0}var pJ={reactCompat:!0};function nJ($,Z){if(typeof $!=="string")return;if(!$.trim()){Z.style={};return}try{Z.style=(0,cJ.default)($,pJ)}catch(H){Z.style={}}}a.PRESERVE_CUSTOM_ATTRIBUTES=Number(Y7.version.split(".")[0])>=16;a.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var aJ=function($){return!a.ELEMENTS_WITH_NO_TEXT_CHILDREN.has($.name)};a.canTextBeChildOfNode=aJ;var oJ=function($){return $};a.returnFirstArg=oJ});var O6=I((G7)=>{Object.defineProperty(G7,"__esModule",{value:!0});G7.default=eJ;var q0=l9(),Q7=G6(),rJ=["checked","value"],sJ=["input","select","textarea"],tJ={reset:!0,submit:!0};function eJ($,Z){if($===void 0)$={};var H={},J=Boolean($.type&&tJ[$.type]);for(var Y in $){var Q=$[Y];if((0,q0.isCustomAttribute)(Y)){H[Y]=Q;continue}var X=Y.toLowerCase(),O=X7(X);if(O){var G=(0,q0.getPropertyInfo)(O);if(rJ.includes(O)&&sJ.includes(Z)&&!J)O=X7("default"+X);switch(H[O]=Q,G===null||G===void 0?void 0:G.type){case q0.BOOLEAN:H[O]=!0;break;case q0.OVERLOADED_BOOLEAN:if(Q==="")H[O]=!0;break}continue}if(Q7.PRESERVE_CUSTOM_ATTRIBUTES)H[Y]=Q}return(0,Q7.setStyleProp)($.style,H),H}function X7($){return q0.possibleStandardNames[$]}});import*as b1 from"react";var z7=I((I0)=>{var ZY=I0&&I0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(I0,"__esModule",{value:!0});I0.default=O7;var HY=ZY(O6()),M0=G6(),JY={cloneElement:b1.cloneElement,createElement:b1.createElement,isValidElement:b1.isValidElement};function O7($,Z){var H,J,Y,Q,X;if(Z===void 0)Z={};var O=[],G=typeof Z.replace==="function",z=(H=Z.transform)!==null&&H!==void 0?H:M0.returnFirstArg,W=(J=Z.library)!==null&&J!==void 0?J:JY,f=W.cloneElement,L=W.createElement,B=W.isValidElement,F=$.length;for(var K=0;K<F;K++){var q=$[K];if(G){var x=(Y=Z.replace)===null||Y===void 0?void 0:Y.call(Z,q,K);if(B(x)){if(F>1)x=f(x,{key:(Q=x.key)!==null&&Q!==void 0?Q:K});O.push(z(x,q,K));continue}}if(q.type==="text"){var N=!q.data.trim().length;if(N&&q.parent&&!(0,M0.canTextBeChildOfNode)(q.parent))continue;if(Z.trim&&N)continue;O.push(z(q.data,q,K));continue}var R=q,M={};if(YY(R))(0,M0.setStyleProp)(R.attribs.style,R.attribs),M=R.attribs;else if(R.attribs)M=(0,HY.default)(R.attribs,R.name);var E=void 0;switch(q.type){case"script":case"style":if(q.children[0])M.dangerouslySetInnerHTML={__html:q.children[0].data};break;case"tag":if(q.name==="textarea"&&q.children[0])M.defaultValue=q.children[0].data;else if((X=q.children)===null||X===void 0?void 0:X.length)E=O7(q.children,Z);break;default:continue}if(F>1)M.key=K;O.push(z(L(q.name,M,E),q,K))}return O.length===1?O[0]:O}function YY($){return M0.PRESERVE_CUSTOM_ATTRIBUTES&&$.type==="tag"&&(0,M0.isCustomComponent)($.name,$.attribs)}});var W6=I((y)=>{var z6=y&&y.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(y,"__esModule",{value:!0});y.htmlToDOM=y.domToReact=y.attributesToProps=y.Text=y.ProcessingInstruction=y.Element=y.Comment=void 0;y.default=GY;var W7=z6(u9());y.htmlToDOM=W7.default;var QY=z6(O6());y.attributesToProps=QY.default;var U7=z6(z7());y.domToReact=U7.default;var s0=s5();Object.defineProperty(y,"Comment",{enumerable:!0,get:function(){return s0.Comment}});Object.defineProperty(y,"Element",{enumerable:!0,get:function(){return s0.Element}});Object.defineProperty(y,"ProcessingInstruction",{enumerable:!0,get:function(){return s0.ProcessingInstruction}});Object.defineProperty(y,"Text",{enumerable:!0,get:function(){return s0.Text}});var XY={lowerCaseAttributeNames:!1};function GY($,Z){var H;if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];return(0,U7.default)((0,W7.default)($,(H=Z===null||Z===void 0?void 0:Z.htmlparser2)!==null&&H!==void 0?H:XY),Z)}});var D7=I((UL,V7)=>{var xY="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";V7.exports=xY});var T7=I((fL,P7)=>{var EY=D7();function R7(){}function N7(){}N7.resetWarningCache=R7;P7.exports=function(){function $(J,Y,Q,X,O,G){if(G===EY)return;var z=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}$.isRequired=$;function Z(){return $}var H={array:$,bigint:$,bool:$,func:$,number:$,object:$,string:$,symbol:$,any:$,arrayOf:Z,element:$,elementType:$,instanceOf:Z,node:$,objectOf:Z,oneOf:Z,oneOfType:Z,shape:Z,exact:Z,checkPropTypes:N7,resetWarningCache:R7};return H.PropTypes=H,H}});var L6=I((FL,w7)=>{w7.exports=T7()();var SY,vY});function cY($){if(typeof $==="object"&&$!==null){var Z=$.$$typeof;switch(Z){case CY:switch($=$.type,$){case yY:case mY:case jY:case _Y:case hY:case uY:return $;default:switch($=$&&$.$$typeof,$){case bY:case x7:case dY:case E7:case kY:return $;default:return Z}}case gY:return Z}}}var e,CY,gY,jY,hY,_Y,kY,bY,yY,mY,x7,uY,E7,dY,B6,K6=function($){return cY($)===E7};var S7=_3(()=>{e=typeof Symbol==="function"&&Symbol.for,CY=e?Symbol.for("react.element"):60103,gY=e?Symbol.for("react.portal"):60106,jY=e?Symbol.for("react.fragment"):60107,hY=e?Symbol.for("react.strict_mode"):60108,_Y=e?Symbol.for("react.profiler"):60114,kY=e?Symbol.for("react.provider"):60109,bY=e?Symbol.for("react.context"):60110,yY=e?Symbol.for("react.async_mode"):60111,mY=e?Symbol.for("react.concurrent_mode"):60111,x7=e?Symbol.for("react.forward_ref"):60112,uY=e?Symbol.for("react.suspense"):60113,E7=e?Symbol.for("react.memo"):60115,dY=e?Symbol.for("react.lazy"):60116;B6=x7});var q6=I((LL,_7)=>{S7();var iY={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},pY={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},nY={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},aY={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},j7={};j7[B6]=nY;function v7($){if(K6($))return aY;return j7[$.$$typeof]||iY}var{defineProperty:oY,getOwnPropertyNames:rY,getOwnPropertySymbols:C7,getOwnPropertyDescriptor:sY,getPrototypeOf:tY,prototype:g7}=Object;function h7($,Z,H){if(typeof Z!=="string"){if(g7){var J=tY(Z);if(J&&J!==g7)h7($,J,H)}var Y=rY(Z);if(C7)Y=Y.concat(C7(Z));var Q=v7($),X=v7(Z);for(var O=0;O<Y.length;++O){var G=Y[O];if(!pY[G]&&!(H&&H[G])&&!(X&&X[G])&&!(Q&&Q[G])){var z=sY(Z,G);try{oY($,G,z)}catch(W){}}}return $}return $}_7.exports=h7});var $5=I((A6,b7)=>{Object.defineProperty(A6,"__esModule",{value:!0});A6.default=JQ;function JQ($){return $.charAt(0).toUpperCase()+$.slice(1)}b7.exports=A6.default});var m7=I((V6,y7)=>{Object.defineProperty(V6,"__esModule",{value:!0});V6.default=OQ;var QQ=$5(),XQ=GQ(QQ);function GQ($){return $&&$.__esModule?$:{default:$}}function OQ($,Z,H){if($.hasOwnProperty(Z)){var J={},Y=$[Z],Q=(0,XQ.default)(Z),X=Object.keys(H);for(var O=0;O<X.length;O++){var G=X[O];if(G===Z)for(var z=0;z<Y.length;z++)J[Y[z]+Q]=H[Z];J[G]=H[G]}return J}return H}y7.exports=V6.default});var R6=I((D6,u7)=>{Object.defineProperty(D6,"__esModule",{value:!0});D6.default=WQ;function WQ($,Z,H,J,Y){for(var Q=0,X=$.length;Q<X;++Q){var O=$[Q](Z,H,J,Y);if(O)return O}}u7.exports=D6.default});var P6=I((N6,c7)=>{Object.defineProperty(N6,"__esModule",{value:!0});N6.default=fQ;function d7($,Z){if($.indexOf(Z)===-1)$.push(Z)}function fQ($,Z){if(Array.isArray(Z))for(var H=0,J=Z.length;H<J;++H)d7($,Z[H]);else d7($,Z)}c7.exports=N6.default});var w6=I((T6,l7)=>{Object.defineProperty(T6,"__esModule",{value:!0});T6.default=LQ;function LQ($){return $ instanceof Object&&!Array.isArray($)}l7.exports=T6.default});var n7=I((x6,p7)=>{Object.defineProperty(x6,"__esModule",{value:!0});x6.default=RQ;var KQ=m7(),qQ=Z5(KQ),MQ=R6(),i7=Z5(MQ),IQ=P6(),AQ=Z5(IQ),VQ=w6(),DQ=Z5(VQ);function Z5($){return $&&$.__esModule?$:{default:$}}function RQ($){var{prefixMap:Z,plugins:H}=$;function J(Y){for(var Q in Y){var X=Y[Q];if((0,DQ.default)(X))Y[Q]=J(X);else if(Array.isArray(X)){var O=[];for(var G=0,z=X.length;G<z;++G){var W=(0,i7.default)(H,Q,X[G],Y,Z);(0,AQ.default)(O,W||X[G])}if(O.length>0)Y[Q]=O}else{var f=(0,i7.default)(H,Q,X,Y,Z);if(f)Y[Q]=f;Y=(0,qQ.default)(Z,Q,Y)}}return Y}return J}p7.exports=x6.default});var o7=I((a7,H5)=>{/*!
|
|
3
13
|
* Bowser - a browser detector
|
|
4
14
|
* https://github.com/ded/bowser
|
|
5
15
|
* MIT License | (c) Dustin Diaz 2015
|
|
6
|
-
*/(function($,Z,J){if(typeof a0<"u"&&a0.exports)a0.exports=J();else if(typeof define=="function"&&define.amd)define(Z,J);else $[Z]=J()})(u7,"bowser",function(){var $=!0;function Z(G){function z(c1){var q1=G.match(c1);return q1&&q1.length>1&&q1[1]||""}function U(c1){var q1=G.match(c1);return q1&&q1.length>1&&q1[2]||""}var L=z(/(ipod|iphone|ipad)/i).toLowerCase(),K=/like android/i.test(G),q=!K&&/android/i.test(G),B=/nexus\s*[0-6]\s*/i.test(G),F=!B&&/nexus\s*[0-9]+/i.test(G),M=/CrOS/.test(G),P=/silk/i.test(G),N=/sailfish/i.test(G),D=/tizen/i.test(G),f=/(web|hpw)(o|0)s/i.test(G),E=/windows phone/i.test(G),j=/SamsungBrowser/i.test(G),u1=!E&&/windows/i.test(G),F5=!L&&!P&&/macintosh/i.test(G),K5=!q&&!N&&!D&&!f&&/linux/i.test(G),d1=U(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),C=z(/version\/(\d+(\.\d+)?)/i),I0=/tablet/i.test(G)&&!/tablet pc/i.test(G),t=!I0&&/[^-]mobi/i.test(G),N3=/xbox/i.test(G),O;if(/opera/i.test(G))O={name:"Opera",opera:$,version:C||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)};else if(/opr\/|opios/i.test(G))O={name:"Opera",opera:$,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||C};else if(/SamsungBrowser/i.test(G))O={name:"Samsung Internet for Android",samsungBrowser:$,version:C||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)};else if(/Whale/i.test(G))O={name:"NAVER Whale browser",whale:$,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)};else if(/MZBrowser/i.test(G))O={name:"MZ Browser",mzbrowser:$,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)};else if(/coast/i.test(G))O={name:"Opera Coast",coast:$,version:C||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)};else if(/focus/i.test(G))O={name:"Focus",focus:$,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)};else if(/yabrowser/i.test(G))O={name:"Yandex Browser",yandexbrowser:$,version:C||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)};else if(/ucbrowser/i.test(G))O={name:"UC Browser",ucbrowser:$,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)};else if(/mxios/i.test(G))O={name:"Maxthon",maxthon:$,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)};else if(/epiphany/i.test(G))O={name:"Epiphany",epiphany:$,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)};else if(/puffin/i.test(G))O={name:"Puffin",puffin:$,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)};else if(/sleipnir/i.test(G))O={name:"Sleipnir",sleipnir:$,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)};else if(/k-meleon/i.test(G))O={name:"K-Meleon",kMeleon:$,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)};else if(E)if(O={name:"Windows Phone",osname:"Windows Phone",windowsphone:$},d1)O.msedge=$,O.version=d1;else O.msie=$,O.version=z(/iemobile\/(\d+(\.\d+)?)/i);else if(/msie|trident/i.test(G))O={name:"Internet Explorer",msie:$,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)};else if(M)O={name:"Chrome",osname:"Chrome OS",chromeos:$,chromeBook:$,chrome:$,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)};else if(/edg([ea]|ios)/i.test(G))O={name:"Microsoft Edge",msedge:$,version:d1};else if(/vivaldi/i.test(G))O={name:"Vivaldi",vivaldi:$,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||C};else if(N)O={name:"Sailfish",osname:"Sailfish OS",sailfish:$,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)};else if(/seamonkey\//i.test(G))O={name:"SeaMonkey",seamonkey:$,version:z(/seamonkey\/(\d+(\.\d+)?)/i)};else if(/firefox|iceweasel|fxios/i.test(G)){if(O={name:"Firefox",firefox:$,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(G))O.firefoxos=$,O.osname="Firefox OS"}else if(P)O={name:"Amazon Silk",silk:$,version:z(/silk\/(\d+(\.\d+)?)/i)};else if(/phantom/i.test(G))O={name:"PhantomJS",phantom:$,version:z(/phantomjs\/(\d+(\.\d+)?)/i)};else if(/slimerjs/i.test(G))O={name:"SlimerJS",slimer:$,version:z(/slimerjs\/(\d+(\.\d+)?)/i)};else if(/blackberry|\bbb\d+/i.test(G)||/rim\stablet/i.test(G))O={name:"BlackBerry",osname:"BlackBerry OS",blackberry:$,version:C||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)};else if(f)O={name:"WebOS",osname:"WebOS",webos:$,version:C||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(G)&&(O.touchpad=$);else if(/bada/i.test(G))O={name:"Bada",osname:"Bada",bada:$,version:z(/dolfin\/(\d+(\.\d+)?)/i)};else if(D)O={name:"Tizen",osname:"Tizen",tizen:$,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||C};else if(/qupzilla/i.test(G))O={name:"QupZilla",qupzilla:$,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||C};else if(/chromium/i.test(G))O={name:"Chromium",chromium:$,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||C};else if(/chrome|crios|crmo/i.test(G))O={name:"Chrome",chrome:$,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)};else if(q)O={name:"Android",version:C};else if(/safari|applewebkit/i.test(G)){if(O={name:"Safari",safari:$},C)O.version=C}else if(L){if(O={name:L=="iphone"?"iPhone":L=="ipad"?"iPad":"iPod"},C)O.version=C}else if(/googlebot/i.test(G))O={name:"Googlebot",googlebot:$,version:z(/googlebot\/(\d+(\.\d+))/i)||C};else O={name:z(/^(.*)\/(.*) /),version:U(/^(.*)\/(.*) /)};if(!O.msedge&&/(apple)?webkit/i.test(G)){if(/(apple)?webkit\/537\.36/i.test(G))O.name=O.name||"Blink",O.blink=$;else O.name=O.name||"Webkit",O.webkit=$;if(!O.version&&C)O.version=C}else if(!O.opera&&/gecko\//i.test(G))O.name=O.name||"Gecko",O.gecko=$,O.version=O.version||z(/gecko\/(\d+(\.\d+)?)/i);if(!O.windowsphone&&(q||O.silk))O.android=$,O.osname="Android";else if(!O.windowsphone&&L)O[L]=$,O.ios=$,O.osname="iOS";else if(F5)O.mac=$,O.osname="macOS";else if(N3)O.xbox=$,O.osname="Xbox";else if(u1)O.windows=$,O.osname="Windows";else if(K5)O.linux=$,O.osname="Linux";function P3(c1){switch(c1){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var b="";if(O.windows)b=P3(z(/Windows ((NT|XP)( \d\d?.\d)?)/i));else if(O.windowsphone)b=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);else if(O.mac)b=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),b=b.replace(/[_\s]/g,".");else if(L)b=z(/os (\d+([_\s]\d+)*) like mac os x/i),b=b.replace(/[_\s]/g,".");else if(q)b=z(/android[ \/-](\d+(\.\d+)*)/i);else if(O.webos)b=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i);else if(O.blackberry)b=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i);else if(O.bada)b=z(/bada\/(\d+(\.\d+)*)/i);else if(O.tizen)b=z(/tizen[\/\s](\d+(\.\d+)*)/i);if(b)O.osversion=b;var E8=!O.windows&&b.split(".")[0];if(I0||F||L=="ipad"||q&&(E8==3||E8>=4&&!t)||O.silk)O.tablet=$;else if(t||L=="iphone"||L=="ipod"||q||B||O.blackberry||O.webos||O.bada)O.mobile=$;if(O.msedge||O.msie&&O.version>=10||O.yandexbrowser&&O.version>=15||O.vivaldi&&O.version>=1||O.chrome&&O.version>=20||O.samsungBrowser&&O.version>=4||O.whale&&Q([O.version,"1.0"])===1||O.mzbrowser&&Q([O.version,"6.0"])===1||O.focus&&Q([O.version,"1.0"])===1||O.firefox&&O.version>=20||O.safari&&O.version>=6||O.opera&&O.version>=10||O.ios&&O.osversion&&O.osversion.split(".")[0]>=6||O.blackberry&&O.version>=10.1||O.chromium&&O.version>=20)O.a=$;else if(O.msie&&O.version<10||O.chrome&&O.version<20||O.firefox&&O.version<20||O.safari&&O.version<6||O.opera&&O.version<10||O.ios&&O.osversion&&O.osversion.split(".")[0]<6||O.chromium&&O.version<20)O.c=$;else O.x=$;return O}var J=Z(typeof navigator<"u"?navigator.userAgent||"":"");J.test=function(G){for(var z=0;z<G.length;++z){var U=G[z];if(typeof U==="string"){if(U in J)return!0}}return!1};function H(G){return G.split(".").length}function Y(G,z){var U=[],L;if(Array.prototype.map)return Array.prototype.map.call(G,z);for(L=0;L<G.length;L++)U.push(z(G[L]));return U}function Q(G){var z=Math.max(H(G[0]),H(G[1])),U=Y(G,function(L){var K=z-H(L);return L=L+Array(K+1).join(".0"),Y(L.split("."),function(q){return Array(20-q.length).join("0")+q}).reverse()});while(--z>=0)if(U[0][z]>U[1][z])return 1;else if(U[0][z]===U[1][z]){if(z===0)return 0}else return-1}function X(G,z,U){var L=J;if(typeof z==="string")U=z,z=void 0;if(z===void 0)z=!1;if(U)L=Z(U);var K=""+L.version;for(var q in G)if(G.hasOwnProperty(q)){if(L[q]){if(typeof G[q]!=="string")throw Error("Browser version in the minVersion map should be a string: "+q+": "+String(G));return Q([K,G[q]])<0}}return z}function W(G,z,U){return!X(G,z,U)}return J.isUnsupportedBrowser=X,J.compareVersions=Q,J.check=W,J._detect=Z,J.detect=Z,J})});var n7=I((P6,i7)=>{Object.defineProperty(P6,"__esModule",{value:!0});P6.default=NQ;var VQ=d7(),c7=DQ(VQ);function DQ($){return $&&$.__esModule?$:{default:$}}var l7={chrome:"Webkit",safari:"Webkit",ios:"Webkit",android:"Webkit",phantom:"Webkit",opera:"Webkit",webos:"Webkit",blackberry:"Webkit",bada:"Webkit",tizen:"Webkit",chromium:"Webkit",vivaldi:"Webkit",firefox:"Moz",seamoney:"Moz",sailfish:"Moz",msie:"ms",msedge:"ms"},p7={chrome:"chrome",chromium:"chrome",safari:"safari",firfox:"firefox",msedge:"edge",opera:"opera",vivaldi:"opera",msie:"ie"};function RQ($){if($.firefox)return"firefox";if($.mobile||$.tablet){if($.ios)return"ios_saf";else if($.android)return"android";else if($.opera)return"op_mini"}for(var Z in p7)if($.hasOwnProperty(Z))return p7[Z]}function NQ($){var Z=c7.default._detect($);if(Z.yandexbrowser)Z=c7.default._detect($.replace(/YaBrowser\/[0-9.]*/,""));for(var J in l7)if(Z.hasOwnProperty(J)){var H=l7[J];Z.jsPrefix=H,Z.cssPrefix="-"+H.toLowerCase()+"-";break}if(Z.browserName=RQ(Z),Z.version)Z.browserVersion=parseFloat(Z.version);else Z.browserVersion=parseInt(parseFloat(Z.osversion),10);if(Z.osVersion=parseFloat(Z.osversion),Z.browserName==="ios_saf"&&Z.browserVersion>Z.osVersion)Z.browserVersion=Z.osVersion;if(Z.browserName==="android"&&Z.chrome&&Z.browserVersion>37)Z.browserName="and_chr";if(Z.browserName==="android"&&Z.osVersion<5)Z.browserVersion=Z.osVersion;if(Z.browserName==="android"&&Z.samsungBrowser)Z.browserName="and_chr",Z.browserVersion=44;return Z}i7.exports=P6.default});var a7=I((T6,o7)=>{Object.defineProperty(T6,"__esModule",{value:!0});T6.default=TQ;function TQ($,Z,J){var H="keyframes";if($==="chrome"&&Z<43||($==="safari"||$==="ios_saf")&&Z<9||$==="opera"&&Z<30||$==="android"&&Z<=4.4||$==="and_uc")return J+H;return H}o7.exports=T6.default});var t7=I((w6,s7)=>{Object.defineProperty(w6,"__esModule",{value:!0});var xQ=function(){function $(Z,J){for(var H=0;H<J.length;H++){var Y=J[H];if(Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y)Y.writable=!0;Object.defineProperty(Z,Y.key,Y)}}return function(Z,J,H){if(J)$(Z.prototype,J);if(H)$(Z,H);return Z}}();w6.default=uQ;var EQ=n7(),SQ=C1(EQ),vQ=a7(),CQ=C1(vQ),jQ=n0(),gQ=C1(jQ),_Q=V6(),hQ=C1(_Q),kQ=R6(),bQ=C1(kQ),yQ=I6(),r7=C1(yQ);function C1($){return $&&$.__esModule?$:{default:$}}function mQ($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function uQ($){var{prefixMap:Z,plugins:J}=$,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(Y){return Y};return function(){function Y(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};mQ(this,Y);var X=typeof navigator<"u"?navigator.userAgent:void 0;if(this._userAgent=Q.userAgent||X,this._keepUnprefixed=Q.keepUnprefixed||!1,this._userAgent)this._browserInfo=(0,SQ.default)(this._userAgent);if(this._browserInfo&&this._browserInfo.cssPrefix)this.prefixedKeyframes=(0,CQ.default)(this._browserInfo.browserName,this._browserInfo.browserVersion,this._browserInfo.cssPrefix);else return this._useFallback=!0,!1;var W=this._browserInfo.browserName&&Z[this._browserInfo.browserName];if(W){this._requiresPrefix={};for(var G in W)if(W[G]>=this._browserInfo.browserVersion)this._requiresPrefix[G]=!0;this._hasPropsRequiringPrefix=Object.keys(this._requiresPrefix).length>0}else this._useFallback=!0;this._metaData={browserVersion:this._browserInfo.browserVersion,browserName:this._browserInfo.browserName,cssPrefix:this._browserInfo.cssPrefix,jsPrefix:this._browserInfo.jsPrefix,keepUnprefixed:this._keepUnprefixed,requiresPrefix:this._requiresPrefix}}return xQ(Y,[{key:"prefix",value:function(X){if(this._useFallback)return H(X);if(!this._hasPropsRequiringPrefix)return X;return this._prefixStyle(X)}},{key:"_prefixStyle",value:function(X){for(var W in X){var G=X[W];if((0,bQ.default)(G))X[W]=this.prefix(G);else if(Array.isArray(G)){var z=[];for(var U=0,L=G.length;U<L;++U){var K=(0,r7.default)(J,W,G[U],X,this._metaData);(0,hQ.default)(z,K||G[U])}if(z.length>0)X[W]=z}else{var q=(0,r7.default)(J,W,G,X,this._metaData);if(q)X[W]=q;if(this._requiresPrefix.hasOwnProperty(W)){if(X[this._browserInfo.jsPrefix+(0,gQ.default)(W)]=G,!this._keepUnprefixed)delete X[W]}}}return X}}],[{key:"prefixAll",value:function(X){return H(X)}}]),Y}()}s7.exports=w6.default});var x6=I((KF,r0)=>{/*!
|
|
16
|
+
*/(function($,Z,H){if(typeof H5<"u"&&H5.exports)H5.exports=H();else if(typeof define=="function"&&define.amd)define(Z,H);else $[Z]=H()})(a7,"bowser",function(){var $=!0;function Z(G){function z(o1){var D1=G.match(o1);return D1&&D1.length>1&&D1[1]||""}function W(o1){var D1=G.match(o1);return D1&&D1.length>1&&D1[2]||""}var f=z(/(ipod|iphone|ipad)/i).toLowerCase(),L=/like android/i.test(G),B=!L&&/android/i.test(G),F=/nexus\s*[0-6]\s*/i.test(G),K=!F&&/nexus\s*[0-9]+/i.test(G),q=/CrOS/.test(G),x=/silk/i.test(G),N=/sailfish/i.test(G),R=/tizen/i.test(G),M=/(web|hpw)(o|0)s/i.test(G),E=/windows phone/i.test(G),g=/SamsungBrowser/i.test(G),F1=!E&&/windows/i.test(G),g1=!f&&!x&&/macintosh/i.test(G),V=!B&&!N&&!R&&!M&&/linux/i.test(G),w=W(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),D=z(/version\/(\d+(\.\d+)?)/i),v=/tablet/i.test(G)&&!/tablet pc/i.test(G),_=!v&&/[^-]mobi/i.test(G),r=/xbox/i.test(G),U;if(/opera/i.test(G))U={name:"Opera",opera:$,version:D||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)};else if(/opr\/|opios/i.test(G))U={name:"Opera",opera:$,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||D};else if(/SamsungBrowser/i.test(G))U={name:"Samsung Internet for Android",samsungBrowser:$,version:D||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)};else if(/Whale/i.test(G))U={name:"NAVER Whale browser",whale:$,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)};else if(/MZBrowser/i.test(G))U={name:"MZ Browser",mzbrowser:$,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)};else if(/coast/i.test(G))U={name:"Opera Coast",coast:$,version:D||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)};else if(/focus/i.test(G))U={name:"Focus",focus:$,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)};else if(/yabrowser/i.test(G))U={name:"Yandex Browser",yandexbrowser:$,version:D||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)};else if(/ucbrowser/i.test(G))U={name:"UC Browser",ucbrowser:$,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)};else if(/mxios/i.test(G))U={name:"Maxthon",maxthon:$,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)};else if(/epiphany/i.test(G))U={name:"Epiphany",epiphany:$,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)};else if(/puffin/i.test(G))U={name:"Puffin",puffin:$,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)};else if(/sleipnir/i.test(G))U={name:"Sleipnir",sleipnir:$,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)};else if(/k-meleon/i.test(G))U={name:"K-Meleon",kMeleon:$,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)};else if(E)if(U={name:"Windows Phone",osname:"Windows Phone",windowsphone:$},w)U.msedge=$,U.version=w;else U.msie=$,U.version=z(/iemobile\/(\d+(\.\d+)?)/i);else if(/msie|trident/i.test(G))U={name:"Internet Explorer",msie:$,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)};else if(q)U={name:"Chrome",osname:"Chrome OS",chromeos:$,chromeBook:$,chrome:$,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)};else if(/edg([ea]|ios)/i.test(G))U={name:"Microsoft Edge",msedge:$,version:w};else if(/vivaldi/i.test(G))U={name:"Vivaldi",vivaldi:$,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||D};else if(N)U={name:"Sailfish",osname:"Sailfish OS",sailfish:$,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)};else if(/seamonkey\//i.test(G))U={name:"SeaMonkey",seamonkey:$,version:z(/seamonkey\/(\d+(\.\d+)?)/i)};else if(/firefox|iceweasel|fxios/i.test(G)){if(U={name:"Firefox",firefox:$,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(G))U.firefoxos=$,U.osname="Firefox OS"}else if(x)U={name:"Amazon Silk",silk:$,version:z(/silk\/(\d+(\.\d+)?)/i)};else if(/phantom/i.test(G))U={name:"PhantomJS",phantom:$,version:z(/phantomjs\/(\d+(\.\d+)?)/i)};else if(/slimerjs/i.test(G))U={name:"SlimerJS",slimer:$,version:z(/slimerjs\/(\d+(\.\d+)?)/i)};else if(/blackberry|\bbb\d+/i.test(G)||/rim\stablet/i.test(G))U={name:"BlackBerry",osname:"BlackBerry OS",blackberry:$,version:D||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)};else if(M)U={name:"WebOS",osname:"WebOS",webos:$,version:D||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(G)&&(U.touchpad=$);else if(/bada/i.test(G))U={name:"Bada",osname:"Bada",bada:$,version:z(/dolfin\/(\d+(\.\d+)?)/i)};else if(R)U={name:"Tizen",osname:"Tizen",tizen:$,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||D};else if(/qupzilla/i.test(G))U={name:"QupZilla",qupzilla:$,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||D};else if(/chromium/i.test(G))U={name:"Chromium",chromium:$,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||D};else if(/chrome|crios|crmo/i.test(G))U={name:"Chrome",chrome:$,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)};else if(B)U={name:"Android",version:D};else if(/safari|applewebkit/i.test(G)){if(U={name:"Safari",safari:$},D)U.version=D}else if(f){if(U={name:f=="iphone"?"iPhone":f=="ipad"?"iPad":"iPod"},D)U.version=D}else if(/googlebot/i.test(G))U={name:"Googlebot",googlebot:$,version:z(/googlebot\/(\d+(\.\d+))/i)||D};else U={name:z(/^(.*)\/(.*) /),version:W(/^(.*)\/(.*) /)};if(!U.msedge&&/(apple)?webkit/i.test(G)){if(/(apple)?webkit\/537\.36/i.test(G))U.name=U.name||"Blink",U.blink=$;else U.name=U.name||"Webkit",U.webkit=$;if(!U.version&&D)U.version=D}else if(!U.opera&&/gecko\//i.test(G))U.name=U.name||"Gecko",U.gecko=$,U.version=U.version||z(/gecko\/(\d+(\.\d+)?)/i);if(!U.windowsphone&&(B||U.silk))U.android=$,U.osname="Android";else if(!U.windowsphone&&f)U[f]=$,U.ios=$,U.osname="iOS";else if(g1)U.mac=$,U.osname="macOS";else if(r)U.xbox=$,U.osname="Xbox";else if(F1)U.windows=$,U.osname="Windows";else if(V)U.linux=$,U.osname="Linux";function a1(o1){switch(o1){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var d="";if(U.windows)d=a1(z(/Windows ((NT|XP)( \d\d?.\d)?)/i));else if(U.windowsphone)d=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);else if(U.mac)d=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),d=d.replace(/[_\s]/g,".");else if(f)d=z(/os (\d+([_\s]\d+)*) like mac os x/i),d=d.replace(/[_\s]/g,".");else if(B)d=z(/android[ \/-](\d+(\.\d+)*)/i);else if(U.webos)d=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i);else if(U.blackberry)d=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i);else if(U.bada)d=z(/bada\/(\d+(\.\d+)*)/i);else if(U.tizen)d=z(/tizen[\/\s](\d+(\.\d+)*)/i);if(d)U.osversion=d;var g2=!U.windows&&d.split(".")[0];if(v||K||f=="ipad"||B&&(g2==3||g2>=4&&!_)||U.silk)U.tablet=$;else if(_||f=="iphone"||f=="ipod"||B||F||U.blackberry||U.webos||U.bada)U.mobile=$;if(U.msedge||U.msie&&U.version>=10||U.yandexbrowser&&U.version>=15||U.vivaldi&&U.version>=1||U.chrome&&U.version>=20||U.samsungBrowser&&U.version>=4||U.whale&&Q([U.version,"1.0"])===1||U.mzbrowser&&Q([U.version,"6.0"])===1||U.focus&&Q([U.version,"1.0"])===1||U.firefox&&U.version>=20||U.safari&&U.version>=6||U.opera&&U.version>=10||U.ios&&U.osversion&&U.osversion.split(".")[0]>=6||U.blackberry&&U.version>=10.1||U.chromium&&U.version>=20)U.a=$;else if(U.msie&&U.version<10||U.chrome&&U.version<20||U.firefox&&U.version<20||U.safari&&U.version<6||U.opera&&U.version<10||U.ios&&U.osversion&&U.osversion.split(".")[0]<6||U.chromium&&U.version<20)U.c=$;else U.x=$;return U}var H=Z(typeof navigator<"u"?navigator.userAgent||"":"");H.test=function(G){for(var z=0;z<G.length;++z){var W=G[z];if(typeof W==="string"){if(W in H)return!0}}return!1};function J(G){return G.split(".").length}function Y(G,z){var W=[],f;if(Array.prototype.map)return Array.prototype.map.call(G,z);for(f=0;f<G.length;f++)W.push(z(G[f]));return W}function Q(G){var z=Math.max(J(G[0]),J(G[1])),W=Y(G,function(f){var L=z-J(f);return f=f+Array(L+1).join(".0"),Y(f.split("."),function(B){return Array(20-B.length).join("0")+B}).reverse()});while(--z>=0)if(W[0][z]>W[1][z])return 1;else if(W[0][z]===W[1][z]){if(z===0)return 0}else return-1}function X(G,z,W){var f=H;if(typeof z==="string")W=z,z=void 0;if(z===void 0)z=!1;if(W)f=Z(W);var L=""+f.version;for(var B in G)if(G.hasOwnProperty(B)){if(f[B]){if(typeof G[B]!=="string")throw Error("Browser version in the minVersion map should be a string: "+B+": "+String(G));return Q([L,G[B]])<0}}return z}function O(G,z,W){return!X(G,z,W)}return H.isUnsupportedBrowser=X,H.compareVersions=Q,H.check=O,H._detect=Z,H.detect=Z,H})});var $$=I((E6,e7)=>{Object.defineProperty(E6,"__esModule",{value:!0});E6.default=xQ;var PQ=o7(),r7=TQ(PQ);function TQ($){return $&&$.__esModule?$:{default:$}}var s7={chrome:"Webkit",safari:"Webkit",ios:"Webkit",android:"Webkit",phantom:"Webkit",opera:"Webkit",webos:"Webkit",blackberry:"Webkit",bada:"Webkit",tizen:"Webkit",chromium:"Webkit",vivaldi:"Webkit",firefox:"Moz",seamoney:"Moz",sailfish:"Moz",msie:"ms",msedge:"ms"},t7={chrome:"chrome",chromium:"chrome",safari:"safari",firfox:"firefox",msedge:"edge",opera:"opera",vivaldi:"opera",msie:"ie"};function wQ($){if($.firefox)return"firefox";if($.mobile||$.tablet){if($.ios)return"ios_saf";else if($.android)return"android";else if($.opera)return"op_mini"}for(var Z in t7)if($.hasOwnProperty(Z))return t7[Z]}function xQ($){var Z=r7.default._detect($);if(Z.yandexbrowser)Z=r7.default._detect($.replace(/YaBrowser\/[0-9.]*/,""));for(var H in s7)if(Z.hasOwnProperty(H)){var J=s7[H];Z.jsPrefix=J,Z.cssPrefix="-"+J.toLowerCase()+"-";break}if(Z.browserName=wQ(Z),Z.version)Z.browserVersion=parseFloat(Z.version);else Z.browserVersion=parseInt(parseFloat(Z.osversion),10);if(Z.osVersion=parseFloat(Z.osversion),Z.browserName==="ios_saf"&&Z.browserVersion>Z.osVersion)Z.browserVersion=Z.osVersion;if(Z.browserName==="android"&&Z.chrome&&Z.browserVersion>37)Z.browserName="and_chr";if(Z.browserName==="android"&&Z.osVersion<5)Z.browserVersion=Z.osVersion;if(Z.browserName==="android"&&Z.samsungBrowser)Z.browserName="and_chr",Z.browserVersion=44;return Z}e7.exports=E6.default});var H$=I((S6,Z$)=>{Object.defineProperty(S6,"__esModule",{value:!0});S6.default=SQ;function SQ($,Z,H){var J="keyframes";if($==="chrome"&&Z<43||($==="safari"||$==="ios_saf")&&Z<9||$==="opera"&&Z<30||$==="android"&&Z<=4.4||$==="and_uc")return H+J;return J}Z$.exports=S6.default});var Q$=I((v6,Y$)=>{Object.defineProperty(v6,"__esModule",{value:!0});var CQ=function(){function $(Z,H){for(var J=0;J<H.length;J++){var Y=H[J];if(Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y)Y.writable=!0;Object.defineProperty(Z,Y.key,Y)}}return function(Z,H,J){if(H)$(Z.prototype,H);if(J)$(Z,J);return Z}}();v6.default=iQ;var gQ=$$(),jQ=y1(gQ),hQ=H$(),_Q=y1(hQ),kQ=$5(),bQ=y1(kQ),yQ=P6(),mQ=y1(yQ),uQ=w6(),dQ=y1(uQ),cQ=R6(),J$=y1(cQ);function y1($){return $&&$.__esModule?$:{default:$}}function lQ($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function iQ($){var{prefixMap:Z,plugins:H}=$,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(Y){return Y};return function(){function Y(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lQ(this,Y);var X=typeof navigator<"u"?navigator.userAgent:void 0;if(this._userAgent=Q.userAgent||X,this._keepUnprefixed=Q.keepUnprefixed||!1,this._userAgent)this._browserInfo=(0,jQ.default)(this._userAgent);if(this._browserInfo&&this._browserInfo.cssPrefix)this.prefixedKeyframes=(0,_Q.default)(this._browserInfo.browserName,this._browserInfo.browserVersion,this._browserInfo.cssPrefix);else return this._useFallback=!0,!1;var O=this._browserInfo.browserName&&Z[this._browserInfo.browserName];if(O){this._requiresPrefix={};for(var G in O)if(O[G]>=this._browserInfo.browserVersion)this._requiresPrefix[G]=!0;this._hasPropsRequiringPrefix=Object.keys(this._requiresPrefix).length>0}else this._useFallback=!0;this._metaData={browserVersion:this._browserInfo.browserVersion,browserName:this._browserInfo.browserName,cssPrefix:this._browserInfo.cssPrefix,jsPrefix:this._browserInfo.jsPrefix,keepUnprefixed:this._keepUnprefixed,requiresPrefix:this._requiresPrefix}}return CQ(Y,[{key:"prefix",value:function(X){if(this._useFallback)return J(X);if(!this._hasPropsRequiringPrefix)return X;return this._prefixStyle(X)}},{key:"_prefixStyle",value:function(X){for(var O in X){var G=X[O];if((0,dQ.default)(G))X[O]=this.prefix(G);else if(Array.isArray(G)){var z=[];for(var W=0,f=G.length;W<f;++W){var L=(0,J$.default)(H,O,G[W],X,this._metaData);(0,mQ.default)(z,L||G[W])}if(z.length>0)X[O]=z}else{var B=(0,J$.default)(H,O,G,X,this._metaData);if(B)X[O]=B;if(this._requiresPrefix.hasOwnProperty(O)){if(X[this._browserInfo.jsPrefix+(0,bQ.default)(O)]=G,!this._keepUnprefixed)delete X[O]}}}return X}}],[{key:"prefixAll",value:function(X){return J(X)}}]),Y}()}Y$.exports=v6.default});var C6=I((VL,J5)=>{/*!
|
|
7
17
|
Copyright (c) 2015 Jed Watson.
|
|
8
18
|
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
9
19
|
All rights reserved.
|
|
10
|
-
*/(function(){var $=!!(typeof window<"u"&&window.document&&window.document.createElement),Z={canUseDOM:$,canUseWorkers:typeof Worker<"u",canUseEventListeners:$&&!!(window.addEventListener||window.attachEvent),canUseViewport:$&&!!window.screen};if(typeof define==="function"&&typeof define.amd==="object"&&define.amd)define(function(){return Z});else if(typeof r0<"u"&&r0.exports)r0.exports=Z;else window.ExecutionEnvironment=Z})()});var R1=I((E6,e7)=>{Object.defineProperty(E6,"__esModule",{value:!0});E6.default=lQ;var cQ=/-webkit-|-moz-|-ms-/;function lQ($){return typeof $==="string"&&cQ.test($)}e7.exports=E6.default});var Z$=I((S6,$$)=>{Object.defineProperty(S6,"__esModule",{value:!0});S6.default=rQ;var iQ=R1(),nQ=oQ(iQ);function oQ($){return $&&$.__esModule?$:{default:$}}var aQ=["-webkit-","-moz-",""];function rQ($,Z){if(typeof Z==="string"&&!(0,nQ.default)(Z)&&Z.indexOf("calc(")>-1)return aQ.map(function(J){return Z.replace(/calc\(/g,J+"calc(")})}$$.exports=S6.default});var H$=I((v6,J$)=>{Object.defineProperty(v6,"__esModule",{value:!0});v6.default=JX;var tQ=R1(),eQ=$X(tQ);function $X($){return $&&$.__esModule?$:{default:$}}var ZX=["-webkit-",""];function JX($,Z){if(typeof Z==="string"&&!(0,eQ.default)(Z)&&Z.indexOf("cross-fade(")>-1)return ZX.map(function(J){return Z.replace(/cross-fade\(/g,J+"cross-fade(")})}J$.exports=v6.default});var Q$=I((C6,Y$)=>{Object.defineProperty(C6,"__esModule",{value:!0});C6.default=XX;var YX=["-webkit-","-moz-",""],QX={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function XX($,Z){if($==="cursor"&&QX.hasOwnProperty(Z))return YX.map(function(J){return J+Z})}Y$.exports=C6.default});var G$=I((j6,X$)=>{Object.defineProperty(j6,"__esModule",{value:!0});j6.default=LX;var WX=R1(),zX=UX(WX);function UX($){return $&&$.__esModule?$:{default:$}}var OX=["-webkit-",""];function LX($,Z){if(typeof Z==="string"&&!(0,zX.default)(Z)&&Z.indexOf("filter(")>-1)return OX.map(function(J){return Z.replace(/filter\(/g,J+"filter(")})}X$.exports=j6.default});var U$=I((g6,z$)=>{Object.defineProperty(g6,"__esModule",{value:!0});g6.default=FX;var W$={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function FX($,Z){if($==="display"&&W$.hasOwnProperty(Z))return W$[Z]}z$.exports=g6.default});var B$=I((_6,L$)=>{Object.defineProperty(_6,"__esModule",{value:!0});_6.default=MX;var qX={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},O$={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function MX($,Z,J){if(O$.hasOwnProperty($))J[O$[$]]=qX[Z]||Z}L$.exports=_6.default});var q$=I((h6,K$)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.default=fX;var IX={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},F$={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"};function fX($,Z,J){if($==="flexDirection"&&typeof Z==="string"){if(Z.indexOf("column")>-1)J.WebkitBoxOrient="vertical";else J.WebkitBoxOrient="horizontal";if(Z.indexOf("reverse")>-1)J.WebkitBoxDirection="reverse";else J.WebkitBoxDirection="normal"}if(F$.hasOwnProperty($))J[F$[$]]=IX[Z]||Z}K$.exports=h6.default});var I$=I((k6,A$)=>{Object.defineProperty(k6,"__esModule",{value:!0});k6.default=TX;var DX=R1(),RX=NX(DX);function NX($){return $&&$.__esModule?$:{default:$}}var PX=["-webkit-","-moz-",""],M$=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function TX($,Z){if(typeof Z==="string"&&!(0,RX.default)(Z)&&M$.test(Z))return PX.map(function(J){return Z.replace(M$,function(H){return J+H})})}A$.exports=k6.default});var V$=I((b6,f$)=>{Object.defineProperty(b6,"__esModule",{value:!0});b6.default=CX;var xX=R1(),EX=SX(xX);function SX($){return $&&$.__esModule?$:{default:$}}var vX=["-webkit-",""];function CX($,Z){if(typeof Z==="string"&&!(0,EX.default)(Z)&&Z.indexOf("image-set(")>-1)return vX.map(function(J){return Z.replace(/image-set\(/g,J+"image-set(")})}f$.exports=b6.default});var R$=I((y6,D$)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.default=gX;function gX($,Z){if($==="position"&&Z==="sticky")return["-webkit-sticky","sticky"]}D$.exports=y6.default});var P$=I((m6,N$)=>{Object.defineProperty(m6,"__esModule",{value:!0});m6.default=yX;var hX=["-webkit-","-moz-",""],kX={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},bX={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function yX($,Z){if(kX.hasOwnProperty($)&&bX.hasOwnProperty(Z))return hX.map(function(J){return J+Z})}N$.exports=m6.default});var w$=I((qF,T$)=>{var uX=/[A-Z]/g,dX=/^ms-/,u6={};function cX($){return"-"+$.toLowerCase()}function lX($){if(u6.hasOwnProperty($))return u6[$];var Z=$.replace(uX,cX);return u6[$]=dX.test(Z)?"-"+Z:Z}T$.exports=lX});var c6=I((d6,x$)=>{Object.defineProperty(d6,"__esModule",{value:!0});d6.default=oX;var pX=w$(),iX=nX(pX);function nX($){return $&&$.__esModule?$:{default:$}}function oX($){return(0,iX.default)($)}x$.exports=d6.default});var v$=I((p6,S$)=>{Object.defineProperty(p6,"__esModule",{value:!0});p6.default=YG;var rX=c6(),sX=l6(rX),tX=R1(),eX=l6(tX),$G=n0(),E$=l6($G);function l6($){return $&&$.__esModule?$:{default:$}}var ZG={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},JG={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function HG($,Z){if((0,eX.default)($))return $;var J=$.split(/,(?![^()]*(?:\([^()]*\))?\))/g);for(var H=0,Y=J.length;H<Y;++H){var Q=J[H],X=[Q];for(var W in Z){var G=(0,sX.default)(W);if(Q.indexOf(G)>-1&&G!=="order"){var z=Z[W];for(var U=0,L=z.length;U<L;++U)X.unshift(Q.replace(G,JG[z[U]]+G))}}J[H]=X.join(",")}return J.join(",")}function YG($,Z,J,H){if(typeof Z==="string"&&ZG.hasOwnProperty($)){var Y=HG(Z,H),Q=Y.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(W){return!/-moz-|-ms-/.test(W)}).join(",");if($.indexOf("Webkit")>-1)return Q;var X=Y.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(W){return!/-webkit-|-ms-/.test(W)}).join(",");if($.indexOf("Moz")>-1)return X;return J["Webkit"+(0,E$.default)($)]=Q,J["Moz"+(0,E$.default)($)]=X,Y}}S$.exports=p6.default});var a=I((n6,p$)=>{Object.defineProperty(n6,"__esModule",{value:!0});n6.default=XG;function XG($,Z,J){if(J)return[$,Z];return $}p$.exports=n6.default});var n$=I((o6,i$)=>{Object.defineProperty(o6,"__esModule",{value:!0});o6.default=OG;var WG=a(),zG=UG(WG);function UG($){return $&&$.__esModule?$:{default:$}}function OG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W}=H;if(typeof Z==="string"&&Z.indexOf("calc(")>-1&&(Y==="firefox"&&Q<15||Y==="chrome"&&Q<25||Y==="safari"&&Q<6.1||Y==="ios_saf"&&Q<7))return(0,zG.default)(Z.replace(/calc\(/g,X+"calc("),Z,W)}i$.exports=o6.default});var a$=I((a6,o$)=>{Object.defineProperty(a6,"__esModule",{value:!0});a6.default=qG;var BG=a(),FG=KG(BG);function KG($){return $&&$.__esModule?$:{default:$}}function qG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W}=H;if(typeof Z==="string"&&Z.indexOf("cross-fade(")>-1&&(Y==="chrome"||Y==="opera"||Y==="and_chr"||(Y==="ios_saf"||Y==="safari")&&Q<10))return(0,FG.default)(Z.replace(/cross-fade\(/g,X+"cross-fade("),Z,W)}o$.exports=a6.default});var t$=I((r6,s$)=>{Object.defineProperty(r6,"__esModule",{value:!0});r6.default=DG;var AG=a(),r$=IG(AG);function IG($){return $&&$.__esModule?$:{default:$}}var fG={grab:!0,grabbing:!0},VG={"zoom-in":!0,"zoom-out":!0};function DG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W}=H;if($==="cursor"&&fG[Z]&&(Y==="firefox"||Y==="chrome"||Y==="safari"||Y==="opera"))return(0,r$.default)(X+Z,Z,W);if($==="cursor"&&VG[Z]&&(Y==="firefox"&&Q<24||Y==="chrome"&&Q<37||Y==="safari"&&Q<9||Y==="opera"&&Q<24))return(0,r$.default)(X+Z,Z,W)}s$.exports=r6.default});var $4=I((s6,e$)=>{Object.defineProperty(s6,"__esModule",{value:!0});s6.default=wG;var NG=a(),PG=TG(NG);function TG($){return $&&$.__esModule?$:{default:$}}function wG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W}=H;if(typeof Z==="string"&&Z.indexOf("filter(")>-1&&(Y==="ios_saf"||Y==="safari"&&Q<9.1))return(0,PG.default)(Z.replace(/filter\(/g,X+"filter("),Z,W)}e$.exports=s6.default});var J4=I((t6,Z4)=>{Object.defineProperty(t6,"__esModule",{value:!0});t6.default=jG;var EG=a(),SG=vG(EG);function vG($){return $&&$.__esModule?$:{default:$}}var CG={flex:!0,"inline-flex":!0};function jG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W}=H;if($==="display"&&CG[Z]&&(Y==="chrome"&&Q<29&&Q>20||(Y==="safari"||Y==="ios_saf")&&Q<9&&Q>6||Y==="opera"&&(Q===15||Q===16)))return(0,SG.default)(X+Z,Z,W)}Z4.exports=t6.default});var Y4=I((Z8,H4)=>{Object.defineProperty(Z8,"__esModule",{value:!0});Z8.default=bG;var _G=a(),hG=kG(_G);function kG($){return $&&$.__esModule?$:{default:$}}var e6={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end",flex:"flexbox","inline-flex":"inline-flexbox"},$8={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function bG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W,requiresPrefix:G}=H;if(($8.hasOwnProperty($)||$==="display"&&typeof Z==="string"&&Z.indexOf("flex")>-1)&&(Y==="ie_mob"||Y==="ie")&&Q===10){if(delete G[$],!W&&!Array.isArray(J[$]))delete J[$];if($==="display"&&e6.hasOwnProperty(Z))return(0,hG.default)(X+e6[Z],Z,W);if($8.hasOwnProperty($))J[$8[$]]=e6[Z]||Z}}H4.exports=Z8.default});var X4=I((Y8,Q4)=>{Object.defineProperty(Y8,"__esModule",{value:!0});Y8.default=pG;var mG=a(),uG=dG(mG);function dG($){return $&&$.__esModule?$:{default:$}}var J8={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},H8={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"},cG=["alignContent","alignSelf","order","flexGrow","flexShrink","flexBasis","flexDirection"],lG=Object.keys(H8).concat(cG);function pG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W,requiresPrefix:G}=H;if((lG.indexOf($)>-1||$==="display"&&typeof Z==="string"&&Z.indexOf("flex")>-1)&&(Y==="firefox"&&Q<22||Y==="chrome"&&Q<21||(Y==="safari"||Y==="ios_saf")&&Q<=6.1||Y==="android"&&Q<4.4||Y==="and_uc")){if(delete G[$],!W&&!Array.isArray(J[$]))delete J[$];if($==="flexDirection"&&typeof Z==="string"){if(Z.indexOf("column")>-1)J.WebkitBoxOrient="vertical";else J.WebkitBoxOrient="horizontal";if(Z.indexOf("reverse")>-1)J.WebkitBoxDirection="reverse";else J.WebkitBoxDirection="normal"}if($==="display"&&J8.hasOwnProperty(Z))return(0,uG.default)(X+J8[Z],Z,W);if(H8.hasOwnProperty($))J[H8[$]]=J8[Z]||Z}}Q4.exports=Y8.default});var z4=I((Q8,W4)=>{Object.defineProperty(Q8,"__esModule",{value:!0});Q8.default=rG;var nG=a(),oG=aG(nG);function aG($){return $&&$.__esModule?$:{default:$}}var G4=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function rG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W}=H;if(typeof Z==="string"&&G4.test(Z)&&(Y==="firefox"&&Q<16||Y==="chrome"&&Q<26||(Y==="safari"||Y==="ios_saf")&&Q<7||(Y==="opera"||Y==="op_mini")&&Q<12.1||Y==="android"&&Q<4.4||Y==="and_uc"))return(0,oG.default)(Z.replace(G4,function(G){return X+G}),Z,W)}W4.exports=Q8.default});var O4=I((X8,U4)=>{Object.defineProperty(X8,"__esModule",{value:!0});X8.default=ZW;var tG=a(),eG=$W(tG);function $W($){return $&&$.__esModule?$:{default:$}}function ZW($,Z,J,H){var{browserName:Y,cssPrefix:Q,keepUnprefixed:X}=H;if(typeof Z==="string"&&Z.indexOf("image-set(")>-1&&(Y==="chrome"||Y==="opera"||Y==="and_chr"||Y==="and_uc"||Y==="ios_saf"||Y==="safari"))return(0,eG.default)(Z.replace(/image-set\(/g,Q+"image-set("),Z,X)}U4.exports=X8.default});var B4=I((G8,L4)=>{Object.defineProperty(G8,"__esModule",{value:!0});G8.default=XW;var HW=a(),YW=QW(HW);function QW($){return $&&$.__esModule?$:{default:$}}function XW($,Z,J,H){var{browserName:Y,cssPrefix:Q,keepUnprefixed:X}=H;if($==="position"&&Z==="sticky"&&(Y==="safari"||Y==="ios_saf"))return(0,YW.default)(Q+Z,Z,X)}L4.exports=G8.default});var K4=I((W8,F4)=>{Object.defineProperty(W8,"__esModule",{value:!0});W8.default=BW;var WW=a(),zW=UW(WW);function UW($){return $&&$.__esModule?$:{default:$}}var OW={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},LW={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function BW($,Z,J,H){var{cssPrefix:Y,keepUnprefixed:Q}=H;if(OW.hasOwnProperty($)&&LW.hasOwnProperty(Z))return(0,zW.default)(Y+Z,Z,Q)}F4.exports=W8.default});var M4=I((U8,q4)=>{Object.defineProperty(U8,"__esModule",{value:!0});U8.default=IW;var KW=c6(),qW=MW(KW);function MW($){return $&&$.__esModule?$:{default:$}}var AW={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},z8=void 0;function IW($,Z,J,H){var{cssPrefix:Y,keepUnprefixed:Q,requiresPrefix:X}=H;if(typeof Z==="string"&&AW.hasOwnProperty($)){if(!z8)z8=Object.keys(X).map(function(G){return(0,qW.default)(G)});var W=Z.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return z8.forEach(function(G){W.forEach(function(z,U){if(z.indexOf(G)>-1&&G!=="order")W[U]=z.replace(G,Y+G)+(Q?","+z:"")})}),W.join(",")}}q4.exports=U8.default});import{useContext as g5,useEffect as _5}from"react";import{createContext as C3,useContext as j3}from"react";var g3=C3(null),S8=()=>{let $=j3(g3);if(!$)throw Error("usePieConfig must be used within PieConfigProvider");return $},_3=()=>{let{apiServer:$}=S8();return $},v8=_3;var h3=()=>{let{enableRenderingLog:$}=S8();return $},w1=h3;import{createContext as e3}from"react";function y($,Z,J,H){function Y(Q){return Q instanceof J?Q:new J(function(X){X(Q)})}return new(J||(J=Promise))(function(Q,X){function W(U){try{z(H.next(U))}catch(L){X(L)}}function G(U){try{z(H.throw(U))}catch(L){X(L)}}function z(U){U.done?Q(U.value):Y(U.value).then(W,G)}z((H=H.apply($,Z||[])).next())})}function k3($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var f5={exports:{}},x1=typeof Reflect==="object"?Reflect:null,C8=x1&&typeof x1.apply==="function"?x1.apply:function(Z,J,H){return Function.prototype.apply.call(Z,J,H)},f0;if(x1&&typeof x1.ownKeys==="function")f0=x1.ownKeys;else if(Object.getOwnPropertySymbols)f0=function(Z){return Object.getOwnPropertyNames(Z).concat(Object.getOwnPropertySymbols(Z))};else f0=function(Z){return Object.getOwnPropertyNames(Z)};function b3($){if(console&&console.warn)console.warn($)}var g8=Number.isNaN||function(Z){return Z!==Z};function w(){w.init.call(this)}f5.exports=w;f5.exports.once=d3;w.EventEmitter=w;w.prototype._events=void 0;w.prototype._eventsCount=0;w.prototype._maxListeners=void 0;var j8=10;function P0($){if(typeof $!=="function")throw TypeError('The "listener" argument must be of type Function. Received type '+typeof $)}Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return j8},set:function($){if(typeof $!=="number"||$<0||g8($))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+$+".");j8=$}});w.init=function(){if(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)this._events=Object.create(null),this._eventsCount=0;this._maxListeners=this._maxListeners||void 0};w.prototype.setMaxListeners=function(Z){if(typeof Z!=="number"||Z<0||g8(Z))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Z+".");return this._maxListeners=Z,this};function _8($){if($._maxListeners===void 0)return w.defaultMaxListeners;return $._maxListeners}w.prototype.getMaxListeners=function(){return _8(this)};w.prototype.emit=function(Z){var J=[];for(var H=1;H<arguments.length;H++)J.push(arguments[H]);var Y=Z==="error",Q=this._events;if(Q!==void 0)Y=Y&&Q.error===void 0;else if(!Y)return!1;if(Y){var X;if(J.length>0)X=J[0];if(X instanceof Error)throw X;var W=Error("Unhandled error."+(X?" ("+X.message+")":""));throw W.context=X,W}var G=Q[Z];if(G===void 0)return!1;if(typeof G==="function")C8(G,this,J);else{var z=G.length,U=m8(G,z);for(var H=0;H<z;++H)C8(U[H],this,J)}return!0};function h8($,Z,J,H){var Y,Q,X;if(P0(J),Q=$._events,Q===void 0)Q=$._events=Object.create(null),$._eventsCount=0;else{if(Q.newListener!==void 0)$.emit("newListener",Z,J.listener?J.listener:J),Q=$._events;X=Q[Z]}if(X===void 0)X=Q[Z]=J,++$._eventsCount;else{if(typeof X==="function")X=Q[Z]=H?[J,X]:[X,J];else if(H)X.unshift(J);else X.push(J);if(Y=_8($),Y>0&&X.length>Y&&!X.warned){X.warned=!0;var W=Error("Possible EventEmitter memory leak detected. "+X.length+" "+String(Z)+" listeners added. Use emitter.setMaxListeners() to increase limit");W.name="MaxListenersExceededWarning",W.emitter=$,W.type=Z,W.count=X.length,b3(W)}}return $}w.prototype.addListener=function(Z,J){return h8(this,Z,J,!1)};w.prototype.on=w.prototype.addListener;w.prototype.prependListener=function(Z,J){return h8(this,Z,J,!0)};function y3(){if(!this.fired){if(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function k8($,Z,J){var H={fired:!1,wrapFn:void 0,target:$,type:Z,listener:J},Y=y3.bind(H);return Y.listener=J,H.wrapFn=Y,Y}w.prototype.once=function(Z,J){return P0(J),this.on(Z,k8(this,Z,J)),this};w.prototype.prependOnceListener=function(Z,J){return P0(J),this.prependListener(Z,k8(this,Z,J)),this};w.prototype.removeListener=function(Z,J){var H,Y,Q,X,W;if(P0(J),Y=this._events,Y===void 0)return this;if(H=Y[Z],H===void 0)return this;if(H===J||H.listener===J){if(--this._eventsCount===0)this._events=Object.create(null);else if(delete Y[Z],Y.removeListener)this.emit("removeListener",Z,H.listener||J)}else if(typeof H!=="function"){Q=-1;for(X=H.length-1;X>=0;X--)if(H[X]===J||H[X].listener===J){W=H[X].listener,Q=X;break}if(Q<0)return this;if(Q===0)H.shift();else m3(H,Q);if(H.length===1)Y[Z]=H[0];if(Y.removeListener!==void 0)this.emit("removeListener",Z,W||J)}return this};w.prototype.off=w.prototype.removeListener;w.prototype.removeAllListeners=function(Z){var J,H,Y;if(H=this._events,H===void 0)return this;if(H.removeListener===void 0){if(arguments.length===0)this._events=Object.create(null),this._eventsCount=0;else if(H[Z]!==void 0)if(--this._eventsCount===0)this._events=Object.create(null);else delete H[Z];return this}if(arguments.length===0){var Q=Object.keys(H),X;for(Y=0;Y<Q.length;++Y){if(X=Q[Y],X==="removeListener")continue;this.removeAllListeners(X)}return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(J=H[Z],typeof J==="function")this.removeListener(Z,J);else if(J!==void 0)for(Y=J.length-1;Y>=0;Y--)this.removeListener(Z,J[Y]);return this};function b8($,Z,J){var H=$._events;if(H===void 0)return[];var Y=H[Z];if(Y===void 0)return[];if(typeof Y==="function")return J?[Y.listener||Y]:[Y];return J?u3(Y):m8(Y,Y.length)}w.prototype.listeners=function(Z){return b8(this,Z,!0)};w.prototype.rawListeners=function(Z){return b8(this,Z,!1)};w.listenerCount=function($,Z){if(typeof $.listenerCount==="function")return $.listenerCount(Z);else return y8.call($,Z)};w.prototype.listenerCount=y8;function y8($){var Z=this._events;if(Z!==void 0){var J=Z[$];if(typeof J==="function")return 1;else if(J!==void 0)return J.length}return 0}w.prototype.eventNames=function(){return this._eventsCount>0?f0(this._events):[]};function m8($,Z){var J=Array(Z);for(var H=0;H<Z;++H)J[H]=$[H];return J}function m3($,Z){for(;Z+1<$.length;Z++)$[Z]=$[Z+1];$.pop()}function u3($){var Z=Array($.length);for(var J=0;J<Z.length;++J)Z[J]=$[J].listener||$[J];return Z}function d3($,Z){return new Promise(function(J,H){function Y(X){$.removeListener(Z,Q),H(X)}function Q(){if(typeof $.removeListener==="function")$.removeListener("error",Y);J([].slice.call(arguments))}if(u8($,Z,Q,{once:!0}),Z!=="error")c3($,Y,{once:!0})})}function c3($,Z,J){if(typeof $.on==="function")u8($,"error",Z,J)}function u8($,Z,J,H){if(typeof $.on==="function")if(H.once)$.once(Z,J);else $.on(Z,J);else if(typeof $.addEventListener==="function")$.addEventListener(Z,function Y(Q){if(H.once)$.removeEventListener(Z,Y);J(Q)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof $)}var l3=f5.exports,d8=k3(l3),S;(function($){$[$.timeout=1]="timeout",$[$.transportClosed=2]="transportClosed",$[$.clientDisconnected=3]="clientDisconnected",$[$.clientClosed=4]="clientClosed",$[$.clientConnectToken=5]="clientConnectToken",$[$.clientRefreshToken=6]="clientRefreshToken",$[$.subscriptionUnsubscribed=7]="subscriptionUnsubscribed",$[$.subscriptionSubscribeToken=8]="subscriptionSubscribeToken",$[$.subscriptionRefreshToken=9]="subscriptionRefreshToken",$[$.transportWriteError=10]="transportWriteError",$[$.connectionClosed=11]="connectionClosed",$[$.badConfiguration=12]="badConfiguration"})(S||(S={}));var z1;(function($){$[$.connectCalled=0]="connectCalled",$[$.transportClosed=1]="transportClosed",$[$.noPing=2]="noPing",$[$.subscribeTimeout=3]="subscribeTimeout",$[$.unsubscribeError=4]="unsubscribeError"})(z1||(z1={}));var l1;(function($){$[$.disconnectCalled=0]="disconnectCalled",$[$.unauthorized=1]="unauthorized",$[$.badProtocol=2]="badProtocol",$[$.messageSizeLimit=3]="messageSizeLimit"})(l1||(l1={}));var V0;(function($){$[$.subscribeCalled=0]="subscribeCalled",$[$.transportClosed=1]="transportClosed"})(V0||(V0={}));var D0;(function($){$[$.unsubscribeCalled=0]="unsubscribeCalled",$[$.unauthorized=1]="unauthorized",$[$.clientClosed=2]="clientClosed"})(D0||(D0={}));var M5;(function($){$[$.channelCompaction=1]="channelCompaction"})(M5||(M5={}));var g;(function($){$.Disconnected="disconnected",$.Connecting="connecting",$.Connected="connected"})(g||(g={}));var u;(function($){$.Unsubscribed="unsubscribed",$.Subscribing="subscribing",$.Subscribed="subscribed"})(u||(u={}));function p3($,Z){return $.lastIndexOf(Z,0)===0}function c8($){if($===void 0||$===null)return!1;return typeof $==="function"}function i3($,Z){if(globalThis.console){let J=globalThis.console[$];if(c8(J))J.apply(globalThis.console,Z)}}function n3($,Z){return Math.floor(Math.random()*(Z-$+1)+$)}function R0($,Z,J){if($>31)$=31;let H=n3(0,Math.min(J,Z*Math.pow(2,$)));return Math.min(J,Z+H)}function o3($){return"error"in $&&$.error!==null}function N0($){return Math.min($*1000,2147483647)}class l8 extends d8{constructor($,Z,J){super();if(this._resubscribeTimeout=null,this._refreshTimeout=null,this.channel=Z,this.state=u.Unsubscribed,this._centrifuge=$,this._token="",this._getToken=null,this._data=null,this._getData=null,this._recover=!1,this._offset=null,this._epoch=null,this._id=0,this._recoverable=!1,this._positioned=!1,this._joinLeave=!1,this._minResubscribeDelay=500,this._maxResubscribeDelay=20000,this._resubscribeTimeout=null,this._resubscribeAttempts=0,this._promises={},this._promiseId=0,this._inflight=!1,this._refreshTimeout=null,this._delta="",this._delta_negotiated=!1,this._tagsFilter=null,this._prevValue=null,this._unsubPromise=Promise.resolve(),this._setOptions(J),this._centrifuge._debugEnabled)this.on("state",(H)=>{this._debug("subscription state",Z,H.oldState,"->",H.newState)}),this.on("error",(H)=>{this._debug("subscription error",Z,H)});else this.on("error",function(){Function.prototype()})}ready($){if(this.state===u.Unsubscribed)return Promise.reject({code:S.subscriptionUnsubscribed,message:this.state});if(this.state===u.Subscribed)return Promise.resolve();return new Promise((Z,J)=>{let H={resolve:Z,reject:J};if($)H.timeout=setTimeout(function(){J({code:S.timeout,message:"timeout"})},$);this._promises[this._nextPromiseId()]=H})}subscribe(){if(this._isSubscribed())return;this._resubscribeAttempts=0,this._setSubscribing(V0.subscribeCalled,"subscribe called")}unsubscribe(){this._unsubPromise=this._setUnsubscribed(D0.unsubscribeCalled,"unsubscribe called",!0)}publish($){return y(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.publish(this.channel,$)})}presence(){return y(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presence(this.channel)})}presenceStats(){return y(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presenceStats(this.channel)})}history($){return y(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.history(this.channel,$)})}setTagsFilter($){if($&&this._delta)throw Error("cannot use delta and tagsFilter together");this._tagsFilter=$}setData($){this._data=$}_methodCall(){if(this._isSubscribed())return Promise.resolve();if(this._isUnsubscribed())return Promise.reject({code:S.subscriptionUnsubscribed,message:this.state});return new Promise(($,Z)=>{let J=this._centrifuge._config.timeout,H=setTimeout(()=>{Z({code:S.timeout,message:"timeout"})},J);this._promises[this._nextPromiseId()]={timeout:H,resolve:$,reject:Z}})}_nextPromiseId(){return++this._promiseId}_needRecover(){return this._recover===!0}_isUnsubscribed(){return this.state===u.Unsubscribed}_isSubscribing(){return this.state===u.Subscribing}_isSubscribed(){return this.state===u.Subscribed}_setState($){if(this.state!==$){let Z=this.state;return this.state=$,this.emit("state",{newState:$,oldState:Z,channel:this.channel}),!0}return!1}_usesToken(){return this._token!==""||this._getToken!==null}_clearSubscribingState(){this._resubscribeAttempts=0,this._clearResubscribeTimeout()}_clearSubscribedState(){this._clearRefreshTimeout()}_setSubscribed($){if(!this._isSubscribing())return;if(this._clearSubscribingState(),$.id)this._id=$.id;if($.recoverable)this._recover=!0,this._offset=$.offset||0,this._epoch=$.epoch||"";if($.delta)this._delta_negotiated=!0;else this._delta_negotiated=!1;this._setState(u.Subscribed);let Z=this._centrifuge._getSubscribeContext(this.channel,$);this.emit("subscribed",Z),this._resolvePromises();let J=$.publications;if(J&&J.length>0)for(let H in J){if(!J.hasOwnProperty(H))continue;this._handlePublication(J[H])}if($.expires===!0)this._refreshTimeout=setTimeout(()=>this._refresh(),N0($.ttl))}_setSubscribing($,Z){return y(this,void 0,void 0,function*(){if(this._isSubscribing())return;if(this._isSubscribed())this._clearSubscribedState();if(this._setState(u.Subscribing))this.emit("subscribing",{channel:this.channel,code:$,reason:Z});if(this._centrifuge._transport&&this._centrifuge._transport.emulation())yield this._unsubPromise;if(!this._isSubscribing())return;this._subscribe()})}_subscribe(){if(this._debug("subscribing on",this.channel),!this._isTransportOpen())return this._debug("delay subscribe on",this.channel,"till connected"),null;if(this._inflight)return null;if(this._inflight=!0,this._canSubscribeWithoutGettingToken())return this._subscribeWithoutToken();return this._getSubscriptionToken().then(($)=>this._handleTokenResponse($)).catch(($)=>this._handleTokenError($)),null}_isTransportOpen(){return this._centrifuge._transportIsOpen}_canSubscribeWithoutGettingToken(){return!this._usesToken()||!!this._token}_subscribeWithoutToken(){if(this._getData)return this._getDataAndSubscribe(this._token),null;else return this._sendSubscribe(this._token)}_getDataAndSubscribe($){if(!this._getData){this._inflight=!1;return}this._getData({channel:this.channel}).then((Z)=>{if(!this._isSubscribing()){this._inflight=!1;return}this._data=Z,this._sendSubscribe($)}).catch((Z)=>this._handleGetDataError(Z))}_handleGetDataError($){if(!this._isSubscribing()){this._inflight=!1;return}if($ instanceof e){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeData",channel:this.channel,error:{code:S.badConfiguration,message:($===null||$===void 0?void 0:$.toString())||""}}),this._inflight=!1,this._scheduleResubscribe()}_handleTokenResponse($){if(!this._isSubscribing()){this._inflight=!1;return}if(!$){this._inflight=!1,this._failUnauthorized();return}if(this._token=$,this._getData)this._getDataAndSubscribe($);else this._sendSubscribe($)}_handleTokenError($){if(!this._isSubscribing()){this._inflight=!1;return}if($ instanceof e){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeToken",channel:this.channel,error:{code:S.subscriptionSubscribeToken,message:($===null||$===void 0?void 0:$.toString())||""}}),this._inflight=!1,this._scheduleResubscribe()}_sendSubscribe($){if(!this._isTransportOpen())return this._inflight=!1,null;let Z=this._buildSubscribeCommand($);return this._centrifuge._call(Z).then((J)=>{this._inflight=!1;let H=J.reply.subscribe;if(this._handleSubscribeResponse(H),J.next)J.next()},(J)=>{if(this._inflight=!1,this._handleSubscribeError(J.error),J.next)J.next()}),Z}_buildSubscribeCommand($){let Z={channel:this.channel};if($)Z.token=$;if(this._data)Z.data=this._data;if(this._positioned)Z.positioned=!0;if(this._recoverable)Z.recoverable=!0;if(this._joinLeave)Z.join_leave=!0;if(Z.flag=M5.channelCompaction,this._needRecover()){Z.recover=!0;let J=this._getOffset();if(J)Z.offset=J;let H=this._getEpoch();if(H)Z.epoch=H}if(this._delta)Z.delta=this._delta;if(this._tagsFilter)Z.tf=this._tagsFilter;return{subscribe:Z}}_debug(...$){this._centrifuge._debug(...$)}_handleSubscribeError($){if(!this._isSubscribing())return;if($.code===S.timeout){this._centrifuge._disconnect(z1.subscribeTimeout,"subscribe timeout",!0);return}this._subscribeError($)}_handleSubscribeResponse($){if(!this._isSubscribing())return;this._setSubscribed($)}_setUnsubscribed($,Z,J){if(this._isUnsubscribed())return Promise.resolve();let H=Promise.resolve();if(this._isSubscribed()){if(J)H=this._centrifuge._unsubscribe(this);this._clearSubscribedState()}else if(this._isSubscribing()){if(this._inflight&&J)H=this._centrifuge._unsubscribe(this);this._clearSubscribingState()}if(this._inflight=!1,this._setState(u.Unsubscribed))this.emit("unsubscribed",{channel:this.channel,code:$,reason:Z});return this._rejectPromises({code:S.subscriptionUnsubscribed,message:this.state}),H}_handlePublication($){if(this._delta&&this._delta_negotiated){let{newData:J,newPrevValue:H}=this._centrifuge._codec.applyDeltaIfNeeded($,this._prevValue);$.data=J,this._prevValue=H}let Z=this._centrifuge._getPublicationContext(this.channel,$);if(this.emit("publication",Z),$.offset)this._offset=$.offset}_handleJoin($){let Z=this._centrifuge._getJoinLeaveContext($.info);this.emit("join",{channel:this.channel,info:Z})}_handleLeave($){let Z=this._centrifuge._getJoinLeaveContext($.info);this.emit("leave",{channel:this.channel,info:Z})}_resolvePromises(){for(let $ in this._promises){if(!this._promises.hasOwnProperty($))continue;if(this._promises[$].timeout)clearTimeout(this._promises[$].timeout);this._promises[$].resolve(),delete this._promises[$]}}_rejectPromises($){for(let Z in this._promises){if(!this._promises.hasOwnProperty(Z))continue;if(this._promises[Z].timeout)clearTimeout(this._promises[Z].timeout);this._promises[Z].reject($),delete this._promises[Z]}}_scheduleResubscribe(){if(!this._isSubscribing()){this._debug("not in subscribing state, skip resubscribe scheduling",this.channel);return}let $=this,Z=this._getResubscribeDelay();this._resubscribeTimeout=setTimeout(function(){if($._isSubscribing())$._subscribe()},Z),this._debug("resubscribe scheduled after "+Z,this.channel)}_subscribeError($){if(!this._isSubscribing())return;if($.code<100||$.code===109||$.temporary===!0){if($.code===109)this._token="";let Z={channel:this.channel,type:"subscribe",error:$};if(this._centrifuge.state===g.Connected)this.emit("error",Z);this._scheduleResubscribe()}else this._setUnsubscribed($.code,$.message,!1)}_getResubscribeDelay(){let $=R0(this._resubscribeAttempts,this._minResubscribeDelay,this._maxResubscribeDelay);return this._resubscribeAttempts++,$}_setOptions($){if(!$)return;if($.since)this._offset=$.since.offset||0,this._epoch=$.since.epoch||"",this._recover=!0;if($.data)this._data=$.data;if($.getData)this._getData=$.getData;if($.minResubscribeDelay!==void 0)this._minResubscribeDelay=$.minResubscribeDelay;if($.maxResubscribeDelay!==void 0)this._maxResubscribeDelay=$.maxResubscribeDelay;if($.token)this._token=$.token;if($.getToken)this._getToken=$.getToken;if($.positioned===!0)this._positioned=!0;if($.recoverable===!0)this._recoverable=!0;if($.joinLeave===!0)this._joinLeave=!0;if($.delta){if($.delta!=="fossil")throw Error("unsupported delta format");this._delta=$.delta}if($.tagsFilter)this._tagsFilter=$.tagsFilter;if(this._tagsFilter&&this._delta)throw Error("cannot use delta and tagsFilter together")}_getOffset(){let $=this._offset;if($!==null)return $;return 0}_getEpoch(){let $=this._epoch;if($!==null)return $;return""}_clearRefreshTimeout(){if(this._refreshTimeout!==null)clearTimeout(this._refreshTimeout),this._refreshTimeout=null}_clearResubscribeTimeout(){if(this._resubscribeTimeout!==null)clearTimeout(this._resubscribeTimeout),this._resubscribeTimeout=null}_getSubscriptionToken(){this._debug("get subscription token for channel",this.channel);let $={channel:this.channel},Z=this._getToken;if(Z===null)return this.emit("error",{type:"configuration",channel:this.channel,error:{code:S.badConfiguration,message:"provide a function to get channel subscription token"}}),Promise.reject(new e(""));return Z($)}_refresh(){this._clearRefreshTimeout();let $=this;this._getSubscriptionToken().then(function(Z){if(!$._isSubscribed())return;if(!Z){$._failUnauthorized();return}$._token=Z;let H={sub_refresh:{channel:$.channel,token:Z}};$._centrifuge._call(H).then((Y)=>{let Q=Y.reply.sub_refresh;if($._refreshResponse(Q),Y.next)Y.next()},(Y)=>{if($._refreshError(Y.error),Y.next)Y.next()})}).catch(function(Z){if(Z instanceof e){$._failUnauthorized();return}$.emit("error",{type:"refreshToken",channel:$.channel,error:{code:S.subscriptionRefreshToken,message:Z!==void 0?Z.toString():""}}),$._refreshTimeout=setTimeout(()=>$._refresh(),$._getRefreshRetryDelay())})}_refreshResponse($){if(!this._isSubscribed())return;if(this._debug("subscription token refreshed, channel",this.channel),this._clearRefreshTimeout(),$.expires===!0)this._refreshTimeout=setTimeout(()=>this._refresh(),N0($.ttl))}_refreshError($){if(!this._isSubscribed())return;if($.code<100||$.temporary===!0)this.emit("error",{type:"refresh",channel:this.channel,error:$}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay());else this._setUnsubscribed($.code,$.message,!0)}_getRefreshRetryDelay(){return R0(0,1e4,20000)}_failUnauthorized(){this._setUnsubscribed(D0.unauthorized,"unauthorized",!0)}}class p8{constructor($,Z){this.endpoint=$,this.options=Z,this._transport=null}name(){return"sockjs"}subName(){return"sockjs-"+this._transport.transport}emulation(){return!1}supported(){return this.options.sockjs!==null}initialize($,Z){this._transport=new this.options.sockjs(this.endpoint,null,this.options.sockjsOptions),this._transport.onopen=()=>{Z.onOpen()},this._transport.onerror=(J)=>{Z.onError(J)},this._transport.onclose=(J)=>{Z.onClose(J)},this._transport.onmessage=(J)=>{Z.onMessage(J.data)}}close(){this._transport.close()}send($){this._transport.send($)}}class A5{constructor($,Z){this.endpoint=$,this.options=Z,this._transport=null}name(){return"websocket"}subName(){return"websocket"}emulation(){return!1}supported(){return this.options.websocket!==void 0&&this.options.websocket!==null}initialize($,Z){let J="";if($==="protobuf")J="centrifuge-protobuf";if(J!=="")this._transport=new this.options.websocket(this.endpoint,J);else this._transport=new this.options.websocket(this.endpoint);if($==="protobuf")this._transport.binaryType="arraybuffer";this._transport.onopen=()=>{Z.onOpen()},this._transport.onerror=(H)=>{Z.onError(H)},this._transport.onclose=(H)=>{Z.onClose(H)},this._transport.onmessage=(H)=>{Z.onMessage(H.data)}}close(){this._transport.close()}send($){this._transport.send($)}}class i8{constructor($,Z){this.endpoint=$,this.options=Z,this._abortController=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"http_stream"}subName(){return"http_stream"}emulation(){return!0}_handleErrors($){if(!$.ok)throw Error($.status);return $}_fetchEventTarget($,Z,J){let H=new EventTarget,Y=$.options.fetch;return Y(Z,J).then($._handleErrors).then((Q)=>{H.dispatchEvent(new Event("open"));let X="",W=0,G=new Uint8Array,z=Q.body.getReader();return new $.options.readableStream({start(U){function L(){return z.read().then(({done:K,value:q})=>{if(K){H.dispatchEvent(new Event("close")),U.close();return}try{if($._protocol==="json"){X+=$._utf8decoder.decode(q);while(W<X.length)if(X[W]===`
|
|
11
|
-
`){let
|
|
12
|
-
`){let
|
|
13
|
-
`);else Z=$;try{yield this._writer.write(Z)}catch(
|
|
14
|
-
`)throw Error("size integer not terminated by '\\n'");let
|
|
20
|
+
*/(function(){var $=!!(typeof window<"u"&&window.document&&window.document.createElement),Z={canUseDOM:$,canUseWorkers:typeof Worker<"u",canUseEventListeners:$&&!!(window.addEventListener||window.attachEvent),canUseViewport:$&&!!window.screen};if(typeof define==="function"&&typeof define.amd==="object"&&define.amd)define(function(){return Z});else if(typeof J5<"u"&&J5.exports)J5.exports=Z;else window.ExecutionEnvironment=Z})()});var E1=I((g6,X$)=>{Object.defineProperty(g6,"__esModule",{value:!0});g6.default=aQ;var nQ=/-webkit-|-moz-|-ms-/;function aQ($){return typeof $==="string"&&nQ.test($)}X$.exports=g6.default});var O$=I((j6,G$)=>{Object.defineProperty(j6,"__esModule",{value:!0});j6.default=$X;var rQ=E1(),sQ=tQ(rQ);function tQ($){return $&&$.__esModule?$:{default:$}}var eQ=["-webkit-","-moz-",""];function $X($,Z){if(typeof Z==="string"&&!(0,sQ.default)(Z)&&Z.indexOf("calc(")>-1)return eQ.map(function(H){return Z.replace(/calc\(/g,H+"calc(")})}G$.exports=j6.default});var W$=I((h6,z$)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.default=XX;var HX=E1(),JX=YX(HX);function YX($){return $&&$.__esModule?$:{default:$}}var QX=["-webkit-",""];function XX($,Z){if(typeof Z==="string"&&!(0,JX.default)(Z)&&Z.indexOf("cross-fade(")>-1)return QX.map(function(H){return Z.replace(/cross-fade\(/g,H+"cross-fade(")})}z$.exports=h6.default});var f$=I((_6,U$)=>{Object.defineProperty(_6,"__esModule",{value:!0});_6.default=WX;var OX=["-webkit-","-moz-",""],zX={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function WX($,Z){if($==="cursor"&&zX.hasOwnProperty(Z))return OX.map(function(H){return H+Z})}U$.exports=_6.default});var L$=I((k6,F$)=>{Object.defineProperty(k6,"__esModule",{value:!0});k6.default=KX;var fX=E1(),FX=LX(fX);function LX($){return $&&$.__esModule?$:{default:$}}var BX=["-webkit-",""];function KX($,Z){if(typeof Z==="string"&&!(0,FX.default)(Z)&&Z.indexOf("filter(")>-1)return BX.map(function(H){return Z.replace(/filter\(/g,H+"filter(")})}F$.exports=k6.default});var q$=I((b6,K$)=>{Object.defineProperty(b6,"__esModule",{value:!0});b6.default=MX;var B$={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function MX($,Z){if($==="display"&&B$.hasOwnProperty(Z))return B$[Z]}K$.exports=b6.default});var A$=I((y6,I$)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.default=VX;var AX={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},M$={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function VX($,Z,H){if(M$.hasOwnProperty($))H[M$[$]]=AX[Z]||Z}I$.exports=y6.default});var R$=I((m6,D$)=>{Object.defineProperty(m6,"__esModule",{value:!0});m6.default=NX;var RX={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},V$={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"};function NX($,Z,H){if($==="flexDirection"&&typeof Z==="string"){if(Z.indexOf("column")>-1)H.WebkitBoxOrient="vertical";else H.WebkitBoxOrient="horizontal";if(Z.indexOf("reverse")>-1)H.WebkitBoxDirection="reverse";else H.WebkitBoxDirection="normal"}if(V$.hasOwnProperty($))H[V$[$]]=RX[Z]||Z}D$.exports=m6.default});var T$=I((u6,P$)=>{Object.defineProperty(u6,"__esModule",{value:!0});u6.default=SX;var TX=E1(),wX=xX(TX);function xX($){return $&&$.__esModule?$:{default:$}}var EX=["-webkit-","-moz-",""],N$=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function SX($,Z){if(typeof Z==="string"&&!(0,wX.default)(Z)&&N$.test(Z))return EX.map(function(H){return Z.replace(N$,function(J){return H+J})})}P$.exports=u6.default});var x$=I((d6,w$)=>{Object.defineProperty(d6,"__esModule",{value:!0});d6.default=_X;var CX=E1(),gX=jX(CX);function jX($){return $&&$.__esModule?$:{default:$}}var hX=["-webkit-",""];function _X($,Z){if(typeof Z==="string"&&!(0,gX.default)(Z)&&Z.indexOf("image-set(")>-1)return hX.map(function(H){return Z.replace(/image-set\(/g,H+"image-set(")})}w$.exports=d6.default});var S$=I((c6,E$)=>{Object.defineProperty(c6,"__esModule",{value:!0});c6.default=bX;function bX($,Z){if($==="position"&&Z==="sticky")return["-webkit-sticky","sticky"]}E$.exports=c6.default});var C$=I((l6,v$)=>{Object.defineProperty(l6,"__esModule",{value:!0});l6.default=cX;var mX=["-webkit-","-moz-",""],uX={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},dX={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function cX($,Z){if(uX.hasOwnProperty($)&&dX.hasOwnProperty(Z))return mX.map(function(H){return H+Z})}v$.exports=l6.default});var j$=I((DL,g$)=>{var iX=/[A-Z]/g,pX=/^ms-/,i6={};function nX($){return"-"+$.toLowerCase()}function aX($){if(i6.hasOwnProperty($))return i6[$];var Z=$.replace(iX,nX);return i6[$]=pX.test(Z)?"-"+Z:Z}g$.exports=aX});var n6=I((p6,h$)=>{Object.defineProperty(p6,"__esModule",{value:!0});p6.default=tX;var oX=j$(),rX=sX(oX);function sX($){return $&&$.__esModule?$:{default:$}}function tX($){return(0,rX.default)($)}h$.exports=p6.default});var b$=I((o6,k$)=>{Object.defineProperty(o6,"__esModule",{value:!0});o6.default=OG;var $G=n6(),ZG=a6($G),HG=E1(),JG=a6(HG),YG=$5(),_$=a6(YG);function a6($){return $&&$.__esModule?$:{default:$}}var QG={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},XG={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function GG($,Z){if((0,JG.default)($))return $;var H=$.split(/,(?![^()]*(?:\([^()]*\))?\))/g);for(var J=0,Y=H.length;J<Y;++J){var Q=H[J],X=[Q];for(var O in Z){var G=(0,ZG.default)(O);if(Q.indexOf(G)>-1&&G!=="order"){var z=Z[O];for(var W=0,f=z.length;W<f;++W)X.unshift(Q.replace(G,XG[z[W]]+G))}}H[J]=X.join(",")}return H.join(",")}function OG($,Z,H,J){if(typeof Z==="string"&&QG.hasOwnProperty($)){var Y=GG(Z,J),Q=Y.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(O){return!/-moz-|-ms-/.test(O)}).join(",");if($.indexOf("Webkit")>-1)return Q;var X=Y.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(O){return!/-webkit-|-ms-/.test(O)}).join(",");if($.indexOf("Moz")>-1)return X;return H["Webkit"+(0,_$.default)($)]=Q,H["Moz"+(0,_$.default)($)]=X,Y}}k$.exports=o6.default});var $1=I((s6,t$)=>{Object.defineProperty(s6,"__esModule",{value:!0});s6.default=WG;function WG($,Z,H){if(H)return[$,Z];return $}t$.exports=s6.default});var $4=I((t6,e$)=>{Object.defineProperty(t6,"__esModule",{value:!0});t6.default=BG;var fG=$1(),FG=LG(fG);function LG($){return $&&$.__esModule?$:{default:$}}function BG($,Z,H,J){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:O}=J;if(typeof Z==="string"&&Z.indexOf("calc(")>-1&&(Y==="firefox"&&Q<15||Y==="chrome"&&Q<25||Y==="safari"&&Q<6.1||Y==="ios_saf"&&Q<7))return(0,FG.default)(Z.replace(/calc\(/g,X+"calc("),Z,O)}e$.exports=t6.default});var H4=I((e6,Z4)=>{Object.defineProperty(e6,"__esModule",{value:!0});e6.default=AG;var qG=$1(),MG=IG(qG);function IG($){return $&&$.__esModule?$:{default:$}}function AG($,Z,H,J){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:O}=J;if(typeof Z==="string"&&Z.indexOf("cross-fade(")>-1&&(Y==="chrome"||Y==="opera"||Y==="and_chr"||(Y==="ios_saf"||Y==="safari")&&Q<10))return(0,MG.default)(Z.replace(/cross-fade\(/g,X+"cross-fade("),Z,O)}Z4.exports=e6.default});var Q4=I(($2,Y4)=>{Object.defineProperty($2,"__esModule",{value:!0});$2.default=TG;var DG=$1(),J4=RG(DG);function RG($){return $&&$.__esModule?$:{default:$}}var NG={grab:!0,grabbing:!0},PG={"zoom-in":!0,"zoom-out":!0};function TG($,Z,H,J){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:O}=J;if($==="cursor"&&NG[Z]&&(Y==="firefox"||Y==="chrome"||Y==="safari"||Y==="opera"))return(0,J4.default)(X+Z,Z,O);if($==="cursor"&&PG[Z]&&(Y==="firefox"&&Q<24||Y==="chrome"&&Q<37||Y==="safari"&&Q<9||Y==="opera"&&Q<24))return(0,J4.default)(X+Z,Z,O)}Y4.exports=$2.default});var G4=I((Z2,X4)=>{Object.defineProperty(Z2,"__esModule",{value:!0});Z2.default=vG;var xG=$1(),EG=SG(xG);function SG($){return $&&$.__esModule?$:{default:$}}function vG($,Z,H,J){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:O}=J;if(typeof Z==="string"&&Z.indexOf("filter(")>-1&&(Y==="ios_saf"||Y==="safari"&&Q<9.1))return(0,EG.default)(Z.replace(/filter\(/g,X+"filter("),Z,O)}X4.exports=Z2.default});var z4=I((H2,O4)=>{Object.defineProperty(H2,"__esModule",{value:!0});H2.default=kG;var gG=$1(),jG=hG(gG);function hG($){return $&&$.__esModule?$:{default:$}}var _G={flex:!0,"inline-flex":!0};function kG($,Z,H,J){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:O}=J;if($==="display"&&_G[Z]&&(Y==="chrome"&&Q<29&&Q>20||(Y==="safari"||Y==="ios_saf")&&Q<9&&Q>6||Y==="opera"&&(Q===15||Q===16)))return(0,jG.default)(X+Z,Z,O)}O4.exports=H2.default});var U4=I((Q2,W4)=>{Object.defineProperty(Q2,"__esModule",{value:!0});Q2.default=dG;var yG=$1(),mG=uG(yG);function uG($){return $&&$.__esModule?$:{default:$}}var J2={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end",flex:"flexbox","inline-flex":"inline-flexbox"},Y2={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function dG($,Z,H,J){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:O,requiresPrefix:G}=J;if((Y2.hasOwnProperty($)||$==="display"&&typeof Z==="string"&&Z.indexOf("flex")>-1)&&(Y==="ie_mob"||Y==="ie")&&Q===10){if(delete G[$],!O&&!Array.isArray(H[$]))delete H[$];if($==="display"&&J2.hasOwnProperty(Z))return(0,mG.default)(X+J2[Z],Z,O);if(Y2.hasOwnProperty($))H[Y2[$]]=J2[Z]||Z}}W4.exports=Q2.default});var F4=I((O2,f4)=>{Object.defineProperty(O2,"__esModule",{value:!0});O2.default=oG;var lG=$1(),iG=pG(lG);function pG($){return $&&$.__esModule?$:{default:$}}var X2={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},G2={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"},nG=["alignContent","alignSelf","order","flexGrow","flexShrink","flexBasis","flexDirection"],aG=Object.keys(G2).concat(nG);function oG($,Z,H,J){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:O,requiresPrefix:G}=J;if((aG.indexOf($)>-1||$==="display"&&typeof Z==="string"&&Z.indexOf("flex")>-1)&&(Y==="firefox"&&Q<22||Y==="chrome"&&Q<21||(Y==="safari"||Y==="ios_saf")&&Q<=6.1||Y==="android"&&Q<4.4||Y==="and_uc")){if(delete G[$],!O&&!Array.isArray(H[$]))delete H[$];if($==="flexDirection"&&typeof Z==="string"){if(Z.indexOf("column")>-1)H.WebkitBoxOrient="vertical";else H.WebkitBoxOrient="horizontal";if(Z.indexOf("reverse")>-1)H.WebkitBoxDirection="reverse";else H.WebkitBoxDirection="normal"}if($==="display"&&X2.hasOwnProperty(Z))return(0,iG.default)(X+X2[Z],Z,O);if(G2.hasOwnProperty($))H[G2[$]]=X2[Z]||Z}}f4.exports=O2.default});var K4=I((z2,B4)=>{Object.defineProperty(z2,"__esModule",{value:!0});z2.default=$O;var sG=$1(),tG=eG(sG);function eG($){return $&&$.__esModule?$:{default:$}}var L4=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function $O($,Z,H,J){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:O}=J;if(typeof Z==="string"&&L4.test(Z)&&(Y==="firefox"&&Q<16||Y==="chrome"&&Q<26||(Y==="safari"||Y==="ios_saf")&&Q<7||(Y==="opera"||Y==="op_mini")&&Q<12.1||Y==="android"&&Q<4.4||Y==="and_uc"))return(0,tG.default)(Z.replace(L4,function(G){return X+G}),Z,O)}B4.exports=z2.default});var M4=I((W2,q4)=>{Object.defineProperty(W2,"__esModule",{value:!0});W2.default=QO;var HO=$1(),JO=YO(HO);function YO($){return $&&$.__esModule?$:{default:$}}function QO($,Z,H,J){var{browserName:Y,cssPrefix:Q,keepUnprefixed:X}=J;if(typeof Z==="string"&&Z.indexOf("image-set(")>-1&&(Y==="chrome"||Y==="opera"||Y==="and_chr"||Y==="and_uc"||Y==="ios_saf"||Y==="safari"))return(0,JO.default)(Z.replace(/image-set\(/g,Q+"image-set("),Z,X)}q4.exports=W2.default});var A4=I((U2,I4)=>{Object.defineProperty(U2,"__esModule",{value:!0});U2.default=WO;var GO=$1(),OO=zO(GO);function zO($){return $&&$.__esModule?$:{default:$}}function WO($,Z,H,J){var{browserName:Y,cssPrefix:Q,keepUnprefixed:X}=J;if($==="position"&&Z==="sticky"&&(Y==="safari"||Y==="ios_saf"))return(0,OO.default)(Q+Z,Z,X)}I4.exports=U2.default});var D4=I((f2,V4)=>{Object.defineProperty(f2,"__esModule",{value:!0});f2.default=qO;var fO=$1(),FO=LO(fO);function LO($){return $&&$.__esModule?$:{default:$}}var BO={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},KO={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function qO($,Z,H,J){var{cssPrefix:Y,keepUnprefixed:Q}=J;if(BO.hasOwnProperty($)&&KO.hasOwnProperty(Z))return(0,FO.default)(Y+Z,Z,Q)}V4.exports=f2.default});var N4=I((L2,R4)=>{Object.defineProperty(L2,"__esModule",{value:!0});L2.default=RO;var IO=n6(),AO=VO(IO);function VO($){return $&&$.__esModule?$:{default:$}}var DO={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},F2=void 0;function RO($,Z,H,J){var{cssPrefix:Y,keepUnprefixed:Q,requiresPrefix:X}=J;if(typeof Z==="string"&&DO.hasOwnProperty($)){if(!F2)F2=Object.keys(X).map(function(G){return(0,AO.default)(G)});var O=Z.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return F2.forEach(function(G){O.forEach(function(z,W){if(z.indexOf(G)>-1&&G!=="order")O[W]=z.replace(G,Y+G)+(Q?","+z:"")})}),O.join(",")}}R4.exports=L2.default});import{useContext as y5,useEffect as m5}from"react";import{createContext as k3,useContext as b3}from"react";var y3=k3(null),j2=()=>{let $=b3(y3);if(!$)throw Error("usePieConfig must be used within PieConfigProvider");return $},m3=()=>{let{apiServer:$}=j2();return $},h2=m3;var u3=()=>{let{enableRenderingLog:$}=j2();return $},j1=u3;import{createContext as YZ}from"react";function c($,Z,H,J){function Y(Q){return Q instanceof H?Q:new H(function(X){X(Q)})}return new(H||(H=Promise))(function(Q,X){function O(W){try{z(J.next(W))}catch(f){X(f)}}function G(W){try{z(J.throw(W))}catch(f){X(f)}}function z(W){W.done?Q(W.value):Y(W.value).then(O,G)}z((J=J.apply($,Z||[])).next())})}function d3($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var P5={exports:{}},h1=typeof Reflect==="object"?Reflect:null,_2=h1&&typeof h1.apply==="function"?h1.apply:function(Z,H,J){return Function.prototype.apply.call(Z,H,J)},T0;if(h1&&typeof h1.ownKeys==="function")T0=h1.ownKeys;else if(Object.getOwnPropertySymbols)T0=function(Z){return Object.getOwnPropertyNames(Z).concat(Object.getOwnPropertySymbols(Z))};else T0=function(Z){return Object.getOwnPropertyNames(Z)};function c3($){if(console&&console.warn)console.warn($)}var b2=Number.isNaN||function(Z){return Z!==Z};function C(){C.init.call(this)}P5.exports=C;P5.exports.once=n3;C.EventEmitter=C;C.prototype._events=void 0;C.prototype._eventsCount=0;C.prototype._maxListeners=void 0;var k2=10;function v0($){if(typeof $!=="function")throw TypeError('The "listener" argument must be of type Function. Received type '+typeof $)}Object.defineProperty(C,"defaultMaxListeners",{enumerable:!0,get:function(){return k2},set:function($){if(typeof $!=="number"||$<0||b2($))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+$+".");k2=$}});C.init=function(){if(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)this._events=Object.create(null),this._eventsCount=0;this._maxListeners=this._maxListeners||void 0};C.prototype.setMaxListeners=function(Z){if(typeof Z!=="number"||Z<0||b2(Z))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Z+".");return this._maxListeners=Z,this};function y2($){if($._maxListeners===void 0)return C.defaultMaxListeners;return $._maxListeners}C.prototype.getMaxListeners=function(){return y2(this)};C.prototype.emit=function(Z){var H=[];for(var J=1;J<arguments.length;J++)H.push(arguments[J]);var Y=Z==="error",Q=this._events;if(Q!==void 0)Y=Y&&Q.error===void 0;else if(!Y)return!1;if(Y){var X;if(H.length>0)X=H[0];if(X instanceof Error)throw X;var O=Error("Unhandled error."+(X?" ("+X.message+")":""));throw O.context=X,O}var G=Q[Z];if(G===void 0)return!1;if(typeof G==="function")_2(G,this,H);else{var z=G.length,W=l2(G,z);for(var J=0;J<z;++J)_2(W[J],this,H)}return!0};function m2($,Z,H,J){var Y,Q,X;if(v0(H),Q=$._events,Q===void 0)Q=$._events=Object.create(null),$._eventsCount=0;else{if(Q.newListener!==void 0)$.emit("newListener",Z,H.listener?H.listener:H),Q=$._events;X=Q[Z]}if(X===void 0)X=Q[Z]=H,++$._eventsCount;else{if(typeof X==="function")X=Q[Z]=J?[H,X]:[X,H];else if(J)X.unshift(H);else X.push(H);if(Y=y2($),Y>0&&X.length>Y&&!X.warned){X.warned=!0;var O=Error("Possible EventEmitter memory leak detected. "+X.length+" "+String(Z)+" listeners added. Use emitter.setMaxListeners() to increase limit");O.name="MaxListenersExceededWarning",O.emitter=$,O.type=Z,O.count=X.length,c3(O)}}return $}C.prototype.addListener=function(Z,H){return m2(this,Z,H,!1)};C.prototype.on=C.prototype.addListener;C.prototype.prependListener=function(Z,H){return m2(this,Z,H,!0)};function l3(){if(!this.fired){if(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function u2($,Z,H){var J={fired:!1,wrapFn:void 0,target:$,type:Z,listener:H},Y=l3.bind(J);return Y.listener=H,J.wrapFn=Y,Y}C.prototype.once=function(Z,H){return v0(H),this.on(Z,u2(this,Z,H)),this};C.prototype.prependOnceListener=function(Z,H){return v0(H),this.prependListener(Z,u2(this,Z,H)),this};C.prototype.removeListener=function(Z,H){var J,Y,Q,X,O;if(v0(H),Y=this._events,Y===void 0)return this;if(J=Y[Z],J===void 0)return this;if(J===H||J.listener===H){if(--this._eventsCount===0)this._events=Object.create(null);else if(delete Y[Z],Y.removeListener)this.emit("removeListener",Z,J.listener||H)}else if(typeof J!=="function"){Q=-1;for(X=J.length-1;X>=0;X--)if(J[X]===H||J[X].listener===H){O=J[X].listener,Q=X;break}if(Q<0)return this;if(Q===0)J.shift();else i3(J,Q);if(J.length===1)Y[Z]=J[0];if(Y.removeListener!==void 0)this.emit("removeListener",Z,O||H)}return this};C.prototype.off=C.prototype.removeListener;C.prototype.removeAllListeners=function(Z){var H,J,Y;if(J=this._events,J===void 0)return this;if(J.removeListener===void 0){if(arguments.length===0)this._events=Object.create(null),this._eventsCount=0;else if(J[Z]!==void 0)if(--this._eventsCount===0)this._events=Object.create(null);else delete J[Z];return this}if(arguments.length===0){var Q=Object.keys(J),X;for(Y=0;Y<Q.length;++Y){if(X=Q[Y],X==="removeListener")continue;this.removeAllListeners(X)}return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(H=J[Z],typeof H==="function")this.removeListener(Z,H);else if(H!==void 0)for(Y=H.length-1;Y>=0;Y--)this.removeListener(Z,H[Y]);return this};function d2($,Z,H){var J=$._events;if(J===void 0)return[];var Y=J[Z];if(Y===void 0)return[];if(typeof Y==="function")return H?[Y.listener||Y]:[Y];return H?p3(Y):l2(Y,Y.length)}C.prototype.listeners=function(Z){return d2(this,Z,!0)};C.prototype.rawListeners=function(Z){return d2(this,Z,!1)};C.listenerCount=function($,Z){if(typeof $.listenerCount==="function")return $.listenerCount(Z);else return c2.call($,Z)};C.prototype.listenerCount=c2;function c2($){var Z=this._events;if(Z!==void 0){var H=Z[$];if(typeof H==="function")return 1;else if(H!==void 0)return H.length}return 0}C.prototype.eventNames=function(){return this._eventsCount>0?T0(this._events):[]};function l2($,Z){var H=Array(Z);for(var J=0;J<Z;++J)H[J]=$[J];return H}function i3($,Z){for(;Z+1<$.length;Z++)$[Z]=$[Z+1];$.pop()}function p3($){var Z=Array($.length);for(var H=0;H<Z.length;++H)Z[H]=$[H].listener||$[H];return Z}function n3($,Z){return new Promise(function(H,J){function Y(X){$.removeListener(Z,Q),J(X)}function Q(){if(typeof $.removeListener==="function")$.removeListener("error",Y);H([].slice.call(arguments))}if(i2($,Z,Q,{once:!0}),Z!=="error")a3($,Y,{once:!0})})}function a3($,Z,H){if(typeof $.on==="function")i2($,"error",Z,H)}function i2($,Z,H,J){if(typeof $.on==="function")if(J.once)$.once(Z,H);else $.on(Z,H);else if(typeof $.addEventListener==="function")$.addEventListener(Z,function Y(Q){if(J.once)$.removeEventListener(Z,Y);H(Q)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof $)}var o3=P5.exports,p2=d3(o3),h;(function($){$[$.timeout=1]="timeout",$[$.transportClosed=2]="transportClosed",$[$.clientDisconnected=3]="clientDisconnected",$[$.clientClosed=4]="clientClosed",$[$.clientConnectToken=5]="clientConnectToken",$[$.clientRefreshToken=6]="clientRefreshToken",$[$.subscriptionUnsubscribed=7]="subscriptionUnsubscribed",$[$.subscriptionSubscribeToken=8]="subscriptionSubscribeToken",$[$.subscriptionRefreshToken=9]="subscriptionRefreshToken",$[$.transportWriteError=10]="transportWriteError",$[$.connectionClosed=11]="connectionClosed",$[$.badConfiguration=12]="badConfiguration"})(h||(h={}));var L1;(function($){$[$.connectCalled=0]="connectCalled",$[$.transportClosed=1]="transportClosed",$[$.noPing=2]="noPing",$[$.subscribeTimeout=3]="subscribeTimeout",$[$.unsubscribeError=4]="unsubscribeError"})(L1||(L1={}));var r1;(function($){$[$.disconnectCalled=0]="disconnectCalled",$[$.unauthorized=1]="unauthorized",$[$.badProtocol=2]="badProtocol",$[$.messageSizeLimit=3]="messageSizeLimit"})(r1||(r1={}));var w0;(function($){$[$.subscribeCalled=0]="subscribeCalled",$[$.transportClosed=1]="transportClosed"})(w0||(w0={}));var x0;(function($){$[$.unsubscribeCalled=0]="unsubscribeCalled",$[$.unauthorized=1]="unauthorized",$[$.clientClosed=2]="clientClosed"})(x0||(x0={}));var D5;(function($){$[$.channelCompaction=1]="channelCompaction"})(D5||(D5={}));var b;(function($){$.Disconnected="disconnected",$.Connecting="connecting",$.Connected="connected"})(b||(b={}));var i;(function($){$.Unsubscribed="unsubscribed",$.Subscribing="subscribing",$.Subscribed="subscribed"})(i||(i={}));function r3($,Z){return $.lastIndexOf(Z,0)===0}function n2($){if($===void 0||$===null)return!1;return typeof $==="function"}function s3($,Z){if(globalThis.console){let H=globalThis.console[$];if(n2(H))H.apply(globalThis.console,Z)}}function t3($,Z){return Math.floor(Math.random()*(Z-$+1)+$)}function E0($,Z,H){if($>31)$=31;let J=t3(0,Math.min(H,Z*Math.pow(2,$)));return Math.min(H,Z+J)}function e3($){return"error"in $&&$.error!==null}function S0($){return Math.min($*1000,2147483647)}class a2 extends p2{constructor($,Z,H){super();if(this._resubscribeTimeout=null,this._refreshTimeout=null,this.channel=Z,this.state=i.Unsubscribed,this._centrifuge=$,this._token="",this._getToken=null,this._data=null,this._getData=null,this._recover=!1,this._offset=null,this._epoch=null,this._id=0,this._recoverable=!1,this._positioned=!1,this._joinLeave=!1,this._minResubscribeDelay=500,this._maxResubscribeDelay=20000,this._resubscribeTimeout=null,this._resubscribeAttempts=0,this._promises={},this._promiseId=0,this._inflight=!1,this._refreshTimeout=null,this._delta="",this._delta_negotiated=!1,this._tagsFilter=null,this._prevValue=null,this._unsubPromise=Promise.resolve(),this._setOptions(H),this._centrifuge._debugEnabled)this.on("state",(J)=>{this._debug("subscription state",Z,J.oldState,"->",J.newState)}),this.on("error",(J)=>{this._debug("subscription error",Z,J)});else this.on("error",function(){Function.prototype()})}ready($){if(this.state===i.Unsubscribed)return Promise.reject({code:h.subscriptionUnsubscribed,message:this.state});if(this.state===i.Subscribed)return Promise.resolve();return new Promise((Z,H)=>{let J={resolve:Z,reject:H};if($)J.timeout=setTimeout(function(){H({code:h.timeout,message:"timeout"})},$);this._promises[this._nextPromiseId()]=J})}subscribe(){if(this._isSubscribed())return;this._resubscribeAttempts=0,this._setSubscribing(w0.subscribeCalled,"subscribe called")}unsubscribe(){this._unsubPromise=this._setUnsubscribed(x0.unsubscribeCalled,"unsubscribe called",!0)}publish($){return c(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.publish(this.channel,$)})}presence(){return c(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presence(this.channel)})}presenceStats(){return c(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presenceStats(this.channel)})}history($){return c(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.history(this.channel,$)})}setTagsFilter($){if($&&this._delta)throw Error("cannot use delta and tagsFilter together");this._tagsFilter=$}setData($){this._data=$}_methodCall(){if(this._isSubscribed())return Promise.resolve();if(this._isUnsubscribed())return Promise.reject({code:h.subscriptionUnsubscribed,message:this.state});return new Promise(($,Z)=>{let H=this._centrifuge._config.timeout,J=setTimeout(()=>{Z({code:h.timeout,message:"timeout"})},H);this._promises[this._nextPromiseId()]={timeout:J,resolve:$,reject:Z}})}_nextPromiseId(){return++this._promiseId}_needRecover(){return this._recover===!0}_isUnsubscribed(){return this.state===i.Unsubscribed}_isSubscribing(){return this.state===i.Subscribing}_isSubscribed(){return this.state===i.Subscribed}_setState($){if(this.state!==$){let Z=this.state;return this.state=$,this.emit("state",{newState:$,oldState:Z,channel:this.channel}),!0}return!1}_usesToken(){return this._token!==""||this._getToken!==null}_clearSubscribingState(){this._resubscribeAttempts=0,this._clearResubscribeTimeout()}_clearSubscribedState(){this._clearRefreshTimeout()}_setSubscribed($){if(!this._isSubscribing())return;if(this._clearSubscribingState(),$.id)this._id=$.id;if($.recoverable)this._recover=!0,this._offset=$.offset||0,this._epoch=$.epoch||"";if($.delta)this._delta_negotiated=!0;else this._delta_negotiated=!1;this._setState(i.Subscribed);let Z=this._centrifuge._getSubscribeContext(this.channel,$);this.emit("subscribed",Z),this._resolvePromises();let H=$.publications;if(H&&H.length>0)for(let J in H){if(!H.hasOwnProperty(J))continue;this._handlePublication(H[J])}if($.expires===!0)this._refreshTimeout=setTimeout(()=>this._refresh(),S0($.ttl))}_setSubscribing($,Z){return c(this,void 0,void 0,function*(){if(this._isSubscribing())return;if(this._isSubscribed())this._clearSubscribedState();if(this._setState(i.Subscribing))this.emit("subscribing",{channel:this.channel,code:$,reason:Z});if(this._centrifuge._transport&&this._centrifuge._transport.emulation())yield this._unsubPromise;if(!this._isSubscribing())return;this._subscribe()})}_subscribe(){if(this._debug("subscribing on",this.channel),!this._isTransportOpen())return this._debug("delay subscribe on",this.channel,"till connected"),null;if(this._inflight)return null;if(this._inflight=!0,this._canSubscribeWithoutGettingToken())return this._subscribeWithoutToken();return this._getSubscriptionToken().then(($)=>this._handleTokenResponse($)).catch(($)=>this._handleTokenError($)),null}_isTransportOpen(){return this._centrifuge._transportIsOpen}_canSubscribeWithoutGettingToken(){return!this._usesToken()||!!this._token}_subscribeWithoutToken(){if(this._getData)return this._getDataAndSubscribe(this._token),null;else return this._sendSubscribe(this._token)}_getDataAndSubscribe($){if(!this._getData){this._inflight=!1;return}this._getData({channel:this.channel}).then((Z)=>{if(!this._isSubscribing()){this._inflight=!1;return}this._data=Z,this._sendSubscribe($)}).catch((Z)=>this._handleGetDataError(Z))}_handleGetDataError($){if(!this._isSubscribing()){this._inflight=!1;return}if($ instanceof J1){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeData",channel:this.channel,error:{code:h.badConfiguration,message:($===null||$===void 0?void 0:$.toString())||""}}),this._inflight=!1,this._scheduleResubscribe()}_handleTokenResponse($){if(!this._isSubscribing()){this._inflight=!1;return}if(!$){this._inflight=!1,this._failUnauthorized();return}if(this._token=$,this._getData)this._getDataAndSubscribe($);else this._sendSubscribe($)}_handleTokenError($){if(!this._isSubscribing()){this._inflight=!1;return}if($ instanceof J1){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeToken",channel:this.channel,error:{code:h.subscriptionSubscribeToken,message:($===null||$===void 0?void 0:$.toString())||""}}),this._inflight=!1,this._scheduleResubscribe()}_sendSubscribe($){if(!this._isTransportOpen())return this._inflight=!1,null;let Z=this._buildSubscribeCommand($);return this._centrifuge._call(Z).then((H)=>{this._inflight=!1;let J=H.reply.subscribe;if(this._handleSubscribeResponse(J),H.next)H.next()},(H)=>{if(this._inflight=!1,this._handleSubscribeError(H.error),H.next)H.next()}),Z}_buildSubscribeCommand($){let Z={channel:this.channel};if($)Z.token=$;if(this._data)Z.data=this._data;if(this._positioned)Z.positioned=!0;if(this._recoverable)Z.recoverable=!0;if(this._joinLeave)Z.join_leave=!0;if(Z.flag=D5.channelCompaction,this._needRecover()){Z.recover=!0;let H=this._getOffset();if(H)Z.offset=H;let J=this._getEpoch();if(J)Z.epoch=J}if(this._delta)Z.delta=this._delta;if(this._tagsFilter)Z.tf=this._tagsFilter;return{subscribe:Z}}_debug(...$){this._centrifuge._debug(...$)}_handleSubscribeError($){if(!this._isSubscribing())return;if($.code===h.timeout){this._centrifuge._disconnect(L1.subscribeTimeout,"subscribe timeout",!0);return}this._subscribeError($)}_handleSubscribeResponse($){if(!this._isSubscribing())return;this._setSubscribed($)}_setUnsubscribed($,Z,H){if(this._isUnsubscribed())return Promise.resolve();let J=Promise.resolve();if(this._isSubscribed()){if(H)J=this._centrifuge._unsubscribe(this);this._clearSubscribedState()}else if(this._isSubscribing()){if(this._inflight&&H)J=this._centrifuge._unsubscribe(this);this._clearSubscribingState()}if(this._inflight=!1,this._setState(i.Unsubscribed))this.emit("unsubscribed",{channel:this.channel,code:$,reason:Z});return this._rejectPromises({code:h.subscriptionUnsubscribed,message:this.state}),J}_handlePublication($){if(this._delta&&this._delta_negotiated){let{newData:H,newPrevValue:J}=this._centrifuge._codec.applyDeltaIfNeeded($,this._prevValue);$.data=H,this._prevValue=J}let Z=this._centrifuge._getPublicationContext(this.channel,$);if(this.emit("publication",Z),$.offset)this._offset=$.offset}_handleJoin($){let Z=this._centrifuge._getJoinLeaveContext($.info);this.emit("join",{channel:this.channel,info:Z})}_handleLeave($){let Z=this._centrifuge._getJoinLeaveContext($.info);this.emit("leave",{channel:this.channel,info:Z})}_resolvePromises(){for(let $ in this._promises){if(!this._promises.hasOwnProperty($))continue;if(this._promises[$].timeout)clearTimeout(this._promises[$].timeout);this._promises[$].resolve(),delete this._promises[$]}}_rejectPromises($){for(let Z in this._promises){if(!this._promises.hasOwnProperty(Z))continue;if(this._promises[Z].timeout)clearTimeout(this._promises[Z].timeout);this._promises[Z].reject($),delete this._promises[Z]}}_scheduleResubscribe(){if(!this._isSubscribing()){this._debug("not in subscribing state, skip resubscribe scheduling",this.channel);return}let $=this,Z=this._getResubscribeDelay();this._resubscribeTimeout=setTimeout(function(){if($._isSubscribing())$._subscribe()},Z),this._debug("resubscribe scheduled after "+Z,this.channel)}_subscribeError($){if(!this._isSubscribing())return;if($.code<100||$.code===109||$.temporary===!0){if($.code===109)this._token="";let Z={channel:this.channel,type:"subscribe",error:$};if(this._centrifuge.state===b.Connected)this.emit("error",Z);this._scheduleResubscribe()}else this._setUnsubscribed($.code,$.message,!1)}_getResubscribeDelay(){let $=E0(this._resubscribeAttempts,this._minResubscribeDelay,this._maxResubscribeDelay);return this._resubscribeAttempts++,$}_setOptions($){if(!$)return;if($.since)this._offset=$.since.offset||0,this._epoch=$.since.epoch||"",this._recover=!0;if($.data)this._data=$.data;if($.getData)this._getData=$.getData;if($.minResubscribeDelay!==void 0)this._minResubscribeDelay=$.minResubscribeDelay;if($.maxResubscribeDelay!==void 0)this._maxResubscribeDelay=$.maxResubscribeDelay;if($.token)this._token=$.token;if($.getToken)this._getToken=$.getToken;if($.positioned===!0)this._positioned=!0;if($.recoverable===!0)this._recoverable=!0;if($.joinLeave===!0)this._joinLeave=!0;if($.delta){if($.delta!=="fossil")throw Error("unsupported delta format");this._delta=$.delta}if($.tagsFilter)this._tagsFilter=$.tagsFilter;if(this._tagsFilter&&this._delta)throw Error("cannot use delta and tagsFilter together")}_getOffset(){let $=this._offset;if($!==null)return $;return 0}_getEpoch(){let $=this._epoch;if($!==null)return $;return""}_clearRefreshTimeout(){if(this._refreshTimeout!==null)clearTimeout(this._refreshTimeout),this._refreshTimeout=null}_clearResubscribeTimeout(){if(this._resubscribeTimeout!==null)clearTimeout(this._resubscribeTimeout),this._resubscribeTimeout=null}_getSubscriptionToken(){this._debug("get subscription token for channel",this.channel);let $={channel:this.channel},Z=this._getToken;if(Z===null)return this.emit("error",{type:"configuration",channel:this.channel,error:{code:h.badConfiguration,message:"provide a function to get channel subscription token"}}),Promise.reject(new J1(""));return Z($)}_refresh(){this._clearRefreshTimeout();let $=this;this._getSubscriptionToken().then(function(Z){if(!$._isSubscribed())return;if(!Z){$._failUnauthorized();return}$._token=Z;let J={sub_refresh:{channel:$.channel,token:Z}};$._centrifuge._call(J).then((Y)=>{let Q=Y.reply.sub_refresh;if($._refreshResponse(Q),Y.next)Y.next()},(Y)=>{if($._refreshError(Y.error),Y.next)Y.next()})}).catch(function(Z){if(Z instanceof J1){$._failUnauthorized();return}$.emit("error",{type:"refreshToken",channel:$.channel,error:{code:h.subscriptionRefreshToken,message:Z!==void 0?Z.toString():""}}),$._refreshTimeout=setTimeout(()=>$._refresh(),$._getRefreshRetryDelay())})}_refreshResponse($){if(!this._isSubscribed())return;if(this._debug("subscription token refreshed, channel",this.channel),this._clearRefreshTimeout(),$.expires===!0)this._refreshTimeout=setTimeout(()=>this._refresh(),S0($.ttl))}_refreshError($){if(!this._isSubscribed())return;if($.code<100||$.temporary===!0)this.emit("error",{type:"refresh",channel:this.channel,error:$}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay());else this._setUnsubscribed($.code,$.message,!0)}_getRefreshRetryDelay(){return E0(0,1e4,20000)}_failUnauthorized(){this._setUnsubscribed(x0.unauthorized,"unauthorized",!0)}}class o2{constructor($,Z){this.endpoint=$,this.options=Z,this._transport=null}name(){return"sockjs"}subName(){return"sockjs-"+this._transport.transport}emulation(){return!1}supported(){return this.options.sockjs!==null}initialize($,Z){this._transport=new this.options.sockjs(this.endpoint,null,this.options.sockjsOptions),this._transport.onopen=()=>{Z.onOpen()},this._transport.onerror=(H)=>{Z.onError(H)},this._transport.onclose=(H)=>{Z.onClose(H)},this._transport.onmessage=(H)=>{Z.onMessage(H.data)}}close(){this._transport.close()}send($){this._transport.send($)}}class R5{constructor($,Z){this.endpoint=$,this.options=Z,this._transport=null}name(){return"websocket"}subName(){return"websocket"}emulation(){return!1}supported(){return this.options.websocket!==void 0&&this.options.websocket!==null}initialize($,Z){let H="";if($==="protobuf")H="centrifuge-protobuf";if(H!=="")this._transport=new this.options.websocket(this.endpoint,H);else this._transport=new this.options.websocket(this.endpoint);if($==="protobuf")this._transport.binaryType="arraybuffer";this._transport.onopen=()=>{Z.onOpen()},this._transport.onerror=(J)=>{Z.onError(J)},this._transport.onclose=(J)=>{Z.onClose(J)},this._transport.onmessage=(J)=>{Z.onMessage(J.data)}}close(){this._transport.close()}send($){this._transport.send($)}}class r2{constructor($,Z){this.endpoint=$,this.options=Z,this._abortController=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"http_stream"}subName(){return"http_stream"}emulation(){return!0}_handleErrors($){if(!$.ok)throw Error($.status);return $}_fetchEventTarget($,Z,H){let J=new EventTarget,Y=$.options.fetch;return Y(Z,H).then($._handleErrors).then((Q)=>{J.dispatchEvent(new Event("open"));let X="",O=0,G=new Uint8Array,z=Q.body.getReader();return new $.options.readableStream({start(W){function f(){return z.read().then(({done:L,value:B})=>{if(L){J.dispatchEvent(new Event("close")),W.close();return}try{if($._protocol==="json"){X+=$._utf8decoder.decode(B);while(O<X.length)if(X[O]===`
|
|
21
|
+
`){let F=X.substring(0,O);J.dispatchEvent(new MessageEvent("message",{data:F})),X=X.substring(O+1),O=0}else++O}else{let F=new Uint8Array(G.length+B.length);F.set(G),F.set(B,G.length),G=F;while(!0){let K=$.options.decoder.decodeReply(G);if(K.ok){let q=G.slice(0,K.pos);J.dispatchEvent(new MessageEvent("message",{data:q})),G=G.slice(K.pos);continue}break}}}catch(F){J.dispatchEvent(new Event("error",{detail:F})),J.dispatchEvent(new Event("close")),W.close();return}f()}).catch(function(L){J.dispatchEvent(new Event("error",{detail:L})),J.dispatchEvent(new Event("close")),W.close();return})}return f()}})}).catch((Q)=>{J.dispatchEvent(new Event("error",{detail:Q})),J.dispatchEvent(new Event("close"))}),J}supported(){return this.options.fetch!==null&&this.options.readableStream!==null&&typeof TextDecoder<"u"&&typeof AbortController<"u"&&typeof EventTarget<"u"&&typeof Event<"u"&&typeof MessageEvent<"u"&&typeof Error<"u"}initialize($,Z,H){this._protocol=$,this._abortController=new AbortController;let J,Y;if($==="json")J={Accept:"application/json","Content-Type":"application/json"},Y=H;else J={Accept:"application/octet-stream","Content-Type":"application/octet-stream"},Y=H;let Q={method:"POST",headers:J,body:Y,mode:"cors",credentials:"same-origin",signal:this._abortController.signal},X=this._fetchEventTarget(this,this.endpoint,Q);X.addEventListener("open",()=>{Z.onOpen()}),X.addEventListener("error",(O)=>{this._abortController.abort(),Z.onError(O)}),X.addEventListener("close",()=>{this._abortController.abort(),Z.onClose({code:4,reason:"connection closed"})}),X.addEventListener("message",(O)=>{Z.onMessage(O.data)})}close(){this._abortController.abort()}send($,Z,H){let J,Y,Q={session:Z,node:H,data:$};if(this._protocol==="json")J={"Content-Type":"application/json"},Y=JSON.stringify(Q);else J={"Content-Type":"application/octet-stream"},Y=this.options.encoder.encodeEmulationRequest(Q);let X=this.options.fetch,O={method:"POST",headers:J,body:Y,mode:"cors",credentials:"same-origin"};X(this.options.emulationEndpoint,O)}}class s2{constructor($,Z){this.endpoint=$,this.options=Z,this._protocol="json",this._transport=null,this._onClose=null}name(){return"sse"}subName(){return"sse"}emulation(){return!0}supported(){return this.options.eventsource!==null&&this.options.fetch!==null}initialize($,Z,H){let J;if(globalThis&&globalThis.document&&globalThis.document.baseURI)J=new URL(this.endpoint,globalThis.document.baseURI);else J=new URL(this.endpoint);J.searchParams.append("cf_connect",H);let Y={},Q=new this.options.eventsource(J.toString(),Y);this._transport=Q;let X=this;Q.onopen=function(){Z.onOpen()},Q.onerror=function(O){Q.close(),Z.onError(O),Z.onClose({code:4,reason:"connection closed"})},Q.onmessage=function(O){Z.onMessage(O.data)},X._onClose=function(){Z.onClose({code:4,reason:"connection closed"})}}close(){if(this._transport.close(),this._onClose!==null)this._onClose()}send($,Z,H){let J={session:Z,node:H,data:$},Y={"Content-Type":"application/json"},Q=JSON.stringify(J),X=this.options.fetch,O={method:"POST",headers:Y,body:Q,mode:"cors",credentials:"same-origin"};X(this.options.emulationEndpoint,O)}}class t2{constructor($,Z){this.endpoint=$,this.options=Z,this._transport=null,this._stream=null,this._writer=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"webtransport"}subName(){return"webtransport"}emulation(){return!1}supported(){return this.options.webtransport!==void 0&&this.options.webtransport!==null}initialize($,Z){return c(this,void 0,void 0,function*(){let H;if(globalThis&&globalThis.document&&globalThis.document.baseURI)H=new URL(this.endpoint,globalThis.document.baseURI);else H=new URL(this.endpoint);if($==="protobuf")H.searchParams.append("cf_protocol","protobuf");this._protocol=$;let J=new EventTarget;this._transport=new this.options.webtransport(H.toString()),this._transport.closed.then(()=>{Z.onClose({code:4,reason:"connection closed"})}).catch(()=>{Z.onClose({code:4,reason:"connection closed"})});try{yield this._transport.ready}catch(Q){this.close();return}let Y;try{Y=yield this._transport.createBidirectionalStream()}catch(Q){this.close();return}this._stream=Y,this._writer=this._stream.writable.getWriter(),J.addEventListener("close",()=>{Z.onClose({code:4,reason:"connection closed"})}),J.addEventListener("message",(Q)=>{Z.onMessage(Q.data)}),this._startReading(J),Z.onOpen()})}_startReading($){return c(this,void 0,void 0,function*(){let Z=this._stream.readable.getReader(),H="",J=0,Y=new Uint8Array;try{while(!0){let{done:Q,value:X}=yield Z.read();if(X.length>0)if(this._protocol==="json"){H+=this._utf8decoder.decode(X);while(J<H.length)if(H[J]===`
|
|
22
|
+
`){let O=H.substring(0,J);$.dispatchEvent(new MessageEvent("message",{data:O})),H=H.substring(J+1),J=0}else++J}else{let O=new Uint8Array(Y.length+X.length);O.set(Y),O.set(X,Y.length),Y=O;while(!0){let G=this.options.decoder.decodeReply(Y);if(G.ok){let z=Y.slice(0,G.pos);$.dispatchEvent(new MessageEvent("message",{data:z})),Y=Y.slice(G.pos);continue}break}}if(Q)break}}catch(Q){$.dispatchEvent(new Event("close"))}})}close(){return c(this,void 0,void 0,function*(){try{if(this._writer)yield this._writer.close();this._transport.close()}catch($){}})}send($){return c(this,void 0,void 0,function*(){let Z;if(this._protocol==="json")Z=new TextEncoder().encode($+`
|
|
23
|
+
`);else Z=$;try{yield this._writer.write(Z)}catch(H){this.close()}})}}var $Z=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,36,-1,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,-1,-1,-1,63,-1];class e2{constructor($){this.a=$,this.pos=0}haveBytes(){return this.pos<this.a.length}getByte(){let $=this.a[this.pos];if(this.pos++,this.pos>this.a.length)throw RangeError("out of bounds");return $}getChar(){return String.fromCharCode(this.getByte())}getInt(){let $=0,Z;while(this.haveBytes()&&(Z=$Z[127&this.getByte()])>=0)$=($<<6)+Z;return this.pos--,$>>>0}}class $8{constructor(){this.a=[]}toByteArray($){if(Array.isArray($))return this.a;return new Uint8Array(this.a)}putArray($,Z,H){for(let J=Z;J<H;J++)this.a.push($[J])}}function ZZ($){let Z=0,H=0,J=0,Y=0,Q=0,X=$.length;while(X>=16)Z=Z+$[Q+0]|0,H=H+$[Q+1]|0,J=J+$[Q+2]|0,Y=Y+$[Q+3]|0,Z=Z+$[Q+4]|0,H=H+$[Q+5]|0,J=J+$[Q+6]|0,Y=Y+$[Q+7]|0,Z=Z+$[Q+8]|0,H=H+$[Q+9]|0,J=J+$[Q+10]|0,Y=Y+$[Q+11]|0,Z=Z+$[Q+12]|0,H=H+$[Q+13]|0,J=J+$[Q+14]|0,Y=Y+$[Q+15]|0,Q+=16,X-=16;while(X>=4)Z=Z+$[Q+0]|0,H=H+$[Q+1]|0,J=J+$[Q+2]|0,Y=Y+$[Q+3]|0,Q+=4,X-=4;switch(Y=((Y+(J<<8)|0)+(H<<16)|0)+(Z<<24)|0,X){case 3:Y=Y+($[Q+2]<<8)|0;case 2:Y=Y+($[Q+1]<<16)|0;case 1:Y=Y+($[Q+0]<<24)|0}return Y>>>0}function HZ($,Z){let H=0,J=new e2(Z),Y=$.length,Q=Z.length,X=J.getInt();if(J.getChar()!==`
|
|
24
|
+
`)throw Error("size integer not terminated by '\\n'");let O=new $8;while(J.haveBytes()){let G=J.getInt(),z;switch(J.getChar()){case"@":if(z=J.getInt(),J.haveBytes()&&J.getChar()!==",")throw Error("copy command not terminated by ','");if(H+=G,H>X)throw Error("copy exceeds output file size");if(z+G>Y)throw Error("copy extends past end of input");O.putArray($,z,z+G);break;case":":if(H+=G,H>X)throw Error("insert command gives an output larger than predicted");if(G>Q)throw Error("insert count exceeds size of delta");O.putArray(J.a,J.pos,J.pos+G),J.pos+=G;break;case";":{let W=O.toByteArray($);if(G!==ZZ(W))throw Error("bad checksum");if(H!==X)throw Error("generated size does not match predicted size");return W}default:throw Error("unknown delta operator")}}throw Error("unterminated delta")}class N5{name(){return"json"}encodeCommands($){return $.map((Z)=>JSON.stringify(Z)).join(`
|
|
15
25
|
`)}decodeReplies($){return $.trim().split(`
|
|
16
|
-
`).map((Z)=>JSON.parse(Z))}applyDeltaIfNeeded($,Z){let J,H;if($.delta){let Y=s3(Z,new TextEncoder().encode($.data));J=JSON.parse(new TextDecoder().decode(Y)),H=Y}else J=JSON.parse($.data),H=new TextEncoder().encode($.data);return{newData:J,newPrevValue:H}}}var t3={headers:{},token:"",getToken:null,data:null,getData:null,debug:!1,name:"js",version:"",fetch:null,readableStream:null,websocket:null,eventsource:null,sockjs:null,sockjsOptions:{},emulationEndpoint:"/emulation",minReconnectDelay:500,maxReconnectDelay:20000,timeout:5000,maxServerPingDelay:1e4,networkEventTarget:null};class e extends Error{constructor($){super($);this.name=this.constructor.name}}class p1 extends d8{constructor($,Z){super();if(this._reconnectTimeout=null,this._refreshTimeout=null,this._serverPingTimeout=null,this.state=g.Disconnected,this._transportIsOpen=!1,this._endpoint=$,this._emulation=!1,this._transports=[],this._currentTransportIndex=0,this._triedAllTransports=!1,this._transportWasOpen=!1,this._transport=null,this._transportId=0,this._deviceWentOffline=!1,this._transportClosed=!0,this._codec=new I5,this._reconnecting=!1,this._reconnectTimeout=null,this._reconnectAttempts=0,this._client=null,this._session="",this._node="",this._subs={},this._serverSubs={},this._commandId=0,this._commands=[],this._batching=!1,this._refreshRequired=!1,this._refreshTimeout=null,this._callbacks={},this._token="",this._data=null,this._dispatchPromise=Promise.resolve(),this._serverPing=0,this._serverPingTimeout=null,this._sendPong=!1,this._promises={},this._promiseId=0,this._debugEnabled=!1,this._networkEventsSet=!1,this._config=Object.assign(Object.assign({},t3),Z),this._configure(),this._debugEnabled)this.on("state",(J)=>{this._debug("client state",J.oldState,"->",J.newState)}),this.on("error",(J)=>{this._debug("client error",J)});else this.on("error",function(){Function.prototype()})}newSubscription($,Z){if(this.getSubscription($)!==null)throw Error("Subscription to the channel "+$+" already exists");let J=new l8(this,$,Z);return this._subs[$]=J,J}getSubscription($){return this._getSub($)}removeSubscription($){if(!$)return;if($.state!==u.Unsubscribed)$.unsubscribe();this._removeSubscription($)}subscriptions(){return this._subs}ready($){return y(this,void 0,void 0,function*(){switch(this.state){case g.Disconnected:throw{code:S.clientDisconnected,message:"client disconnected"};case g.Connected:return;default:return new Promise((Z,J)=>{let H={resolve:Z,reject:J};if($)H.timeout=setTimeout(()=>{J({code:S.timeout,message:"timeout"})},$);this._promises[this._nextPromiseId()]=H})}})}connect(){if(this._isConnected()){this._debug("connect called when already connected");return}if(this._isConnecting()){this._debug("connect called when already connecting");return}this._debug("connect called"),this._reconnectAttempts=0,this._startConnecting()}disconnect(){this._disconnect(l1.disconnectCalled,"disconnect called",!1)}setToken($){this._token=$}setData($){this._data=$}setHeaders($){this._config.headers=$}send($){return y(this,void 0,void 0,function*(){let Z={send:{data:$}};if(yield this._methodCall(),!this._transportSendCommands([Z]))throw this._createErrorObject(S.transportWriteError,"transport write error")})}rpc($,Z){return y(this,void 0,void 0,function*(){let J={rpc:{method:$,data:Z}};return yield this._methodCall(),{data:(yield this._callPromise(J,(Y)=>Y.rpc)).data}})}publish($,Z){return y(this,void 0,void 0,function*(){let J={publish:{channel:$,data:Z}};return yield this._methodCall(),yield this._callPromise(J,()=>({})),{}})}history($,Z){return y(this,void 0,void 0,function*(){let J={history:this._getHistoryRequest($,Z)};yield this._methodCall();let H=yield this._callPromise(J,(Q)=>Q.history),Y=[];if(H.publications)for(let Q=0;Q<H.publications.length;Q++)Y.push(this._getPublicationContext($,H.publications[Q]));return{publications:Y,epoch:H.epoch||"",offset:H.offset||0}})}presence($){return y(this,void 0,void 0,function*(){let Z={presence:{channel:$}};yield this._methodCall();let H=(yield this._callPromise(Z,(Y)=>Y.presence)).presence;for(let Y in H)if(Object.prototype.hasOwnProperty.call(H,Y)){let Q=H[Y],X=Q.conn_info,W=Q.chan_info;if(X)Q.connInfo=X;if(W)Q.chanInfo=W}return{clients:H}})}presenceStats($){return y(this,void 0,void 0,function*(){let Z={presence_stats:{channel:$}};yield this._methodCall();let J=yield this._callPromise(Z,(H)=>{return H.presence_stats});return{numUsers:J.num_users,numClients:J.num_clients}})}startBatching(){this._batching=!0}stopBatching(){let $=this;Promise.resolve().then(function(){Promise.resolve().then(function(){$._batching=!1,$._flush()})})}_debug(...$){if(!this._debugEnabled)return;i3("debug",$)}_codecName(){return this._codec.name()}_formatOverride(){return}_configure(){if(!("Promise"in globalThis))throw Error("Promise polyfill required");if(!this._endpoint)throw Error("endpoint configuration required");if(this._config.token!==null)this._token=this._config.token;if(this._config.data!==null)this._data=this._config.data;if(this._codec=new I5,this._formatOverride(),this._config.debug===!0||typeof localStorage<"u"&&typeof localStorage.getItem==="function"&&localStorage.getItem("centrifuge.debug"))this._debugEnabled=!0;if(this._debug("config",this._config),typeof this._endpoint==="string");else if(Array.isArray(this._endpoint)){this._transports=this._endpoint,this._emulation=!0;for(let $ in this._transports)if(this._transports.hasOwnProperty($)){let Z=this._transports[$];if(!Z.endpoint||!Z.transport)throw Error("malformed transport configuration");let J=Z.transport;if(["websocket","http_stream","sse","sockjs","webtransport"].indexOf(J)<0)throw Error("unsupported transport name: "+J)}}else throw Error("unsupported url configuration type: only string or array of objects are supported")}_setState($){if(this.state!==$){this._reconnecting=!1;let Z=this.state;return this.state=$,this.emit("state",{newState:$,oldState:Z}),!0}return!1}_isDisconnected(){return this.state===g.Disconnected}_isConnecting(){return this.state===g.Connecting}_isConnected(){return this.state===g.Connected}_nextCommandId(){return++this._commandId}_setNetworkEvents(){if(this._networkEventsSet)return;let $=null;if(this._config.networkEventTarget!==null)$=this._config.networkEventTarget;else if(typeof globalThis.addEventListener<"u")$=globalThis;if($)$.addEventListener("offline",()=>{if(this._debug("offline event triggered"),this.state===g.Connected||this.state===g.Connecting)this._disconnect(z1.transportClosed,"transport closed",!0),this._deviceWentOffline=!0}),$.addEventListener("online",()=>{if(this._debug("online event triggered"),this.state!==g.Connecting)return;if(this._deviceWentOffline&&!this._transportClosed)this._deviceWentOffline=!1,this._transportClosed=!0;this._clearReconnectTimeout(),this._startReconnecting()}),this._networkEventsSet=!0}_getReconnectDelay(){let $=R0(this._reconnectAttempts,this._config.minReconnectDelay,this._config.maxReconnectDelay);return this._reconnectAttempts+=1,$}_clearOutgoingRequests(){for(let $ in this._callbacks)if(this._callbacks.hasOwnProperty($)){let Z=this._callbacks[$];clearTimeout(Z.timeout);let J=Z.errback;if(!J)continue;J({error:this._createErrorObject(S.connectionClosed,"connection closed")})}this._callbacks={}}_clearConnectedState(){this._client=null,this._clearServerPingTimeout(),this._clearRefreshTimeout();for(let $ in this._subs){if(!this._subs.hasOwnProperty($))continue;let Z=this._subs[$];if(Z.state===u.Subscribed)Z._setSubscribing(V0.transportClosed,"transport closed")}for(let $ in this._serverSubs)if(this._serverSubs.hasOwnProperty($))this.emit("subscribing",{channel:$})}_handleWriteError($){for(let Z of $){let J=Z.id;if(!(J in this._callbacks))continue;let H=this._callbacks[J];clearTimeout(this._callbacks[J].timeout),delete this._callbacks[J];let Y=H.errback;Y({error:this._createErrorObject(S.transportWriteError,"transport write error")})}}_transportSendCommands($){if(!$.length)return!0;if(!this._transport)return!1;try{this._transport.send(this._codec.encodeCommands($),this._session,this._node)}catch(Z){return this._debug("error writing commands",Z),this._handleWriteError($),!1}return!0}_initializeTransport(){let $;if(this._config.websocket!==null)$=this._config.websocket;else if(!(typeof globalThis.WebSocket!=="function"&&typeof globalThis.WebSocket!=="object"))$=globalThis.WebSocket;let Z=null;if(this._config.sockjs!==null)Z=this._config.sockjs;else if(typeof globalThis.SockJS<"u")Z=globalThis.SockJS;let J=null;if(this._config.eventsource!==null)J=this._config.eventsource;else if(typeof globalThis.EventSource<"u")J=globalThis.EventSource;let H=null;if(this._config.fetch!==null)H=this._config.fetch;else if(typeof globalThis.fetch<"u")H=globalThis.fetch;let Y=null;if(this._config.readableStream!==null)Y=this._config.readableStream;else if(typeof globalThis.ReadableStream<"u")Y=globalThis.ReadableStream;if(!this._emulation){if(p3(this._endpoint,"http"))throw Error("Provide explicit transport endpoints configuration in case of using HTTP (i.e. using array of TransportEndpoint instead of a single string), or use ws(s):// scheme in an endpoint if you aimed using WebSocket transport");else if(this._debug("client will use websocket"),this._transport=new A5(this._endpoint,{websocket:$}),!this._transport.supported())throw Error("WebSocket constructor not found, make sure it is available globally or passed as a dependency in Centrifuge options")}else{if(this._currentTransportIndex>=this._transports.length)this._triedAllTransports=!0,this._currentTransportIndex=0;let K=0;while(!0){if(K>=this._transports.length)throw Error("no supported transport found");let q=this._transports[this._currentTransportIndex],B=q.transport,F=q.endpoint;if(B==="websocket"){if(this._debug("trying websocket transport"),this._transport=new A5(F,{websocket:$}),!this._transport.supported()){this._debug("websocket transport not available"),this._currentTransportIndex++,K++;continue}}else if(B==="webtransport"){if(this._debug("trying webtransport transport"),this._transport=new o8(F,{webtransport:globalThis.WebTransport,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("webtransport transport not available"),this._currentTransportIndex++,K++;continue}}else if(B==="http_stream"){if(this._debug("trying http_stream transport"),this._transport=new i8(F,{fetch:H,readableStream:Y,emulationEndpoint:this._config.emulationEndpoint,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("http_stream transport not available"),this._currentTransportIndex++,K++;continue}}else if(B==="sse"){if(this._debug("trying sse transport"),this._transport=new n8(F,{eventsource:J,fetch:H,emulationEndpoint:this._config.emulationEndpoint}),!this._transport.supported()){this._debug("sse transport not available"),this._currentTransportIndex++,K++;continue}}else if(B==="sockjs"){if(this._debug("trying sockjs"),this._transport=new p8(F,{sockjs:Z,sockjsOptions:this._config.sockjsOptions}),!this._transport.supported()){this._debug("sockjs transport not available"),this._currentTransportIndex++,K++;continue}}else throw Error("unknown transport "+B);break}}let Q=this,X=this._transport,W=this._nextTransportId();Q._debug("id of transport",W);let G=!1,z=[];if(this._transport.emulation()){let K=Q._sendConnect(!0);z.push(K)}this._setNetworkEvents();let U=this._codec.encodeCommands(z);this._transportClosed=!1;let L;L=setTimeout(function(){X.close()},this._config.timeout),this._transport.initialize(this._codecName(),{onOpen:function(){if(L)clearTimeout(L),L=null;if(Q._transportId!=W){Q._debug("open callback from non-actual transport"),X.close();return}if(G=!0,Q._debug(X.subName(),"transport open"),X.emulation())return;Q._transportIsOpen=!0,Q._transportWasOpen=!0,Q.startBatching(),Q._sendConnect(!1),Q._sendSubscribeCommands(),Q.stopBatching(),Q.emit("__centrifuge_debug:connect_frame_sent",{})},onError:function(K){if(Q._transportId!=W){Q._debug("error callback from non-actual transport");return}Q._debug("transport level error",K)},onClose:function(K){if(L)clearTimeout(L),L=null;if(Q._transportId!=W){Q._debug("close callback from non-actual transport");return}Q._debug(X.subName(),"transport closed"),Q._transportClosed=!0,Q._transportIsOpen=!1;let q="connection closed",B=!0,F=0;if(K&&"code"in K&&K.code)F=K.code;if(K&&K.reason)try{let M=JSON.parse(K.reason);q=M.reason,B=M.reconnect}catch(M){if(q=K.reason,F>=3500&&F<4000||F>=4500&&F<5000)B=!1}if(F<3000){if(F===1009)F=l1.messageSizeLimit,q="message size limit exceeded",B=!1;else F=z1.transportClosed,q="transport closed";if(Q._emulation&&!Q._transportWasOpen){if(Q._currentTransportIndex++,Q._currentTransportIndex>=Q._transports.length)Q._triedAllTransports=!0,Q._currentTransportIndex=0}}else Q._transportWasOpen=!0;if(Q._isConnecting()&&!G)Q.emit("error",{type:"transport",error:{code:S.transportClosed,message:"transport closed"},transport:X.name()});Q._reconnecting=!1,Q._disconnect(F,q,B)},onMessage:function(K){Q._dataReceived(K)}},U),Q.emit("__centrifuge_debug:transport_initialized",{})}_sendConnect($){let Z=this._constructConnectCommand(),J=this;return this._call(Z,$).then((H)=>{let Y=H.reply.connect;if(J._connectResponse(Y),H.next)H.next()},(H)=>{if(J._connectError(H.error),H.next)H.next()}),Z}_startReconnecting(){if(this._debug("start reconnecting"),!this._isConnecting()){this._debug("stop reconnecting: client not in connecting state");return}if(this._reconnecting){this._debug("reconnect already in progress, return from reconnect routine");return}if(this._transportClosed===!1){this._debug("waiting for transport close");return}this._reconnecting=!0;let $=this._token==="";if(!(this._refreshRequired||$&&this._config.getToken!==null)){if(this._config.getData)this._config.getData().then((H)=>{if(!this._isConnecting())return;this._data=H,this._initializeTransport()}).catch((H)=>this._handleGetDataError(H));else this._initializeTransport();return}let J=this;this._getToken().then(function(H){if(!J._isConnecting())return;if(H==null||H==null){J._failUnauthorized();return}if(J._token=H,J._debug("connection token refreshed"),J._config.getData)J._config.getData().then(function(Y){if(!J._isConnecting())return;J._data=Y,J._initializeTransport()}).catch((Y)=>J._handleGetDataError(Y));else J._initializeTransport()}).catch(function(H){if(!J._isConnecting())return;if(H instanceof e){J._failUnauthorized();return}J.emit("error",{type:"connectToken",error:{code:S.clientConnectToken,message:H!==void 0?H.toString():""}});let Y=J._getReconnectDelay();J._debug("error on getting connection token, reconnect after "+Y+" milliseconds",H),J._reconnecting=!1,J._reconnectTimeout=setTimeout(()=>{J._startReconnecting()},Y)})}_handleGetDataError($){if($ instanceof e){this._failUnauthorized();return}this.emit("error",{type:"connectData",error:{code:S.badConfiguration,message:($===null||$===void 0?void 0:$.toString())||""}});let Z=this._getReconnectDelay();this._debug("error on getting connect data, reconnect after "+Z+" milliseconds",$),this._reconnecting=!1,this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},Z)}_connectError($){if(this.state!==g.Connecting)return;if($.code===109)this._refreshRequired=!0;if($.code<100||$.temporary===!0||$.code===109)this.emit("error",{type:"connect",error:$}),this._debug("closing transport due to connect error"),this._disconnect($.code,$.message,!0);else this._disconnect($.code,$.message,!1)}_scheduleReconnect(){if(!this._isConnecting())return;let $=!1;if(this._emulation&&!this._transportWasOpen&&!this._triedAllTransports)$=!0;let Z=this._getReconnectDelay();if($)Z=0;this._debug("reconnect after "+Z+" milliseconds"),this._clearReconnectTimeout(),this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},Z)}_constructConnectCommand(){let $={};if(this._token)$.token=this._token;if(this._data)$.data=this._data;if(this._config.name)$.name=this._config.name;if(this._config.version)$.version=this._config.version;if(Object.keys(this._config.headers).length>0)$.headers=this._config.headers;let Z={},J=!1;for(let H in this._serverSubs)if(this._serverSubs.hasOwnProperty(H)&&this._serverSubs[H].recoverable){J=!0;let Y={recover:!0};if(this._serverSubs[H].offset)Y.offset=this._serverSubs[H].offset;if(this._serverSubs[H].epoch)Y.epoch=this._serverSubs[H].epoch;Z[H]=Y}if(J)$.subs=Z;return{connect:$}}_getHistoryRequest($,Z){let J={channel:$};if(Z!==void 0){if(Z.since){if(J.since={offset:Z.since.offset},Z.since.epoch)J.since.epoch=Z.since.epoch}if(Z.limit!==void 0)J.limit=Z.limit;if(Z.reverse===!0)J.reverse=!0}return J}_methodCall(){if(this._isConnected())return Promise.resolve();return new Promise(($,Z)=>{let J=setTimeout(function(){Z({code:S.timeout,message:"timeout"})},this._config.timeout);this._promises[this._nextPromiseId()]={timeout:J,resolve:$,reject:Z}})}_callPromise($,Z){return new Promise((J,H)=>{this._call($,!1).then((Y)=>{var Q;let X=Z(Y.reply);J(X),(Q=Y.next)===null||Q===void 0||Q.call(Y)},(Y)=>{var Q;H(Y.error),(Q=Y.next)===null||Q===void 0||Q.call(Y)})})}_dataReceived($){if(this._serverPing>0)this._waitServerPing();let Z=this._codec.decodeReplies($);this._dispatchPromise=this._dispatchPromise.then(()=>{let J;this._dispatchPromise=new Promise((H)=>{J=H}),this._dispatchSynchronized(Z,J)})}_dispatchSynchronized($,Z){let J=Promise.resolve();for(let H in $)if($.hasOwnProperty(H))J=J.then(()=>{return this._dispatchReply($[H])});J=J.then(()=>{Z()})}_dispatchReply($){let Z,J=new Promise((Y)=>{Z=Y});if($===void 0||$===null)return this._debug("dispatch: got undefined or null reply"),Z(),J;let H=$.id;if(H&&H>0)this._handleReply($,Z);else if(!$.push)this._handleServerPing(Z);else this._handlePush($.push,Z);return J}_call($,Z){return new Promise((J,H)=>{if($.id=this._nextCommandId(),this._registerCall($.id,J,H),!Z)this._addCommand($)})}_startConnecting(){if(this._debug("start connecting"),this._setState(g.Connecting))this.emit("connecting",{code:z1.connectCalled,reason:"connect called"});this._client=null,this._startReconnecting()}_disconnect($,Z,J){if(this._isDisconnected())return;this._transportIsOpen=!1;let H=this.state;this._reconnecting=!1;let Y={code:$,reason:Z},Q=!1;if(J)Q=this._setState(g.Connecting);else Q=this._setState(g.Disconnected),this._rejectPromises({code:S.clientDisconnected,message:"disconnected"});if(this._clearOutgoingRequests(),H===g.Connecting)this._clearReconnectTimeout();if(H===g.Connected)this._clearConnectedState();if(Q)if(this._isConnecting())this.emit("connecting",Y);else this.emit("disconnected",Y);if(this._transport){this._debug("closing existing transport");let X=this._transport;this._transport=null,X.close(),this._transportClosed=!0,this._nextTransportId()}else this._debug("no transport to close");this._scheduleReconnect()}_failUnauthorized(){this._disconnect(l1.unauthorized,"unauthorized",!1)}_getToken(){if(this._debug("get connection token"),!this._config.getToken)return this.emit("error",{type:"configuration",error:{code:S.badConfiguration,message:"token expired but no getToken function set in the configuration"}}),Promise.reject(new e(""));return this._config.getToken({})}_refresh(){let $=this._client,Z=this;this._getToken().then(function(J){if($!==Z._client)return;if(!J){Z._failUnauthorized();return}if(Z._token=J,Z._debug("connection token refreshed"),!Z._isConnected())return;let H={refresh:{token:Z._token}};Z._call(H,!1).then((Y)=>{let Q=Y.reply.refresh;if(Z._refreshResponse(Q),Y.next)Y.next()},(Y)=>{if(Z._refreshError(Y.error),Y.next)Y.next()})}).catch(function(J){if(!Z._isConnected())return;if(J instanceof e){Z._failUnauthorized();return}Z.emit("error",{type:"refreshToken",error:{code:S.clientRefreshToken,message:J!==void 0?J.toString():""}}),Z._refreshTimeout=setTimeout(()=>Z._refresh(),Z._getRefreshRetryDelay())})}_refreshError($){if($.code<100||$.temporary===!0)this.emit("error",{type:"refresh",error:$}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay());else this._disconnect($.code,$.message,!1)}_getRefreshRetryDelay(){return R0(0,5000,1e4)}_refreshResponse($){if(this._refreshTimeout)clearTimeout(this._refreshTimeout),this._refreshTimeout=null;if($.expires)this._client=$.client,this._refreshTimeout=setTimeout(()=>this._refresh(),N0($.ttl))}_removeSubscription($){if($===null)return;delete this._subs[$.channel]}_unsubscribe($){if(!this._transportIsOpen)return Promise.resolve();let J={unsubscribe:{channel:$.channel}},H=this;return new Promise((Q,X)=>{this._call(J,!1).then((W)=>{if(Q(),W.next)W.next()},(W)=>{if(Q(),W.next)W.next();H._disconnect(z1.unsubscribeError,"unsubscribe error",!0)})})}_getSub($,Z){if(Z&&Z>0){for(let H in this._subs)if(this._subs.hasOwnProperty(H)){let Y=this._subs[H];if(Y._id===Z)return Y}return null}let J=this._subs[$];if(!J)return null;return J}_isServerSub($){return this._serverSubs[$]!==void 0}_sendSubscribeCommands(){let $=[];for(let Z in this._subs){if(!this._subs.hasOwnProperty(Z))continue;let J=this._subs[Z];if(J._inflight===!0)continue;if(J.state===u.Subscribing){let H=J._subscribe();if(H)$.push(H)}}return $}_connectResponse($){if(this._transportIsOpen=!0,this._transportWasOpen=!0,this._reconnectAttempts=0,this._refreshRequired=!1,this._isConnected())return;if(this._client=$.client,this._setState(g.Connected),this._refreshTimeout)clearTimeout(this._refreshTimeout);if($.expires)this._refreshTimeout=setTimeout(()=>this._refresh(),N0($.ttl));this._session=$.session,this._node=$.node,this.startBatching(),this._sendSubscribeCommands(),this.stopBatching();let Z={client:$.client,transport:this._transport.subName()};if($.data)Z.data=$.data;if(this.emit("connected",Z),this._resolvePromises(),this._processServerSubs($.subs||{}),$.ping&&$.ping>0)this._serverPing=$.ping*1000,this._sendPong=$.pong===!0,this._waitServerPing();else this._serverPing=0}_processServerSubs($){for(let Z in $){if(!$.hasOwnProperty(Z))continue;let J=$[Z];this._serverSubs[Z]={offset:J.offset,epoch:J.epoch,recoverable:J.recoverable||!1};let H=this._getSubscribeContext(Z,J);this.emit("subscribed",H)}for(let Z in $){if(!$.hasOwnProperty(Z))continue;let J=$[Z];if(J.recovered){let H=J.publications;if(H&&H.length>0){for(let Y in H)if(H.hasOwnProperty(Y))this._handlePublication(Z,H[Y])}}}for(let Z in this._serverSubs){if(!this._serverSubs.hasOwnProperty(Z))continue;if(!$[Z])this.emit("unsubscribed",{channel:Z}),delete this._serverSubs[Z]}}_clearRefreshTimeout(){if(this._refreshTimeout!==null)clearTimeout(this._refreshTimeout),this._refreshTimeout=null}_clearReconnectTimeout(){if(this._reconnectTimeout!==null)clearTimeout(this._reconnectTimeout),this._reconnectTimeout=null}_clearServerPingTimeout(){if(this._serverPingTimeout!==null)clearTimeout(this._serverPingTimeout),this._serverPingTimeout=null}_waitServerPing(){if(this._config.maxServerPingDelay===0)return;if(!this._isConnected())return;this._clearServerPingTimeout(),this._serverPingTimeout=setTimeout(()=>{if(!this._isConnected())return;this._disconnect(z1.noPing,"no ping",!0)},this._serverPing+this._config.maxServerPingDelay)}_getSubscribeContext($,Z){let J={channel:$,positioned:!1,recoverable:!1,wasRecovering:!1,recovered:!1,hasRecoveredPublications:!1};if(Z.recovered)J.recovered=!0;if(Z.positioned)J.positioned=!0;if(Z.recoverable)J.recoverable=!0;if(Z.was_recovering)J.wasRecovering=!0;let H="";if("epoch"in Z)H=Z.epoch;let Y=0;if("offset"in Z)Y=Z.offset;if(J.positioned||J.recoverable)J.streamPosition={offset:Y,epoch:H};if(Array.isArray(Z.publications)&&Z.publications.length>0)J.hasRecoveredPublications=!0;if(Z.data)J.data=Z.data;return J}_handleReply($,Z){let J=$.id;if(!(J in this._callbacks)){Z();return}let H=this._callbacks[J];if(clearTimeout(this._callbacks[J].timeout),delete this._callbacks[J],!o3($)){let Y=H.callback;if(!Y)return;Y({reply:$,next:Z})}else{let Y=H.errback;if(!Y){Z();return}let Q={code:$.error.code,message:$.error.message||"",temporary:$.error.temporary||!1};Y({error:Q,next:Z})}}_handleJoin($,Z,J){let H=this._getSub($,J);if(!H&&$){if(this._isServerSub($)){let Y={channel:$,info:this._getJoinLeaveContext(Z.info)};this.emit("join",Y)}return}H._handleJoin(Z)}_handleLeave($,Z,J){let H=this._getSub($,J);if(!H&&$){if(this._isServerSub($)){let Y={channel:$,info:this._getJoinLeaveContext(Z.info)};this.emit("leave",Y)}return}H._handleLeave(Z)}_handleUnsubscribe($,Z){let J=this._getSub($,0);if(!J&&$){if(this._isServerSub($))delete this._serverSubs[$],this.emit("unsubscribed",{channel:$});return}if(Z.code<2500)J._setUnsubscribed(Z.code,Z.reason,!1);else J._setSubscribing(Z.code,Z.reason)}_handleSubscribe($,Z){this._serverSubs[$]={offset:Z.offset,epoch:Z.epoch,recoverable:Z.recoverable||!1},this.emit("subscribed",this._getSubscribeContext($,Z))}_handleDisconnect($){let Z=$.code,J=!0;if(Z>=3500&&Z<4000||Z>=4500&&Z<5000)J=!1;this._disconnect(Z,$.reason,J)}_getPublicationContext($,Z){let J={channel:$,data:Z.data};if(Z.offset)J.offset=Z.offset;if(Z.info)J.info=this._getJoinLeaveContext(Z.info);if(Z.tags)J.tags=Z.tags;return J}_getJoinLeaveContext($){let Z={client:$.client,user:$.user},J=$.conn_info;if(J)Z.connInfo=J;let H=$.chan_info;if(H)Z.chanInfo=H;return Z}_handlePublication($,Z,J){let H=this._getSub($,J);if(!H&&$){if(this._isServerSub($)){let Y=this._getPublicationContext($,Z);if(this.emit("publication",Y),Z.offset!==void 0)this._serverSubs[$].offset=Z.offset}return}H._handlePublication(Z)}_handleMessage($){this.emit("message",{data:$.data})}_handleServerPing($){if(this._sendPong){let Z={};this._transportSendCommands([Z])}$()}_handlePush($,Z){let{channel:J,id:H}=$;if($.pub)this._handlePublication(J,$.pub,H);else if($.message)this._handleMessage($.message);else if($.join)this._handleJoin(J,$.join,H);else if($.leave)this._handleLeave(J,$.leave,H);else if($.unsubscribe)this._handleUnsubscribe(J,$.unsubscribe);else if($.subscribe)this._handleSubscribe(J,$.subscribe);else if($.disconnect)this._handleDisconnect($.disconnect);Z()}_flush(){let $=this._commands.slice(0);this._commands=[],this._transportSendCommands($)}_createErrorObject($,Z,J){let H={code:$,message:Z};if(J)H.temporary=!0;return H}_registerCall($,Z,J){this._callbacks[$]={callback:Z,errback:J,timeout:null},this._callbacks[$].timeout=setTimeout(()=>{if(delete this._callbacks[$],c8(J))J({error:this._createErrorObject(S.timeout,"timeout")})},this._config.timeout)}_addCommand($){if(this._batching)this._commands.push($);else this._transportSendCommands([$])}_nextPromiseId(){return++this._promiseId}_nextTransportId(){return++this._transportId}_resolvePromises(){for(let $ in this._promises){if(!this._promises.hasOwnProperty($))continue;if(this._promises[$].timeout)clearTimeout(this._promises[$].timeout);this._promises[$].resolve(),delete this._promises[$]}}_rejectPromises($){for(let Z in this._promises){if(!this._promises.hasOwnProperty(Z))continue;if(this._promises[Z].timeout)clearTimeout(this._promises[Z].timeout);this._promises[Z].reject($),delete this._promises[Z]}}}p1.SubscriptionState=u;p1.State=g;p1.UnauthorizedError=e;var $Z=e3(null),s8=$Z;var s=Object.create(null);s.open="0";s.close="1";s.ping="2";s.pong="3";s.message="4";s.upgrade="5";s.noop="6";var i1=Object.create(null);Object.keys(s).forEach(($)=>{i1[s[$]]=$});var n1={type:"error",data:"parser error"};var $2=typeof Blob==="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Z2=typeof ArrayBuffer==="function",J2=($)=>{return typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView($):$&&$.buffer instanceof ArrayBuffer},o1=({type:$,data:Z},J,H)=>{if($2&&Z instanceof Blob)if(J)return H(Z);else return t8(Z,H);else if(Z2&&(Z instanceof ArrayBuffer||J2(Z)))if(J)return H(Z);else return t8(new Blob([Z]),H);return H(s[$]+(Z||""))},t8=($,Z)=>{let J=new FileReader;return J.onload=function(){let H=J.result.split(",")[1];Z("b"+(H||""))},J.readAsDataURL($)};function e8($){if($ instanceof Uint8Array)return $;else if($ instanceof ArrayBuffer)return new Uint8Array($);else return new Uint8Array($.buffer,$.byteOffset,$.byteLength)}var V5;function H2($,Z){if($2&&$.data instanceof Blob)return $.data.arrayBuffer().then(e8).then(Z);else if(Z2&&($.data instanceof ArrayBuffer||J2($.data)))return Z(e8($.data));o1($,!1,(J)=>{if(!V5)V5=new TextEncoder;Z(V5.encode(J))})}var a1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let $=0;$<64;$++)a1["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt($)]=$;var Y2=($)=>{let Z=$.length*0.75,J=$.length,H,Y=0,Q,X,W,G;if($[$.length-1]==="="){if(Z--,$[$.length-2]==="=")Z--}let z=new ArrayBuffer(Z),U=new Uint8Array(z);for(H=0;H<J;H+=4)Q=a1[$.charCodeAt(H)],X=a1[$.charCodeAt(H+1)],W=a1[$.charCodeAt(H+2)],G=a1[$.charCodeAt(H+3)],U[Y++]=Q<<2|X>>4,U[Y++]=(X&15)<<4|W>>2,U[Y++]=(W&3)<<6|G&63;return z};var ZZ=typeof ArrayBuffer==="function",r1=($,Z)=>{if(typeof $!=="string")return{type:"message",data:Q2($,Z)};let J=$.charAt(0);if(J==="b")return{type:"message",data:JZ($.substring(1),Z)};if(!i1[J])return n1;return $.length>1?{type:i1[J],data:$.substring(1)}:{type:i1[J]}},JZ=($,Z)=>{if(ZZ){let J=Y2($);return Q2(J,Z)}else return{base64:!0,data:$}},Q2=($,Z)=>{switch(Z){case"blob":if($ instanceof Blob)return $;else return new Blob([$]);case"arraybuffer":default:if($ instanceof ArrayBuffer)return $;else return $.buffer}};var X2=String.fromCharCode(30),G2=($,Z)=>{let J=$.length,H=Array(J),Y=0;$.forEach((Q,X)=>{o1(Q,!1,(W)=>{if(H[X]=W,++Y===J)Z(H.join(X2))})})},W2=($,Z)=>{let J=$.split(X2),H=[];for(let Y=0;Y<J.length;Y++){let Q=r1(J[Y],Z);if(H.push(Q),Q.type==="error")break}return H};function z2(){return new TransformStream({transform($,Z){H2($,(J)=>{let H=J.length,Y;if(H<126)Y=new Uint8Array(1),new DataView(Y.buffer).setUint8(0,H);else if(H<65536){Y=new Uint8Array(3);let Q=new DataView(Y.buffer);Q.setUint8(0,126),Q.setUint16(1,H)}else{Y=new Uint8Array(9);let Q=new DataView(Y.buffer);Q.setUint8(0,127),Q.setBigUint64(1,BigInt(H))}if($.data&&typeof $.data!=="string")Y[0]|=128;Z.enqueue(Y),Z.enqueue(J)})}})}var D5;function T0($){return $.reduce((Z,J)=>Z+J.length,0)}function w0($,Z){if($[0].length===Z)return $.shift();let J=new Uint8Array(Z),H=0;for(let Y=0;Y<Z;Y++)if(J[Y]=$[0][H++],H===$[0].length)$.shift(),H=0;if($.length&&H<$[0].length)$[0]=$[0].slice(H);return J}function U2($,Z){if(!D5)D5=new TextDecoder;let J=[],H=0,Y=-1,Q=!1;return new TransformStream({transform(X,W){J.push(X);while(!0){if(H===0){if(T0(J)<1)break;let G=w0(J,1);if(Q=(G[0]&128)===128,Y=G[0]&127,Y<126)H=3;else if(Y===126)H=1;else H=2}else if(H===1){if(T0(J)<2)break;let G=w0(J,2);Y=new DataView(G.buffer,G.byteOffset,G.length).getUint16(0),H=3}else if(H===2){if(T0(J)<8)break;let G=w0(J,8),z=new DataView(G.buffer,G.byteOffset,G.length),U=z.getUint32(0);if(U>Math.pow(2,21)-1){W.enqueue(n1);break}Y=U*Math.pow(2,32)+z.getUint32(4),H=3}else{if(T0(J)<Y)break;let G=w0(J,Y);W.enqueue(r1(Q?G:D5.decode(G),Z)),H=0}if(Y===0||Y>$){W.enqueue(n1);break}}}})}var R5=4;function x($){if($)return HZ($)}function HZ($){for(var Z in x.prototype)$[Z]=x.prototype[Z];return $}x.prototype.on=x.prototype.addEventListener=function($,Z){return this._callbacks=this._callbacks||{},(this._callbacks["$"+$]=this._callbacks["$"+$]||[]).push(Z),this};x.prototype.once=function($,Z){function J(){this.off($,J),Z.apply(this,arguments)}return J.fn=Z,this.on($,J),this};x.prototype.off=x.prototype.removeListener=x.prototype.removeAllListeners=x.prototype.removeEventListener=function($,Z){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var J=this._callbacks["$"+$];if(!J)return this;if(arguments.length==1)return delete this._callbacks["$"+$],this;var H;for(var Y=0;Y<J.length;Y++)if(H=J[Y],H===Z||H.fn===Z){J.splice(Y,1);break}if(J.length===0)delete this._callbacks["$"+$];return this};x.prototype.emit=function($){this._callbacks=this._callbacks||{};var Z=Array(arguments.length-1),J=this._callbacks["$"+$];for(var H=1;H<arguments.length;H++)Z[H-1]=arguments[H];if(J){J=J.slice(0);for(var H=0,Y=J.length;H<Y;++H)J[H].apply(this,Z)}return this};x.prototype.emitReserved=x.prototype.emit;x.prototype.listeners=function($){return this._callbacks=this._callbacks||{},this._callbacks["$"+$]||[]};x.prototype.hasListeners=function($){return!!this.listeners($).length};var Y1=(()=>{if(typeof Promise==="function"&&typeof Promise.resolve==="function")return(Z)=>Promise.resolve().then(Z);else return(Z,J)=>J(Z,0)})(),d=(()=>{if(typeof self<"u")return self;else if(typeof window<"u")return window;else return Function("return this")()})(),O2="arraybuffer";function L2(){}function x0($,...Z){return Z.reduce((J,H)=>{if($.hasOwnProperty(H))J[H]=$[H];return J},{})}var YZ=d.setTimeout,QZ=d.clearTimeout;function Q1($,Z){if(Z.useNativeTimers)$.setTimeoutFn=YZ.bind(d),$.clearTimeoutFn=QZ.bind(d);else $.setTimeoutFn=d.setTimeout.bind(d),$.clearTimeoutFn=d.clearTimeout.bind(d)}var XZ=1.33;function B2($){if(typeof $==="string")return GZ($);return Math.ceil(($.byteLength||$.size)*XZ)}function GZ($){let Z=0,J=0;for(let H=0,Y=$.length;H<Y;H++)if(Z=$.charCodeAt(H),Z<128)J+=1;else if(Z<2048)J+=2;else if(Z<55296||Z>=57344)J+=3;else H++,J+=4;return J}function E0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function F2($){let Z="";for(let J in $)if($.hasOwnProperty(J)){if(Z.length)Z+="&";Z+=encodeURIComponent(J)+"="+encodeURIComponent($[J])}return Z}function K2($){let Z={},J=$.split("&");for(let H=0,Y=J.length;H<Y;H++){let Q=J[H].split("=");Z[decodeURIComponent(Q[0])]=decodeURIComponent(Q[1])}return Z}class N5 extends Error{constructor($,Z,J){super($);this.description=Z,this.context=J,this.type="TransportError"}}class U1 extends x{constructor($){super();this.writable=!1,Q1(this,$),this.opts=$,this.query=$.query,this.socket=$.socket,this.supportsBinary=!$.forceBase64}onError($,Z,J){return super.emitReserved("error",new N5($,Z,J)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){if(this.readyState==="opening"||this.readyState==="open")this.doClose(),this.onClose();return this}send($){if(this.readyState==="open")this.write($)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData($){let Z=r1($,this.socket.binaryType);this.onPacket(Z)}onPacket($){super.emitReserved("packet",$)}onClose($){this.readyState="closed",super.emitReserved("close",$)}pause($){}createUri($,Z={}){return $+"://"+this._hostname()+this._port()+this.opts.path+this._query(Z)}_hostname(){let $=this.opts.hostname;return $.indexOf(":")===-1?$:"["+$+"]"}_port(){if(this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80))return":"+this.opts.port;else return""}_query($){let Z=F2($);return Z.length?"?"+Z:""}}class S0 extends U1{constructor(){super(...arguments);this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause($){this.readyState="pausing";let Z=()=>{this.readyState="paused",$()};if(this._polling||!this.writable){let J=0;if(this._polling)J++,this.once("pollComplete",function(){--J||Z()});if(!this.writable)J++,this.once("drain",function(){--J||Z()})}else Z()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData($){let Z=(J)=>{if(this.readyState==="opening"&&J.type==="open")this.onOpen();if(J.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(J)};if(W2($,this.socket.binaryType).forEach(Z),this.readyState!=="closed"){if(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open")this._poll()}}doClose(){let $=()=>{this.write([{type:"close"}])};if(this.readyState==="open")$();else this.once("open",$)}write($){this.writable=!1,G2($,(Z)=>{this.doWrite(Z,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let $=this.opts.secure?"https":"http",Z=this.query||{};if(this.opts.timestampRequests!==!1)Z[this.opts.timestampParam]=E0();if(!this.supportsBinary&&!Z.sid)Z.b64=1;return this.createUri($,Z)}}var q2=!1;try{q2=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch($){}var M2=q2;function WZ(){}class I2 extends S0{constructor($){super($);if(typeof location<"u"){let Z=location.protocol==="https:",J=location.port;if(!J)J=Z?"443":"80";this.xd=typeof location<"u"&&$.hostname!==location.hostname||J!==$.port}}doWrite($,Z){let J=this.request({method:"POST",data:$});J.on("success",Z),J.on("error",(H,Y)=>{this.onError("xhr post error",H,Y)})}doPoll(){let $=this.request();$.on("data",this.onData.bind(this)),$.on("error",(Z,J)=>{this.onError("xhr poll error",Z,J)}),this.pollXhr=$}}class $1 extends x{constructor($,Z,J){super();this.createRequest=$,Q1(this,J),this._opts=J,this._method=J.method||"GET",this._uri=Z,this._data=J.data!==void 0?J.data:null,this._create()}_create(){var $;let Z=x0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");Z.xdomain=!!this._opts.xd;let J=this._xhr=this.createRequest(Z);try{J.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){J.setDisableHeaderCheck&&J.setDisableHeaderCheck(!0);for(let H in this._opts.extraHeaders)if(this._opts.extraHeaders.hasOwnProperty(H))J.setRequestHeader(H,this._opts.extraHeaders[H])}}catch(H){}if(this._method==="POST")try{J.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(H){}try{J.setRequestHeader("Accept","*/*")}catch(H){}if(($=this._opts.cookieJar)===null||$===void 0||$.addCookies(J),"withCredentials"in J)J.withCredentials=this._opts.withCredentials;if(this._opts.requestTimeout)J.timeout=this._opts.requestTimeout;J.onreadystatechange=()=>{var H;if(J.readyState===3)(H=this._opts.cookieJar)===null||H===void 0||H.parseCookies(J.getResponseHeader("set-cookie"));if(J.readyState!==4)return;if(J.status===200||J.status===1223)this._onLoad();else this.setTimeoutFn(()=>{this._onError(typeof J.status==="number"?J.status:0)},0)},J.send(this._data)}catch(H){this.setTimeoutFn(()=>{this._onError(H)},0);return}if(typeof document<"u")this._index=$1.requestsCount++,$1.requests[this._index]=this}_onError($){this.emitReserved("error",$,this._xhr),this._cleanup(!0)}_cleanup($){if(typeof this._xhr>"u"||this._xhr===null)return;if(this._xhr.onreadystatechange=WZ,$)try{this._xhr.abort()}catch(Z){}if(typeof document<"u")delete $1.requests[this._index];this._xhr=null}_onLoad(){let $=this._xhr.responseText;if($!==null)this.emitReserved("data",$),this.emitReserved("success"),this._cleanup()}abort(){this._cleanup()}}$1.requestsCount=0;$1.requests={};if(typeof document<"u"){if(typeof attachEvent==="function")attachEvent("onunload",A2);else if(typeof addEventListener==="function"){let $="onpagehide"in d?"pagehide":"unload";addEventListener($,A2,!1)}}function A2(){for(let $ in $1.requests)if($1.requests.hasOwnProperty($))$1.requests[$].abort()}var zZ=function(){let $=f2({xdomain:!1});return $&&$.responseType!==null}();class M1 extends I2{constructor($){super($);let Z=$&&$.forceBase64;this.supportsBinary=zZ&&!Z}request($={}){return Object.assign($,{xd:this.xd},this.opts),new $1(f2,this.uri(),$)}}function f2($){let Z=$.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!Z||M2))return new XMLHttpRequest}catch(J){}if(!Z)try{return new d[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(J){}}var V2=typeof navigator<"u"&&typeof navigator.product==="string"&&navigator.product.toLowerCase()==="reactnative";class D2 extends U1{get name(){return"websocket"}doOpen(){let $=this.uri(),Z=this.opts.protocols,J=V2?{}:x0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");if(this.opts.extraHeaders)J.headers=this.opts.extraHeaders;try{this.ws=this.createSocket($,Z,J)}catch(H){return this.emitReserved("error",H)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{if(this.opts.autoUnref)this.ws._socket.unref();this.onOpen()},this.ws.onclose=($)=>this.onClose({description:"websocket connection closed",context:$}),this.ws.onmessage=($)=>this.onData($.data),this.ws.onerror=($)=>this.onError("websocket error",$)}write($){this.writable=!1;for(let Z=0;Z<$.length;Z++){let J=$[Z],H=Z===$.length-1;o1(J,this.supportsBinary,(Y)=>{try{this.doWrite(J,Y)}catch(Q){}if(H)Y1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){if(typeof this.ws<"u")this.ws.onerror=()=>{},this.ws.close(),this.ws=null}uri(){let $=this.opts.secure?"wss":"ws",Z=this.query||{};if(this.opts.timestampRequests)Z[this.opts.timestampParam]=E0();if(!this.supportsBinary)Z.b64=1;return this.createUri($,Z)}}var P5=d.WebSocket||d.MozWebSocket;class A1 extends D2{createSocket($,Z,J){return!V2?Z?new P5($,Z):new P5($):new P5($,Z,J)}doWrite($,Z){this.ws.send(Z)}}class s1 extends U1{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch($){return this.emitReserved("error",$)}this._transport.closed.then(()=>{this.onClose()}).catch(($)=>{this.onError("webtransport error",$)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(($)=>{let Z=U2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),J=$.readable.pipeThrough(Z).getReader(),H=z2();H.readable.pipeTo($.writable),this._writer=H.writable.getWriter();let Y=()=>{J.read().then(({done:X,value:W})=>{if(X)return;this.onPacket(W),Y()}).catch((X)=>{})};Y();let Q={type:"open"};if(this.query.sid)Q.data=`{"sid":"${this.query.sid}"}`;this._writer.write(Q).then(()=>this.onOpen())})})}write($){this.writable=!1;for(let Z=0;Z<$.length;Z++){let J=$[Z],H=Z===$.length-1;this._writer.write(J).then(()=>{if(H)Y1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var $;($=this._transport)===null||$===void 0||$.close()}}var T5={websocket:A1,webtransport:s1,polling:M1};var UZ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,OZ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function E1($){if($.length>8000)throw"URI too long";let Z=$,J=$.indexOf("["),H=$.indexOf("]");if(J!=-1&&H!=-1)$=$.substring(0,J)+$.substring(J,H).replace(/:/g,";")+$.substring(H,$.length);let Y=UZ.exec($||""),Q={},X=14;while(X--)Q[OZ[X]]=Y[X]||"";if(J!=-1&&H!=-1)Q.source=Z,Q.host=Q.host.substring(1,Q.host.length-1).replace(/;/g,":"),Q.authority=Q.authority.replace("[","").replace("]","").replace(/;/g,":"),Q.ipv6uri=!0;return Q.pathNames=LZ(Q,Q.path),Q.queryKey=BZ(Q,Q.query),Q}function LZ($,Z){let J=/\/{2,9}/g,H=Z.replace(J,"/").split("/");if(Z.slice(0,1)=="/"||Z.length===0)H.splice(0,1);if(Z.slice(-1)=="/")H.splice(H.length-1,1);return H}function BZ($,Z){let J={};return Z.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(H,Y,Q){if(Y)J[Y]=Q}),J}var w5=typeof addEventListener==="function"&&typeof removeEventListener==="function",v0=[];if(w5)addEventListener("offline",()=>{v0.forEach(($)=>$())},!1);class X1 extends x{constructor($,Z){super();if(this.binaryType=O2,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,$&&typeof $==="object")Z=$,$=null;if($){let J=E1($);if(Z.hostname=J.host,Z.secure=J.protocol==="https"||J.protocol==="wss",Z.port=J.port,J.query)Z.query=J.query}else if(Z.host)Z.hostname=E1(Z.host).host;if(Q1(this,Z),this.secure=Z.secure!=null?Z.secure:typeof location<"u"&&location.protocol==="https:",Z.hostname&&!Z.port)Z.port=this.secure?"443":"80";if(this.hostname=Z.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=Z.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},Z.transports.forEach((J)=>{let H=J.prototype.name;this.transports.push(H),this._transportsByName[H]=J}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},Z),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query==="string")this.opts.query=K2(this.opts.query);if(w5){if(this.opts.closeOnBeforeunload)this._beforeunloadEventListener=()=>{if(this.transport)this.transport.removeAllListeners(),this.transport.close()},addEventListener("beforeunload",this._beforeunloadEventListener,!1);if(this.hostname!=="localhost")this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},v0.push(this._offlineEventListener)}if(this.opts.withCredentials)this._cookieJar=L2();this._open()}createTransport($){let Z=Object.assign({},this.opts.query);if(Z.EIO=R5,Z.transport=$,this.id)Z.sid=this.id;let J=Object.assign({},this.opts,{query:Z,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[$]);return new this._transportsByName[$](J)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let $=this.opts.rememberUpgrade&&X1.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let Z=this.createTransport($);Z.open(),this.setTransport(Z)}setTransport($){if(this.transport)this.transport.removeAllListeners();this.transport=$,$.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",(Z)=>this._onClose("transport close",Z))}onOpen(){this.readyState="open",X1.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket($){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",$),this.emitReserved("heartbeat"),$.type){case"open":this.onHandshake(JSON.parse($.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let Z=Error("server error");Z.code=$.data,this._onError(Z);break;case"message":this.emitReserved("data",$.data),this.emitReserved("message",$.data);break}}onHandshake($){if(this.emitReserved("handshake",$),this.id=$.sid,this.transport.query.sid=$.sid,this._pingInterval=$.pingInterval,this._pingTimeout=$.pingTimeout,this._maxPayload=$.maxPayload,this.onOpen(),this.readyState==="closed")return;this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let $=this._pingInterval+this._pingTimeout;if(this._pingTimeoutTime=Date.now()+$,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},$),this.opts.autoUnref)this._pingTimeoutTimer.unref()}_onDrain(){if(this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0)this.emitReserved("drain");else this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let $=this._getWritablePackets();this.transport.send($),this._prevBufferLen=$.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let Z=1;for(let J=0;J<this.writeBuffer.length;J++){let H=this.writeBuffer[J].data;if(H)Z+=B2(H);if(J>0&&Z>this._maxPayload)return this.writeBuffer.slice(0,J);Z+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let $=Date.now()>this._pingTimeoutTime;if($)this._pingTimeoutTime=0,Y1(()=>{this._onClose("ping timeout")},this.setTimeoutFn);return $}write($,Z,J){return this._sendPacket("message",$,Z,J),this}send($,Z,J){return this._sendPacket("message",$,Z,J),this}_sendPacket($,Z,J,H){if(typeof Z==="function")H=Z,Z=void 0;if(typeof J==="function")H=J,J=null;if(this.readyState==="closing"||this.readyState==="closed")return;J=J||{},J.compress=J.compress!==!1;let Y={type:$,data:Z,options:J};if(this.emitReserved("packetCreate",Y),this.writeBuffer.push(Y),H)this.once("flush",H);this.flush()}close(){let $=()=>{this._onClose("forced close"),this.transport.close()},Z=()=>{this.off("upgrade",Z),this.off("upgradeError",Z),$()},J=()=>{this.once("upgrade",Z),this.once("upgradeError",Z)};if(this.readyState==="opening"||this.readyState==="open")if(this.readyState="closing",this.writeBuffer.length)this.once("drain",()=>{if(this.upgrading)J();else $()});else if(this.upgrading)J();else $();return this}_onError($){if(X1.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",$),this._onClose("transport error",$)}_onClose($,Z){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),w5){if(this._beforeunloadEventListener)removeEventListener("beforeunload",this._beforeunloadEventListener,!1);if(this._offlineEventListener){let J=v0.indexOf(this._offlineEventListener);if(J!==-1)v0.splice(J,1)}}this.readyState="closed",this.id=null,this.emitReserved("close",$,Z),this.writeBuffer=[],this._prevBufferLen=0}}}X1.protocol=R5;class x5 extends X1{constructor(){super(...arguments);this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let $=0;$<this._upgrades.length;$++)this._probe(this._upgrades[$])}_probe($){let Z=this.createTransport($),J=!1;X1.priorWebsocketSuccess=!1;let H=()=>{if(J)return;Z.send([{type:"ping",data:"probe"}]),Z.once("packet",(U)=>{if(J)return;if(U.type==="pong"&&U.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",Z),!Z)return;X1.priorWebsocketSuccess=Z.name==="websocket",this.transport.pause(()=>{if(J)return;if(this.readyState==="closed")return;z(),this.setTransport(Z),Z.send([{type:"upgrade"}]),this.emitReserved("upgrade",Z),Z=null,this.upgrading=!1,this.flush()})}else{let L=Error("probe error");L.transport=Z.name,this.emitReserved("upgradeError",L)}})};function Y(){if(J)return;J=!0,z(),Z.close(),Z=null}let Q=(U)=>{let L=Error("probe error: "+U);L.transport=Z.name,Y(),this.emitReserved("upgradeError",L)};function X(){Q("transport closed")}function W(){Q("socket closed")}function G(U){if(Z&&U.name!==Z.name)Y()}let z=()=>{Z.removeListener("open",H),Z.removeListener("error",Q),Z.removeListener("close",X),this.off("close",W),this.off("upgrading",G)};if(Z.once("open",H),Z.once("error",Q),Z.once("close",X),this.once("close",W),this.once("upgrading",G),this._upgrades.indexOf("webtransport")!==-1&&$!=="webtransport")this.setTimeoutFn(()=>{if(!J)Z.open()},200);else Z.open()}onHandshake($){this._upgrades=this._filterUpgrades($.upgrades),super.onHandshake($)}_filterUpgrades($){let Z=[];for(let J=0;J<$.length;J++)if(~this.transports.indexOf($[J]))Z.push($[J]);return Z}}class t1 extends x5{constructor($,Z={}){let J=typeof $==="object"?$:Z;if(!J.transports||J.transports&&typeof J.transports[0]==="string")J.transports=(J.transports||["polling","websocket","webtransport"]).map((H)=>T5[H]).filter((H)=>!!H);super($,J)}}var $O=t1.protocol;function R2($,Z="",J){let H=$;if(J=J||typeof location<"u"&&location,$==null)$=J.protocol+"//"+J.host;if(typeof $==="string"){if($.charAt(0)==="/")if($.charAt(1)==="/")$=J.protocol+$;else $=J.host+$;if(!/^(https?|wss?):\/\//.test($))if(typeof J<"u")$=J.protocol+"//"+$;else $="https://"+$;H=E1($)}if(!H.port){if(/^(http|ws)$/.test(H.protocol))H.port="80";else if(/^(http|ws)s$/.test(H.protocol))H.port="443"}H.path=H.path||"/";let Q=H.host.indexOf(":")!==-1?"["+H.host+"]":H.host;return H.id=H.protocol+"://"+Q+":"+H.port+Z,H.href=H.protocol+"://"+Q+(J&&J.port===H.port?"":":"+H.port),H}var C5={};S3(C5,{protocol:()=>x2,isPacketValid:()=>RZ,PacketType:()=>V,Encoder:()=>E2,Decoder:()=>v5});var KZ=typeof ArrayBuffer==="function",qZ=($)=>{return typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView($):$.buffer instanceof ArrayBuffer},N2=Object.prototype.toString,MZ=typeof Blob==="function"||typeof Blob<"u"&&N2.call(Blob)==="[object BlobConstructor]",AZ=typeof File==="function"||typeof File<"u"&&N2.call(File)==="[object FileConstructor]";function $0($){return KZ&&($ instanceof ArrayBuffer||qZ($))||MZ&&$ instanceof Blob||AZ&&$ instanceof File}function e1($,Z){if(!$||typeof $!=="object")return!1;if(Array.isArray($)){for(let J=0,H=$.length;J<H;J++)if(e1($[J]))return!0;return!1}if($0($))return!0;if($.toJSON&&typeof $.toJSON==="function"&&arguments.length===1)return e1($.toJSON(),!0);for(let J in $)if(Object.prototype.hasOwnProperty.call($,J)&&e1($[J]))return!0;return!1}function P2($){let Z=[],J=$.data,H=$;return H.data=E5(J,Z),H.attachments=Z.length,{packet:H,buffers:Z}}function E5($,Z){if(!$)return $;if($0($)){let J={_placeholder:!0,num:Z.length};return Z.push($),J}else if(Array.isArray($)){let J=Array($.length);for(let H=0;H<$.length;H++)J[H]=E5($[H],Z);return J}else if(typeof $==="object"&&!($ instanceof Date)){let J={};for(let H in $)if(Object.prototype.hasOwnProperty.call($,H))J[H]=E5($[H],Z);return J}return $}function T2($,Z){return $.data=S5($.data,Z),delete $.attachments,$}function S5($,Z){if(!$)return $;if($&&$._placeholder===!0)if(typeof $.num==="number"&&$.num>=0&&$.num<Z.length)return Z[$.num];else throw Error("illegal attachments");else if(Array.isArray($))for(let J=0;J<$.length;J++)$[J]=S5($[J],Z);else if(typeof $==="object"){for(let J in $)if(Object.prototype.hasOwnProperty.call($,J))$[J]=S5($[J],Z)}return $}var w2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],x2=5,V;(function($){$[$.CONNECT=0]="CONNECT",$[$.DISCONNECT=1]="DISCONNECT",$[$.EVENT=2]="EVENT",$[$.ACK=3]="ACK",$[$.CONNECT_ERROR=4]="CONNECT_ERROR",$[$.BINARY_EVENT=5]="BINARY_EVENT",$[$.BINARY_ACK=6]="BINARY_ACK"})(V||(V={}));class E2{constructor($){this.replacer=$}encode($){if($.type===V.EVENT||$.type===V.ACK){if(e1($))return this.encodeAsBinary({type:$.type===V.EVENT?V.BINARY_EVENT:V.BINARY_ACK,nsp:$.nsp,data:$.data,id:$.id})}return[this.encodeAsString($)]}encodeAsString($){let Z=""+$.type;if($.type===V.BINARY_EVENT||$.type===V.BINARY_ACK)Z+=$.attachments+"-";if($.nsp&&$.nsp!=="/")Z+=$.nsp+",";if($.id!=null)Z+=$.id;if($.data!=null)Z+=JSON.stringify($.data,this.replacer);return Z}encodeAsBinary($){let Z=P2($),J=this.encodeAsString(Z.packet),H=Z.buffers;return H.unshift(J),H}}class v5 extends x{constructor($){super();this.reviver=$}add($){let Z;if(typeof $==="string"){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");Z=this.decodeString($);let J=Z.type===V.BINARY_EVENT;if(J||Z.type===V.BINARY_ACK){if(Z.type=J?V.EVENT:V.ACK,this.reconstructor=new S2(Z),Z.attachments===0)super.emitReserved("decoded",Z)}else super.emitReserved("decoded",Z)}else if($0($)||$.base64){if(!this.reconstructor)throw Error("got binary data when not reconstructing a packet");else if(Z=this.reconstructor.takeBinaryData($),Z)this.reconstructor=null,super.emitReserved("decoded",Z)}else throw Error("Unknown type: "+$)}decodeString($){let Z=0,J={type:Number($.charAt(0))};if(V[J.type]===void 0)throw Error("unknown packet type "+J.type);if(J.type===V.BINARY_EVENT||J.type===V.BINARY_ACK){let Y=Z+1;while($.charAt(++Z)!=="-"&&Z!=$.length);let Q=$.substring(Y,Z);if(Q!=Number(Q)||$.charAt(Z)!=="-")throw Error("Illegal attachments");J.attachments=Number(Q)}if($.charAt(Z+1)==="/"){let Y=Z+1;while(++Z){if($.charAt(Z)===",")break;if(Z===$.length)break}J.nsp=$.substring(Y,Z)}else J.nsp="/";let H=$.charAt(Z+1);if(H!==""&&Number(H)==H){let Y=Z+1;while(++Z){let Q=$.charAt(Z);if(Q==null||Number(Q)!=Q){--Z;break}if(Z===$.length)break}J.id=Number($.substring(Y,Z+1))}if($.charAt(++Z)){let Y=this.tryParse($.substr(Z));if(v5.isPayloadValid(J.type,Y))J.data=Y;else throw Error("invalid payload")}return J}tryParse($){try{return JSON.parse($,this.reviver)}catch(Z){return!1}}static isPayloadValid($,Z){switch($){case V.CONNECT:return C0(Z);case V.DISCONNECT:return Z===void 0;case V.CONNECT_ERROR:return typeof Z==="string"||C0(Z);case V.EVENT:case V.BINARY_EVENT:return Array.isArray(Z)&&(typeof Z[0]==="number"||typeof Z[0]==="string"&&w2.indexOf(Z[0])===-1);case V.ACK:case V.BINARY_ACK:return Array.isArray(Z)}}destroy(){if(this.reconstructor)this.reconstructor.finishedReconstruction(),this.reconstructor=null}}class S2{constructor($){this.packet=$,this.buffers=[],this.reconPack=$}takeBinaryData($){if(this.buffers.push($),this.buffers.length===this.reconPack.attachments){let Z=T2(this.reconPack,this.buffers);return this.finishedReconstruction(),Z}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function IZ($){return typeof $==="string"}var fZ=Number.isInteger||function($){return typeof $==="number"&&isFinite($)&&Math.floor($)===$};function VZ($){return $===void 0||fZ($)}function C0($){return Object.prototype.toString.call($)==="[object Object]"}function DZ($,Z){switch($){case V.CONNECT:return Z===void 0||C0(Z);case V.DISCONNECT:return Z===void 0;case V.EVENT:return Array.isArray(Z)&&(typeof Z[0]==="number"||typeof Z[0]==="string"&&w2.indexOf(Z[0])===-1);case V.ACK:return Array.isArray(Z);case V.CONNECT_ERROR:return typeof Z==="string"||C0(Z);default:return!1}}function RZ($){return IZ($.nsp)&&VZ($.id)&&DZ($.type,$.data)}function i($,Z,J){return $.on(Z,J),function(){$.off(Z,J)}}var NZ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Z0 extends x{constructor($,Z,J){super();if(this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=$,this.nsp=Z,J&&J.auth)this.auth=J.auth;if(this._opts=Object.assign({},J),this.io._autoConnect)this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let $=this.io;this.subs=[i($,"open",this.onopen.bind(this)),i($,"packet",this.onpacket.bind(this)),i($,"error",this.onerror.bind(this)),i($,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){if(this.connected)return this;if(this.subEvents(),!this.io._reconnecting)this.io.open();if(this.io._readyState==="open")this.onopen();return this}open(){return this.connect()}send(...$){return $.unshift("message"),this.emit.apply(this,$),this}emit($,...Z){var J,H,Y;if(NZ.hasOwnProperty($))throw Error('"'+$.toString()+'" is a reserved event name');if(Z.unshift($),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(Z),this;let Q={type:V.EVENT,data:Z};if(Q.options={},Q.options.compress=this.flags.compress!==!1,typeof Z[Z.length-1]==="function"){let z=this.ids++,U=Z.pop();this._registerAckCallback(z,U),Q.id=z}let X=(H=(J=this.io.engine)===null||J===void 0?void 0:J.transport)===null||H===void 0?void 0:H.writable,W=this.connected&&!((Y=this.io.engine)===null||Y===void 0?void 0:Y._hasPingExpired());if(this.flags.volatile&&!X);else if(W)this.notifyOutgoingListeners(Q),this.packet(Q);else this.sendBuffer.push(Q);return this.flags={},this}_registerAckCallback($,Z){var J;let H=(J=this.flags.timeout)!==null&&J!==void 0?J:this._opts.ackTimeout;if(H===void 0){this.acks[$]=Z;return}let Y=this.io.setTimeoutFn(()=>{delete this.acks[$];for(let X=0;X<this.sendBuffer.length;X++)if(this.sendBuffer[X].id===$)this.sendBuffer.splice(X,1);Z.call(this,Error("operation has timed out"))},H),Q=(...X)=>{this.io.clearTimeoutFn(Y),Z.apply(this,X)};Q.withError=!0,this.acks[$]=Q}emitWithAck($,...Z){return new Promise((J,H)=>{let Y=(Q,X)=>{return Q?H(Q):J(X)};Y.withError=!0,Z.push(Y),this.emit($,...Z)})}_addToQueue($){let Z;if(typeof $[$.length-1]==="function")Z=$.pop();let J={id:this._queueSeq++,tryCount:0,pending:!1,args:$,flags:Object.assign({fromQueue:!0},this.flags)};$.push((H,...Y)=>{if(J!==this._queue[0]);if(H!==null){if(J.tryCount>this._opts.retries){if(this._queue.shift(),Z)Z(H)}}else if(this._queue.shift(),Z)Z(null,...Y);return J.pending=!1,this._drainQueue()}),this._queue.push(J),this._drainQueue()}_drainQueue($=!1){if(!this.connected||this._queue.length===0)return;let Z=this._queue[0];if(Z.pending&&!$)return;Z.pending=!0,Z.tryCount++,this.flags=Z.flags,this.emit.apply(this,Z.args)}packet($){$.nsp=this.nsp,this.io._packet($)}onopen(){if(typeof this.auth=="function")this.auth(($)=>{this._sendConnectPacket($)});else this._sendConnectPacket(this.auth)}_sendConnectPacket($){this.packet({type:V.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},$):$})}onerror($){if(!this.connected)this.emitReserved("connect_error",$)}onclose($,Z){this.connected=!1,delete this.id,this.emitReserved("disconnect",$,Z),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(($)=>{if(!this.sendBuffer.some((J)=>String(J.id)===$)){let J=this.acks[$];if(delete this.acks[$],J.withError)J.call(this,Error("socket has been disconnected"))}})}onpacket($){if($.nsp!==this.nsp)return;switch($.type){case V.CONNECT:if($.data&&$.data.sid)this.onconnect($.data.sid,$.data.pid);else this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case V.EVENT:case V.BINARY_EVENT:this.onevent($);break;case V.ACK:case V.BINARY_ACK:this.onack($);break;case V.DISCONNECT:this.ondisconnect();break;case V.CONNECT_ERROR:this.destroy();let J=Error($.data.message);J.data=$.data.data,this.emitReserved("connect_error",J);break}}onevent($){let Z=$.data||[];if($.id!=null)Z.push(this.ack($.id));if(this.connected)this.emitEvent(Z);else this.receiveBuffer.push(Object.freeze(Z))}emitEvent($){if(this._anyListeners&&this._anyListeners.length){let Z=this._anyListeners.slice();for(let J of Z)J.apply(this,$)}if(super.emit.apply(this,$),this._pid&&$.length&&typeof $[$.length-1]==="string")this._lastOffset=$[$.length-1]}ack($){let Z=this,J=!1;return function(...H){if(J)return;J=!0,Z.packet({type:V.ACK,id:$,data:H})}}onack($){let Z=this.acks[$.id];if(typeof Z!=="function")return;if(delete this.acks[$.id],Z.withError)$.data.unshift(null);Z.apply(this,$.data)}onconnect($,Z){this.id=$,this.recovered=Z&&this._pid===Z,this._pid=Z,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(($)=>this.emitEvent($)),this.receiveBuffer=[],this.sendBuffer.forEach(($)=>{this.notifyOutgoingListeners($),this.packet($)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){if(this.subs)this.subs.forEach(($)=>$()),this.subs=void 0;this.io._destroy(this)}disconnect(){if(this.connected)this.packet({type:V.DISCONNECT});if(this.destroy(),this.connected)this.onclose("io client disconnect");return this}close(){return this.disconnect()}compress($){return this.flags.compress=$,this}get volatile(){return this.flags.volatile=!0,this}timeout($){return this.flags.timeout=$,this}onAny($){return this._anyListeners=this._anyListeners||[],this._anyListeners.push($),this}prependAny($){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift($),this}offAny($){if(!this._anyListeners)return this;if($){let Z=this._anyListeners;for(let J=0;J<Z.length;J++)if($===Z[J])return Z.splice(J,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing($){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push($),this}prependAnyOutgoing($){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift($),this}offAnyOutgoing($){if(!this._anyOutgoingListeners)return this;if($){let Z=this._anyOutgoingListeners;for(let J=0;J<Z.length;J++)if($===Z[J])return Z.splice(J,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners($){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let Z=this._anyOutgoingListeners.slice();for(let J of Z)J.apply(this,$.data)}}}function I1($){$=$||{},this.ms=$.min||100,this.max=$.max||1e4,this.factor=$.factor||2,this.jitter=$.jitter>0&&$.jitter<=1?$.jitter:0,this.attempts=0}I1.prototype.duration=function(){var $=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var Z=Math.random(),J=Math.floor(Z*this.jitter*$);$=(Math.floor(Z*10)&1)==0?$-J:$+J}return Math.min($,this.max)|0};I1.prototype.reset=function(){this.attempts=0};I1.prototype.setMin=function($){this.ms=$};I1.prototype.setMax=function($){this.max=$};I1.prototype.setJitter=function($){this.jitter=$};class J0 extends x{constructor($,Z){var J;super();if(this.nsps={},this.subs=[],$&&typeof $==="object")Z=$,$=void 0;Z=Z||{},Z.path=Z.path||"/socket.io",this.opts=Z,Q1(this,Z),this.reconnection(Z.reconnection!==!1),this.reconnectionAttempts(Z.reconnectionAttempts||1/0),this.reconnectionDelay(Z.reconnectionDelay||1000),this.reconnectionDelayMax(Z.reconnectionDelayMax||5000),this.randomizationFactor((J=Z.randomizationFactor)!==null&&J!==void 0?J:0.5),this.backoff=new I1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(Z.timeout==null?20000:Z.timeout),this._readyState="closed",this.uri=$;let H=Z.parser||C5;if(this.encoder=new H.Encoder,this.decoder=new H.Decoder,this._autoConnect=Z.autoConnect!==!1,this._autoConnect)this.open()}reconnection($){if(!arguments.length)return this._reconnection;if(this._reconnection=!!$,!$)this.skipReconnect=!0;return this}reconnectionAttempts($){if($===void 0)return this._reconnectionAttempts;return this._reconnectionAttempts=$,this}reconnectionDelay($){var Z;if($===void 0)return this._reconnectionDelay;return this._reconnectionDelay=$,(Z=this.backoff)===null||Z===void 0||Z.setMin($),this}randomizationFactor($){var Z;if($===void 0)return this._randomizationFactor;return this._randomizationFactor=$,(Z=this.backoff)===null||Z===void 0||Z.setJitter($),this}reconnectionDelayMax($){var Z;if($===void 0)return this._reconnectionDelayMax;return this._reconnectionDelayMax=$,(Z=this.backoff)===null||Z===void 0||Z.setMax($),this}timeout($){if(!arguments.length)return this._timeout;return this._timeout=$,this}maybeReconnectOnOpen(){if(!this._reconnecting&&this._reconnection&&this.backoff.attempts===0)this.reconnect()}open($){if(~this._readyState.indexOf("open"))return this;this.engine=new t1(this.uri,this.opts);let Z=this.engine,J=this;this._readyState="opening",this.skipReconnect=!1;let H=i(Z,"open",function(){J.onopen(),$&&$()}),Y=(X)=>{if(this.cleanup(),this._readyState="closed",this.emitReserved("error",X),$)$(X);else this.maybeReconnectOnOpen()},Q=i(Z,"error",Y);if(this._timeout!==!1){let X=this._timeout,W=this.setTimeoutFn(()=>{H(),Y(Error("timeout")),Z.close()},X);if(this.opts.autoUnref)W.unref();this.subs.push(()=>{this.clearTimeoutFn(W)})}return this.subs.push(H),this.subs.push(Q),this}connect($){return this.open($)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let $=this.engine;this.subs.push(i($,"ping",this.onping.bind(this)),i($,"data",this.ondata.bind(this)),i($,"error",this.onerror.bind(this)),i($,"close",this.onclose.bind(this)),i(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata($){try{this.decoder.add($)}catch(Z){this.onclose("parse error",Z)}}ondecoded($){Y1(()=>{this.emitReserved("packet",$)},this.setTimeoutFn)}onerror($){this.emitReserved("error",$)}socket($,Z){let J=this.nsps[$];if(!J)J=new Z0(this,$,Z),this.nsps[$]=J;else if(this._autoConnect&&!J.active)J.connect();return J}_destroy($){let Z=Object.keys(this.nsps);for(let J of Z)if(this.nsps[J].active)return;this._close()}_packet($){let Z=this.encoder.encode($);for(let J=0;J<Z.length;J++)this.engine.write(Z[J],$.options)}cleanup(){this.subs.forEach(($)=>$()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose($,Z){var J;if(this.cleanup(),(J=this.engine)===null||J===void 0||J.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",$,Z),this._reconnection&&!this.skipReconnect)this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let $=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let Z=this.backoff.duration();this._reconnecting=!0;let J=this.setTimeoutFn(()=>{if($.skipReconnect)return;if(this.emitReserved("reconnect_attempt",$.backoff.attempts),$.skipReconnect)return;$.open((H)=>{if(H)$._reconnecting=!1,$.reconnect(),this.emitReserved("reconnect_error",H);else $.onreconnect()})},Z);if(this.opts.autoUnref)J.unref();this.subs.push(()=>{this.clearTimeoutFn(J)})}}onreconnect(){let $=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",$)}}var H0={};function j0($,Z){if(typeof $==="object")Z=$,$=void 0;Z=Z||{};let J=R2($,Z.path||"/socket.io"),H=J.source,Y=J.id,Q=J.path,X=H0[Y]&&Q in H0[Y].nsps,W=Z.forceNew||Z["force new connection"]||Z.multiplex===!1||X,G;if(W)G=new J0(H,Z);else{if(!H0[Y])H0[Y]=new J0(H,Z);G=H0[Y]}if(J.query&&!Z.query)Z.query=J.queryKey;return G.socket(J.path,Z)}Object.assign(j0,{Manager:J0,Socket:Z0,io:j0,connect:j0});import{createContext as PZ}from"react";var TZ=PZ(null),v2=TZ;function j5($){return{all:$=$||new Map,on:function(Z,J){var H=$.get(Z);H?H.push(J):$.set(Z,[J])},off:function(Z,J){var H=$.get(Z);H&&(J?H.splice(H.indexOf(J)>>>0,1):$.set(Z,[]))},emit:function(Z,J){var H=$.get(Z);H&&H.slice().map(function(Y){Y(J)}),(H=$.get("*"))&&H.slice().map(function(Y){Y(Z,J)})}}}import{createContext as wZ}from"react";var xZ=j5(),EZ=wZ(xZ),C2=EZ;var SZ=({card:$,data:Z,children:J,useSocketioSupport:H=!1,useCentrifugeSupport:Y=!1,useMittSupport:Q=!1,centrifugeChannel:X=void 0,methods:W=void 0})=>{let G=w1();if(G)console.log("[PieCard] Rendering card:",$),console.log("[PieCard] Card data:",Z),console.log("[PieCard] Component name:",Z?.name),console.log("[PieCard] Real-time support:",{socketio:H,centrifuge:Y,mitt:Q,centrifugeChannel:X}),console.log("[PieCard] Methods:",W?Object.keys(W):"none"),console.log("[PieCard] Has children:",!!J);let z=g5(v2),U=g5(s8),L=g5(C2);if(_5(()=>{if(!z||!H||!W||!Z.name){if(G&&H)console.log("[PieCard] Socket.IO setup skipped:",{hasSocket:!!z,useSocketioSupport:H,hasMethods:!!W,hasDataName:!!Z?.name});return}return Object.entries(W).forEach(([K,q])=>{let B=`pie${K}_${Z.name}`;if(G)console.log(`[PieCard] Socket.IO registering event: ${B}`);z.on(B,q)}),()=>{Object.entries(W).forEach(([K,q])=>{let B=`pie${K}_${Z.name}`;if(G)console.log(`[PieCard] Socket.IO unregistering event: ${B}`);z.off(B,q)})}},[z,W,Z.name]),_5(()=>{if(!U||!Y||!X||!W||!Z.name){if(G&&Y)console.log("[PieCard] Centrifuge setup skipped:",{hasCentrifuge:!!U,useCentrifugeSupport:Y,hasCentrifugeChannel:!!X,hasMethods:!!W,hasDataName:!!Z?.name});return}let K=Object.entries(W).map(([q,B])=>{let F=`pie${q}_${Z.name}_${X}`;if(G)console.log(`[PieCard] Centrifuge subscribing to channel: ${F}`);let M=U.newSubscription(F);return M.on("publication",(P)=>{if(G)console.log(`[PieCard] Centrifuge received data on ${F}:`,P.data);B(P.data)}),M.subscribe(),M});return()=>{K.forEach((q)=>{if(G)console.log("[PieCard] Centrifuge unsubscribing from channel");q.unsubscribe(),U.removeSubscription(q)})}},[U,X,W,Z.name]),_5(()=>{if(!L||!Q||!W||!Z.name){if(G&&Q)console.log("[PieCard] Mitt setup skipped:",{hasMitt:!!L,useMittSupport:Q,hasMethods:!!W,hasDataName:!!Z?.name});return}return Object.entries(W).forEach(([K,q])=>{let B=`pie${K}_${Z.name}`;if(G)console.log(`[PieCard] Mitt registering event: ${B}`);L.on(B,q)}),()=>{Object.entries(W).forEach(([K,q])=>{let B=`pie${K}_${Z.name}`;if(G)console.log(`[PieCard] Mitt unregistering event: ${B}`);L.off(B,q)})}},[L,W,Z.name]),G)console.log("[PieCard] Rendering complete, returning children");return J},G1=SZ;var vZ=new Map;var j2=($)=>{return vZ.get($)};import{Suspense as hZ,useContext as kZ}from"react";import{createContext as CZ}from"react";import{jsx as _Z,Fragment as gZ}from"react/jsx-runtime";var jZ=CZ(_Z(gZ,{})),g2=jZ;import{jsx as _2}from"react/jsx-runtime";function bZ({uiConfig:$,setUiAjaxConfiguration:Z}){let J=kZ(g2),H=w1();if(H)console.log("[UI] Rendering component:",$.card),console.log("[UI] Component data:",$.data),console.log("[UI] Component content:",$.content),console.log("[UI] Has setUiAjaxConfiguration:",!!Z);let Y=j2($.card);if(!Y?.component){if(H)console.warn(`[UI] Component not found in registry: ${$.card}`),console.log("[UI] Returning fallback component");return J}if(H)console.log("[UI] Found component in registry:",{name:Y.name,isLazy:Y.isLazy,hasMetadata:!!Y.metadata});let Q=Y.component,X=_2(Q,{data:$.data,content:$.content,setUiAjaxConfiguration:Z});if(Y.isLazy){if(H)console.log("[UI] Rendering lazy component with Suspense:",Y.name);return _2(hZ,{fallback:Y.fallback??J,children:X},`${Y.name}`)}if(H)console.log("[UI] Rendering component directly:",Y.name);return X}var f1=bZ;function h5($=1000){return new Promise((Z)=>{if(typeof window>"u"){Z();return}let J=()=>{if(typeof window.sid<"u")Z();else setTimeout(J,$)};J()})}var g0=($,Z={},J=[],H)=>{let Y=w1();if(Y)console.log("Registering AJAX: ",H,Z,J);if(!H||!$){if(Y)console.warn("Registration FAILED: pathname or setUiAjaxConfiguration is missing!");return()=>{}}return async(Q={})=>{if(typeof window>"u"||typeof document>"u"){if(Y)console.warn("getAjaxSubmit called on server, skipping DOM-dependent logic");return}if(J.includes("sid"))await h5();let X=new FormData;for(let[G,z]of Object.entries({...Z,...Q}))X.append(G,z);for(let G of J)if(G==="sid"){if(!window.sid)throw Error("SocketIO isn't initialized properly");X.append("sid",window.sid)}else{let z=document.getElementsByName(G);if(!z.length){if(Y)console.warn(`No input found with name ${G}`);continue}let U=z[0];if(U instanceof HTMLInputElement)if(U.type==="file"&&U.files)Array.from(U.files).forEach((L)=>X.append(G,L));else X.append(G,U.value);else if(U instanceof HTMLTextAreaElement)X.append(G,U.value)}let W=v8()+"api/ajax_content"+H;return $(null),await fetch(W,{method:"POST",body:X}).then(async(G)=>{let U=(G.headers.get("content-type")||"").includes("application/json");if(!!G.body?.getReader&&!U){let K=G.body.getReader(),q=new TextDecoder,B="";while(!0){let{done:F,value:M}=await K.read();if(F)break;B+=q.decode(M,{stream:!0});let P=B.split(`
|
|
17
|
-
`);B=P.pop()??"";for(let N of P){let D=N.trim();if(!D)continue;try{let f=JSON.parse(D);$([f])}catch(f){if(Y)console.warn("Failed to parse streamed line:",D)}}}if(B.trim())try{let F=JSON.parse(B);$([F])}catch(F){if(Y)console.warn("Failed to parse final streamed line:",B)}return{}}else{let K=await G.json();return $(K),K}}).catch((G)=>{if(Y)console.error("AJAX request failed:",G);return $(null),G})}};import{forwardRef as QJ,useEffect as XJ,useImperativeHandle as GJ,useRef as WJ,useState as k0}from"react";import{useRef as yZ,useState as mZ}from"react";import{jsx as uZ}from"react/jsx-runtime";function k5($){let[Z,J]=mZ(!1),H=yZ(null);return uZ("textarea",{ref:H,...$,onKeyUp:()=>{J(!1)},onKeyDown:(W)=>{if(W.key==="Enter"&&W.shiftKey){if(J(!0),H.current&&typeof window<"u"){let G=window.getComputedStyle(H.current),z=parseFloat(G.lineHeight);H.current.style.height=H.current.scrollHeight+z+"px"}}if(W.key==="Backspace"){if(J(!0),H.current&&typeof window<"u"){let G=window.getComputedStyle(H.current),z=parseFloat(G.lineHeight);if(H.current.scrollHeight>z)H.current.style.height=H.current.scrollHeight-z+"px"}}$.onKeyDown&&$.onKeyDown(W)},onBlur:(W)=>{J(!1),$.onBlur&&$.onBlur(W)},style:{resize:Z?"vertical":"none",overflowY:"auto",...$.style}})}import{useRef as cZ,useCallback as lZ}from"react";import{jsx as h2}from"react/jsx-runtime";var dZ=()=>h2("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:h2("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})}),k2=dZ;import{jsx as b5}from"react/jsx-runtime";var pZ=({type:$="button",onClick:Z,icons:J})=>{let H=cZ(null),Y=lZ(()=>{let X=H.current;if(X)X.style.transform="scale(0.8)",setTimeout(()=>{X.style.transform="scale(1)"},600)},[]);return b5("button",{ref:H,type:$,onClick:(X)=>{if(Z)Z(X);Y()},className:"mr-1.5 rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",style:{transition:"transform 300ms ease"},children:J.sendIcon?b5("img",{src:J.sendIcon,alt:""}):b5(k2,{})})},b2=pZ;import{jsx as y2}from"react/jsx-runtime";var iZ=()=>y2("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:y2("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.375 12.739l-7.693 7.693a4.5 4.5 0 01-6.364-6.364l10.94-10.94A3 3 0 1119.5 7.372L8.552 18.32m.009-.01l-.01.01m5.699-9.941l-7.81 7.81a1.5 1.5 0 002.112 2.13"})}),m2=iZ;import{jsx as y5,jsxs as oZ}from"react/jsx-runtime";var nZ=({name:$,accept:Z,fileInputRef:J,onSelectFile:H,icons:Y})=>{return oZ("button",{className:"rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",type:"button",onClick:()=>{if(J.current)J.current.click()},children:[y5("input",{name:$+"__pie__file",className:"hidden",type:"file",accept:Z,ref:J,onChange:(Q)=>{if(Q.target.files)H(Q.target.files[0])}}),Y.attachFileIcon?y5("img",{src:Y.attachFileIcon,alt:""}):y5(m2,{})]})},u2=nZ;import{jsx as d2}from"react/jsx-runtime";var aZ=()=>d2("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5 text-gray-500",children:d2("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),c2=aZ;import{jsx as l2}from"react/jsx-runtime";var rZ=()=>l2("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:l2("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),_0=rZ;import{jsx as Y0,jsxs as tZ}from"react/jsx-runtime";var sZ=({name:$,selectedFile:Z,onDropFile:J})=>{return tZ("div",{className:"flex w-full cursor-default flex-row items-center gap-2",children:[Y0(c2,{}),Y0("span",{className:"flex-1",children:Z.name}),Y0("input",{type:"hidden",name:$,value:""}),Y0("button",{className:"rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",type:"button",onClick:J,children:Y0(_0,{})})]})},p2=sZ;import{jsx as i2,jsxs as $J}from"react/jsx-runtime";var eZ=()=>$J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:[i2("path",{d:"M8 5C8 2.79086 9.79086 1 12 1C14.2091 1 16 2.79086 16 5V12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12V5Z"}),i2("path",{d:"M6.25 11.8438V12C6.25 13.525 6.8558 14.9875 7.93414 16.0659C9.01247 17.1442 10.475 17.75 12 17.75C13.525 17.75 14.9875 17.1442 16.0659 16.0659C17.1442 14.9875 17.75 13.525 17.75 12V11.8438C17.75 11.2915 18.1977 10.8438 18.75 10.8438H19.25C19.8023 10.8438 20.25 11.2915 20.25 11.8437V12C20.25 14.188 19.3808 16.2865 17.8336 17.8336C16.5842 19.0831 14.9753 19.8903 13.25 20.1548V22C13.25 22.5523 12.8023 23 12.25 23H11.75C11.1977 23 10.75 22.5523 10.75 22V20.1548C9.02471 19.8903 7.41579 19.0831 6.16637 17.8336C4.61919 16.2865 3.75 14.188 3.75 12V11.8438C3.75 11.2915 4.19772 10.8438 4.75 10.8438H5.25C5.80228 10.8438 6.25 11.2915 6.25 11.8438Z"})]}),n2=eZ;import{jsx as Q0}from"react/jsx-runtime";var ZJ=({isListening:$,toggleListening:Z,icons:J})=>{return Q0("button",{className:"rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",type:"button",onClick:Z,children:$?J.cancelIcon?Q0("img",{src:J.cancelIcon,alt:""}):Q0(_0,{}):J.voiceRecordingIcon?Q0("img",{src:J.voiceRecordingIcon,alt:""}):Q0(n2,{})})},o2=ZJ;import{jsx as a2,jsxs as HJ}from"react/jsx-runtime";var JJ=({option:$,onClickOption:Z})=>{return HJ("div",{className:"flex w-fit cursor-pointer flex-row place-content-center items-center gap-1 rounded-md border border-black bg-white px-2 py-1 text-black",onClick:()=>{Z($.title)},style:$.sx,children:[$.iconPosition==="start"&&a2("img",{src:$.iconUrl,alt:""}),$.title,$.iconPosition==="end"&&a2("img",{src:$.iconUrl,alt:""})]})},h0=JJ;import{jsx as r2}from"react/jsx-runtime";var YJ=({options:$,handleOptionClick:Z})=>{return r2("div",{className:"flex w-full flex-row flex-wrap justify-start gap-[5px]",children:$.map((J,H)=>{return r2(h0,{option:J,onClickOption:Z},H)})})},m5=YJ;import{jsx as W1,jsxs as s2}from"react/jsx-runtime";var zJ=QJ(({name:$,defaultValue:Z,defaultOptions:J,isArea:H,placeholder:Y,fileAccept:Q,optionsPosition:X,icons:W,handleOptionClick:G,handleSendMessage:z,sx:U},L)=>{let K=WJ(null),[q,B]=k0(null),[F,M]=k0(Z),[P,N]=k0(J),[D,f]=k0(!1);GJ(L,()=>({clear:()=>{if(M(""),B(null),K.current)K.current.value=""},setValue:(j)=>M(j),setOptions:(j)=>N(j)})),XJ(()=>{M(Z)},[Z]);let E=()=>{};return s2("div",{className:"flex flex-col items-center gap-[0.1rem]",id:$+"_chat_input",style:U,children:[P&&X==="top"&&W1(m5,{options:P,handleOptionClick:G}),W1("div",{className:"stretch relative flex size-full flex-1 flex-row items-stretch gap-3 last:mb-2 md:mx-4 md:flex-col md:last:mb-6 lg:mx-auto",children:s2("div",{className:"flex w-full grow flex-row items-center rounded-md bg-transparent",children:[q?W1(p2,{name:$,selectedFile:q,onDropFile:()=>{if(B(null),K.current)K.current.value=""}}):!H?W1("input",{name:$,value:F,onChange:(j)=>M(j.target.value),onKeyDown:(j)=>{if(j.key==="Enter")j.preventDefault(),z()},tabIndex:0,placeholder:Y,className:"m-0 w-full resize-none border-0 bg-transparent outline-none",style:{maxHeight:200,height:"100%",overflowY:"hidden"}}):W1(k5,{name:$,value:F,onChange:(j)=>M(j.target.value),onKeyDown:(j)=>{if(j.key==="Enter"&&!j.shiftKey)j.preventDefault(),z()},tabIndex:0,rows:2,placeholder:Y,className:"m-0 w-full resize-none border-0 bg-transparent p-0 pl-2 pr-7 outline-none md:pl-0",style:{maxHeight:200,height:"100%",minHeight:24}}),W1(o2,{isListening:D,toggleListening:E,icons:W}),W1(u2,{name:$,fileInputRef:K,accept:Q,onSelectFile:B,icons:W}),W1(b2,{onClick:z,icons:W})]})}),P&&X==="bottom"&&W1(m5,{options:P,handleOptionClick:G})]})}),t2=zJ;var G6=T(X6(),1),D1=T(X6(),1),p0=G6.default.default||G6.default;import{useState as UY,useEffect as OY}from"react";import{useEffect as YY,useState as QY}from"react";import{jsx as GY}from"react/jsx-runtime";function XY({children:$}){let[Z,J]=QY($);return YY(()=>{J($)},[$]),GY("div",{className:"max-w-full first:mt-0",children:Z})}var Q7=XY;import{jsx as X7}from"react/jsx-runtime";var WY=()=>X7("svg",{width:"30",height:"30",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:X7("path",{d:"m 8 1 c -1.65625 0 -3 1.34375 -3 3 s 1.34375 3 3 3 s 3 -1.34375 3 -3 s -1.34375 -3 -3 -3 z m -1.5 7 c -2.492188 0 -4.5 2.007812 -4.5 4.5 v 0.5 c 0 1.109375 0.890625 2 2 2 h 8 c 1.109375 0 2 -0.890625 2 -2 v -0.5 c 0 -2.492188 -2.007812 -4.5 -4.5 -4.5 z m 0 0",fill:"#2e3436"})}),G7=WY;import{jsx as i0}from"react/jsx-runtime";function zY({username:$,avatar:Z}){return i0("div",{className:"w-[30px]",children:i0("div",{className:"relative flex size-[30px] items-center justify-center rounded-sm p-1 text-white",children:Z?i0("img",{src:Z,className:"absolute inset-0 rounded",alt:$}):i0(G7,{})})})}var W6=zY;import{jsx as J1,jsxs as W7}from"react/jsx-runtime";var LY=({message:$,handleOptionClick:Z,setUiAjaxConfiguration:J})=>{let[H,Y]=UY(!1);return OY(()=>{let Q=setTimeout(()=>{if(H)Y(!1)},1000);return()=>clearTimeout(Q)},[H]),J1("div",{className:"group w-full border-b border-black/10",id:$.id,children:W7("div",{className:`flex gap-4 p-4 text-base md:max-w-2xl md:gap-6 md:py-6 lg:max-w-3xl xl:max-w-5xl ${$.align==="center"?"m-auto":""} ${$.align==="right"?"ml-auto justify-end":""} ${$.align==="left"?"mr-auto":""} `,children:[($.align==="left"||$.align==="center")&&J1("div",{className:"relative flex shrink-0 flex-col items-end",children:J1(W6,{username:$.username,avatar:$.avatar})}),W7("div",{className:"relative flex w-[calc(100%-50px)] flex-col gap-1 md:gap-3 lg:w-[calc(100%-115px)]",children:[J1("div",{className:`markdown light prose w-full break-words dark:prose-invert first:mt-0 ${$.align==="right"?"flex justify-end self-end":""}`,children:typeof $.content==="string"?$.parseMode.toLowerCase()==="markdown"?J1(Q7,{children:$.content},Date.now()+Math.random()):$.parseMode.toLowerCase()==="html"?p0($.content):$.content:J1(f1,{uiConfig:$.content,setUiAjaxConfiguration:J})}),J1("div",{className:"flex flex-row flex-wrap justify-start gap-1",children:$.options.map((Q,X)=>J1(h0,{onClickOption:Z,option:Q},X))})]}),$.align==="right"&&J1("div",{className:"relative flex shrink-0 flex-col items-end",children:J1(W6,{username:$.username,avatar:$.avatar})})]})})},z7=LY;import{forwardRef as BY,useEffect as FY,useImperativeHandle as KY,useRef as qY,useState as MY}from"react";import{jsx as U7}from"react/jsx-runtime";var AY=BY(({name:$,handleOptionClick:Z,defaultMessages:J,sx:H,setUiAjaxConfiguration:Y},Q)=>{let[X,W]=MY(J),G=qY(null),z=()=>{if(G.current)G.current.scrollTop=G.current.scrollHeight};return FY(()=>{z()},[X]),KY(Q,()=>({setMessages:(U)=>W(U),addMessage:(U)=>W((L)=>[...L,U]),scrollToBottom:z})),U7("div",{id:$+"_messages",className:"flex flex-col items-center overflow-y-scroll",style:H,ref:G,children:X.map((U)=>U7(z7,{message:U,handleOptionClick:Z,setUiAjaxConfiguration:Y},U.id))})}),O7=AY;import{useEffect as IY,useMemo as fY,useRef as L7,useState as VY}from"react";import{jsx as z6,jsxs as RY}from"react/jsx-runtime";var DY=({data:$,setUiAjaxConfiguration:Z})=>{let{name:J,defaultValue:H,defaultMessages:Y,defaultOptions:Q,isArea:X,fileAccept:W,placeholder:G,icons:z,optionsPosition:U,sxMap:L={container:{},chatInput:{},messages:{}},depsNames:K,pathname:q,kwargs:B,useSocketioSupport:F,useCentrifugeSupport:M,centrifugeChannel:P}=$,N=L7(null),D=L7(null),[f,E]=VY(!1),j=fY(()=>g0(Z,B,K,q),[Z,B,K,q]);IY(()=>{if(f)requestAnimationFrame(()=>{j(),E(!1)})},[f]);let u1=(t)=>{if(N.current)N.current.setValue(t),E(!0)},F5=()=>{if(N.current)N.current.clear()},K5=(t)=>{if(N.current)N.current.setOptions(t.options)},d1=(t)=>{if(D.current)D.current.addMessage(t.message)},C=(t)=>{if(D.current)D.current.setMessages(t.messages)},I0=()=>{E(!0)};return z6(G1,{card:"ChatCard",data:$,methods:{clearInput:F5,setOptions:K5,addMessage:d1,setMessages:C},useSocketioSupport:F,useCentrifugeSupport:M,centrifugeChannel:P,children:RY("div",{className:"flex size-full flex-col",style:L.container,children:[z6(O7,{ref:D,name:J,defaultMessages:Y,sx:L.messages,handleOptionClick:u1,setUiAjaxConfiguration:Z}),z6(t2,{ref:N,name:J,isArea:X,defaultOptions:Q,placeholder:G,defaultValue:H,fileAccept:W,sx:L.chatInput,handleSendMessage:I0,handleOptionClick:u1,optionsPosition:U,icons:z})]})})},B7=DY;import{useMemo as yz}from"react";var W5=T(U6(),1),z3=T(B6(),1);import W3,{useState as Xz,useContext as e4,useRef as Gz,useEffect as $3,forwardRef as Wz}from"react";var aY={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function B0($,Z){var J=!aY[$]&&typeof Z==="number"&&Z!==0;return J?Z+"px":Z}function F0($,Z){return Object.keys($).reduce(function(J,H){return J[H]=Z($[H],H),J},{})}function F6($){return F0($,function(Z,J){return B0(J,$[J])+" !important"})}var rY=/([a-z])?([A-Z])/g,sY=function(Z,J,H){return(J||"")+"-"+H.toLowerCase()},K6=function(Z){return Z.replace(rY,sY)},tY=function(Z){return Object.keys(Z).reduce(function(J,H){var Y=K6(H);if(/^ms-/.test(Y))Y="-".concat(Y);return J[Y]=Z[H],J},{})},S7=tY;var C4=T(m7(),1),j4=T(t7(),1),g4=T(x6(),1);var C$=T(Z$(),1),j$=T(H$(),1),g$=T(Q$(),1),_$=T(G$(),1),h$=T(U$(),1),k$=T(B$(),1),b$=T(q$(),1),y$=T(I$(),1),m$=T(V$(),1),u$=T(R$(),1),d$=T(P$(),1),c$=T(v$(),1),A=["Webkit"],i6=["Moz"],v=["ms"],m=["Webkit","Moz"],h=["Webkit","ms"],K0=["Webkit","Moz","ms"],l$={plugins:[C$.default,j$.default,g$.default,_$.default,h$.default,k$.default,b$.default,y$.default,m$.default,u$.default,d$.default,c$.default],prefixMap:{transform:h,transformOrigin:h,transformOriginX:h,transformOriginY:h,backfaceVisibility:A,perspective:A,perspectiveOrigin:A,transformStyle:A,transformOriginZ:A,animation:A,animationDelay:A,animationDirection:A,animationFillMode:A,animationDuration:A,animationIterationCount:A,animationName:A,animationPlayState:A,animationTimingFunction:A,appearance:m,userSelect:K0,fontKerning:A,textEmphasisPosition:A,textEmphasis:A,textEmphasisStyle:A,textEmphasisColor:A,boxDecorationBreak:A,clipPath:A,maskImage:A,maskMode:A,maskRepeat:A,maskPosition:A,maskClip:A,maskOrigin:A,maskSize:A,maskComposite:A,mask:A,maskBorderSource:A,maskBorderMode:A,maskBorderSlice:A,maskBorderWidth:A,maskBorderOutset:A,maskBorderRepeat:A,maskBorder:A,maskType:A,textDecorationStyle:m,textDecorationSkip:m,textDecorationLine:m,textDecorationColor:m,filter:A,fontFeatureSettings:m,breakAfter:K0,breakBefore:K0,breakInside:K0,columnCount:m,columnFill:m,columnGap:m,columnRule:m,columnRuleColor:m,columnRuleStyle:m,columnRuleWidth:m,columns:m,columnSpan:m,columnWidth:m,writingMode:h,flex:h,flexBasis:A,flexDirection:h,flexGrow:A,flexFlow:h,flexShrink:A,flexWrap:h,alignContent:A,alignItems:A,alignSelf:A,justifyContent:A,order:A,transitionDelay:A,transitionDuration:A,transitionProperty:A,transitionTimingFunction:A,backdropFilter:A,scrollSnapType:h,scrollSnapPointsX:h,scrollSnapPointsY:h,scrollSnapDestination:h,scrollSnapCoordinate:h,shapeImageThreshold:A,shapeImageMargin:A,shapeImageOutside:A,hyphens:K0,flowInto:h,flowFrom:h,regionFragment:h,boxSizing:i6,textAlignLast:i6,tabSize:i6,wrapFlow:v,wrapThrough:v,wrapMargin:v,touchAction:v,gridTemplateColumns:v,gridTemplateRows:v,gridTemplateAreas:v,gridTemplate:v,gridAutoColumns:v,gridAutoRows:v,gridAutoFlow:v,grid:v,gridRowStart:v,gridColumnStart:v,gridRowEnd:v,gridRow:v,gridColumn:v,gridColumnEnd:v,gridColumnGap:v,gridRowGap:v,gridArea:v,gridGap:v,textSizeAdjust:h,borderImage:A,borderImageOutset:A,borderImageRepeat:A,borderImageSlice:A,borderImageSource:A,borderImageWidth:A}};var A4=T(n$(),1),I4=T(a$(),1),f4=T(t$(),1),V4=T($4(),1),D4=T(J4(),1),R4=T(Y4(),1),N4=T(X4(),1),P4=T(z4(),1),T4=T(O4(),1),w4=T(B4(),1),x4=T(K4(),1),E4=T(M4(),1),S4={plugins:[A4.default,I4.default,f4.default,V4.default,D4.default,R4.default,N4.default,P4.default,T4.default,w4.default,x4.default,E4.default],prefixMap:{chrome:{transform:35,transformOrigin:35,transformOriginX:35,transformOriginY:35,backfaceVisibility:35,perspective:35,perspectiveOrigin:35,transformStyle:35,transformOriginZ:35,animation:42,animationDelay:42,animationDirection:42,animationFillMode:42,animationDuration:42,animationIterationCount:42,animationName:42,animationPlayState:42,animationTimingFunction:42,appearance:66,userSelect:53,fontKerning:32,textEmphasisPosition:66,textEmphasis:66,textEmphasisStyle:66,textEmphasisColor:66,boxDecorationBreak:66,clipPath:54,maskImage:66,maskMode:66,maskRepeat:66,maskPosition:66,maskClip:66,maskOrigin:66,maskSize:66,maskComposite:66,mask:66,maskBorderSource:66,maskBorderMode:66,maskBorderSlice:66,maskBorderWidth:66,maskBorderOutset:66,maskBorderRepeat:66,maskBorder:66,maskType:66,textDecorationStyle:56,textDecorationSkip:56,textDecorationLine:56,textDecorationColor:56,filter:52,fontFeatureSettings:47,breakAfter:49,breakBefore:49,breakInside:49,columnCount:49,columnFill:49,columnGap:49,columnRule:49,columnRuleColor:49,columnRuleStyle:49,columnRuleWidth:49,columns:49,columnSpan:49,columnWidth:49,writingMode:47},safari:{flex:8,flexBasis:8,flexDirection:8,flexGrow:8,flexFlow:8,flexShrink:8,flexWrap:8,alignContent:8,alignItems:8,alignSelf:8,justifyContent:8,order:8,transition:6,transitionDelay:6,transitionDuration:6,transitionProperty:6,transitionTimingFunction:6,transform:8,transformOrigin:8,transformOriginX:8,transformOriginY:8,backfaceVisibility:8,perspective:8,perspectiveOrigin:8,transformStyle:8,transformOriginZ:8,animation:8,animationDelay:8,animationDirection:8,animationFillMode:8,animationDuration:8,animationIterationCount:8,animationName:8,animationPlayState:8,animationTimingFunction:8,appearance:11,userSelect:11,backdropFilter:11,fontKerning:9,scrollSnapType:10.1,scrollSnapPointsX:10.1,scrollSnapPointsY:10.1,scrollSnapDestination:10.1,scrollSnapCoordinate:10.1,textEmphasisPosition:7,textEmphasis:7,textEmphasisStyle:7,textEmphasisColor:7,boxDecorationBreak:11,clipPath:11,maskImage:11,maskMode:11,maskRepeat:11,maskPosition:11,maskClip:11,maskOrigin:11,maskSize:11,maskComposite:11,mask:11,maskBorderSource:11,maskBorderMode:11,maskBorderSlice:11,maskBorderWidth:11,maskBorderOutset:11,maskBorderRepeat:11,maskBorder:11,maskType:11,textDecorationStyle:11,textDecorationSkip:11,textDecorationLine:11,textDecorationColor:11,shapeImageThreshold:10,shapeImageMargin:10,shapeImageOutside:10,filter:9,hyphens:11,flowInto:11,flowFrom:11,breakBefore:8,breakAfter:8,breakInside:8,regionFragment:11,columnCount:8,columnFill:8,columnGap:8,columnRule:8,columnRuleColor:8,columnRuleStyle:8,columnRuleWidth:8,columns:8,columnSpan:8,columnWidth:8,writingMode:10.1},firefox:{appearance:60,userSelect:60,boxSizing:28,textAlignLast:48,textDecorationStyle:35,textDecorationSkip:35,textDecorationLine:35,textDecorationColor:35,tabSize:60,hyphens:42,fontFeatureSettings:33,breakAfter:51,breakBefore:51,breakInside:51,columnCount:51,columnFill:51,columnGap:51,columnRule:51,columnRuleColor:51,columnRuleStyle:51,columnRuleWidth:51,columns:51,columnSpan:51,columnWidth:51},opera:{flex:16,flexBasis:16,flexDirection:16,flexGrow:16,flexFlow:16,flexShrink:16,flexWrap:16,alignContent:16,alignItems:16,alignSelf:16,justifyContent:16,order:16,transform:22,transformOrigin:22,transformOriginX:22,transformOriginY:22,backfaceVisibility:22,perspective:22,perspectiveOrigin:22,transformStyle:22,transformOriginZ:22,animation:29,animationDelay:29,animationDirection:29,animationFillMode:29,animationDuration:29,animationIterationCount:29,animationName:29,animationPlayState:29,animationTimingFunction:29,appearance:50,userSelect:40,fontKerning:19,textEmphasisPosition:50,textEmphasis:50,textEmphasisStyle:50,textEmphasisColor:50,boxDecorationBreak:50,clipPath:41,maskImage:50,maskMode:50,maskRepeat:50,maskPosition:50,maskClip:50,maskOrigin:50,maskSize:50,maskComposite:50,mask:50,maskBorderSource:50,maskBorderMode:50,maskBorderSlice:50,maskBorderWidth:50,maskBorderOutset:50,maskBorderRepeat:50,maskBorder:50,maskType:50,textDecorationStyle:43,textDecorationSkip:43,textDecorationLine:43,textDecorationColor:43,filter:39,fontFeatureSettings:34,breakAfter:36,breakBefore:36,breakInside:36,columnCount:36,columnFill:36,columnGap:36,columnRule:36,columnRuleColor:36,columnRuleStyle:36,columnRuleWidth:36,columns:36,columnSpan:36,columnWidth:36,writingMode:34},ie:{flex:10,flexDirection:10,flexFlow:10,flexWrap:10,transform:9,transformOrigin:9,transformOriginX:9,transformOriginY:9,userSelect:11,wrapFlow:11,wrapThrough:11,wrapMargin:11,scrollSnapType:11,scrollSnapPointsX:11,scrollSnapPointsY:11,scrollSnapDestination:11,scrollSnapCoordinate:11,touchAction:10,hyphens:11,flowInto:11,flowFrom:11,breakBefore:11,breakAfter:11,breakInside:11,regionFragment:11,gridTemplateColumns:11,gridTemplateRows:11,gridTemplateAreas:11,gridTemplate:11,gridAutoColumns:11,gridAutoRows:11,gridAutoFlow:11,grid:11,gridRowStart:11,gridColumnStart:11,gridRowEnd:11,gridRow:11,gridColumn:11,gridColumnEnd:11,gridColumnGap:11,gridRowGap:11,gridArea:11,gridGap:11,textSizeAdjust:11,writingMode:11},edge:{userSelect:17,wrapFlow:17,wrapThrough:17,wrapMargin:17,scrollSnapType:17,scrollSnapPointsX:17,scrollSnapPointsY:17,scrollSnapDestination:17,scrollSnapCoordinate:17,hyphens:17,flowInto:17,flowFrom:17,breakBefore:17,breakAfter:17,breakInside:17,regionFragment:17,gridTemplateColumns:15,gridTemplateRows:15,gridTemplateAreas:15,gridTemplate:15,gridAutoColumns:15,gridAutoRows:15,gridAutoFlow:15,grid:15,gridRowStart:15,gridColumnStart:15,gridRowEnd:15,gridRow:15,gridColumn:15,gridColumnEnd:15,gridColumnGap:15,gridRowGap:15,gridArea:15,gridGap:15},ios_saf:{flex:8.1,flexBasis:8.1,flexDirection:8.1,flexGrow:8.1,flexFlow:8.1,flexShrink:8.1,flexWrap:8.1,alignContent:8.1,alignItems:8.1,alignSelf:8.1,justifyContent:8.1,order:8.1,transition:6,transitionDelay:6,transitionDuration:6,transitionProperty:6,transitionTimingFunction:6,transform:8.1,transformOrigin:8.1,transformOriginX:8.1,transformOriginY:8.1,backfaceVisibility:8.1,perspective:8.1,perspectiveOrigin:8.1,transformStyle:8.1,transformOriginZ:8.1,animation:8.1,animationDelay:8.1,animationDirection:8.1,animationFillMode:8.1,animationDuration:8.1,animationIterationCount:8.1,animationName:8.1,animationPlayState:8.1,animationTimingFunction:8.1,appearance:11,userSelect:11,backdropFilter:11,fontKerning:11,scrollSnapType:10.3,scrollSnapPointsX:10.3,scrollSnapPointsY:10.3,scrollSnapDestination:10.3,scrollSnapCoordinate:10.3,boxDecorationBreak:11,clipPath:11,maskImage:11,maskMode:11,maskRepeat:11,maskPosition:11,maskClip:11,maskOrigin:11,maskSize:11,maskComposite:11,mask:11,maskBorderSource:11,maskBorderMode:11,maskBorderSlice:11,maskBorderWidth:11,maskBorderOutset:11,maskBorderRepeat:11,maskBorder:11,maskType:11,textSizeAdjust:11,textDecorationStyle:11,textDecorationSkip:11,textDecorationLine:11,textDecorationColor:11,shapeImageThreshold:10,shapeImageMargin:10,shapeImageOutside:10,filter:9,hyphens:11,flowInto:11,flowFrom:11,breakBefore:8.1,breakAfter:8.1,breakInside:8.1,regionFragment:11,columnCount:8.1,columnFill:8.1,columnGap:8.1,columnRule:8.1,columnRuleColor:8.1,columnRuleStyle:8.1,columnRuleWidth:8.1,columns:8.1,columnSpan:8.1,columnWidth:8.1,writingMode:10.3},android:{borderImage:4.2,borderImageOutset:4.2,borderImageRepeat:4.2,borderImageSlice:4.2,borderImageSource:4.2,borderImageWidth:4.2,flex:4.2,flexBasis:4.2,flexDirection:4.2,flexGrow:4.2,flexFlow:4.2,flexShrink:4.2,flexWrap:4.2,alignContent:4.2,alignItems:4.2,alignSelf:4.2,justifyContent:4.2,order:4.2,transition:4.2,transitionDelay:4.2,transitionDuration:4.2,transitionProperty:4.2,transitionTimingFunction:4.2,transform:4.4,transformOrigin:4.4,transformOriginX:4.4,transformOriginY:4.4,backfaceVisibility:4.4,perspective:4.4,perspectiveOrigin:4.4,transformStyle:4.4,transformOriginZ:4.4,animation:4.4,animationDelay:4.4,animationDirection:4.4,animationFillMode:4.4,animationDuration:4.4,animationIterationCount:4.4,animationName:4.4,animationPlayState:4.4,animationTimingFunction:4.4,appearance:62,userSelect:4.4,fontKerning:4.4,textEmphasisPosition:62,textEmphasis:62,textEmphasisStyle:62,textEmphasisColor:62,boxDecorationBreak:62,clipPath:4.4,maskImage:62,maskMode:62,maskRepeat:62,maskPosition:62,maskClip:62,maskOrigin:62,maskSize:62,maskComposite:62,mask:62,maskBorderSource:62,maskBorderMode:62,maskBorderSlice:62,maskBorderWidth:62,maskBorderOutset:62,maskBorderRepeat:62,maskBorder:62,maskType:62,filter:4.4,fontFeatureSettings:4.4,breakAfter:4.4,breakBefore:4.4,breakInside:4.4,columnCount:4.4,columnFill:4.4,columnGap:4.4,columnRule:4.4,columnRuleColor:4.4,columnRuleStyle:4.4,columnRuleWidth:4.4,columns:4.4,columnSpan:4.4,columnWidth:4.4,writingMode:4.4},and_chr:{appearance:62,textEmphasisPosition:62,textEmphasis:62,textEmphasisStyle:62,textEmphasisColor:62,boxDecorationBreak:62,maskImage:62,maskMode:62,maskRepeat:62,maskPosition:62,maskClip:62,maskOrigin:62,maskSize:62,maskComposite:62,mask:62,maskBorderSource:62,maskBorderMode:62,maskBorderSlice:62,maskBorderWidth:62,maskBorderOutset:62,maskBorderRepeat:62,maskBorder:62,maskType:62},and_uc:{flex:11.4,flexBasis:11.4,flexDirection:11.4,flexGrow:11.4,flexFlow:11.4,flexShrink:11.4,flexWrap:11.4,alignContent:11.4,alignItems:11.4,alignSelf:11.4,justifyContent:11.4,order:11.4,transform:11.4,transformOrigin:11.4,transformOriginX:11.4,transformOriginY:11.4,backfaceVisibility:11.4,perspective:11.4,perspectiveOrigin:11.4,transformStyle:11.4,transformOriginZ:11.4,animation:11.4,animationDelay:11.4,animationDirection:11.4,animationFillMode:11.4,animationDuration:11.4,animationIterationCount:11.4,animationName:11.4,animationPlayState:11.4,animationTimingFunction:11.4,appearance:11.4,userSelect:11.4,textEmphasisPosition:11.4,textEmphasis:11.4,textEmphasisStyle:11.4,textEmphasisColor:11.4,clipPath:11.4,maskImage:11.4,maskMode:11.4,maskRepeat:11.4,maskPosition:11.4,maskClip:11.4,maskOrigin:11.4,maskSize:11.4,maskComposite:11.4,mask:11.4,maskBorderSource:11.4,maskBorderMode:11.4,maskBorderSlice:11.4,maskBorderWidth:11.4,maskBorderOutset:11.4,maskBorderRepeat:11.4,maskBorder:11.4,maskType:11.4,textSizeAdjust:11.4,filter:11.4,hyphens:11.4,fontFeatureSettings:11.4,breakAfter:11.4,breakBefore:11.4,breakInside:11.4,columnCount:11.4,columnFill:11.4,columnGap:11.4,columnRule:11.4,columnRuleColor:11.4,columnRuleStyle:11.4,columnRuleWidth:11.4,columns:11.4,columnSpan:11.4,columnWidth:11.4,writingMode:11.4},op_mini:{}}};function t0($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")t0=function(J){return typeof J};else t0=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return t0($)}var _4=C4.default(l$),VW=j4.default(S4,_4);function DW($){return Object.keys($).reduce(function(Z,J){var H=$[J];if(Array.isArray(H))H=H.join(";"+J+":");else if(H&&t0(H)==="object"&&typeof H.toString==="function")H=H.toString();return Z[J]=H,Z},{})}function RW($){return Object.keys($).reduce(function(Z,J){var H=$[J];if(Array.isArray(H))if(g4.default.canUseDOM)H=H[H.length-1].toString();else H=H.join(";".concat(K6(J),":"));return Z[J]=H,Z},{})}var v4,s0;function h4($){var Z=$||global&&global.navigator&&global.navigator.userAgent;if(!s0||Z!==v4){if(Z==="all")s0={prefix:_4,prefixedKeyframes:"keyframes"};else s0=new VW({userAgent:Z});v4=Z}return s0}function k4($){return h4($).prefixedKeyframes||"keyframes"}function e0($,Z){var J=DW($),H=h4(Z),Y=H.prefix(J),Q=RW(Y);return Q}function NW($){return Object.keys($).map(function(Z){return Z+": "+$[Z]+";"}).join(`
|
|
18
|
-
`)}function
|
|
19
|
-
`)}},{key:"_emitChange",value:function(){this._listeners.forEach(function(J){return J()})}}]),$}();function g1($){for(var Z=1;Z<arguments.length;Z++){var J=arguments[Z]!=null?arguments[Z]:{},H=Object.keys(J);if(typeof Object.getOwnPropertySymbols==="function")H=H.concat(Object.getOwnPropertySymbols(J).filter(function(Y){return Object.getOwnPropertyDescriptor(J,Y).enumerable}));H.forEach(function(Y){uW($,Y,J[Y])})}return $}function uW($,Z,J){if(Z in $)Object.defineProperty($,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[Z]=J;return $}function X5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")X5=function(J){return typeof J};else X5=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return X5($)}var o4={plugins:[r.mergeStyleArray,r.checkProps,r.resolveMediaQueries,r.resolveInteractionStyles,r.keyframes,r.visited,r.removeNestedStyles,r.prefix,r.checkProps]},i4={},dW=!1,P1=null,cW=function(Z){return Z.type&&!Z.type._isRadiumEnhanced},lW=function(Z){var{children:J,component:H,config:Y,existingKeyMap:Q,extraStateKeyMap:X}=Z;if(!J)return J;var W=X5(J);if(W==="string"||W==="number")return J;if(W==="function")return function(){var K=J.apply(this,arguments);if(F1.isValidElement(K)){var q=N1(K);delete X[q];var B=P1(H,K,Y,Q,!0,X),F=B.element;return F}return K};if(F1.Children.count(J)===1&&J.type){var G=F1.Children.only(J),z=N1(G);delete X[z];var U=P1(H,G,Y,Q,!0,X),L=U.element;return L}return F1.Children.map(J,function(K){if(F1.isValidElement(K)){var q=N1(K);delete X[q];var B=P1(H,K,Y,Q,!0,X),F=B.element;return F}return K})},pW=function(Z){var{component:J,config:H,existingKeyMap:Y,props:Q,extraStateKeyMap:X}=Z,W=Q;return Object.keys(Q).forEach(function(G){if(G==="children")return;var z=Q[G];if(F1.isValidElement(z)){var U=N1(z);delete X[U],W=g1({},W);var L=P1(J,z,H,Y,!0,X),K=L.element;W[G]=K}}),W},iW=function(Z){var{componentName:J,existingKeyMap:H,renderedElement:Y}=Z,Q=N1(Y),X=$5(Q),W=!1,G=function(){if(W)return X;if(W=!0,H[X]){var U;if(typeof Y.type==="string")U=Y.type;else if(Y.type.constructor)U=Y.type.constructor.displayName||Y.type.constructor.name;throw Error("Radium requires each element with interactive styles to have a unique key, set using either the ref or key prop. "+(Q?'Key "'+Q+'" is a duplicate.':"Multiple elements have no key specified.")+' Component: "'+J+'". '+(U?'Element: "'+U+'".':""))}return H[X]=!0,X};return G},nW=function(Z,J,H,Y){if(!Z._radiumIsMounted)return;var Q=q0(Z),X={_radiumStyleState:g1({},Q)};X._radiumStyleState[J]=g1({},X._radiumStyleState[J]),X._radiumStyleState[J][H]=Y,Z._lastRadiumState=X._radiumStyleState,Z.setState(X)},oW=function(Z){var{component:J,config:H,existingKeyMap:Y,props:Q,renderedElement:X}=Z;if(!F1.isValidElement(X)||typeof X.type!=="string"||!Q.style)return Q;var W=Q,G=H.plugins||o4.plugins,z=J.constructor.displayName||J.constructor.name,U=iW({renderedElement:X,existingKeyMap:Y,componentName:z}),L=function(N){return J[N]},K=function(N){return i4[N]},q=function(N,D){return Z5(J.state,D||U(),N)},B=function(N,D,f){return nW(J,f||U(),N,D)},F=function(N){var D=J._radiumStyleKeeper;if(!D){if(dW)return{remove:function(){}};throw Error("To use plugins requiring `addCSS` (e.g. keyframes, media queries), please wrap your application in the StyleRoot component. Component name: `"+z+"`.")}return D.addCSS(N)},M=Q.style;if(G.forEach(function(P){var N=P({ExecutionEnvironment:n4.default,addCSS:F,appendImportantToEachValue:F6,componentName:z,config:H,cssRuleSetToString:B1,getComponentField:L,getGlobalState:K,getState:q,hash:M0,mergeStyles:Y5,props:W,setState:B,isNestedStyle:H5,style:M})||{};M=N.style||M,W=N.props&&Object.keys(N.props).length?g1({},W,N.props):W;var D=N.componentFields||{};Object.keys(D).forEach(function(E){J[E]=D[E]});var f=N.globalState||{};Object.keys(f).forEach(function(E){i4[E]=f[E]})}),M!==Q.style)W=g1({},W,{style:M});return W},aW=function(Z,J,H){if(typeof Z.type==="string")J=g1({},J,{"data-radium":!0});return F1.cloneElement(Z,J,H)};P1=function(Z,J){var H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o4,Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Q=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,X=arguments.length>5?arguments[5]:void 0;if(!X){var W=q0(Z);X=Object.keys(W).reduce(function(q,B){if(B!=="main")q[B]=!0;return q},{})}if(Array.isArray(J)&&!J.props){var G=J.map(function(q){if(X){var B=N1(q);delete X[B]}return P1(Z,q,H,Y,Q,X).element});return{extraStateKeyMap:X,element:G}}if(!J||J.props&&J.props["data-radium"]||Q&&!cW(J))return{extraStateKeyMap:X,element:J};var z=J.props.children,U=lW({children:z,component:Z,config:H,existingKeyMap:Y,extraStateKeyMap:X}),L=pW({component:Z,config:H,existingKeyMap:Y,extraStateKeyMap:X,props:J.props});if(L=oW({component:Z,config:H,existingKeyMap:Y,props:L,renderedElement:J}),U===z&&L===J.props)return{extraStateKeyMap:X,element:J};var K=aW(J,L!==J.props?L:{},U);return{extraStateKeyMap:X,element:K}};var a4=P1;var s4=T(B6(),1);import G5,{useContext as r4}from"react";function A8(){return A8=Object.assign||function($){for(var Z=1;Z<arguments.length;Z++){var J=arguments[Z];for(var H in J)if(Object.prototype.hasOwnProperty.call(J,H))$[H]=J[H]}return $},A8.apply(this,arguments)}var A0=G5.createContext(void 0),_1=G5.createContext(void 0);function h1($){var Z=G5.forwardRef(function(J,H){var Y=r4(_1),Q=r4(A0);return G5.createElement($,A8({ref:H},J,{radiumConfigContext:Y,styleKeeperContext:Q}))});return Z.displayName="withRadiumContexts(".concat($.displayName||$.name||"Component",")"),s4.default(Z,$)}function T1($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")T1=function(J){return typeof J};else T1=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return T1($)}function H3($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function t4($,Z){for(var J=0;J<Z.length;J++){var H=Z[J];if(H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H)H.writable=!0;Object.defineProperty($,H.key,H)}}function rW($,Z,J){if(Z)t4($.prototype,Z);if(J)t4($,J);return $}function Y3($,Z){if(Z&&(T1(Z)==="object"||typeof Z==="function"))return Z;return Q3($)}function Q3($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function K1($,Z,J){if(typeof Reflect<"u"&&Reflect.get)K1=Reflect.get;else K1=function(Y,Q,X){var W=sW(Y,Q);if(!W)return;var G=Object.getOwnPropertyDescriptor(W,Q);if(G.get)return G.get.call(X);return G.value};return K1($,Z,J||$)}function sW($,Z){while(!Object.prototype.hasOwnProperty.call($,Z))if($=H1($),$===null)break;return $}function H1($){return H1=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},H1($)}function X3($,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(Z&&Z.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Z)I8($,Z)}function I8($,Z){return I8=Object.setPrototypeOf||function(H,Y){return H.__proto__=Y,H},I8($,Z)}function tW($,Z){return Zz($)||$z($,Z)||eW()}function eW(){throw TypeError("Invalid attempt to destructure non-iterable instance")}function $z($,Z){var J=[],H=!0,Y=!1,Q=void 0;try{for(var X=$[Symbol.iterator](),W;!(H=(W=X.next()).done);H=!0)if(J.push(W.value),Z&&J.length===Z)break}catch(G){Y=!0,Q=G}finally{try{if(!H&&X.return!=null)X.return()}finally{if(Y)throw Q}}return J}function Zz($){if(Array.isArray($))return $}function f8($){for(var Z=1;Z<arguments.length;Z++){var J=arguments[Z]!=null?arguments[Z]:{},H=Object.keys(J);if(typeof Object.getOwnPropertySymbols==="function")H=H.concat(Object.getOwnPropertySymbols(J).filter(function(Y){return Object.getOwnPropertyDescriptor(J,Y).enumerable}));H.forEach(function(Y){Jz($,Y,J[Y])})}return $}function Jz($,Z,J){if(Z in $)Object.defineProperty($,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[Z]=J;return $}function G3($,Z){if($==null)return{};var J=Hz($,Z),H,Y;if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols($);for(Y=0;Y<Q.length;Y++){if(H=Q[Y],Z.indexOf(H)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call($,H))continue;J[H]=$[H]}}return J}function Hz($,Z){if($==null)return{};var J={},H=Object.keys($),Y,Q;for(Q=0;Q<H.length;Q++){if(Y=H[Q],Z.indexOf(Y)>=0)continue;J[Y]=$[Y]}return J}function Yz($){var Z=Qz($,"string");return T1(Z)==="symbol"?Z:String(Z)}function Qz($,Z){if(T1($)!=="object"||$===null)return $;var J=$[Symbol.toPrimitive];if(J!==void 0){var H=J.call($,Z||"default");if(T1(H)!=="object")return H;throw TypeError("@@toPrimitive must return a primitive value.")}return(Z==="string"?String:Number)($)}var zz=["arguments","callee","caller","length","name","prototype","type"],z5,U3;function Uz($,Z){Object.getOwnPropertyNames($).forEach(function(J){if(zz.indexOf(J)<0&&!Z.hasOwnProperty(J)){var H=Object.getOwnPropertyDescriptor($,J);H&&Object.defineProperty(Z,J,H)}})}function Oz($){var Z=$.prototype||{};return!$.isReactComponent&&!Z.isReactComponent&&!$.render&&!Z.render}function Lz($){return typeof $==="function"&&/^\s*class\s+/.test($.toString())}function Bz($,Z){U3.forEach(function(J){var H=Object.getOwnPropertyDescriptor($,J),Y=(H||{}).value;if(!Y)return;var Q=Object.getOwnPropertyDescriptor(z5,J),X=(Q||{}).value,W=Z.prototype[J];if(!W&&Y!==X)H&&Object.defineProperty(Z.prototype,J,H),delete $[J]})}function O3($){if($._extraRadiumStateKeys&&$._extraRadiumStateKeys.length>0){var Z=$._extraRadiumStateKeys.reduce(function(J,H){var Y=J[H],Q=G3(J,[H].map(Yz));return Q},q0($));$._lastRadiumState=Z,$.setState({_radiumStyleState:Z})}}function L3($){var{_radiumMouseUpListener:Z,_radiumMediaQueryListenersByQuery:J}=$;if($._radiumIsMounted=!1,Z)Z.remove();if(J)Object.keys(J).forEach(function(H){J[H].remove()},$)}function B3($,Z,J){var H=$||Z||J;if(J&&H!==J)H=f8({},J,H);return H}function F3($,Z,J,H){var Y=a4($,Z,J),Q=Y.extraStateKeyMap,X=Y.element;if($._extraRadiumStateKeys=Object.keys(Q),H)return W3.createElement(_1.Provider,{value:H},X);return X}function Z3($,Z){var J=W3.forwardRef(function(H,Y){var Q=H.radiumConfig,X=G3(H,["radiumConfig"]),W=e4(_1),G=e4(A0),z=Xz({_radiumStyleState:{}}),U=tW(z,2),L=U[0],K=U[1],q=Gz({state:L,setState:K,_radiumMediaQueryListenersByQuery:void 0,_radiumMouseUpListener:void 0,_radiumIsMounted:!0,_lastRadiumState:void 0,_extraRadiumStateKeys:void 0,_radiumStyleKeeper:G}).current;q.state=L,$3(function(){return function(){L3(q)}},[q]);var B=q._extraRadiumStateKeys&&q._extraRadiumStateKeys.length>0;$3(function(){O3(q)},[B,q]);var F=$(X,Y),M=B3(Q,W,Z);return F3(q,F,M,Q)});return J._isRadiumEnhanced=!0,J.defaultProps=$.defaultProps,z3.default(J,$)}function Fz($,Z,J){var H=function(Y){X3(Q,Y);function Q(){var X;H3(this,Q),X=Y3(this,H1(Q).apply(this,arguments)),X.state=X.state||{},X._radiumStyleKeeper=X.props.styleKeeperContext,X._radiumMediaQueryListenersByQuery=X._radiumMediaQueryListenersByQuery,X._radiumMouseUpListener=X._radiumMouseUpListener,X._radiumIsMounted=!0,X._lastRadiumState=void 0,X._extraRadiumStateKeys=void 0,X.state._radiumStyleState={};var W=Q3(X);return Bz(W,Z),X}return rW(Q,[{key:"componentDidUpdate",value:function(W,G,z){if(K1(H1(Q.prototype),"componentDidUpdate",this))K1(H1(Q.prototype),"componentDidUpdate",this).call(this,W,G,z);O3(this)}},{key:"componentWillUnmount",value:function(){if(K1(H1(Q.prototype),"componentWillUnmount",this))K1(H1(Q.prototype),"componentWillUnmount",this).call(this);L3(this)}},{key:"render",value:function(){var W=K1(H1(Q.prototype),"render",this).call(this),G=B3(this.props.radiumConfig,this.props.radiumConfigContext,J);return F3(this,W,G,this.props.radiumConfig)}}]),Q}(Z);if(H._isRadiumEnhanced=!0,z5=H.prototype,U3=Object.getOwnPropertyNames(z5).filter(function(Y){return Y!=="constructor"&&typeof z5[Y]==="function"}),Uz($,H),H.propTypes&&H.propTypes.style)H.propTypes=f8({},H.propTypes,{style:W5.default.oneOfType([W5.default.array,W5.default.object])});return H.displayName=$.displayName||$.name||"Component",h1(H)}function Kz($){return $=function(Z){function J(){var H=Reflect.construct(Z,arguments,this.constructor);return H}return Reflect.setPrototypeOf(J.prototype,Z.prototype),Reflect.setPrototypeOf(J,Z),J}($),$}var J3=Wz(function(){return null}).$$typeof;function k1($){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(J3&&$.$$typeof===J3)return Z3($.render,Z);if(typeof $!=="function")return qz(Z,$);var J=$;if(Oz(J))return Z3(J,Z);var H=J;if(Lz(H))H=Kz(H);if(H===J)H=function(Y){X3(Q,Y);function Q(){return H3(this,Q),Y3(this,H1(Q).apply(this,arguments))}return Q}(H);return Fz(J,H,Z)}function qz($,Z){var J=f8({},$,Z);return function(H){return k1(H,J)}}var U5=T(U6(),1);import Dz,{PureComponent as Rz}from"react";function b1($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")b1=function(J){return typeof J};else b1=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return b1($)}function Mz($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function K3($,Z){for(var J=0;J<Z.length;J++){var H=Z[J];if(H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H)H.writable=!0;Object.defineProperty($,H.key,H)}}function Az($,Z,J){if(Z)K3($.prototype,Z);if(J)K3($,J);return $}function Iz($,Z){if(Z&&(b1(Z)==="object"||typeof Z==="function"))return Z;return fz($)}function fz($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function V8($){return V8=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},V8($)}function Vz($,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(Z&&Z.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Z)D8($,Z)}function D8($,Z){return D8=Object.setPrototypeOf||function(H,Y){return H.__proto__=Y,H},D8($,Z)}var R8=function($){Vz(Z,$);function Z(){return Mz(this,Z),Iz(this,V8(Z).apply(this,arguments))}return Az(Z,[{key:"_buildStyles",value:function(H){var Y=this,Q=this.props.radiumConfig&&this.props.radiumConfig.userAgent||this.props.radiumConfigContext&&this.props.radiumConfigContext.userAgent,X=this.props.scopeSelector,W=Object.keys(H).reduce(function(z,U){if(b1(H[U])!=="object")z[U]=H[U];return z},{}),G=Object.keys(W).length?B1(X||"",W,Q):"";return G+Object.keys(H).reduce(function(z,U){var L=H[U];if(U==="mediaQueries")z+=Y._buildMediaQueryString(L);else if(b1(H[U])==="object"){var K=X?U.split(",").map(function(q){return X+" "+q.trim()}).join(","):U;z+=B1(K,L,Q)}return z},"")}},{key:"_buildMediaQueryString",value:function(H){var Y=this,Q="";return Object.keys(H).forEach(function(X){Q+="@media "+X+"{"+Y._buildStyles(H[X])+"}"}),Q}},{key:"render",value:function(){if(!this.props.rules)return null;var H=this._buildStyles(this.props.rules);return Dz.createElement("style",{dangerouslySetInnerHTML:{__html:H}})}}]),Z}(Rz);R8.propTypes={radiumConfig:U5.default.object,rules:U5.default.object,scopeSelector:U5.default.string};R8.defaultProps={scopeSelector:""};var q3=h1(R8);import L5,{useContext as gz,useRef as _z}from"react";import Ez,{Component as Sz}from"react";function O5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")O5=function(J){return typeof J};else O5=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return O5($)}function Nz($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function M3($,Z){for(var J=0;J<Z.length;J++){var H=Z[J];if(H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H)H.writable=!0;Object.defineProperty($,H.key,H)}}function Pz($,Z,J){if(Z)M3($.prototype,Z);if(J)M3($,J);return $}function Tz($,Z){if(Z&&(O5(Z)==="object"||typeof Z==="function"))return Z;return wz($)}function wz($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function N8($){return N8=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},N8($)}function xz($,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(Z&&Z.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Z)P8($,Z)}function P8($,Z){return P8=Object.setPrototypeOf||function(H,Y){return H.__proto__=Y,H},P8($,Z)}var vz=function($){xz(Z,$);function Z(){var J;if(Nz(this,Z),J=Tz(this,N8(Z).apply(this,arguments)),J.styleKeeper=void 0,J._subscription=void 0,J._root=void 0,J._css=void 0,J._onChange=function(){var H=J.styleKeeper.getCSS();if(H!==J._css){if(J._root)J._root.innerHTML=H;else throw Error("No root style object found, even after StyleSheet mount.");J._css=H}},!J.props.styleKeeperContext)throw Error("StyleRoot is required to use StyleSheet");return J.styleKeeper=J.props.styleKeeperContext,J._css=J.styleKeeper.getCSS(),J}return Pz(Z,[{key:"componentDidMount",value:function(){this._subscription=this.styleKeeper.subscribe(this._onChange),this._onChange()}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillUnmount",value:function(){if(this._subscription)this._subscription.remove()}},{key:"render",value:function(){var H=this;return Ez.createElement("style",{dangerouslySetInnerHTML:{__html:this._css},ref:function(Q){H._root=Q}})}}]),Z}(Sz),A3=h1(vz);function Cz($,Z){if($==null)return{};var J=jz($,Z),H,Y;if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols($);for(Y=0;Y<Q.length;Y++){if(H=Q[Y],Z.indexOf(H)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call($,H))continue;J[H]=$[H]}}return J}function jz($,Z){if($==null)return{};var J={},H=Object.keys($),Y,Q;for(Q=0;Q<H.length;Q++){if(Y=H[Q],Z.indexOf(Y)>=0)continue;J[Y]=$[Y]}return J}function hz($,Z){var J=$&&$.userAgent||Z&&Z.userAgent;return new p4(J)}var kz=k1(function($){var Z=$.children,J=Cz($,["children"]);return L5.createElement("div",J,Z,L5.createElement(A3,null))}),bz=function(Z){var J=Z.radiumConfig,H=gz(_1),Y=_z(hz(J,H));return L5.createElement(A0.Provider,{value:Y.current},L5.createElement(kz,Z))},I3=bz;function T8($,Z){return{__radiumKeyframes:!0,__process:function(H){var Y=k4(H),Q=Object.keys($).map(function(G){return B1(G,$[G],H)}).join(`
|
|
20
|
-
`),X=(Z?Z+"-":"")+"radium-animation-"+
|
|
26
|
+
`).map((Z)=>JSON.parse(Z))}applyDeltaIfNeeded($,Z){let H,J;if($.delta){let Y=HZ(Z,new TextEncoder().encode($.data));H=JSON.parse(new TextDecoder().decode(Y)),J=Y}else H=JSON.parse($.data),J=new TextEncoder().encode($.data);return{newData:H,newPrevValue:J}}}var JZ={headers:{},token:"",getToken:null,data:null,getData:null,debug:!1,name:"js",version:"",fetch:null,readableStream:null,websocket:null,eventsource:null,sockjs:null,sockjsOptions:{},emulationEndpoint:"/emulation",minReconnectDelay:500,maxReconnectDelay:20000,timeout:5000,maxServerPingDelay:1e4,networkEventTarget:null};class J1 extends Error{constructor($){super($);this.name=this.constructor.name}}class s1 extends p2{constructor($,Z){super();if(this._reconnectTimeout=null,this._refreshTimeout=null,this._serverPingTimeout=null,this.state=b.Disconnected,this._transportIsOpen=!1,this._endpoint=$,this._emulation=!1,this._transports=[],this._currentTransportIndex=0,this._triedAllTransports=!1,this._transportWasOpen=!1,this._transport=null,this._transportId=0,this._deviceWentOffline=!1,this._transportClosed=!0,this._codec=new N5,this._reconnecting=!1,this._reconnectTimeout=null,this._reconnectAttempts=0,this._client=null,this._session="",this._node="",this._subs={},this._serverSubs={},this._commandId=0,this._commands=[],this._batching=!1,this._refreshRequired=!1,this._refreshTimeout=null,this._callbacks={},this._token="",this._data=null,this._dispatchPromise=Promise.resolve(),this._serverPing=0,this._serverPingTimeout=null,this._sendPong=!1,this._promises={},this._promiseId=0,this._debugEnabled=!1,this._networkEventsSet=!1,this._config=Object.assign(Object.assign({},JZ),Z),this._configure(),this._debugEnabled)this.on("state",(H)=>{this._debug("client state",H.oldState,"->",H.newState)}),this.on("error",(H)=>{this._debug("client error",H)});else this.on("error",function(){Function.prototype()})}newSubscription($,Z){if(this.getSubscription($)!==null)throw Error("Subscription to the channel "+$+" already exists");let H=new a2(this,$,Z);return this._subs[$]=H,H}getSubscription($){return this._getSub($)}removeSubscription($){if(!$)return;if($.state!==i.Unsubscribed)$.unsubscribe();this._removeSubscription($)}subscriptions(){return this._subs}ready($){return c(this,void 0,void 0,function*(){switch(this.state){case b.Disconnected:throw{code:h.clientDisconnected,message:"client disconnected"};case b.Connected:return;default:return new Promise((Z,H)=>{let J={resolve:Z,reject:H};if($)J.timeout=setTimeout(()=>{H({code:h.timeout,message:"timeout"})},$);this._promises[this._nextPromiseId()]=J})}})}connect(){if(this._isConnected()){this._debug("connect called when already connected");return}if(this._isConnecting()){this._debug("connect called when already connecting");return}this._debug("connect called"),this._reconnectAttempts=0,this._startConnecting()}disconnect(){this._disconnect(r1.disconnectCalled,"disconnect called",!1)}setToken($){this._token=$}setData($){this._data=$}setHeaders($){this._config.headers=$}send($){return c(this,void 0,void 0,function*(){let Z={send:{data:$}};if(yield this._methodCall(),!this._transportSendCommands([Z]))throw this._createErrorObject(h.transportWriteError,"transport write error")})}rpc($,Z){return c(this,void 0,void 0,function*(){let H={rpc:{method:$,data:Z}};return yield this._methodCall(),{data:(yield this._callPromise(H,(Y)=>Y.rpc)).data}})}publish($,Z){return c(this,void 0,void 0,function*(){let H={publish:{channel:$,data:Z}};return yield this._methodCall(),yield this._callPromise(H,()=>({})),{}})}history($,Z){return c(this,void 0,void 0,function*(){let H={history:this._getHistoryRequest($,Z)};yield this._methodCall();let J=yield this._callPromise(H,(Q)=>Q.history),Y=[];if(J.publications)for(let Q=0;Q<J.publications.length;Q++)Y.push(this._getPublicationContext($,J.publications[Q]));return{publications:Y,epoch:J.epoch||"",offset:J.offset||0}})}presence($){return c(this,void 0,void 0,function*(){let Z={presence:{channel:$}};yield this._methodCall();let J=(yield this._callPromise(Z,(Y)=>Y.presence)).presence;for(let Y in J)if(Object.prototype.hasOwnProperty.call(J,Y)){let Q=J[Y],X=Q.conn_info,O=Q.chan_info;if(X)Q.connInfo=X;if(O)Q.chanInfo=O}return{clients:J}})}presenceStats($){return c(this,void 0,void 0,function*(){let Z={presence_stats:{channel:$}};yield this._methodCall();let H=yield this._callPromise(Z,(J)=>{return J.presence_stats});return{numUsers:H.num_users,numClients:H.num_clients}})}startBatching(){this._batching=!0}stopBatching(){let $=this;Promise.resolve().then(function(){Promise.resolve().then(function(){$._batching=!1,$._flush()})})}_debug(...$){if(!this._debugEnabled)return;s3("debug",$)}_codecName(){return this._codec.name()}_formatOverride(){return}_configure(){if(!("Promise"in globalThis))throw Error("Promise polyfill required");if(!this._endpoint)throw Error("endpoint configuration required");if(this._config.token!==null)this._token=this._config.token;if(this._config.data!==null)this._data=this._config.data;if(this._codec=new N5,this._formatOverride(),this._config.debug===!0||typeof localStorage<"u"&&typeof localStorage.getItem==="function"&&localStorage.getItem("centrifuge.debug"))this._debugEnabled=!0;if(this._debug("config",this._config),typeof this._endpoint==="string");else if(Array.isArray(this._endpoint)){this._transports=this._endpoint,this._emulation=!0;for(let $ in this._transports)if(this._transports.hasOwnProperty($)){let Z=this._transports[$];if(!Z.endpoint||!Z.transport)throw Error("malformed transport configuration");let H=Z.transport;if(["websocket","http_stream","sse","sockjs","webtransport"].indexOf(H)<0)throw Error("unsupported transport name: "+H)}}else throw Error("unsupported url configuration type: only string or array of objects are supported")}_setState($){if(this.state!==$){this._reconnecting=!1;let Z=this.state;return this.state=$,this.emit("state",{newState:$,oldState:Z}),!0}return!1}_isDisconnected(){return this.state===b.Disconnected}_isConnecting(){return this.state===b.Connecting}_isConnected(){return this.state===b.Connected}_nextCommandId(){return++this._commandId}_setNetworkEvents(){if(this._networkEventsSet)return;let $=null;if(this._config.networkEventTarget!==null)$=this._config.networkEventTarget;else if(typeof globalThis.addEventListener<"u")$=globalThis;if($)$.addEventListener("offline",()=>{if(this._debug("offline event triggered"),this.state===b.Connected||this.state===b.Connecting)this._disconnect(L1.transportClosed,"transport closed",!0),this._deviceWentOffline=!0}),$.addEventListener("online",()=>{if(this._debug("online event triggered"),this.state!==b.Connecting)return;if(this._deviceWentOffline&&!this._transportClosed)this._deviceWentOffline=!1,this._transportClosed=!0;this._clearReconnectTimeout(),this._startReconnecting()}),this._networkEventsSet=!0}_getReconnectDelay(){let $=E0(this._reconnectAttempts,this._config.minReconnectDelay,this._config.maxReconnectDelay);return this._reconnectAttempts+=1,$}_clearOutgoingRequests(){for(let $ in this._callbacks)if(this._callbacks.hasOwnProperty($)){let Z=this._callbacks[$];clearTimeout(Z.timeout);let H=Z.errback;if(!H)continue;H({error:this._createErrorObject(h.connectionClosed,"connection closed")})}this._callbacks={}}_clearConnectedState(){this._client=null,this._clearServerPingTimeout(),this._clearRefreshTimeout();for(let $ in this._subs){if(!this._subs.hasOwnProperty($))continue;let Z=this._subs[$];if(Z.state===i.Subscribed)Z._setSubscribing(w0.transportClosed,"transport closed")}for(let $ in this._serverSubs)if(this._serverSubs.hasOwnProperty($))this.emit("subscribing",{channel:$})}_handleWriteError($){for(let Z of $){let H=Z.id;if(!(H in this._callbacks))continue;let J=this._callbacks[H];clearTimeout(this._callbacks[H].timeout),delete this._callbacks[H];let Y=J.errback;Y({error:this._createErrorObject(h.transportWriteError,"transport write error")})}}_transportSendCommands($){if(!$.length)return!0;if(!this._transport)return!1;try{this._transport.send(this._codec.encodeCommands($),this._session,this._node)}catch(Z){return this._debug("error writing commands",Z),this._handleWriteError($),!1}return!0}_initializeTransport(){let $;if(this._config.websocket!==null)$=this._config.websocket;else if(!(typeof globalThis.WebSocket!=="function"&&typeof globalThis.WebSocket!=="object"))$=globalThis.WebSocket;let Z=null;if(this._config.sockjs!==null)Z=this._config.sockjs;else if(typeof globalThis.SockJS<"u")Z=globalThis.SockJS;let H=null;if(this._config.eventsource!==null)H=this._config.eventsource;else if(typeof globalThis.EventSource<"u")H=globalThis.EventSource;let J=null;if(this._config.fetch!==null)J=this._config.fetch;else if(typeof globalThis.fetch<"u")J=globalThis.fetch;let Y=null;if(this._config.readableStream!==null)Y=this._config.readableStream;else if(typeof globalThis.ReadableStream<"u")Y=globalThis.ReadableStream;if(!this._emulation){if(r3(this._endpoint,"http"))throw Error("Provide explicit transport endpoints configuration in case of using HTTP (i.e. using array of TransportEndpoint instead of a single string), or use ws(s):// scheme in an endpoint if you aimed using WebSocket transport");else if(this._debug("client will use websocket"),this._transport=new R5(this._endpoint,{websocket:$}),!this._transport.supported())throw Error("WebSocket constructor not found, make sure it is available globally or passed as a dependency in Centrifuge options")}else{if(this._currentTransportIndex>=this._transports.length)this._triedAllTransports=!0,this._currentTransportIndex=0;let L=0;while(!0){if(L>=this._transports.length)throw Error("no supported transport found");let B=this._transports[this._currentTransportIndex],F=B.transport,K=B.endpoint;if(F==="websocket"){if(this._debug("trying websocket transport"),this._transport=new R5(K,{websocket:$}),!this._transport.supported()){this._debug("websocket transport not available"),this._currentTransportIndex++,L++;continue}}else if(F==="webtransport"){if(this._debug("trying webtransport transport"),this._transport=new t2(K,{webtransport:globalThis.WebTransport,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("webtransport transport not available"),this._currentTransportIndex++,L++;continue}}else if(F==="http_stream"){if(this._debug("trying http_stream transport"),this._transport=new r2(K,{fetch:J,readableStream:Y,emulationEndpoint:this._config.emulationEndpoint,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("http_stream transport not available"),this._currentTransportIndex++,L++;continue}}else if(F==="sse"){if(this._debug("trying sse transport"),this._transport=new s2(K,{eventsource:H,fetch:J,emulationEndpoint:this._config.emulationEndpoint}),!this._transport.supported()){this._debug("sse transport not available"),this._currentTransportIndex++,L++;continue}}else if(F==="sockjs"){if(this._debug("trying sockjs"),this._transport=new o2(K,{sockjs:Z,sockjsOptions:this._config.sockjsOptions}),!this._transport.supported()){this._debug("sockjs transport not available"),this._currentTransportIndex++,L++;continue}}else throw Error("unknown transport "+F);break}}let Q=this,X=this._transport,O=this._nextTransportId();Q._debug("id of transport",O);let G=!1,z=[];if(this._transport.emulation()){let L=Q._sendConnect(!0);z.push(L)}this._setNetworkEvents();let W=this._codec.encodeCommands(z);this._transportClosed=!1;let f;f=setTimeout(function(){X.close()},this._config.timeout),this._transport.initialize(this._codecName(),{onOpen:function(){if(f)clearTimeout(f),f=null;if(Q._transportId!=O){Q._debug("open callback from non-actual transport"),X.close();return}if(G=!0,Q._debug(X.subName(),"transport open"),X.emulation())return;Q._transportIsOpen=!0,Q._transportWasOpen=!0,Q.startBatching(),Q._sendConnect(!1),Q._sendSubscribeCommands(),Q.stopBatching(),Q.emit("__centrifuge_debug:connect_frame_sent",{})},onError:function(L){if(Q._transportId!=O){Q._debug("error callback from non-actual transport");return}Q._debug("transport level error",L)},onClose:function(L){if(f)clearTimeout(f),f=null;if(Q._transportId!=O){Q._debug("close callback from non-actual transport");return}Q._debug(X.subName(),"transport closed"),Q._transportClosed=!0,Q._transportIsOpen=!1;let B="connection closed",F=!0,K=0;if(L&&"code"in L&&L.code)K=L.code;if(L&&L.reason)try{let q=JSON.parse(L.reason);B=q.reason,F=q.reconnect}catch(q){if(B=L.reason,K>=3500&&K<4000||K>=4500&&K<5000)F=!1}if(K<3000){if(K===1009)K=r1.messageSizeLimit,B="message size limit exceeded",F=!1;else K=L1.transportClosed,B="transport closed";if(Q._emulation&&!Q._transportWasOpen){if(Q._currentTransportIndex++,Q._currentTransportIndex>=Q._transports.length)Q._triedAllTransports=!0,Q._currentTransportIndex=0}}else Q._transportWasOpen=!0;if(Q._isConnecting()&&!G)Q.emit("error",{type:"transport",error:{code:h.transportClosed,message:"transport closed"},transport:X.name()});Q._reconnecting=!1,Q._disconnect(K,B,F)},onMessage:function(L){Q._dataReceived(L)}},W),Q.emit("__centrifuge_debug:transport_initialized",{})}_sendConnect($){let Z=this._constructConnectCommand(),H=this;return this._call(Z,$).then((J)=>{let Y=J.reply.connect;if(H._connectResponse(Y),J.next)J.next()},(J)=>{if(H._connectError(J.error),J.next)J.next()}),Z}_startReconnecting(){if(this._debug("start reconnecting"),!this._isConnecting()){this._debug("stop reconnecting: client not in connecting state");return}if(this._reconnecting){this._debug("reconnect already in progress, return from reconnect routine");return}if(this._transportClosed===!1){this._debug("waiting for transport close");return}this._reconnecting=!0;let $=this._token==="";if(!(this._refreshRequired||$&&this._config.getToken!==null)){if(this._config.getData)this._config.getData().then((J)=>{if(!this._isConnecting())return;this._data=J,this._initializeTransport()}).catch((J)=>this._handleGetDataError(J));else this._initializeTransport();return}let H=this;this._getToken().then(function(J){if(!H._isConnecting())return;if(J==null||J==null){H._failUnauthorized();return}if(H._token=J,H._debug("connection token refreshed"),H._config.getData)H._config.getData().then(function(Y){if(!H._isConnecting())return;H._data=Y,H._initializeTransport()}).catch((Y)=>H._handleGetDataError(Y));else H._initializeTransport()}).catch(function(J){if(!H._isConnecting())return;if(J instanceof J1){H._failUnauthorized();return}H.emit("error",{type:"connectToken",error:{code:h.clientConnectToken,message:J!==void 0?J.toString():""}});let Y=H._getReconnectDelay();H._debug("error on getting connection token, reconnect after "+Y+" milliseconds",J),H._reconnecting=!1,H._reconnectTimeout=setTimeout(()=>{H._startReconnecting()},Y)})}_handleGetDataError($){if($ instanceof J1){this._failUnauthorized();return}this.emit("error",{type:"connectData",error:{code:h.badConfiguration,message:($===null||$===void 0?void 0:$.toString())||""}});let Z=this._getReconnectDelay();this._debug("error on getting connect data, reconnect after "+Z+" milliseconds",$),this._reconnecting=!1,this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},Z)}_connectError($){if(this.state!==b.Connecting)return;if($.code===109)this._refreshRequired=!0;if($.code<100||$.temporary===!0||$.code===109)this.emit("error",{type:"connect",error:$}),this._debug("closing transport due to connect error"),this._disconnect($.code,$.message,!0);else this._disconnect($.code,$.message,!1)}_scheduleReconnect(){if(!this._isConnecting())return;let $=!1;if(this._emulation&&!this._transportWasOpen&&!this._triedAllTransports)$=!0;let Z=this._getReconnectDelay();if($)Z=0;this._debug("reconnect after "+Z+" milliseconds"),this._clearReconnectTimeout(),this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},Z)}_constructConnectCommand(){let $={};if(this._token)$.token=this._token;if(this._data)$.data=this._data;if(this._config.name)$.name=this._config.name;if(this._config.version)$.version=this._config.version;if(Object.keys(this._config.headers).length>0)$.headers=this._config.headers;let Z={},H=!1;for(let J in this._serverSubs)if(this._serverSubs.hasOwnProperty(J)&&this._serverSubs[J].recoverable){H=!0;let Y={recover:!0};if(this._serverSubs[J].offset)Y.offset=this._serverSubs[J].offset;if(this._serverSubs[J].epoch)Y.epoch=this._serverSubs[J].epoch;Z[J]=Y}if(H)$.subs=Z;return{connect:$}}_getHistoryRequest($,Z){let H={channel:$};if(Z!==void 0){if(Z.since){if(H.since={offset:Z.since.offset},Z.since.epoch)H.since.epoch=Z.since.epoch}if(Z.limit!==void 0)H.limit=Z.limit;if(Z.reverse===!0)H.reverse=!0}return H}_methodCall(){if(this._isConnected())return Promise.resolve();return new Promise(($,Z)=>{let H=setTimeout(function(){Z({code:h.timeout,message:"timeout"})},this._config.timeout);this._promises[this._nextPromiseId()]={timeout:H,resolve:$,reject:Z}})}_callPromise($,Z){return new Promise((H,J)=>{this._call($,!1).then((Y)=>{var Q;let X=Z(Y.reply);H(X),(Q=Y.next)===null||Q===void 0||Q.call(Y)},(Y)=>{var Q;J(Y.error),(Q=Y.next)===null||Q===void 0||Q.call(Y)})})}_dataReceived($){if(this._serverPing>0)this._waitServerPing();let Z=this._codec.decodeReplies($);this._dispatchPromise=this._dispatchPromise.then(()=>{let H;this._dispatchPromise=new Promise((J)=>{H=J}),this._dispatchSynchronized(Z,H)})}_dispatchSynchronized($,Z){let H=Promise.resolve();for(let J in $)if($.hasOwnProperty(J))H=H.then(()=>{return this._dispatchReply($[J])});H=H.then(()=>{Z()})}_dispatchReply($){let Z,H=new Promise((Y)=>{Z=Y});if($===void 0||$===null)return this._debug("dispatch: got undefined or null reply"),Z(),H;let J=$.id;if(J&&J>0)this._handleReply($,Z);else if(!$.push)this._handleServerPing(Z);else this._handlePush($.push,Z);return H}_call($,Z){return new Promise((H,J)=>{if($.id=this._nextCommandId(),this._registerCall($.id,H,J),!Z)this._addCommand($)})}_startConnecting(){if(this._debug("start connecting"),this._setState(b.Connecting))this.emit("connecting",{code:L1.connectCalled,reason:"connect called"});this._client=null,this._startReconnecting()}_disconnect($,Z,H){if(this._isDisconnected())return;this._transportIsOpen=!1;let J=this.state;this._reconnecting=!1;let Y={code:$,reason:Z},Q=!1;if(H)Q=this._setState(b.Connecting);else Q=this._setState(b.Disconnected),this._rejectPromises({code:h.clientDisconnected,message:"disconnected"});if(this._clearOutgoingRequests(),J===b.Connecting)this._clearReconnectTimeout();if(J===b.Connected)this._clearConnectedState();if(Q)if(this._isConnecting())this.emit("connecting",Y);else this.emit("disconnected",Y);if(this._transport){this._debug("closing existing transport");let X=this._transport;this._transport=null,X.close(),this._transportClosed=!0,this._nextTransportId()}else this._debug("no transport to close");this._scheduleReconnect()}_failUnauthorized(){this._disconnect(r1.unauthorized,"unauthorized",!1)}_getToken(){if(this._debug("get connection token"),!this._config.getToken)return this.emit("error",{type:"configuration",error:{code:h.badConfiguration,message:"token expired but no getToken function set in the configuration"}}),Promise.reject(new J1(""));return this._config.getToken({})}_refresh(){let $=this._client,Z=this;this._getToken().then(function(H){if($!==Z._client)return;if(!H){Z._failUnauthorized();return}if(Z._token=H,Z._debug("connection token refreshed"),!Z._isConnected())return;let J={refresh:{token:Z._token}};Z._call(J,!1).then((Y)=>{let Q=Y.reply.refresh;if(Z._refreshResponse(Q),Y.next)Y.next()},(Y)=>{if(Z._refreshError(Y.error),Y.next)Y.next()})}).catch(function(H){if(!Z._isConnected())return;if(H instanceof J1){Z._failUnauthorized();return}Z.emit("error",{type:"refreshToken",error:{code:h.clientRefreshToken,message:H!==void 0?H.toString():""}}),Z._refreshTimeout=setTimeout(()=>Z._refresh(),Z._getRefreshRetryDelay())})}_refreshError($){if($.code<100||$.temporary===!0)this.emit("error",{type:"refresh",error:$}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay());else this._disconnect($.code,$.message,!1)}_getRefreshRetryDelay(){return E0(0,5000,1e4)}_refreshResponse($){if(this._refreshTimeout)clearTimeout(this._refreshTimeout),this._refreshTimeout=null;if($.expires)this._client=$.client,this._refreshTimeout=setTimeout(()=>this._refresh(),S0($.ttl))}_removeSubscription($){if($===null)return;delete this._subs[$.channel]}_unsubscribe($){if(!this._transportIsOpen)return Promise.resolve();let H={unsubscribe:{channel:$.channel}},J=this;return new Promise((Q,X)=>{this._call(H,!1).then((O)=>{if(Q(),O.next)O.next()},(O)=>{if(Q(),O.next)O.next();J._disconnect(L1.unsubscribeError,"unsubscribe error",!0)})})}_getSub($,Z){if(Z&&Z>0){for(let J in this._subs)if(this._subs.hasOwnProperty(J)){let Y=this._subs[J];if(Y._id===Z)return Y}return null}let H=this._subs[$];if(!H)return null;return H}_isServerSub($){return this._serverSubs[$]!==void 0}_sendSubscribeCommands(){let $=[];for(let Z in this._subs){if(!this._subs.hasOwnProperty(Z))continue;let H=this._subs[Z];if(H._inflight===!0)continue;if(H.state===i.Subscribing){let J=H._subscribe();if(J)$.push(J)}}return $}_connectResponse($){if(this._transportIsOpen=!0,this._transportWasOpen=!0,this._reconnectAttempts=0,this._refreshRequired=!1,this._isConnected())return;if(this._client=$.client,this._setState(b.Connected),this._refreshTimeout)clearTimeout(this._refreshTimeout);if($.expires)this._refreshTimeout=setTimeout(()=>this._refresh(),S0($.ttl));this._session=$.session,this._node=$.node,this.startBatching(),this._sendSubscribeCommands(),this.stopBatching();let Z={client:$.client,transport:this._transport.subName()};if($.data)Z.data=$.data;if(this.emit("connected",Z),this._resolvePromises(),this._processServerSubs($.subs||{}),$.ping&&$.ping>0)this._serverPing=$.ping*1000,this._sendPong=$.pong===!0,this._waitServerPing();else this._serverPing=0}_processServerSubs($){for(let Z in $){if(!$.hasOwnProperty(Z))continue;let H=$[Z];this._serverSubs[Z]={offset:H.offset,epoch:H.epoch,recoverable:H.recoverable||!1};let J=this._getSubscribeContext(Z,H);this.emit("subscribed",J)}for(let Z in $){if(!$.hasOwnProperty(Z))continue;let H=$[Z];if(H.recovered){let J=H.publications;if(J&&J.length>0){for(let Y in J)if(J.hasOwnProperty(Y))this._handlePublication(Z,J[Y])}}}for(let Z in this._serverSubs){if(!this._serverSubs.hasOwnProperty(Z))continue;if(!$[Z])this.emit("unsubscribed",{channel:Z}),delete this._serverSubs[Z]}}_clearRefreshTimeout(){if(this._refreshTimeout!==null)clearTimeout(this._refreshTimeout),this._refreshTimeout=null}_clearReconnectTimeout(){if(this._reconnectTimeout!==null)clearTimeout(this._reconnectTimeout),this._reconnectTimeout=null}_clearServerPingTimeout(){if(this._serverPingTimeout!==null)clearTimeout(this._serverPingTimeout),this._serverPingTimeout=null}_waitServerPing(){if(this._config.maxServerPingDelay===0)return;if(!this._isConnected())return;this._clearServerPingTimeout(),this._serverPingTimeout=setTimeout(()=>{if(!this._isConnected())return;this._disconnect(L1.noPing,"no ping",!0)},this._serverPing+this._config.maxServerPingDelay)}_getSubscribeContext($,Z){let H={channel:$,positioned:!1,recoverable:!1,wasRecovering:!1,recovered:!1,hasRecoveredPublications:!1};if(Z.recovered)H.recovered=!0;if(Z.positioned)H.positioned=!0;if(Z.recoverable)H.recoverable=!0;if(Z.was_recovering)H.wasRecovering=!0;let J="";if("epoch"in Z)J=Z.epoch;let Y=0;if("offset"in Z)Y=Z.offset;if(H.positioned||H.recoverable)H.streamPosition={offset:Y,epoch:J};if(Array.isArray(Z.publications)&&Z.publications.length>0)H.hasRecoveredPublications=!0;if(Z.data)H.data=Z.data;return H}_handleReply($,Z){let H=$.id;if(!(H in this._callbacks)){Z();return}let J=this._callbacks[H];if(clearTimeout(this._callbacks[H].timeout),delete this._callbacks[H],!e3($)){let Y=J.callback;if(!Y)return;Y({reply:$,next:Z})}else{let Y=J.errback;if(!Y){Z();return}let Q={code:$.error.code,message:$.error.message||"",temporary:$.error.temporary||!1};Y({error:Q,next:Z})}}_handleJoin($,Z,H){let J=this._getSub($,H);if(!J&&$){if(this._isServerSub($)){let Y={channel:$,info:this._getJoinLeaveContext(Z.info)};this.emit("join",Y)}return}J._handleJoin(Z)}_handleLeave($,Z,H){let J=this._getSub($,H);if(!J&&$){if(this._isServerSub($)){let Y={channel:$,info:this._getJoinLeaveContext(Z.info)};this.emit("leave",Y)}return}J._handleLeave(Z)}_handleUnsubscribe($,Z){let H=this._getSub($,0);if(!H&&$){if(this._isServerSub($))delete this._serverSubs[$],this.emit("unsubscribed",{channel:$});return}if(Z.code<2500)H._setUnsubscribed(Z.code,Z.reason,!1);else H._setSubscribing(Z.code,Z.reason)}_handleSubscribe($,Z){this._serverSubs[$]={offset:Z.offset,epoch:Z.epoch,recoverable:Z.recoverable||!1},this.emit("subscribed",this._getSubscribeContext($,Z))}_handleDisconnect($){let Z=$.code,H=!0;if(Z>=3500&&Z<4000||Z>=4500&&Z<5000)H=!1;this._disconnect(Z,$.reason,H)}_getPublicationContext($,Z){let H={channel:$,data:Z.data};if(Z.offset)H.offset=Z.offset;if(Z.info)H.info=this._getJoinLeaveContext(Z.info);if(Z.tags)H.tags=Z.tags;return H}_getJoinLeaveContext($){let Z={client:$.client,user:$.user},H=$.conn_info;if(H)Z.connInfo=H;let J=$.chan_info;if(J)Z.chanInfo=J;return Z}_handlePublication($,Z,H){let J=this._getSub($,H);if(!J&&$){if(this._isServerSub($)){let Y=this._getPublicationContext($,Z);if(this.emit("publication",Y),Z.offset!==void 0)this._serverSubs[$].offset=Z.offset}return}J._handlePublication(Z)}_handleMessage($){this.emit("message",{data:$.data})}_handleServerPing($){if(this._sendPong){let Z={};this._transportSendCommands([Z])}$()}_handlePush($,Z){let{channel:H,id:J}=$;if($.pub)this._handlePublication(H,$.pub,J);else if($.message)this._handleMessage($.message);else if($.join)this._handleJoin(H,$.join,J);else if($.leave)this._handleLeave(H,$.leave,J);else if($.unsubscribe)this._handleUnsubscribe(H,$.unsubscribe);else if($.subscribe)this._handleSubscribe(H,$.subscribe);else if($.disconnect)this._handleDisconnect($.disconnect);Z()}_flush(){let $=this._commands.slice(0);this._commands=[],this._transportSendCommands($)}_createErrorObject($,Z,H){let J={code:$,message:Z};if(H)J.temporary=!0;return J}_registerCall($,Z,H){this._callbacks[$]={callback:Z,errback:H,timeout:null},this._callbacks[$].timeout=setTimeout(()=>{if(delete this._callbacks[$],n2(H))H({error:this._createErrorObject(h.timeout,"timeout")})},this._config.timeout)}_addCommand($){if(this._batching)this._commands.push($);else this._transportSendCommands([$])}_nextPromiseId(){return++this._promiseId}_nextTransportId(){return++this._transportId}_resolvePromises(){for(let $ in this._promises){if(!this._promises.hasOwnProperty($))continue;if(this._promises[$].timeout)clearTimeout(this._promises[$].timeout);this._promises[$].resolve(),delete this._promises[$]}}_rejectPromises($){for(let Z in this._promises){if(!this._promises.hasOwnProperty(Z))continue;if(this._promises[Z].timeout)clearTimeout(this._promises[Z].timeout);this._promises[Z].reject($),delete this._promises[Z]}}}s1.SubscriptionState=i;s1.State=b;s1.UnauthorizedError=J1;var QZ=YZ(null),Z8=QZ;var H1=Object.create(null);H1.open="0";H1.close="1";H1.ping="2";H1.pong="3";H1.message="4";H1.upgrade="5";H1.noop="6";var t1=Object.create(null);Object.keys(H1).forEach(($)=>{t1[H1[$]]=$});var e1={type:"error",data:"parser error"};var Y8=typeof Blob==="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Q8=typeof ArrayBuffer==="function",X8=($)=>{return typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView($):$&&$.buffer instanceof ArrayBuffer},$0=({type:$,data:Z},H,J)=>{if(Y8&&Z instanceof Blob)if(H)return J(Z);else return H8(Z,J);else if(Q8&&(Z instanceof ArrayBuffer||X8(Z)))if(H)return J(Z);else return H8(new Blob([Z]),J);return J(H1[$]+(Z||""))},H8=($,Z)=>{let H=new FileReader;return H.onload=function(){let J=H.result.split(",")[1];Z("b"+(J||""))},H.readAsDataURL($)};function J8($){if($ instanceof Uint8Array)return $;else if($ instanceof ArrayBuffer)return new Uint8Array($);else return new Uint8Array($.buffer,$.byteOffset,$.byteLength)}var T5;function G8($,Z){if(Y8&&$.data instanceof Blob)return $.data.arrayBuffer().then(J8).then(Z);else if(Q8&&($.data instanceof ArrayBuffer||X8($.data)))return Z(J8($.data));$0($,!1,(H)=>{if(!T5)T5=new TextEncoder;Z(T5.encode(H))})}var Z0=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let $=0;$<64;$++)Z0["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt($)]=$;var O8=($)=>{let Z=$.length*0.75,H=$.length,J,Y=0,Q,X,O,G;if($[$.length-1]==="="){if(Z--,$[$.length-2]==="=")Z--}let z=new ArrayBuffer(Z),W=new Uint8Array(z);for(J=0;J<H;J+=4)Q=Z0[$.charCodeAt(J)],X=Z0[$.charCodeAt(J+1)],O=Z0[$.charCodeAt(J+2)],G=Z0[$.charCodeAt(J+3)],W[Y++]=Q<<2|X>>4,W[Y++]=(X&15)<<4|O>>2,W[Y++]=(O&3)<<6|G&63;return z};var XZ=typeof ArrayBuffer==="function",H0=($,Z)=>{if(typeof $!=="string")return{type:"message",data:z8($,Z)};let H=$.charAt(0);if(H==="b")return{type:"message",data:GZ($.substring(1),Z)};if(!t1[H])return e1;return $.length>1?{type:t1[H],data:$.substring(1)}:{type:t1[H]}},GZ=($,Z)=>{if(XZ){let H=O8($);return z8(H,Z)}else return{base64:!0,data:$}},z8=($,Z)=>{switch(Z){case"blob":if($ instanceof Blob)return $;else return new Blob([$]);case"arraybuffer":default:if($ instanceof ArrayBuffer)return $;else return $.buffer}};var W8=String.fromCharCode(30),U8=($,Z)=>{let H=$.length,J=Array(H),Y=0;$.forEach((Q,X)=>{$0(Q,!1,(O)=>{if(J[X]=O,++Y===H)Z(J.join(W8))})})},f8=($,Z)=>{let H=$.split(W8),J=[];for(let Y=0;Y<H.length;Y++){let Q=H0(H[Y],Z);if(J.push(Q),Q.type==="error")break}return J};function F8(){return new TransformStream({transform($,Z){G8($,(H)=>{let J=H.length,Y;if(J<126)Y=new Uint8Array(1),new DataView(Y.buffer).setUint8(0,J);else if(J<65536){Y=new Uint8Array(3);let Q=new DataView(Y.buffer);Q.setUint8(0,126),Q.setUint16(1,J)}else{Y=new Uint8Array(9);let Q=new DataView(Y.buffer);Q.setUint8(0,127),Q.setBigUint64(1,BigInt(J))}if($.data&&typeof $.data!=="string")Y[0]|=128;Z.enqueue(Y),Z.enqueue(H)})}})}var w5;function C0($){return $.reduce((Z,H)=>Z+H.length,0)}function g0($,Z){if($[0].length===Z)return $.shift();let H=new Uint8Array(Z),J=0;for(let Y=0;Y<Z;Y++)if(H[Y]=$[0][J++],J===$[0].length)$.shift(),J=0;if($.length&&J<$[0].length)$[0]=$[0].slice(J);return H}function L8($,Z){if(!w5)w5=new TextDecoder;let H=[],J=0,Y=-1,Q=!1;return new TransformStream({transform(X,O){H.push(X);while(!0){if(J===0){if(C0(H)<1)break;let G=g0(H,1);if(Q=(G[0]&128)===128,Y=G[0]&127,Y<126)J=3;else if(Y===126)J=1;else J=2}else if(J===1){if(C0(H)<2)break;let G=g0(H,2);Y=new DataView(G.buffer,G.byteOffset,G.length).getUint16(0),J=3}else if(J===2){if(C0(H)<8)break;let G=g0(H,8),z=new DataView(G.buffer,G.byteOffset,G.length),W=z.getUint32(0);if(W>Math.pow(2,21)-1){O.enqueue(e1);break}Y=W*Math.pow(2,32)+z.getUint32(4),J=3}else{if(C0(H)<Y)break;let G=g0(H,Y);O.enqueue(H0(Q?G:w5.decode(G),Z)),J=0}if(Y===0||Y>$){O.enqueue(e1);break}}}})}var x5=4;function j($){if($)return OZ($)}function OZ($){for(var Z in j.prototype)$[Z]=j.prototype[Z];return $}j.prototype.on=j.prototype.addEventListener=function($,Z){return this._callbacks=this._callbacks||{},(this._callbacks["$"+$]=this._callbacks["$"+$]||[]).push(Z),this};j.prototype.once=function($,Z){function H(){this.off($,H),Z.apply(this,arguments)}return H.fn=Z,this.on($,H),this};j.prototype.off=j.prototype.removeListener=j.prototype.removeAllListeners=j.prototype.removeEventListener=function($,Z){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var H=this._callbacks["$"+$];if(!H)return this;if(arguments.length==1)return delete this._callbacks["$"+$],this;var J;for(var Y=0;Y<H.length;Y++)if(J=H[Y],J===Z||J.fn===Z){H.splice(Y,1);break}if(H.length===0)delete this._callbacks["$"+$];return this};j.prototype.emit=function($){this._callbacks=this._callbacks||{};var Z=Array(arguments.length-1),H=this._callbacks["$"+$];for(var J=1;J<arguments.length;J++)Z[J-1]=arguments[J];if(H){H=H.slice(0);for(var J=0,Y=H.length;J<Y;++J)H[J].apply(this,Z)}return this};j.prototype.emitReserved=j.prototype.emit;j.prototype.listeners=function($){return this._callbacks=this._callbacks||{},this._callbacks["$"+$]||[]};j.prototype.hasListeners=function($){return!!this.listeners($).length};var O1=(()=>{if(typeof Promise==="function"&&typeof Promise.resolve==="function")return(Z)=>Promise.resolve().then(Z);else return(Z,H)=>H(Z,0)})(),p=(()=>{if(typeof self<"u")return self;else if(typeof window<"u")return window;else return Function("return this")()})(),B8="arraybuffer";function K8(){}function j0($,...Z){return Z.reduce((H,J)=>{if($.hasOwnProperty(J))H[J]=$[J];return H},{})}var zZ=p.setTimeout,WZ=p.clearTimeout;function z1($,Z){if(Z.useNativeTimers)$.setTimeoutFn=zZ.bind(p),$.clearTimeoutFn=WZ.bind(p);else $.setTimeoutFn=p.setTimeout.bind(p),$.clearTimeoutFn=p.clearTimeout.bind(p)}var UZ=1.33;function q8($){if(typeof $==="string")return fZ($);return Math.ceil(($.byteLength||$.size)*UZ)}function fZ($){let Z=0,H=0;for(let J=0,Y=$.length;J<Y;J++)if(Z=$.charCodeAt(J),Z<128)H+=1;else if(Z<2048)H+=2;else if(Z<55296||Z>=57344)H+=3;else J++,H+=4;return H}function h0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function M8($){let Z="";for(let H in $)if($.hasOwnProperty(H)){if(Z.length)Z+="&";Z+=encodeURIComponent(H)+"="+encodeURIComponent($[H])}return Z}function I8($){let Z={},H=$.split("&");for(let J=0,Y=H.length;J<Y;J++){let Q=H[J].split("=");Z[decodeURIComponent(Q[0])]=decodeURIComponent(Q[1])}return Z}class E5 extends Error{constructor($,Z,H){super($);this.description=Z,this.context=H,this.type="TransportError"}}class B1 extends j{constructor($){super();this.writable=!1,z1(this,$),this.opts=$,this.query=$.query,this.socket=$.socket,this.supportsBinary=!$.forceBase64}onError($,Z,H){return super.emitReserved("error",new E5($,Z,H)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){if(this.readyState==="opening"||this.readyState==="open")this.doClose(),this.onClose();return this}send($){if(this.readyState==="open")this.write($)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData($){let Z=H0($,this.socket.binaryType);this.onPacket(Z)}onPacket($){super.emitReserved("packet",$)}onClose($){this.readyState="closed",super.emitReserved("close",$)}pause($){}createUri($,Z={}){return $+"://"+this._hostname()+this._port()+this.opts.path+this._query(Z)}_hostname(){let $=this.opts.hostname;return $.indexOf(":")===-1?$:"["+$+"]"}_port(){if(this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80))return":"+this.opts.port;else return""}_query($){let Z=M8($);return Z.length?"?"+Z:""}}class _0 extends B1{constructor(){super(...arguments);this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause($){this.readyState="pausing";let Z=()=>{this.readyState="paused",$()};if(this._polling||!this.writable){let H=0;if(this._polling)H++,this.once("pollComplete",function(){--H||Z()});if(!this.writable)H++,this.once("drain",function(){--H||Z()})}else Z()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData($){let Z=(H)=>{if(this.readyState==="opening"&&H.type==="open")this.onOpen();if(H.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(H)};if(f8($,this.socket.binaryType).forEach(Z),this.readyState!=="closed"){if(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open")this._poll()}}doClose(){let $=()=>{this.write([{type:"close"}])};if(this.readyState==="open")$();else this.once("open",$)}write($){this.writable=!1,U8($,(Z)=>{this.doWrite(Z,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let $=this.opts.secure?"https":"http",Z=this.query||{};if(this.opts.timestampRequests!==!1)Z[this.opts.timestampParam]=h0();if(!this.supportsBinary&&!Z.sid)Z.b64=1;return this.createUri($,Z)}}var A8=!1;try{A8=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch($){}var V8=A8;function FZ(){}class R8 extends _0{constructor($){super($);if(typeof location<"u"){let Z=location.protocol==="https:",H=location.port;if(!H)H=Z?"443":"80";this.xd=typeof location<"u"&&$.hostname!==location.hostname||H!==$.port}}doWrite($,Z){let H=this.request({method:"POST",data:$});H.on("success",Z),H.on("error",(J,Y)=>{this.onError("xhr post error",J,Y)})}doPoll(){let $=this.request();$.on("data",this.onData.bind(this)),$.on("error",(Z,H)=>{this.onError("xhr poll error",Z,H)}),this.pollXhr=$}}class Y1 extends j{constructor($,Z,H){super();this.createRequest=$,z1(this,H),this._opts=H,this._method=H.method||"GET",this._uri=Z,this._data=H.data!==void 0?H.data:null,this._create()}_create(){var $;let Z=j0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");Z.xdomain=!!this._opts.xd;let H=this._xhr=this.createRequest(Z);try{H.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){H.setDisableHeaderCheck&&H.setDisableHeaderCheck(!0);for(let J in this._opts.extraHeaders)if(this._opts.extraHeaders.hasOwnProperty(J))H.setRequestHeader(J,this._opts.extraHeaders[J])}}catch(J){}if(this._method==="POST")try{H.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(J){}try{H.setRequestHeader("Accept","*/*")}catch(J){}if(($=this._opts.cookieJar)===null||$===void 0||$.addCookies(H),"withCredentials"in H)H.withCredentials=this._opts.withCredentials;if(this._opts.requestTimeout)H.timeout=this._opts.requestTimeout;H.onreadystatechange=()=>{var J;if(H.readyState===3)(J=this._opts.cookieJar)===null||J===void 0||J.parseCookies(H.getResponseHeader("set-cookie"));if(H.readyState!==4)return;if(H.status===200||H.status===1223)this._onLoad();else this.setTimeoutFn(()=>{this._onError(typeof H.status==="number"?H.status:0)},0)},H.send(this._data)}catch(J){this.setTimeoutFn(()=>{this._onError(J)},0);return}if(typeof document<"u")this._index=Y1.requestsCount++,Y1.requests[this._index]=this}_onError($){this.emitReserved("error",$,this._xhr),this._cleanup(!0)}_cleanup($){if(typeof this._xhr>"u"||this._xhr===null)return;if(this._xhr.onreadystatechange=FZ,$)try{this._xhr.abort()}catch(Z){}if(typeof document<"u")delete Y1.requests[this._index];this._xhr=null}_onLoad(){let $=this._xhr.responseText;if($!==null)this.emitReserved("data",$),this.emitReserved("success"),this._cleanup()}abort(){this._cleanup()}}Y1.requestsCount=0;Y1.requests={};if(typeof document<"u"){if(typeof attachEvent==="function")attachEvent("onunload",D8);else if(typeof addEventListener==="function"){let $="onpagehide"in p?"pagehide":"unload";addEventListener($,D8,!1)}}function D8(){for(let $ in Y1.requests)if(Y1.requests.hasOwnProperty($))Y1.requests[$].abort()}var LZ=function(){let $=N8({xdomain:!1});return $&&$.responseType!==null}();class R1 extends R8{constructor($){super($);let Z=$&&$.forceBase64;this.supportsBinary=LZ&&!Z}request($={}){return Object.assign($,{xd:this.xd},this.opts),new Y1(N8,this.uri(),$)}}function N8($){let Z=$.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!Z||V8))return new XMLHttpRequest}catch(H){}if(!Z)try{return new p[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(H){}}var P8=typeof navigator<"u"&&typeof navigator.product==="string"&&navigator.product.toLowerCase()==="reactnative";class T8 extends B1{get name(){return"websocket"}doOpen(){let $=this.uri(),Z=this.opts.protocols,H=P8?{}:j0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");if(this.opts.extraHeaders)H.headers=this.opts.extraHeaders;try{this.ws=this.createSocket($,Z,H)}catch(J){return this.emitReserved("error",J)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{if(this.opts.autoUnref)this.ws._socket.unref();this.onOpen()},this.ws.onclose=($)=>this.onClose({description:"websocket connection closed",context:$}),this.ws.onmessage=($)=>this.onData($.data),this.ws.onerror=($)=>this.onError("websocket error",$)}write($){this.writable=!1;for(let Z=0;Z<$.length;Z++){let H=$[Z],J=Z===$.length-1;$0(H,this.supportsBinary,(Y)=>{try{this.doWrite(H,Y)}catch(Q){}if(J)O1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){if(typeof this.ws<"u")this.ws.onerror=()=>{},this.ws.close(),this.ws=null}uri(){let $=this.opts.secure?"wss":"ws",Z=this.query||{};if(this.opts.timestampRequests)Z[this.opts.timestampParam]=h0();if(!this.supportsBinary)Z.b64=1;return this.createUri($,Z)}}var S5=p.WebSocket||p.MozWebSocket;class N1 extends T8{createSocket($,Z,H){return!P8?Z?new S5($,Z):new S5($):new S5($,Z,H)}doWrite($,Z){this.ws.send(Z)}}class J0 extends B1{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch($){return this.emitReserved("error",$)}this._transport.closed.then(()=>{this.onClose()}).catch(($)=>{this.onError("webtransport error",$)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(($)=>{let Z=L8(Number.MAX_SAFE_INTEGER,this.socket.binaryType),H=$.readable.pipeThrough(Z).getReader(),J=F8();J.readable.pipeTo($.writable),this._writer=J.writable.getWriter();let Y=()=>{H.read().then(({done:X,value:O})=>{if(X)return;this.onPacket(O),Y()}).catch((X)=>{})};Y();let Q={type:"open"};if(this.query.sid)Q.data=`{"sid":"${this.query.sid}"}`;this._writer.write(Q).then(()=>this.onOpen())})})}write($){this.writable=!1;for(let Z=0;Z<$.length;Z++){let H=$[Z],J=Z===$.length-1;this._writer.write(H).then(()=>{if(J)O1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var $;($=this._transport)===null||$===void 0||$.close()}}var v5={websocket:N1,webtransport:J0,polling:R1};var BZ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,KZ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function _1($){if($.length>8000)throw"URI too long";let Z=$,H=$.indexOf("["),J=$.indexOf("]");if(H!=-1&&J!=-1)$=$.substring(0,H)+$.substring(H,J).replace(/:/g,";")+$.substring(J,$.length);let Y=BZ.exec($||""),Q={},X=14;while(X--)Q[KZ[X]]=Y[X]||"";if(H!=-1&&J!=-1)Q.source=Z,Q.host=Q.host.substring(1,Q.host.length-1).replace(/;/g,":"),Q.authority=Q.authority.replace("[","").replace("]","").replace(/;/g,":"),Q.ipv6uri=!0;return Q.pathNames=qZ(Q,Q.path),Q.queryKey=MZ(Q,Q.query),Q}function qZ($,Z){let H=/\/{2,9}/g,J=Z.replace(H,"/").split("/");if(Z.slice(0,1)=="/"||Z.length===0)J.splice(0,1);if(Z.slice(-1)=="/")J.splice(J.length-1,1);return J}function MZ($,Z){let H={};return Z.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(J,Y,Q){if(Y)H[Y]=Q}),H}var C5=typeof addEventListener==="function"&&typeof removeEventListener==="function",k0=[];if(C5)addEventListener("offline",()=>{k0.forEach(($)=>$())},!1);class W1 extends j{constructor($,Z){super();if(this.binaryType=B8,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,$&&typeof $==="object")Z=$,$=null;if($){let H=_1($);if(Z.hostname=H.host,Z.secure=H.protocol==="https"||H.protocol==="wss",Z.port=H.port,H.query)Z.query=H.query}else if(Z.host)Z.hostname=_1(Z.host).host;if(z1(this,Z),this.secure=Z.secure!=null?Z.secure:typeof location<"u"&&location.protocol==="https:",Z.hostname&&!Z.port)Z.port=this.secure?"443":"80";if(this.hostname=Z.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=Z.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},Z.transports.forEach((H)=>{let J=H.prototype.name;this.transports.push(J),this._transportsByName[J]=H}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},Z),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query==="string")this.opts.query=I8(this.opts.query);if(C5){if(this.opts.closeOnBeforeunload)this._beforeunloadEventListener=()=>{if(this.transport)this.transport.removeAllListeners(),this.transport.close()},addEventListener("beforeunload",this._beforeunloadEventListener,!1);if(this.hostname!=="localhost")this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},k0.push(this._offlineEventListener)}if(this.opts.withCredentials)this._cookieJar=K8();this._open()}createTransport($){let Z=Object.assign({},this.opts.query);if(Z.EIO=x5,Z.transport=$,this.id)Z.sid=this.id;let H=Object.assign({},this.opts,{query:Z,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[$]);return new this._transportsByName[$](H)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let $=this.opts.rememberUpgrade&&W1.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let Z=this.createTransport($);Z.open(),this.setTransport(Z)}setTransport($){if(this.transport)this.transport.removeAllListeners();this.transport=$,$.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",(Z)=>this._onClose("transport close",Z))}onOpen(){this.readyState="open",W1.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket($){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",$),this.emitReserved("heartbeat"),$.type){case"open":this.onHandshake(JSON.parse($.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let Z=Error("server error");Z.code=$.data,this._onError(Z);break;case"message":this.emitReserved("data",$.data),this.emitReserved("message",$.data);break}}onHandshake($){if(this.emitReserved("handshake",$),this.id=$.sid,this.transport.query.sid=$.sid,this._pingInterval=$.pingInterval,this._pingTimeout=$.pingTimeout,this._maxPayload=$.maxPayload,this.onOpen(),this.readyState==="closed")return;this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let $=this._pingInterval+this._pingTimeout;if(this._pingTimeoutTime=Date.now()+$,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},$),this.opts.autoUnref)this._pingTimeoutTimer.unref()}_onDrain(){if(this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0)this.emitReserved("drain");else this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let $=this._getWritablePackets();this.transport.send($),this._prevBufferLen=$.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let Z=1;for(let H=0;H<this.writeBuffer.length;H++){let J=this.writeBuffer[H].data;if(J)Z+=q8(J);if(H>0&&Z>this._maxPayload)return this.writeBuffer.slice(0,H);Z+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let $=Date.now()>this._pingTimeoutTime;if($)this._pingTimeoutTime=0,O1(()=>{this._onClose("ping timeout")},this.setTimeoutFn);return $}write($,Z,H){return this._sendPacket("message",$,Z,H),this}send($,Z,H){return this._sendPacket("message",$,Z,H),this}_sendPacket($,Z,H,J){if(typeof Z==="function")J=Z,Z=void 0;if(typeof H==="function")J=H,H=null;if(this.readyState==="closing"||this.readyState==="closed")return;H=H||{},H.compress=H.compress!==!1;let Y={type:$,data:Z,options:H};if(this.emitReserved("packetCreate",Y),this.writeBuffer.push(Y),J)this.once("flush",J);this.flush()}close(){let $=()=>{this._onClose("forced close"),this.transport.close()},Z=()=>{this.off("upgrade",Z),this.off("upgradeError",Z),$()},H=()=>{this.once("upgrade",Z),this.once("upgradeError",Z)};if(this.readyState==="opening"||this.readyState==="open")if(this.readyState="closing",this.writeBuffer.length)this.once("drain",()=>{if(this.upgrading)H();else $()});else if(this.upgrading)H();else $();return this}_onError($){if(W1.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",$),this._onClose("transport error",$)}_onClose($,Z){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),C5){if(this._beforeunloadEventListener)removeEventListener("beforeunload",this._beforeunloadEventListener,!1);if(this._offlineEventListener){let H=k0.indexOf(this._offlineEventListener);if(H!==-1)k0.splice(H,1)}}this.readyState="closed",this.id=null,this.emitReserved("close",$,Z),this.writeBuffer=[],this._prevBufferLen=0}}}W1.protocol=x5;class g5 extends W1{constructor(){super(...arguments);this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let $=0;$<this._upgrades.length;$++)this._probe(this._upgrades[$])}_probe($){let Z=this.createTransport($),H=!1;W1.priorWebsocketSuccess=!1;let J=()=>{if(H)return;Z.send([{type:"ping",data:"probe"}]),Z.once("packet",(W)=>{if(H)return;if(W.type==="pong"&&W.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",Z),!Z)return;W1.priorWebsocketSuccess=Z.name==="websocket",this.transport.pause(()=>{if(H)return;if(this.readyState==="closed")return;z(),this.setTransport(Z),Z.send([{type:"upgrade"}]),this.emitReserved("upgrade",Z),Z=null,this.upgrading=!1,this.flush()})}else{let f=Error("probe error");f.transport=Z.name,this.emitReserved("upgradeError",f)}})};function Y(){if(H)return;H=!0,z(),Z.close(),Z=null}let Q=(W)=>{let f=Error("probe error: "+W);f.transport=Z.name,Y(),this.emitReserved("upgradeError",f)};function X(){Q("transport closed")}function O(){Q("socket closed")}function G(W){if(Z&&W.name!==Z.name)Y()}let z=()=>{Z.removeListener("open",J),Z.removeListener("error",Q),Z.removeListener("close",X),this.off("close",O),this.off("upgrading",G)};if(Z.once("open",J),Z.once("error",Q),Z.once("close",X),this.once("close",O),this.once("upgrading",G),this._upgrades.indexOf("webtransport")!==-1&&$!=="webtransport")this.setTimeoutFn(()=>{if(!H)Z.open()},200);else Z.open()}onHandshake($){this._upgrades=this._filterUpgrades($.upgrades),super.onHandshake($)}_filterUpgrades($){let Z=[];for(let H=0;H<$.length;H++)if(~this.transports.indexOf($[H]))Z.push($[H]);return Z}}class Y0 extends g5{constructor($,Z={}){let H=typeof $==="object"?$:Z;if(!H.transports||H.transports&&typeof H.transports[0]==="string")H.transports=(H.transports||["polling","websocket","webtransport"]).map((J)=>v5[J]).filter((J)=>!!J);super($,H)}}var YU=Y0.protocol;function w8($,Z="",H){let J=$;if(H=H||typeof location<"u"&&location,$==null)$=H.protocol+"//"+H.host;if(typeof $==="string"){if($.charAt(0)==="/")if($.charAt(1)==="/")$=H.protocol+$;else $=H.host+$;if(!/^(https?|wss?):\/\//.test($))if(typeof H<"u")$=H.protocol+"//"+$;else $="https://"+$;J=_1($)}if(!J.port){if(/^(http|ws)$/.test(J.protocol))J.port="80";else if(/^(http|ws)s$/.test(J.protocol))J.port="443"}J.path=J.path||"/";let Q=J.host.indexOf(":")!==-1?"["+J.host+"]":J.host;return J.id=J.protocol+"://"+Q+":"+J.port+Z,J.href=J.protocol+"://"+Q+(H&&H.port===J.port?"":":"+J.port),J}var k5={};h3(k5,{protocol:()=>C8,isPacketValid:()=>xZ,PacketType:()=>P,Encoder:()=>g8,Decoder:()=>_5});var AZ=typeof ArrayBuffer==="function",VZ=($)=>{return typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView($):$.buffer instanceof ArrayBuffer},x8=Object.prototype.toString,DZ=typeof Blob==="function"||typeof Blob<"u"&&x8.call(Blob)==="[object BlobConstructor]",RZ=typeof File==="function"||typeof File<"u"&&x8.call(File)==="[object FileConstructor]";function X0($){return AZ&&($ instanceof ArrayBuffer||VZ($))||DZ&&$ instanceof Blob||RZ&&$ instanceof File}function Q0($,Z){if(!$||typeof $!=="object")return!1;if(Array.isArray($)){for(let H=0,J=$.length;H<J;H++)if(Q0($[H]))return!0;return!1}if(X0($))return!0;if($.toJSON&&typeof $.toJSON==="function"&&arguments.length===1)return Q0($.toJSON(),!0);for(let H in $)if(Object.prototype.hasOwnProperty.call($,H)&&Q0($[H]))return!0;return!1}function E8($){let Z=[],H=$.data,J=$;return J.data=j5(H,Z),J.attachments=Z.length,{packet:J,buffers:Z}}function j5($,Z){if(!$)return $;if(X0($)){let H={_placeholder:!0,num:Z.length};return Z.push($),H}else if(Array.isArray($)){let H=Array($.length);for(let J=0;J<$.length;J++)H[J]=j5($[J],Z);return H}else if(typeof $==="object"&&!($ instanceof Date)){let H={};for(let J in $)if(Object.prototype.hasOwnProperty.call($,J))H[J]=j5($[J],Z);return H}return $}function S8($,Z){return $.data=h5($.data,Z),delete $.attachments,$}function h5($,Z){if(!$)return $;if($&&$._placeholder===!0)if(typeof $.num==="number"&&$.num>=0&&$.num<Z.length)return Z[$.num];else throw Error("illegal attachments");else if(Array.isArray($))for(let H=0;H<$.length;H++)$[H]=h5($[H],Z);else if(typeof $==="object"){for(let H in $)if(Object.prototype.hasOwnProperty.call($,H))$[H]=h5($[H],Z)}return $}var v8=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],C8=5,P;(function($){$[$.CONNECT=0]="CONNECT",$[$.DISCONNECT=1]="DISCONNECT",$[$.EVENT=2]="EVENT",$[$.ACK=3]="ACK",$[$.CONNECT_ERROR=4]="CONNECT_ERROR",$[$.BINARY_EVENT=5]="BINARY_EVENT",$[$.BINARY_ACK=6]="BINARY_ACK"})(P||(P={}));class g8{constructor($){this.replacer=$}encode($){if($.type===P.EVENT||$.type===P.ACK){if(Q0($))return this.encodeAsBinary({type:$.type===P.EVENT?P.BINARY_EVENT:P.BINARY_ACK,nsp:$.nsp,data:$.data,id:$.id})}return[this.encodeAsString($)]}encodeAsString($){let Z=""+$.type;if($.type===P.BINARY_EVENT||$.type===P.BINARY_ACK)Z+=$.attachments+"-";if($.nsp&&$.nsp!=="/")Z+=$.nsp+",";if($.id!=null)Z+=$.id;if($.data!=null)Z+=JSON.stringify($.data,this.replacer);return Z}encodeAsBinary($){let Z=E8($),H=this.encodeAsString(Z.packet),J=Z.buffers;return J.unshift(H),J}}class _5 extends j{constructor($){super();this.reviver=$}add($){let Z;if(typeof $==="string"){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");Z=this.decodeString($);let H=Z.type===P.BINARY_EVENT;if(H||Z.type===P.BINARY_ACK){if(Z.type=H?P.EVENT:P.ACK,this.reconstructor=new j8(Z),Z.attachments===0)super.emitReserved("decoded",Z)}else super.emitReserved("decoded",Z)}else if(X0($)||$.base64){if(!this.reconstructor)throw Error("got binary data when not reconstructing a packet");else if(Z=this.reconstructor.takeBinaryData($),Z)this.reconstructor=null,super.emitReserved("decoded",Z)}else throw Error("Unknown type: "+$)}decodeString($){let Z=0,H={type:Number($.charAt(0))};if(P[H.type]===void 0)throw Error("unknown packet type "+H.type);if(H.type===P.BINARY_EVENT||H.type===P.BINARY_ACK){let Y=Z+1;while($.charAt(++Z)!=="-"&&Z!=$.length);let Q=$.substring(Y,Z);if(Q!=Number(Q)||$.charAt(Z)!=="-")throw Error("Illegal attachments");H.attachments=Number(Q)}if($.charAt(Z+1)==="/"){let Y=Z+1;while(++Z){if($.charAt(Z)===",")break;if(Z===$.length)break}H.nsp=$.substring(Y,Z)}else H.nsp="/";let J=$.charAt(Z+1);if(J!==""&&Number(J)==J){let Y=Z+1;while(++Z){let Q=$.charAt(Z);if(Q==null||Number(Q)!=Q){--Z;break}if(Z===$.length)break}H.id=Number($.substring(Y,Z+1))}if($.charAt(++Z)){let Y=this.tryParse($.substr(Z));if(_5.isPayloadValid(H.type,Y))H.data=Y;else throw Error("invalid payload")}return H}tryParse($){try{return JSON.parse($,this.reviver)}catch(Z){return!1}}static isPayloadValid($,Z){switch($){case P.CONNECT:return b0(Z);case P.DISCONNECT:return Z===void 0;case P.CONNECT_ERROR:return typeof Z==="string"||b0(Z);case P.EVENT:case P.BINARY_EVENT:return Array.isArray(Z)&&(typeof Z[0]==="number"||typeof Z[0]==="string"&&v8.indexOf(Z[0])===-1);case P.ACK:case P.BINARY_ACK:return Array.isArray(Z)}}destroy(){if(this.reconstructor)this.reconstructor.finishedReconstruction(),this.reconstructor=null}}class j8{constructor($){this.packet=$,this.buffers=[],this.reconPack=$}takeBinaryData($){if(this.buffers.push($),this.buffers.length===this.reconPack.attachments){let Z=S8(this.reconPack,this.buffers);return this.finishedReconstruction(),Z}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function NZ($){return typeof $==="string"}var PZ=Number.isInteger||function($){return typeof $==="number"&&isFinite($)&&Math.floor($)===$};function TZ($){return $===void 0||PZ($)}function b0($){return Object.prototype.toString.call($)==="[object Object]"}function wZ($,Z){switch($){case P.CONNECT:return Z===void 0||b0(Z);case P.DISCONNECT:return Z===void 0;case P.EVENT:return Array.isArray(Z)&&(typeof Z[0]==="number"||typeof Z[0]==="string"&&v8.indexOf(Z[0])===-1);case P.ACK:return Array.isArray(Z);case P.CONNECT_ERROR:return typeof Z==="string"||b0(Z);default:return!1}}function xZ($){return NZ($.nsp)&&TZ($.id)&&wZ($.type,$.data)}function s($,Z,H){return $.on(Z,H),function(){$.off(Z,H)}}var EZ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class G0 extends j{constructor($,Z,H){super();if(this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=$,this.nsp=Z,H&&H.auth)this.auth=H.auth;if(this._opts=Object.assign({},H),this.io._autoConnect)this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let $=this.io;this.subs=[s($,"open",this.onopen.bind(this)),s($,"packet",this.onpacket.bind(this)),s($,"error",this.onerror.bind(this)),s($,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){if(this.connected)return this;if(this.subEvents(),!this.io._reconnecting)this.io.open();if(this.io._readyState==="open")this.onopen();return this}open(){return this.connect()}send(...$){return $.unshift("message"),this.emit.apply(this,$),this}emit($,...Z){var H,J,Y;if(EZ.hasOwnProperty($))throw Error('"'+$.toString()+'" is a reserved event name');if(Z.unshift($),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(Z),this;let Q={type:P.EVENT,data:Z};if(Q.options={},Q.options.compress=this.flags.compress!==!1,typeof Z[Z.length-1]==="function"){let z=this.ids++,W=Z.pop();this._registerAckCallback(z,W),Q.id=z}let X=(J=(H=this.io.engine)===null||H===void 0?void 0:H.transport)===null||J===void 0?void 0:J.writable,O=this.connected&&!((Y=this.io.engine)===null||Y===void 0?void 0:Y._hasPingExpired());if(this.flags.volatile&&!X);else if(O)this.notifyOutgoingListeners(Q),this.packet(Q);else this.sendBuffer.push(Q);return this.flags={},this}_registerAckCallback($,Z){var H;let J=(H=this.flags.timeout)!==null&&H!==void 0?H:this._opts.ackTimeout;if(J===void 0){this.acks[$]=Z;return}let Y=this.io.setTimeoutFn(()=>{delete this.acks[$];for(let X=0;X<this.sendBuffer.length;X++)if(this.sendBuffer[X].id===$)this.sendBuffer.splice(X,1);Z.call(this,Error("operation has timed out"))},J),Q=(...X)=>{this.io.clearTimeoutFn(Y),Z.apply(this,X)};Q.withError=!0,this.acks[$]=Q}emitWithAck($,...Z){return new Promise((H,J)=>{let Y=(Q,X)=>{return Q?J(Q):H(X)};Y.withError=!0,Z.push(Y),this.emit($,...Z)})}_addToQueue($){let Z;if(typeof $[$.length-1]==="function")Z=$.pop();let H={id:this._queueSeq++,tryCount:0,pending:!1,args:$,flags:Object.assign({fromQueue:!0},this.flags)};$.push((J,...Y)=>{if(H!==this._queue[0]);if(J!==null){if(H.tryCount>this._opts.retries){if(this._queue.shift(),Z)Z(J)}}else if(this._queue.shift(),Z)Z(null,...Y);return H.pending=!1,this._drainQueue()}),this._queue.push(H),this._drainQueue()}_drainQueue($=!1){if(!this.connected||this._queue.length===0)return;let Z=this._queue[0];if(Z.pending&&!$)return;Z.pending=!0,Z.tryCount++,this.flags=Z.flags,this.emit.apply(this,Z.args)}packet($){$.nsp=this.nsp,this.io._packet($)}onopen(){if(typeof this.auth=="function")this.auth(($)=>{this._sendConnectPacket($)});else this._sendConnectPacket(this.auth)}_sendConnectPacket($){this.packet({type:P.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},$):$})}onerror($){if(!this.connected)this.emitReserved("connect_error",$)}onclose($,Z){this.connected=!1,delete this.id,this.emitReserved("disconnect",$,Z),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(($)=>{if(!this.sendBuffer.some((H)=>String(H.id)===$)){let H=this.acks[$];if(delete this.acks[$],H.withError)H.call(this,Error("socket has been disconnected"))}})}onpacket($){if($.nsp!==this.nsp)return;switch($.type){case P.CONNECT:if($.data&&$.data.sid)this.onconnect($.data.sid,$.data.pid);else this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case P.EVENT:case P.BINARY_EVENT:this.onevent($);break;case P.ACK:case P.BINARY_ACK:this.onack($);break;case P.DISCONNECT:this.ondisconnect();break;case P.CONNECT_ERROR:this.destroy();let H=Error($.data.message);H.data=$.data.data,this.emitReserved("connect_error",H);break}}onevent($){let Z=$.data||[];if($.id!=null)Z.push(this.ack($.id));if(this.connected)this.emitEvent(Z);else this.receiveBuffer.push(Object.freeze(Z))}emitEvent($){if(this._anyListeners&&this._anyListeners.length){let Z=this._anyListeners.slice();for(let H of Z)H.apply(this,$)}if(super.emit.apply(this,$),this._pid&&$.length&&typeof $[$.length-1]==="string")this._lastOffset=$[$.length-1]}ack($){let Z=this,H=!1;return function(...J){if(H)return;H=!0,Z.packet({type:P.ACK,id:$,data:J})}}onack($){let Z=this.acks[$.id];if(typeof Z!=="function")return;if(delete this.acks[$.id],Z.withError)$.data.unshift(null);Z.apply(this,$.data)}onconnect($,Z){this.id=$,this.recovered=Z&&this._pid===Z,this._pid=Z,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(($)=>this.emitEvent($)),this.receiveBuffer=[],this.sendBuffer.forEach(($)=>{this.notifyOutgoingListeners($),this.packet($)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){if(this.subs)this.subs.forEach(($)=>$()),this.subs=void 0;this.io._destroy(this)}disconnect(){if(this.connected)this.packet({type:P.DISCONNECT});if(this.destroy(),this.connected)this.onclose("io client disconnect");return this}close(){return this.disconnect()}compress($){return this.flags.compress=$,this}get volatile(){return this.flags.volatile=!0,this}timeout($){return this.flags.timeout=$,this}onAny($){return this._anyListeners=this._anyListeners||[],this._anyListeners.push($),this}prependAny($){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift($),this}offAny($){if(!this._anyListeners)return this;if($){let Z=this._anyListeners;for(let H=0;H<Z.length;H++)if($===Z[H])return Z.splice(H,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing($){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push($),this}prependAnyOutgoing($){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift($),this}offAnyOutgoing($){if(!this._anyOutgoingListeners)return this;if($){let Z=this._anyOutgoingListeners;for(let H=0;H<Z.length;H++)if($===Z[H])return Z.splice(H,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners($){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let Z=this._anyOutgoingListeners.slice();for(let H of Z)H.apply(this,$.data)}}}function P1($){$=$||{},this.ms=$.min||100,this.max=$.max||1e4,this.factor=$.factor||2,this.jitter=$.jitter>0&&$.jitter<=1?$.jitter:0,this.attempts=0}P1.prototype.duration=function(){var $=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var Z=Math.random(),H=Math.floor(Z*this.jitter*$);$=(Math.floor(Z*10)&1)==0?$-H:$+H}return Math.min($,this.max)|0};P1.prototype.reset=function(){this.attempts=0};P1.prototype.setMin=function($){this.ms=$};P1.prototype.setMax=function($){this.max=$};P1.prototype.setJitter=function($){this.jitter=$};class O0 extends j{constructor($,Z){var H;super();if(this.nsps={},this.subs=[],$&&typeof $==="object")Z=$,$=void 0;Z=Z||{},Z.path=Z.path||"/socket.io",this.opts=Z,z1(this,Z),this.reconnection(Z.reconnection!==!1),this.reconnectionAttempts(Z.reconnectionAttempts||1/0),this.reconnectionDelay(Z.reconnectionDelay||1000),this.reconnectionDelayMax(Z.reconnectionDelayMax||5000),this.randomizationFactor((H=Z.randomizationFactor)!==null&&H!==void 0?H:0.5),this.backoff=new P1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(Z.timeout==null?20000:Z.timeout),this._readyState="closed",this.uri=$;let J=Z.parser||k5;if(this.encoder=new J.Encoder,this.decoder=new J.Decoder,this._autoConnect=Z.autoConnect!==!1,this._autoConnect)this.open()}reconnection($){if(!arguments.length)return this._reconnection;if(this._reconnection=!!$,!$)this.skipReconnect=!0;return this}reconnectionAttempts($){if($===void 0)return this._reconnectionAttempts;return this._reconnectionAttempts=$,this}reconnectionDelay($){var Z;if($===void 0)return this._reconnectionDelay;return this._reconnectionDelay=$,(Z=this.backoff)===null||Z===void 0||Z.setMin($),this}randomizationFactor($){var Z;if($===void 0)return this._randomizationFactor;return this._randomizationFactor=$,(Z=this.backoff)===null||Z===void 0||Z.setJitter($),this}reconnectionDelayMax($){var Z;if($===void 0)return this._reconnectionDelayMax;return this._reconnectionDelayMax=$,(Z=this.backoff)===null||Z===void 0||Z.setMax($),this}timeout($){if(!arguments.length)return this._timeout;return this._timeout=$,this}maybeReconnectOnOpen(){if(!this._reconnecting&&this._reconnection&&this.backoff.attempts===0)this.reconnect()}open($){if(~this._readyState.indexOf("open"))return this;this.engine=new Y0(this.uri,this.opts);let Z=this.engine,H=this;this._readyState="opening",this.skipReconnect=!1;let J=s(Z,"open",function(){H.onopen(),$&&$()}),Y=(X)=>{if(this.cleanup(),this._readyState="closed",this.emitReserved("error",X),$)$(X);else this.maybeReconnectOnOpen()},Q=s(Z,"error",Y);if(this._timeout!==!1){let X=this._timeout,O=this.setTimeoutFn(()=>{J(),Y(Error("timeout")),Z.close()},X);if(this.opts.autoUnref)O.unref();this.subs.push(()=>{this.clearTimeoutFn(O)})}return this.subs.push(J),this.subs.push(Q),this}connect($){return this.open($)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let $=this.engine;this.subs.push(s($,"ping",this.onping.bind(this)),s($,"data",this.ondata.bind(this)),s($,"error",this.onerror.bind(this)),s($,"close",this.onclose.bind(this)),s(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata($){try{this.decoder.add($)}catch(Z){this.onclose("parse error",Z)}}ondecoded($){O1(()=>{this.emitReserved("packet",$)},this.setTimeoutFn)}onerror($){this.emitReserved("error",$)}socket($,Z){let H=this.nsps[$];if(!H)H=new G0(this,$,Z),this.nsps[$]=H;else if(this._autoConnect&&!H.active)H.connect();return H}_destroy($){let Z=Object.keys(this.nsps);for(let H of Z)if(this.nsps[H].active)return;this._close()}_packet($){let Z=this.encoder.encode($);for(let H=0;H<Z.length;H++)this.engine.write(Z[H],$.options)}cleanup(){this.subs.forEach(($)=>$()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose($,Z){var H;if(this.cleanup(),(H=this.engine)===null||H===void 0||H.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",$,Z),this._reconnection&&!this.skipReconnect)this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let $=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let Z=this.backoff.duration();this._reconnecting=!0;let H=this.setTimeoutFn(()=>{if($.skipReconnect)return;if(this.emitReserved("reconnect_attempt",$.backoff.attempts),$.skipReconnect)return;$.open((J)=>{if(J)$._reconnecting=!1,$.reconnect(),this.emitReserved("reconnect_error",J);else $.onreconnect()})},Z);if(this.opts.autoUnref)H.unref();this.subs.push(()=>{this.clearTimeoutFn(H)})}}onreconnect(){let $=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",$)}}var z0={};function y0($,Z){if(typeof $==="object")Z=$,$=void 0;Z=Z||{};let H=w8($,Z.path||"/socket.io"),J=H.source,Y=H.id,Q=H.path,X=z0[Y]&&Q in z0[Y].nsps,O=Z.forceNew||Z["force new connection"]||Z.multiplex===!1||X,G;if(O)G=new O0(J,Z);else{if(!z0[Y])z0[Y]=new O0(J,Z);G=z0[Y]}if(H.query&&!Z.query)Z.query=H.queryKey;return G.socket(H.path,Z)}Object.assign(y0,{Manager:O0,Socket:G0,io:y0,connect:y0});import{createContext as SZ}from"react";var vZ=SZ(null),h8=vZ;function b5($){return{all:$=$||new Map,on:function(Z,H){var J=$.get(Z);J?J.push(H):$.set(Z,[H])},off:function(Z,H){var J=$.get(Z);J&&(H?J.splice(J.indexOf(H)>>>0,1):$.set(Z,[]))},emit:function(Z,H){var J=$.get(Z);J&&J.slice().map(function(Y){Y(H)}),(J=$.get("*"))&&J.slice().map(function(Y){Y(Z,H)})}}}import{createContext as CZ}from"react";var gZ=b5(),jZ=CZ(gZ),_8=jZ;var hZ=({card:$,data:Z,children:H,useSocketioSupport:J=!1,useCentrifugeSupport:Y=!1,useMittSupport:Q=!1,centrifugeChannel:X=void 0,methods:O=void 0})=>{let G=j1();if(G)console.log("[PieCard] Rendering card:",$),console.log("[PieCard] Card data:",Z),console.log("[PieCard] Component name:",Z?.name),console.log("[PieCard] Real-time support:",{socketio:J,centrifuge:Y,mitt:Q,centrifugeChannel:X}),console.log("[PieCard] Methods:",O?Object.keys(O):"none"),console.log("[PieCard] Has children:",!!H);let z=y5(h8),W=y5(Z8),f=y5(_8);if(m5(()=>{if(!z||!J||!O||!Z.name){if(G&&J)console.log("[PieCard] Socket.IO setup skipped:",{hasSocket:!!z,useSocketioSupport:J,hasMethods:!!O,hasDataName:!!Z?.name});return}return Object.entries(O).forEach(([L,B])=>{let F=`pie${L}_${Z.name}`;if(G)console.log(`[PieCard] Socket.IO registering event: ${F}`);z.on(F,B)}),()=>{Object.entries(O).forEach(([L,B])=>{let F=`pie${L}_${Z.name}`;if(G)console.log(`[PieCard] Socket.IO unregistering event: ${F}`);z.off(F,B)})}},[z,O,Z.name]),m5(()=>{if(!W||!Y||!X||!O||!Z.name){if(G&&Y)console.log("[PieCard] Centrifuge setup skipped:",{hasCentrifuge:!!W,useCentrifugeSupport:Y,hasCentrifugeChannel:!!X,hasMethods:!!O,hasDataName:!!Z?.name});return}let L=Object.entries(O).map(([B,F])=>{let K=`pie${B}_${Z.name}_${X}`;if(G)console.log(`[PieCard] Centrifuge subscribing to channel: ${K}`);let q=W.newSubscription(K);return q.on("publication",(x)=>{if(G)console.log(`[PieCard] Centrifuge received data on ${K}:`,x.data);F(x.data)}),q.subscribe(),q});return()=>{L.forEach((B)=>{if(G)console.log("[PieCard] Centrifuge unsubscribing from channel");B.unsubscribe(),W.removeSubscription(B)})}},[W,X,O,Z.name]),m5(()=>{if(!f||!Q||!O||!Z.name){if(G&&Q)console.log("[PieCard] Mitt setup skipped:",{hasMitt:!!f,useMittSupport:Q,hasMethods:!!O,hasDataName:!!Z?.name});return}return Object.entries(O).forEach(([L,B])=>{let F=`pie${L}_${Z.name}`;if(G)console.log(`[PieCard] Mitt registering event: ${F}`);f.on(F,B)}),()=>{Object.entries(O).forEach(([L,B])=>{let F=`pie${L}_${Z.name}`;if(G)console.log(`[PieCard] Mitt unregistering event: ${F}`);f.off(F,B)})}},[f,O,Z.name]),G)console.log("[PieCard] Rendering complete, returning children");return H},U1=hZ;var _Z=new Map;var k8=($)=>{return _Z.get($)};import{Suspense as uZ,useContext as dZ}from"react";import{createContext as kZ}from"react";import{jsx as mZ,Fragment as yZ}from"react/jsx-runtime";var bZ=kZ(mZ(yZ,{})),b8=bZ;import{jsx as y8}from"react/jsx-runtime";function cZ({uiConfig:$,setUiAjaxConfiguration:Z}){let H=dZ(b8),J=j1();if(J)console.log("[UI] Rendering component:",$.card),console.log("[UI] Component data:",$.data),console.log("[UI] Component content:",$.content),console.log("[UI] Has setUiAjaxConfiguration:",!!Z);let Y=k8($.card);if(!Y?.component){if(J)console.warn(`[UI] Component not found in registry: ${$.card}`),console.log("[UI] Returning fallback component");return H}if(J)console.log("[UI] Found component in registry:",{name:Y.name,isLazy:Y.isLazy,hasMetadata:!!Y.metadata});let Q=Y.component,X=y8(Q,{data:$.data,content:$.content,setUiAjaxConfiguration:Z});if(Y.isLazy){if(J)console.log("[UI] Rendering lazy component with Suspense:",Y.name);return y8(uZ,{fallback:Y.fallback??H,children:X},`${Y.name}`)}if(J)console.log("[UI] Rendering component directly:",Y.name);return X}var T1=cZ;function u5($=1000){return new Promise((Z)=>{if(typeof window>"u"){Z();return}let H=()=>{if(typeof window.sid<"u")Z();else setTimeout(H,$)};H()})}var m0=($,Z={},H=[],J)=>{let Y=j1();if(Y)console.log("Registering AJAX: ",J,Z,H);if(!J||!$){if(Y)console.warn("Registration FAILED: pathname or setUiAjaxConfiguration is missing!");return()=>{}}return async(Q={})=>{if(typeof window>"u"||typeof document>"u"){if(Y)console.warn("getAjaxSubmit called on server, skipping DOM-dependent logic");return}if(H.includes("sid"))await u5();let X=new FormData;for(let[G,z]of Object.entries({...Z,...Q}))X.append(G,z);for(let G of H)if(G==="sid"){if(!window.sid)throw Error("SocketIO isn't initialized properly");X.append("sid",window.sid)}else{let z=document.getElementsByName(G);if(!z.length){if(Y)console.warn(`No input found with name ${G}`);continue}let W=z[0];if(W instanceof HTMLInputElement)if(W.type==="file"&&W.files)Array.from(W.files).forEach((f)=>X.append(G,f));else X.append(G,W.value);else if(W instanceof HTMLTextAreaElement)X.append(G,W.value)}let O=h2()+"api/ajax_content"+J;return $(null),await fetch(O,{method:"POST",body:X}).then(async(G)=>{let W=(G.headers.get("content-type")||"").includes("application/json");if(!!G.body?.getReader&&!W){let L=G.body.getReader(),B=new TextDecoder,F="";while(!0){let{done:K,value:q}=await L.read();if(K)break;F+=B.decode(q,{stream:!0});let x=F.split(`
|
|
27
|
+
`);F=x.pop()??"";for(let N of x){let R=N.trim();if(!R)continue;try{let M=JSON.parse(R);$([M])}catch(M){if(Y)console.warn("Failed to parse streamed line:",R)}}}if(F.trim())try{let K=JSON.parse(F);$([K])}catch(K){if(Y)console.warn("Failed to parse final streamed line:",F)}return{}}else{let L=await G.json();return $(L),L}}).catch((G)=>{if(Y)console.error("AJAX request failed:",G);return $(null),G})}};import{forwardRef as WH,useEffect as J9,useImperativeHandle as UH,useRef as fH,useState as l0}from"react";import{useRef as lZ,useState as iZ}from"react";import{jsx as pZ}from"react/jsx-runtime";function d5($){let[Z,H]=iZ(!1),J=lZ(null);return pZ("textarea",{ref:J,...$,onKeyUp:()=>{H(!1)},onKeyDown:(O)=>{if(O.key==="Enter"&&O.shiftKey){if(H(!0),J.current&&typeof window<"u"){let G=window.getComputedStyle(J.current),z=parseFloat(G.lineHeight);J.current.style.height=J.current.scrollHeight+z+"px"}}if(O.key==="Backspace"){if(H(!0),J.current&&typeof window<"u"){let G=window.getComputedStyle(J.current),z=parseFloat(G.lineHeight);if(J.current.scrollHeight>z)J.current.style.height=J.current.scrollHeight-z+"px"}}$.onKeyDown&&$.onKeyDown(O)},onBlur:(O)=>{H(!1),$.onBlur&&$.onBlur(O)},style:{resize:Z?"vertical":"none",overflowY:"auto",...$.style}})}var K1=S(u8(),1);import{useRef as aZ,useCallback as oZ}from"react";import{jsx as d8}from"react/jsx-runtime";var nZ=()=>d8("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:d8("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})}),c8=nZ;import{jsx as c5}from"react/jsx-runtime";var rZ=({type:$="button",onClick:Z,icons:H})=>{let J=aZ(null),Y=oZ(()=>{let X=J.current;if(X)X.style.transform="scale(0.8)",setTimeout(()=>{X.style.transform="scale(1)"},600)},[]);return c5("button",{ref:J,type:$,onClick:(X)=>{if(Z)Z(X);Y()},className:"mr-1.5 rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",style:{transition:"transform 300ms ease"},children:H.sendIcon?c5("img",{src:H.sendIcon,alt:""}):c5(c8,{})})},l8=rZ;import{jsx as i8}from"react/jsx-runtime";var sZ=()=>i8("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:i8("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.375 12.739l-7.693 7.693a4.5 4.5 0 01-6.364-6.364l10.94-10.94A3 3 0 1119.5 7.372L8.552 18.32m.009-.01l-.01.01m5.699-9.941l-7.81 7.81a1.5 1.5 0 002.112 2.13"})}),p8=sZ;import{jsx as u0,jsxs as eZ}from"react/jsx-runtime";var tZ=({name:$,accept:Z,fileInputRef:H,onSelectFile:J,icons:Y})=>{return eZ("button",{className:"rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",type:"button",onClick:()=>{if(H.current)H.current.click()},children:[u0("input",{id:$+"__pie__file",name:$+"__pie__file",className:"hidden",type:"file",accept:Z,ref:H,onChange:(Q)=>{if(Q.target.files)J(Q.target.files[0])}}),u0("label",{htmlFor:$+"__pie__file"}),Y.attachFileIcon?u0("img",{src:Y.attachFileIcon,alt:""}):u0(p8,{})]})},n8=tZ;import{jsx as a8}from"react/jsx-runtime";var $H=()=>a8("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5 text-gray-500",children:a8("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),o8=$H;import{jsx as r8}from"react/jsx-runtime";var ZH=()=>r8("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:r8("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),d0=ZH;import{jsx as U0,jsxs as JH}from"react/jsx-runtime";var HH=({name:$,selectedFile:Z,onDropFile:H})=>{return JH("div",{className:"flex w-full cursor-default flex-row items-center gap-2",children:[U0(o8,{}),U0("span",{className:"flex-1",children:Z.name}),U0("input",{type:"hidden",name:$,value:""}),U0("button",{className:"rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",type:"button",onClick:H,children:U0(d0,{})})]})},s8=HH;import{jsx as t8,jsxs as QH}from"react/jsx-runtime";var YH=()=>QH("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:[t8("path",{d:"M8 5C8 2.79086 9.79086 1 12 1C14.2091 1 16 2.79086 16 5V12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12V5Z"}),t8("path",{d:"M6.25 11.8438V12C6.25 13.525 6.8558 14.9875 7.93414 16.0659C9.01247 17.1442 10.475 17.75 12 17.75C13.525 17.75 14.9875 17.1442 16.0659 16.0659C17.1442 14.9875 17.75 13.525 17.75 12V11.8438C17.75 11.2915 18.1977 10.8438 18.75 10.8438H19.25C19.8023 10.8438 20.25 11.2915 20.25 11.8437V12C20.25 14.188 19.3808 16.2865 17.8336 17.8336C16.5842 19.0831 14.9753 19.8903 13.25 20.1548V22C13.25 22.5523 12.8023 23 12.25 23H11.75C11.1977 23 10.75 22.5523 10.75 22V20.1548C9.02471 19.8903 7.41579 19.0831 6.16637 17.8336C4.61919 16.2865 3.75 14.188 3.75 12V11.8438C3.75 11.2915 4.19772 10.8438 4.75 10.8438H5.25C5.80228 10.8438 6.25 11.2915 6.25 11.8438Z"})]}),e8=YH;import{jsx as f0}from"react/jsx-runtime";var XH=({isListening:$,toggleListening:Z,icons:H})=>{return f0("button",{className:"rounded-md p-1 text-gray-500 ring-0 hover:bg-gray-100 disabled:opacity-40 disabled:hover:bg-transparent",type:"button",onClick:Z,children:$?H.cancelIcon?f0("img",{src:H.cancelIcon,alt:""}):f0(d0,{}):H.voiceRecordingIcon?f0("img",{src:H.voiceRecordingIcon,alt:""}):f0(e8,{})})},$9=XH;import{jsx as Z9,jsxs as OH}from"react/jsx-runtime";var GH=({option:$,onClickOption:Z})=>{return OH("div",{className:"flex w-fit cursor-pointer flex-row place-content-center items-center gap-1 rounded-md border border-black bg-white px-2 py-1 text-black",onClick:()=>{Z($.title)},style:$.sx,children:[$.iconPosition==="start"&&Z9("img",{src:$.iconUrl,alt:""}),$.title,$.iconPosition==="end"&&Z9("img",{src:$.iconUrl,alt:""})]})},c0=GH;import{jsx as H9}from"react/jsx-runtime";var zH=({options:$,handleOptionClick:Z})=>{return H9("div",{className:"flex w-full flex-row flex-wrap justify-start gap-[5px]",children:$.map((H,J)=>{return H9(c0,{option:H,onClickOption:Z},J)})})},l5=zH;import{jsx as f1,jsxs as Y9}from"react/jsx-runtime";var FH=WH(({name:$,defaultValue:Z,defaultOptions:H,isArea:J,placeholder:Y,fileAccept:Q,optionsPosition:X,icons:O,handleOptionClick:G,handleSendMessage:z,sx:W},f)=>{let L=fH(null),[B,F]=l0(null),[K,q]=l0(Z),[x,N]=l0(H),[R,M]=l0(!1);UH(f,()=>({clear:()=>{if(q(""),F(null),L.current)L.current.value=""},setValue:(g)=>q(g),setOptions:(g)=>N(g)})),J9(()=>{q(Z)},[Z]),J9(()=>{if(K1.default)return K1.default.addCallback("result",(g)=>{q(g[0])}),()=>{K1.default.abort(),K1.default.removeCallback()}},[]);let E=()=>{if(!K1.default)return;if(R)K1.default.abort(),M(!1),z();else K1.default.start({autoRestart:!0,continuous:!0}),q(""),M(!0)};return Y9("div",{className:"flex flex-col items-center gap-[0.1rem]",id:$+"_chat_input",style:W,children:[x&&X==="top"&&f1(l5,{options:x,handleOptionClick:G}),f1("div",{className:"stretch relative flex size-full flex-1 flex-row items-stretch gap-3 last:mb-2 md:mx-4 md:flex-col md:last:mb-6 lg:mx-auto",children:Y9("div",{className:"flex w-full grow flex-row items-center rounded-md bg-transparent",children:[B?f1(s8,{name:$,selectedFile:B,onDropFile:()=>{if(F(null),L.current)L.current.value=""}}):!J?f1("input",{name:$,value:K,onChange:(g)=>q(g.target.value),onKeyDown:(g)=>{if(g.key==="Enter")g.preventDefault(),z()},tabIndex:0,placeholder:Y,className:"m-0 w-full resize-none border-0 bg-transparent outline-none",style:{maxHeight:200,height:"100%",overflowY:"hidden"}}):f1(d5,{name:$,value:K,onChange:(g)=>q(g.target.value),onKeyDown:(g)=>{if(g.key==="Enter"&&!g.shiftKey)g.preventDefault(),z()},tabIndex:0,rows:2,placeholder:Y,className:"m-0 w-full resize-none border-0 bg-transparent p-0 pl-2 pr-7 outline-none md:pl-0",style:{maxHeight:200,height:"100%",minHeight:24}}),f1($9,{isListening:R,toggleListening:E,icons:O}),f1(n8,{name:$,fileInputRef:L,accept:Q,onSelectFile:F,icons:O}),f1(l8,{onClick:z,icons:O})]})}),x&&X==="bottom"&&f1(l5,{options:x,handleOptionClick:G})]})}),Q9=FH;var U6=S(W6(),1),x1=S(W6(),1),t0=U6.default.default||U6.default;import{useState as LY,useEffect as BY}from"react";import{useEffect as OY,useState as zY}from"react";import{jsx as UY}from"react/jsx-runtime";function WY({children:$}){let[Z,H]=zY($);return OY(()=>{H($)},[$]),UY("div",{className:"max-w-full first:mt-0",children:Z})}var f7=WY;import{jsx as F7}from"react/jsx-runtime";var fY=()=>F7("svg",{width:"30",height:"30",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:F7("path",{d:"m 8 1 c -1.65625 0 -3 1.34375 -3 3 s 1.34375 3 3 3 s 3 -1.34375 3 -3 s -1.34375 -3 -3 -3 z m -1.5 7 c -2.492188 0 -4.5 2.007812 -4.5 4.5 v 0.5 c 0 1.109375 0.890625 2 2 2 h 8 c 1.109375 0 2 -0.890625 2 -2 v -0.5 c 0 -2.492188 -2.007812 -4.5 -4.5 -4.5 z m 0 0",fill:"#2e3436"})}),L7=fY;import{jsx as e0}from"react/jsx-runtime";function FY({username:$,avatar:Z}){return e0("div",{className:"w-[30px]",children:e0("div",{className:"relative flex size-[30px] items-center justify-center rounded-sm p-1 text-white",children:Z?e0("img",{src:Z,className:"absolute inset-0 rounded",alt:$}):e0(L7,{})})})}var f6=FY;import{jsx as X1,jsxs as B7}from"react/jsx-runtime";var KY=({message:$,handleOptionClick:Z,setUiAjaxConfiguration:H})=>{let[J,Y]=LY(!1);return BY(()=>{let Q=setTimeout(()=>{if(J)Y(!1)},1000);return()=>clearTimeout(Q)},[J]),X1("div",{className:"group w-full border-b border-black/10",id:$.id,children:B7("div",{className:`flex gap-4 p-4 text-base md:max-w-2xl md:gap-6 md:py-6 lg:max-w-3xl xl:max-w-5xl ${$.align==="center"?"m-auto":""} ${$.align==="right"?"ml-auto justify-end":""} ${$.align==="left"?"mr-auto":""} `,children:[($.align==="left"||$.align==="center")&&X1("div",{className:"relative flex shrink-0 flex-col items-end",children:X1(f6,{username:$.username,avatar:$.avatar})}),B7("div",{className:"relative flex w-[calc(100%-50px)] flex-col gap-1 md:gap-3 lg:w-[calc(100%-115px)]",children:[X1("div",{className:`markdown light prose w-full break-words dark:prose-invert first:mt-0 ${$.align==="right"?"flex justify-end self-end":""}`,children:typeof $.content==="string"?$.parseMode.toLowerCase()==="markdown"?X1(f7,{children:$.content},Date.now()+Math.random()):$.parseMode.toLowerCase()==="html"?t0($.content):$.content:X1(T1,{uiConfig:$.content,setUiAjaxConfiguration:H})}),X1("div",{className:"flex flex-row flex-wrap justify-start gap-1",children:$.options.map((Q,X)=>X1(c0,{onClickOption:Z,option:Q},X))})]}),$.align==="right"&&X1("div",{className:"relative flex shrink-0 flex-col items-end",children:X1(f6,{username:$.username,avatar:$.avatar})})]})})},K7=KY;import{forwardRef as qY,useEffect as MY,useImperativeHandle as IY,useRef as AY,useState as VY}from"react";import{jsx as q7}from"react/jsx-runtime";var DY=qY(({name:$,handleOptionClick:Z,defaultMessages:H,sx:J,setUiAjaxConfiguration:Y},Q)=>{let[X,O]=VY(H),G=AY(null),z=()=>{if(G.current)G.current.scrollTop=G.current.scrollHeight};return MY(()=>{z()},[X]),IY(Q,()=>({setMessages:(W)=>O(W),addMessage:(W)=>O((f)=>[...f,W]),scrollToBottom:z})),q7("div",{id:$+"_messages",className:"flex flex-col items-center overflow-y-scroll",style:J,ref:G,children:X.map((W)=>q7(K7,{message:W,handleOptionClick:Z,setUiAjaxConfiguration:Y},W.id))})}),M7=DY;import{useEffect as RY,useMemo as NY,useRef as I7,useState as PY}from"react";import{jsx as F6,jsxs as wY}from"react/jsx-runtime";var TY=({data:$,setUiAjaxConfiguration:Z})=>{let{name:H,defaultValue:J,defaultMessages:Y,defaultOptions:Q,isArea:X,fileAccept:O,placeholder:G,icons:z,optionsPosition:W,sxMap:f={container:{},chatInput:{},messages:{}},depsNames:L,pathname:B,kwargs:F,useSocketioSupport:K,useCentrifugeSupport:q,centrifugeChannel:x}=$,N=I7(null),R=I7(null),[M,E]=PY(!1),g=NY(()=>m0(Z,F,L,B),[Z,F,L,B]);RY(()=>{if(M)requestAnimationFrame(()=>{g(),E(!1)})},[M]);let F1=(_)=>{if(N.current)N.current.setValue(_),E(!0)},g1=()=>{if(N.current)N.current.clear()},V=(_)=>{if(N.current)N.current.setOptions(_.options)},w=(_)=>{if(R.current)R.current.addMessage(_.message)},D=(_)=>{if(R.current)R.current.setMessages(_.messages)},v=()=>{E(!0)};return F6(U1,{card:"ChatCard",data:$,methods:{clearInput:g1,setOptions:V,addMessage:w,setMessages:D},useSocketioSupport:K,useCentrifugeSupport:q,centrifugeChannel:x,children:wY("div",{className:"flex size-full flex-col",style:f.container,children:[F6(M7,{ref:R,name:H,defaultMessages:Y,sx:f.messages,handleOptionClick:F1,setUiAjaxConfiguration:Z}),F6(Q9,{ref:N,name:H,isArea:X,defaultOptions:Q,placeholder:G,defaultValue:J,fileAccept:O,sx:f.chatInput,handleSendMessage:v,handleOptionClick:F1,optionsPosition:W,icons:z})]})})},A7=TY;import{useMemo as cz}from"react";var B5=S(L6(),1),K3=S(q6(),1);import B3,{useState as Wz,useContext as X3,useRef as Uz,useEffect as G3,forwardRef as fz}from"react";var eY={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function A0($,Z){var H=!eY[$]&&typeof Z==="number"&&Z!==0;return H?Z+"px":Z}function V0($,Z){return Object.keys($).reduce(function(H,J){return H[J]=Z($[J],J),H},{})}function M6($){return V0($,function(Z,H){return A0(H,$[H])+" !important"})}var $Q=/([a-z])?([A-Z])/g,ZQ=function(Z,H,J){return(H||"")+"-"+J.toLowerCase()},I6=function(Z){return Z.replace($Q,ZQ)},HQ=function(Z){return Object.keys(Z).reduce(function(H,J){var Y=I6(J);if(/^ms-/.test(Y))Y="-".concat(Y);return H[Y]=Z[J],H},{})},k7=HQ;var y4=S(n7(),1),m4=S(Q$(),1),u4=S(C6(),1);var y$=S(O$(),1),m$=S(W$(),1),u$=S(f$(),1),d$=S(L$(),1),c$=S(q$(),1),l$=S(A$(),1),i$=S(R$(),1),p$=S(T$(),1),n$=S(x$(),1),a$=S(S$(),1),o$=S(C$(),1),r$=S(b$(),1),A=["Webkit"],r6=["Moz"],k=["ms"],l=["Webkit","Moz"],m=["Webkit","ms"],D0=["Webkit","Moz","ms"],s$={plugins:[y$.default,m$.default,u$.default,d$.default,c$.default,l$.default,i$.default,p$.default,n$.default,a$.default,o$.default,r$.default],prefixMap:{transform:m,transformOrigin:m,transformOriginX:m,transformOriginY:m,backfaceVisibility:A,perspective:A,perspectiveOrigin:A,transformStyle:A,transformOriginZ:A,animation:A,animationDelay:A,animationDirection:A,animationFillMode:A,animationDuration:A,animationIterationCount:A,animationName:A,animationPlayState:A,animationTimingFunction:A,appearance:l,userSelect:D0,fontKerning:A,textEmphasisPosition:A,textEmphasis:A,textEmphasisStyle:A,textEmphasisColor:A,boxDecorationBreak:A,clipPath:A,maskImage:A,maskMode:A,maskRepeat:A,maskPosition:A,maskClip:A,maskOrigin:A,maskSize:A,maskComposite:A,mask:A,maskBorderSource:A,maskBorderMode:A,maskBorderSlice:A,maskBorderWidth:A,maskBorderOutset:A,maskBorderRepeat:A,maskBorder:A,maskType:A,textDecorationStyle:l,textDecorationSkip:l,textDecorationLine:l,textDecorationColor:l,filter:A,fontFeatureSettings:l,breakAfter:D0,breakBefore:D0,breakInside:D0,columnCount:l,columnFill:l,columnGap:l,columnRule:l,columnRuleColor:l,columnRuleStyle:l,columnRuleWidth:l,columns:l,columnSpan:l,columnWidth:l,writingMode:m,flex:m,flexBasis:A,flexDirection:m,flexGrow:A,flexFlow:m,flexShrink:A,flexWrap:m,alignContent:A,alignItems:A,alignSelf:A,justifyContent:A,order:A,transitionDelay:A,transitionDuration:A,transitionProperty:A,transitionTimingFunction:A,backdropFilter:A,scrollSnapType:m,scrollSnapPointsX:m,scrollSnapPointsY:m,scrollSnapDestination:m,scrollSnapCoordinate:m,shapeImageThreshold:A,shapeImageMargin:A,shapeImageOutside:A,hyphens:D0,flowInto:m,flowFrom:m,regionFragment:m,boxSizing:r6,textAlignLast:r6,tabSize:r6,wrapFlow:k,wrapThrough:k,wrapMargin:k,touchAction:k,gridTemplateColumns:k,gridTemplateRows:k,gridTemplateAreas:k,gridTemplate:k,gridAutoColumns:k,gridAutoRows:k,gridAutoFlow:k,grid:k,gridRowStart:k,gridColumnStart:k,gridRowEnd:k,gridRow:k,gridColumn:k,gridColumnEnd:k,gridColumnGap:k,gridRowGap:k,gridArea:k,gridGap:k,textSizeAdjust:m,borderImage:A,borderImageOutset:A,borderImageRepeat:A,borderImageSlice:A,borderImageSource:A,borderImageWidth:A}};var P4=S($4(),1),T4=S(H4(),1),w4=S(Q4(),1),x4=S(G4(),1),E4=S(z4(),1),S4=S(U4(),1),v4=S(F4(),1),C4=S(K4(),1),g4=S(M4(),1),j4=S(A4(),1),h4=S(D4(),1),_4=S(N4(),1),k4={plugins:[P4.default,T4.default,w4.default,x4.default,E4.default,S4.default,v4.default,C4.default,g4.default,j4.default,h4.default,_4.default],prefixMap:{chrome:{transform:35,transformOrigin:35,transformOriginX:35,transformOriginY:35,backfaceVisibility:35,perspective:35,perspectiveOrigin:35,transformStyle:35,transformOriginZ:35,animation:42,animationDelay:42,animationDirection:42,animationFillMode:42,animationDuration:42,animationIterationCount:42,animationName:42,animationPlayState:42,animationTimingFunction:42,appearance:66,userSelect:53,fontKerning:32,textEmphasisPosition:66,textEmphasis:66,textEmphasisStyle:66,textEmphasisColor:66,boxDecorationBreak:66,clipPath:54,maskImage:66,maskMode:66,maskRepeat:66,maskPosition:66,maskClip:66,maskOrigin:66,maskSize:66,maskComposite:66,mask:66,maskBorderSource:66,maskBorderMode:66,maskBorderSlice:66,maskBorderWidth:66,maskBorderOutset:66,maskBorderRepeat:66,maskBorder:66,maskType:66,textDecorationStyle:56,textDecorationSkip:56,textDecorationLine:56,textDecorationColor:56,filter:52,fontFeatureSettings:47,breakAfter:49,breakBefore:49,breakInside:49,columnCount:49,columnFill:49,columnGap:49,columnRule:49,columnRuleColor:49,columnRuleStyle:49,columnRuleWidth:49,columns:49,columnSpan:49,columnWidth:49,writingMode:47},safari:{flex:8,flexBasis:8,flexDirection:8,flexGrow:8,flexFlow:8,flexShrink:8,flexWrap:8,alignContent:8,alignItems:8,alignSelf:8,justifyContent:8,order:8,transition:6,transitionDelay:6,transitionDuration:6,transitionProperty:6,transitionTimingFunction:6,transform:8,transformOrigin:8,transformOriginX:8,transformOriginY:8,backfaceVisibility:8,perspective:8,perspectiveOrigin:8,transformStyle:8,transformOriginZ:8,animation:8,animationDelay:8,animationDirection:8,animationFillMode:8,animationDuration:8,animationIterationCount:8,animationName:8,animationPlayState:8,animationTimingFunction:8,appearance:11,userSelect:11,backdropFilter:11,fontKerning:9,scrollSnapType:10.1,scrollSnapPointsX:10.1,scrollSnapPointsY:10.1,scrollSnapDestination:10.1,scrollSnapCoordinate:10.1,textEmphasisPosition:7,textEmphasis:7,textEmphasisStyle:7,textEmphasisColor:7,boxDecorationBreak:11,clipPath:11,maskImage:11,maskMode:11,maskRepeat:11,maskPosition:11,maskClip:11,maskOrigin:11,maskSize:11,maskComposite:11,mask:11,maskBorderSource:11,maskBorderMode:11,maskBorderSlice:11,maskBorderWidth:11,maskBorderOutset:11,maskBorderRepeat:11,maskBorder:11,maskType:11,textDecorationStyle:11,textDecorationSkip:11,textDecorationLine:11,textDecorationColor:11,shapeImageThreshold:10,shapeImageMargin:10,shapeImageOutside:10,filter:9,hyphens:11,flowInto:11,flowFrom:11,breakBefore:8,breakAfter:8,breakInside:8,regionFragment:11,columnCount:8,columnFill:8,columnGap:8,columnRule:8,columnRuleColor:8,columnRuleStyle:8,columnRuleWidth:8,columns:8,columnSpan:8,columnWidth:8,writingMode:10.1},firefox:{appearance:60,userSelect:60,boxSizing:28,textAlignLast:48,textDecorationStyle:35,textDecorationSkip:35,textDecorationLine:35,textDecorationColor:35,tabSize:60,hyphens:42,fontFeatureSettings:33,breakAfter:51,breakBefore:51,breakInside:51,columnCount:51,columnFill:51,columnGap:51,columnRule:51,columnRuleColor:51,columnRuleStyle:51,columnRuleWidth:51,columns:51,columnSpan:51,columnWidth:51},opera:{flex:16,flexBasis:16,flexDirection:16,flexGrow:16,flexFlow:16,flexShrink:16,flexWrap:16,alignContent:16,alignItems:16,alignSelf:16,justifyContent:16,order:16,transform:22,transformOrigin:22,transformOriginX:22,transformOriginY:22,backfaceVisibility:22,perspective:22,perspectiveOrigin:22,transformStyle:22,transformOriginZ:22,animation:29,animationDelay:29,animationDirection:29,animationFillMode:29,animationDuration:29,animationIterationCount:29,animationName:29,animationPlayState:29,animationTimingFunction:29,appearance:50,userSelect:40,fontKerning:19,textEmphasisPosition:50,textEmphasis:50,textEmphasisStyle:50,textEmphasisColor:50,boxDecorationBreak:50,clipPath:41,maskImage:50,maskMode:50,maskRepeat:50,maskPosition:50,maskClip:50,maskOrigin:50,maskSize:50,maskComposite:50,mask:50,maskBorderSource:50,maskBorderMode:50,maskBorderSlice:50,maskBorderWidth:50,maskBorderOutset:50,maskBorderRepeat:50,maskBorder:50,maskType:50,textDecorationStyle:43,textDecorationSkip:43,textDecorationLine:43,textDecorationColor:43,filter:39,fontFeatureSettings:34,breakAfter:36,breakBefore:36,breakInside:36,columnCount:36,columnFill:36,columnGap:36,columnRule:36,columnRuleColor:36,columnRuleStyle:36,columnRuleWidth:36,columns:36,columnSpan:36,columnWidth:36,writingMode:34},ie:{flex:10,flexDirection:10,flexFlow:10,flexWrap:10,transform:9,transformOrigin:9,transformOriginX:9,transformOriginY:9,userSelect:11,wrapFlow:11,wrapThrough:11,wrapMargin:11,scrollSnapType:11,scrollSnapPointsX:11,scrollSnapPointsY:11,scrollSnapDestination:11,scrollSnapCoordinate:11,touchAction:10,hyphens:11,flowInto:11,flowFrom:11,breakBefore:11,breakAfter:11,breakInside:11,regionFragment:11,gridTemplateColumns:11,gridTemplateRows:11,gridTemplateAreas:11,gridTemplate:11,gridAutoColumns:11,gridAutoRows:11,gridAutoFlow:11,grid:11,gridRowStart:11,gridColumnStart:11,gridRowEnd:11,gridRow:11,gridColumn:11,gridColumnEnd:11,gridColumnGap:11,gridRowGap:11,gridArea:11,gridGap:11,textSizeAdjust:11,writingMode:11},edge:{userSelect:17,wrapFlow:17,wrapThrough:17,wrapMargin:17,scrollSnapType:17,scrollSnapPointsX:17,scrollSnapPointsY:17,scrollSnapDestination:17,scrollSnapCoordinate:17,hyphens:17,flowInto:17,flowFrom:17,breakBefore:17,breakAfter:17,breakInside:17,regionFragment:17,gridTemplateColumns:15,gridTemplateRows:15,gridTemplateAreas:15,gridTemplate:15,gridAutoColumns:15,gridAutoRows:15,gridAutoFlow:15,grid:15,gridRowStart:15,gridColumnStart:15,gridRowEnd:15,gridRow:15,gridColumn:15,gridColumnEnd:15,gridColumnGap:15,gridRowGap:15,gridArea:15,gridGap:15},ios_saf:{flex:8.1,flexBasis:8.1,flexDirection:8.1,flexGrow:8.1,flexFlow:8.1,flexShrink:8.1,flexWrap:8.1,alignContent:8.1,alignItems:8.1,alignSelf:8.1,justifyContent:8.1,order:8.1,transition:6,transitionDelay:6,transitionDuration:6,transitionProperty:6,transitionTimingFunction:6,transform:8.1,transformOrigin:8.1,transformOriginX:8.1,transformOriginY:8.1,backfaceVisibility:8.1,perspective:8.1,perspectiveOrigin:8.1,transformStyle:8.1,transformOriginZ:8.1,animation:8.1,animationDelay:8.1,animationDirection:8.1,animationFillMode:8.1,animationDuration:8.1,animationIterationCount:8.1,animationName:8.1,animationPlayState:8.1,animationTimingFunction:8.1,appearance:11,userSelect:11,backdropFilter:11,fontKerning:11,scrollSnapType:10.3,scrollSnapPointsX:10.3,scrollSnapPointsY:10.3,scrollSnapDestination:10.3,scrollSnapCoordinate:10.3,boxDecorationBreak:11,clipPath:11,maskImage:11,maskMode:11,maskRepeat:11,maskPosition:11,maskClip:11,maskOrigin:11,maskSize:11,maskComposite:11,mask:11,maskBorderSource:11,maskBorderMode:11,maskBorderSlice:11,maskBorderWidth:11,maskBorderOutset:11,maskBorderRepeat:11,maskBorder:11,maskType:11,textSizeAdjust:11,textDecorationStyle:11,textDecorationSkip:11,textDecorationLine:11,textDecorationColor:11,shapeImageThreshold:10,shapeImageMargin:10,shapeImageOutside:10,filter:9,hyphens:11,flowInto:11,flowFrom:11,breakBefore:8.1,breakAfter:8.1,breakInside:8.1,regionFragment:11,columnCount:8.1,columnFill:8.1,columnGap:8.1,columnRule:8.1,columnRuleColor:8.1,columnRuleStyle:8.1,columnRuleWidth:8.1,columns:8.1,columnSpan:8.1,columnWidth:8.1,writingMode:10.3},android:{borderImage:4.2,borderImageOutset:4.2,borderImageRepeat:4.2,borderImageSlice:4.2,borderImageSource:4.2,borderImageWidth:4.2,flex:4.2,flexBasis:4.2,flexDirection:4.2,flexGrow:4.2,flexFlow:4.2,flexShrink:4.2,flexWrap:4.2,alignContent:4.2,alignItems:4.2,alignSelf:4.2,justifyContent:4.2,order:4.2,transition:4.2,transitionDelay:4.2,transitionDuration:4.2,transitionProperty:4.2,transitionTimingFunction:4.2,transform:4.4,transformOrigin:4.4,transformOriginX:4.4,transformOriginY:4.4,backfaceVisibility:4.4,perspective:4.4,perspectiveOrigin:4.4,transformStyle:4.4,transformOriginZ:4.4,animation:4.4,animationDelay:4.4,animationDirection:4.4,animationFillMode:4.4,animationDuration:4.4,animationIterationCount:4.4,animationName:4.4,animationPlayState:4.4,animationTimingFunction:4.4,appearance:62,userSelect:4.4,fontKerning:4.4,textEmphasisPosition:62,textEmphasis:62,textEmphasisStyle:62,textEmphasisColor:62,boxDecorationBreak:62,clipPath:4.4,maskImage:62,maskMode:62,maskRepeat:62,maskPosition:62,maskClip:62,maskOrigin:62,maskSize:62,maskComposite:62,mask:62,maskBorderSource:62,maskBorderMode:62,maskBorderSlice:62,maskBorderWidth:62,maskBorderOutset:62,maskBorderRepeat:62,maskBorder:62,maskType:62,filter:4.4,fontFeatureSettings:4.4,breakAfter:4.4,breakBefore:4.4,breakInside:4.4,columnCount:4.4,columnFill:4.4,columnGap:4.4,columnRule:4.4,columnRuleColor:4.4,columnRuleStyle:4.4,columnRuleWidth:4.4,columns:4.4,columnSpan:4.4,columnWidth:4.4,writingMode:4.4},and_chr:{appearance:62,textEmphasisPosition:62,textEmphasis:62,textEmphasisStyle:62,textEmphasisColor:62,boxDecorationBreak:62,maskImage:62,maskMode:62,maskRepeat:62,maskPosition:62,maskClip:62,maskOrigin:62,maskSize:62,maskComposite:62,mask:62,maskBorderSource:62,maskBorderMode:62,maskBorderSlice:62,maskBorderWidth:62,maskBorderOutset:62,maskBorderRepeat:62,maskBorder:62,maskType:62},and_uc:{flex:11.4,flexBasis:11.4,flexDirection:11.4,flexGrow:11.4,flexFlow:11.4,flexShrink:11.4,flexWrap:11.4,alignContent:11.4,alignItems:11.4,alignSelf:11.4,justifyContent:11.4,order:11.4,transform:11.4,transformOrigin:11.4,transformOriginX:11.4,transformOriginY:11.4,backfaceVisibility:11.4,perspective:11.4,perspectiveOrigin:11.4,transformStyle:11.4,transformOriginZ:11.4,animation:11.4,animationDelay:11.4,animationDirection:11.4,animationFillMode:11.4,animationDuration:11.4,animationIterationCount:11.4,animationName:11.4,animationPlayState:11.4,animationTimingFunction:11.4,appearance:11.4,userSelect:11.4,textEmphasisPosition:11.4,textEmphasis:11.4,textEmphasisStyle:11.4,textEmphasisColor:11.4,clipPath:11.4,maskImage:11.4,maskMode:11.4,maskRepeat:11.4,maskPosition:11.4,maskClip:11.4,maskOrigin:11.4,maskSize:11.4,maskComposite:11.4,mask:11.4,maskBorderSource:11.4,maskBorderMode:11.4,maskBorderSlice:11.4,maskBorderWidth:11.4,maskBorderOutset:11.4,maskBorderRepeat:11.4,maskBorder:11.4,maskType:11.4,textSizeAdjust:11.4,filter:11.4,hyphens:11.4,fontFeatureSettings:11.4,breakAfter:11.4,breakBefore:11.4,breakInside:11.4,columnCount:11.4,columnFill:11.4,columnGap:11.4,columnRule:11.4,columnRuleColor:11.4,columnRuleStyle:11.4,columnRuleWidth:11.4,columns:11.4,columnSpan:11.4,columnWidth:11.4,writingMode:11.4},op_mini:{}}};function Q5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")Q5=function(H){return typeof H};else Q5=function(H){return H&&typeof Symbol==="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H};return Q5($)}var d4=y4.default(s$),PO=m4.default(k4,d4);function TO($){return Object.keys($).reduce(function(Z,H){var J=$[H];if(Array.isArray(J))J=J.join(";"+H+":");else if(J&&Q5(J)==="object"&&typeof J.toString==="function")J=J.toString();return Z[H]=J,Z},{})}function wO($){return Object.keys($).reduce(function(Z,H){var J=$[H];if(Array.isArray(J))if(u4.default.canUseDOM)J=J[J.length-1].toString();else J=J.join(";".concat(I6(H),":"));return Z[H]=J,Z},{})}var b4,Y5;function c4($){var Z=$||global&&global.navigator&&global.navigator.userAgent;if(!Y5||Z!==b4){if(Z==="all")Y5={prefix:d4,prefixedKeyframes:"keyframes"};else Y5=new PO({userAgent:Z});b4=Z}return Y5}function l4($){return c4($).prefixedKeyframes||"keyframes"}function X5($,Z){var H=TO($),J=c4(Z),Y=J.prefix(H),Q=wO(Y);return Q}function xO($){return Object.keys($).map(function(Z){return Z+": "+$[Z]+";"}).join(`
|
|
28
|
+
`)}function I1($,Z,H){if(!Z)return"";var J=V0(Z,function(O,G){return A0(G,O)}),Y=X5(J,H),Q=k7(Y),X=xO(Q);return $+"{"+X+"}"}var EO=function(Z){return Z===null||typeof Z>"u"?"main":Z.toString()},G5=EO;var SO=function(Z,H,J){var Y=G5(H);return!!Z&&!!Z._radiumStyleState&&!!Z._radiumStyleState[Y]&&Z._radiumStyleState[Y][J]},O5=SO;var vO=function(Z){return typeof Z.ref==="string"?Z.ref:Z.key},S1=vO;var CO=function(Z){return Z._lastRadiumState||Z.state&&Z.state._radiumStyleState||{}},R0=CO;function N0($){if(!$)return"";var Z=5381,H=$.length-1;while(H)Z=Z*33^$.charCodeAt(H),H-=1;return(Z>>>0).toString(16)}function z5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")z5=function(H){return typeof H};else z5=function(H){return H&&typeof Symbol==="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H};return z5($)}function W5($){return $&&$.constructor===Object&&$.toString===Object.prototype.toString}function U5($){var Z={};return $.forEach(function(H){if(!H||z5(H)!=="object")return;if(Array.isArray(H))H=U5(H);Object.keys(H).forEach(function(J){if(!W5(H[J])||!W5(Z[J])){Z[J]=H[J];return}if(J.indexOf("@media")===0){var Y=J;while(!0)if(Y+=" ",!Z[Y]){Z[Y]=H[J];return}}Z[J]=U5([Z[J],H[J]])})}),Z}var gO=function(){};var i4=gO;function B2($){var{addCSS:Z,config:H,style:J}=$,Y=function(O){var G=O,z=G.__process(H.userAgent),W=z.animationName,f=z.css;return Z(f),W},Q=Object.keys(J).reduce(function(X,O){var G=J[O],z=Array.isArray(G);if(O==="animationName"&&G&&(G.__radiumKeyframes||z))if(z)G=G.map(Y).join(", ");else G=Y(G);return X[O]=G,X},{});return{style:Q}}var jO=function(Z){var{style:H,mergeStyles:J}=Z,Y=Array.isArray(H)?J(H):H;return{style:Y}},p4=jO;function K2($){var{config:Z,style:H}=$,J=X5(H,Z.userAgent);return{style:J}}function q2($){var{isNestedStyle:Z,style:H}=$,J=Object.keys(H).reduce(function(Y,Q){var X=H[Q];if(!Z(X))Y[Q]=X;return Y},{});return{style:J}}var m1=[],f5=!1;function M2(){m1.forEach(function($){$()})}var hO=function(Z){if(m1.indexOf(Z)===-1)m1.push(Z);if(!f5)window.addEventListener("mouseup",M2),f5=!0;return{remove:function(){var J=m1.indexOf(Z);if(m1.splice(J,1),m1.length===0&&f5)window.removeEventListener("mouseup",M2),f5=!1}}},n4={subscribe:hO,__triggerForTests:M2};var a4=function(Z){return Z===":hover"||Z===":active"||Z===":focus"},_O=function(Z){var{ExecutionEnvironment:H,getComponentField:J,getState:Y,mergeStyles:Q,props:X,setState:O,style:G}=Z,z={},W={};if(G[":hover"]){var f=X.onMouseEnter;W.onMouseEnter=function(M){f&&f(M),O(":hover",!0)};var L=X.onMouseLeave;W.onMouseLeave=function(M){L&&L(M),O(":hover",!1)}}if(G[":active"]){var B=X.onMouseDown;W.onMouseDown=function(M){B&&B(M),z._lastMouseDown=Date.now(),O(":active","viamousedown")};var F=X.onKeyDown;W.onKeyDown=function(M){if(F&&F(M),M.key===" "||M.key==="Enter")O(":active","viakeydown")};var K=X.onKeyUp;W.onKeyUp=function(M){if(K&&K(M),M.key===" "||M.key==="Enter")O(":active",!1)}}if(G[":focus"]){var q=X.onFocus;W.onFocus=function(M){q&&q(M),O(":focus",!0)};var x=X.onBlur;W.onBlur=function(M){x&&x(M),O(":focus",!1)}}if(G[":active"]&&!J("_radiumMouseUpListener")&&H.canUseEventListeners)z._radiumMouseUpListener=n4.subscribe(function(){Object.keys(J("state")._radiumStyleState).forEach(function(M){if(Y(":active",M)==="viamousedown")O(":active",!1,M)})});var N=X.disabled?[G[":disabled"]]:Object.keys(G).filter(function(M){return a4(M)&&Y(M)}).map(function(M){return G[M]}),R=Q([G].concat(N));return R=Object.keys(R).reduce(function(M,E){if(!a4(E)&&E!==":disabled")M[E]=R[E];return M},{}),{componentFields:z,props:W,style:R}},o4=_O;function kO($){for(var Z=1;Z<arguments.length;Z++){var H=arguments[Z]!=null?arguments[Z]:{},J=Object.keys(H);if(typeof Object.getOwnPropertySymbols==="function")J=J.concat(Object.getOwnPropertySymbols(H).filter(function(Y){return Object.getOwnPropertyDescriptor(H,Y).enumerable}));J.forEach(function(Y){bO($,Y,H[Y])})}return $}function bO($,Z,H){if(Z in $)Object.defineProperty($,Z,{value:H,enumerable:!0,configurable:!0,writable:!0});else $[Z]=H;return $}var I2;function yO($){if(I2===void 0)I2=!!$.canUseDOM&&!!window&&!!window.matchMedia&&function(Z){return window.matchMedia(Z)}||null;return I2}function r4($,Z){return Object.keys($).filter(function(H){return Z($[H],H)}).reduce(function(H,J){return H[J]=$[J],H},{})}function mO($){return Object.keys($).reduce(function(Z,H){if(H.indexOf("@media")!==0)Z[H]=$[H];return Z},{})}function uO($){var{addCSS:Z,appendImportantToEachValue:H,cssRuleSetToString:J,hash:Y,isNestedStyle:Q,style:X,userAgent:O}=$,G="";return Object.keys(X).filter(function(z){return z.indexOf("@media")===0}).map(function(z){var W=H(r4(X[z],function(F){return!Q(F)}));if(!Object.keys(W).length)return;var f=J("",W,O),L="rmq-"+Y(z+f),B=z+"{ ."+L+f+"}";Z(B),G+=(G?" ":"")+L}),G}function dO($){var{listener:Z,listenersByQuery:H,matchMedia:J,mediaQueryListsByQuery:Y,query:Q}=$;Q=Q.replace("@media ","");var X=Y[Q];if(!X&&J)Y[Q]=X=J(Q);if(!H||!H[Q])X.addListener(Z),H[Q]={remove:function(){X.removeListener(Z)}};return X}function A2($){var{ExecutionEnvironment:Z,addCSS:H,appendImportantToEachValue:J,config:Y,cssRuleSetToString:Q,getComponentField:X,getGlobalState:O,hash:G,isNestedStyle:z,mergeStyles:W,props:f,setState:L,style:B}=$,F=mO(B),K=uO({addCSS:H,appendImportantToEachValue:J,cssRuleSetToString:Q,hash:G,isNestedStyle:z,style:B,userAgent:Y.userAgent}),q=K?{className:K+(f.className?" "+f.className:"")}:null,x=Y.matchMedia||yO(Z);if(!x)return{props:q,style:F};var N=kO({},X("_radiumMediaQueryListenersByQuery")),R=O("mediaQueryListsByQuery")||{};return Object.keys(B).filter(function(M){return M.indexOf("@media")===0}).map(function(M){var E=r4(B[M],z);if(!Object.keys(E).length)return;var g=dO({listener:function(){return L(M,g.matches,"_all")},listenersByQuery:N,matchMedia:x,mediaQueryListsByQuery:R,query:M});if(g.matches)F=W([F,E])}),{componentFields:{_radiumMediaQueryListenersByQuery:N},globalState:{mediaQueryListsByQuery:R},props:q,style:F}}function V2($){var{addCSS:Z,appendImportantToEachValue:H,config:J,cssRuleSetToString:Y,hash:Q,props:X,style:O}=$,G=X.className,z=Object.keys(O).reduce(function(W,f){var L=O[f];if(f===":visited"){L=H(L);var B=Y("",L,J.userAgent),F="rad-"+Q(B),K="."+F+":visited"+B;Z(K),G=(G?G+" ":"")+F}else W[f]=L;return W},{});return{props:G===X.className?null:{className:G},style:z}}var Z1={checkProps:i4,keyframes:B2,mergeStyleArray:p4,prefix:K2,removeNestedStyles:q2,resolveInteractionStyles:o4,resolveMediaQueries:A2,visited:V2};var $3=S(C6(),1);import A1 from"react";function cO($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function s4($,Z){for(var H=0;H<Z.length;H++){var J=Z[H];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty($,J.key,J)}}function lO($,Z,H){if(Z)s4($.prototype,Z);if(H)s4($,H);return $}var t4=function(){function $(Z){cO(this,$),this._userAgent=void 0,this._listeners=void 0,this._cssSet=void 0,this._userAgent=Z,this._listeners=[],this._cssSet={}}return lO($,[{key:"subscribe",value:function(H){var J=this;if(this._listeners.indexOf(H)===-1)this._listeners.push(H);return{remove:function(){var Q=J._listeners.indexOf(H);if(Q>-1)J._listeners.splice(Q,1)}}}},{key:"addCSS",value:function(H){var J=this;if(!this._cssSet[H])this._cssSet[H]=!0,this._emitChange();return{remove:function(){delete J._cssSet[H],J._emitChange()}}}},{key:"getCSS",value:function(){return Object.keys(this._cssSet).join(`
|
|
29
|
+
`)}},{key:"_emitChange",value:function(){this._listeners.forEach(function(H){return H()})}}]),$}();function u1($){for(var Z=1;Z<arguments.length;Z++){var H=arguments[Z]!=null?arguments[Z]:{},J=Object.keys(H);if(typeof Object.getOwnPropertySymbols==="function")J=J.concat(Object.getOwnPropertySymbols(H).filter(function(Y){return Object.getOwnPropertyDescriptor(H,Y).enumerable}));J.forEach(function(Y){iO($,Y,H[Y])})}return $}function iO($,Z,H){if(Z in $)Object.defineProperty($,Z,{value:H,enumerable:!0,configurable:!0,writable:!0});else $[Z]=H;return $}function F5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")F5=function(H){return typeof H};else F5=function(H){return H&&typeof Symbol==="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H};return F5($)}var Z3={plugins:[Z1.mergeStyleArray,Z1.checkProps,Z1.resolveMediaQueries,Z1.resolveInteractionStyles,Z1.keyframes,Z1.visited,Z1.removeNestedStyles,Z1.prefix,Z1.checkProps]},e4={},pO=!1,v1=null,nO=function(Z){return Z.type&&!Z.type._isRadiumEnhanced},aO=function(Z){var{children:H,component:J,config:Y,existingKeyMap:Q,extraStateKeyMap:X}=Z;if(!H)return H;var O=F5(H);if(O==="string"||O==="number")return H;if(O==="function")return function(){var L=H.apply(this,arguments);if(A1.isValidElement(L)){var B=S1(L);delete X[B];var F=v1(J,L,Y,Q,!0,X),K=F.element;return K}return L};if(A1.Children.count(H)===1&&H.type){var G=A1.Children.only(H),z=S1(G);delete X[z];var W=v1(J,G,Y,Q,!0,X),f=W.element;return f}return A1.Children.map(H,function(L){if(A1.isValidElement(L)){var B=S1(L);delete X[B];var F=v1(J,L,Y,Q,!0,X),K=F.element;return K}return L})},oO=function(Z){var{component:H,config:J,existingKeyMap:Y,props:Q,extraStateKeyMap:X}=Z,O=Q;return Object.keys(Q).forEach(function(G){if(G==="children")return;var z=Q[G];if(A1.isValidElement(z)){var W=S1(z);delete X[W],O=u1({},O);var f=v1(H,z,J,Y,!0,X),L=f.element;O[G]=L}}),O},rO=function(Z){var{componentName:H,existingKeyMap:J,renderedElement:Y}=Z,Q=S1(Y),X=G5(Q),O=!1,G=function(){if(O)return X;if(O=!0,J[X]){var W;if(typeof Y.type==="string")W=Y.type;else if(Y.type.constructor)W=Y.type.constructor.displayName||Y.type.constructor.name;throw Error("Radium requires each element with interactive styles to have a unique key, set using either the ref or key prop. "+(Q?'Key "'+Q+'" is a duplicate.':"Multiple elements have no key specified.")+' Component: "'+H+'". '+(W?'Element: "'+W+'".':""))}return J[X]=!0,X};return G},sO=function(Z,H,J,Y){if(!Z._radiumIsMounted)return;var Q=R0(Z),X={_radiumStyleState:u1({},Q)};X._radiumStyleState[H]=u1({},X._radiumStyleState[H]),X._radiumStyleState[H][J]=Y,Z._lastRadiumState=X._radiumStyleState,Z.setState(X)},tO=function(Z){var{component:H,config:J,existingKeyMap:Y,props:Q,renderedElement:X}=Z;if(!A1.isValidElement(X)||typeof X.type!=="string"||!Q.style)return Q;var O=Q,G=J.plugins||Z3.plugins,z=H.constructor.displayName||H.constructor.name,W=rO({renderedElement:X,existingKeyMap:Y,componentName:z}),f=function(N){return H[N]},L=function(N){return e4[N]},B=function(N,R){return O5(H.state,R||W(),N)},F=function(N,R,M){return sO(H,M||W(),N,R)},K=function(N){var R=H._radiumStyleKeeper;if(!R){if(pO)return{remove:function(){}};throw Error("To use plugins requiring `addCSS` (e.g. keyframes, media queries), please wrap your application in the StyleRoot component. Component name: `"+z+"`.")}return R.addCSS(N)},q=Q.style;if(G.forEach(function(x){var N=x({ExecutionEnvironment:$3.default,addCSS:K,appendImportantToEachValue:M6,componentName:z,config:J,cssRuleSetToString:I1,getComponentField:f,getGlobalState:L,getState:B,hash:N0,mergeStyles:U5,props:O,setState:F,isNestedStyle:W5,style:q})||{};q=N.style||q,O=N.props&&Object.keys(N.props).length?u1({},O,N.props):O;var R=N.componentFields||{};Object.keys(R).forEach(function(E){H[E]=R[E]});var M=N.globalState||{};Object.keys(M).forEach(function(E){e4[E]=M[E]})}),q!==Q.style)O=u1({},O,{style:q});return O},eO=function(Z,H,J){if(typeof Z.type==="string")H=u1({},H,{"data-radium":!0});return A1.cloneElement(Z,H,J)};v1=function(Z,H){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Z3,Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Q=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,X=arguments.length>5?arguments[5]:void 0;if(!X){var O=R0(Z);X=Object.keys(O).reduce(function(B,F){if(F!=="main")B[F]=!0;return B},{})}if(Array.isArray(H)&&!H.props){var G=H.map(function(B){if(X){var F=S1(B);delete X[F]}return v1(Z,B,J,Y,Q,X).element});return{extraStateKeyMap:X,element:G}}if(!H||H.props&&H.props["data-radium"]||Q&&!nO(H))return{extraStateKeyMap:X,element:H};var z=H.props.children,W=aO({children:z,component:Z,config:J,existingKeyMap:Y,extraStateKeyMap:X}),f=oO({component:Z,config:J,existingKeyMap:Y,extraStateKeyMap:X,props:H.props});if(f=tO({component:Z,config:J,existingKeyMap:Y,props:f,renderedElement:H}),W===z&&f===H.props)return{extraStateKeyMap:X,element:H};var L=eO(H,f!==H.props?f:{},W);return{extraStateKeyMap:X,element:L}};var H3=v1;var Y3=S(q6(),1);import L5,{useContext as J3}from"react";function D2(){return D2=Object.assign||function($){for(var Z=1;Z<arguments.length;Z++){var H=arguments[Z];for(var J in H)if(Object.prototype.hasOwnProperty.call(H,J))$[J]=H[J]}return $},D2.apply(this,arguments)}var P0=L5.createContext(void 0),d1=L5.createContext(void 0);function c1($){var Z=L5.forwardRef(function(H,J){var Y=J3(d1),Q=J3(P0);return L5.createElement($,D2({ref:J},H,{radiumConfigContext:Y,styleKeeperContext:Q}))});return Z.displayName="withRadiumContexts(".concat($.displayName||$.name||"Component",")"),Y3.default(Z,$)}function C1($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")C1=function(H){return typeof H};else C1=function(H){return H&&typeof Symbol==="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H};return C1($)}function W3($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function Q3($,Z){for(var H=0;H<Z.length;H++){var J=Z[H];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty($,J.key,J)}}function $z($,Z,H){if(Z)Q3($.prototype,Z);if(H)Q3($,H);return $}function U3($,Z){if(Z&&(C1(Z)==="object"||typeof Z==="function"))return Z;return f3($)}function f3($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function V1($,Z,H){if(typeof Reflect<"u"&&Reflect.get)V1=Reflect.get;else V1=function(Y,Q,X){var O=Zz(Y,Q);if(!O)return;var G=Object.getOwnPropertyDescriptor(O,Q);if(G.get)return G.get.call(X);return G.value};return V1($,Z,H||$)}function Zz($,Z){while(!Object.prototype.hasOwnProperty.call($,Z))if($=G1($),$===null)break;return $}function G1($){return G1=Object.setPrototypeOf?Object.getPrototypeOf:function(H){return H.__proto__||Object.getPrototypeOf(H)},G1($)}function F3($,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(Z&&Z.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Z)R2($,Z)}function R2($,Z){return R2=Object.setPrototypeOf||function(J,Y){return J.__proto__=Y,J},R2($,Z)}function Hz($,Z){return Qz($)||Yz($,Z)||Jz()}function Jz(){throw TypeError("Invalid attempt to destructure non-iterable instance")}function Yz($,Z){var H=[],J=!0,Y=!1,Q=void 0;try{for(var X=$[Symbol.iterator](),O;!(J=(O=X.next()).done);J=!0)if(H.push(O.value),Z&&H.length===Z)break}catch(G){Y=!0,Q=G}finally{try{if(!J&&X.return!=null)X.return()}finally{if(Y)throw Q}}return H}function Qz($){if(Array.isArray($))return $}function N2($){for(var Z=1;Z<arguments.length;Z++){var H=arguments[Z]!=null?arguments[Z]:{},J=Object.keys(H);if(typeof Object.getOwnPropertySymbols==="function")J=J.concat(Object.getOwnPropertySymbols(H).filter(function(Y){return Object.getOwnPropertyDescriptor(H,Y).enumerable}));J.forEach(function(Y){Xz($,Y,H[Y])})}return $}function Xz($,Z,H){if(Z in $)Object.defineProperty($,Z,{value:H,enumerable:!0,configurable:!0,writable:!0});else $[Z]=H;return $}function L3($,Z){if($==null)return{};var H=Gz($,Z),J,Y;if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols($);for(Y=0;Y<Q.length;Y++){if(J=Q[Y],Z.indexOf(J)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call($,J))continue;H[J]=$[J]}}return H}function Gz($,Z){if($==null)return{};var H={},J=Object.keys($),Y,Q;for(Q=0;Q<J.length;Q++){if(Y=J[Q],Z.indexOf(Y)>=0)continue;H[Y]=$[Y]}return H}function Oz($){var Z=zz($,"string");return C1(Z)==="symbol"?Z:String(Z)}function zz($,Z){if(C1($)!=="object"||$===null)return $;var H=$[Symbol.toPrimitive];if(H!==void 0){var J=H.call($,Z||"default");if(C1(J)!=="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return(Z==="string"?String:Number)($)}var Fz=["arguments","callee","caller","length","name","prototype","type"],K5,q3;function Lz($,Z){Object.getOwnPropertyNames($).forEach(function(H){if(Fz.indexOf(H)<0&&!Z.hasOwnProperty(H)){var J=Object.getOwnPropertyDescriptor($,H);J&&Object.defineProperty(Z,H,J)}})}function Bz($){var Z=$.prototype||{};return!$.isReactComponent&&!Z.isReactComponent&&!$.render&&!Z.render}function Kz($){return typeof $==="function"&&/^\s*class\s+/.test($.toString())}function qz($,Z){q3.forEach(function(H){var J=Object.getOwnPropertyDescriptor($,H),Y=(J||{}).value;if(!Y)return;var Q=Object.getOwnPropertyDescriptor(K5,H),X=(Q||{}).value,O=Z.prototype[H];if(!O&&Y!==X)J&&Object.defineProperty(Z.prototype,H,J),delete $[H]})}function M3($){if($._extraRadiumStateKeys&&$._extraRadiumStateKeys.length>0){var Z=$._extraRadiumStateKeys.reduce(function(H,J){var Y=H[J],Q=L3(H,[J].map(Oz));return Q},R0($));$._lastRadiumState=Z,$.setState({_radiumStyleState:Z})}}function I3($){var{_radiumMouseUpListener:Z,_radiumMediaQueryListenersByQuery:H}=$;if($._radiumIsMounted=!1,Z)Z.remove();if(H)Object.keys(H).forEach(function(J){H[J].remove()},$)}function A3($,Z,H){var J=$||Z||H;if(H&&J!==H)J=N2({},H,J);return J}function V3($,Z,H,J){var Y=H3($,Z,H),Q=Y.extraStateKeyMap,X=Y.element;if($._extraRadiumStateKeys=Object.keys(Q),J)return B3.createElement(d1.Provider,{value:J},X);return X}function O3($,Z){var H=B3.forwardRef(function(J,Y){var Q=J.radiumConfig,X=L3(J,["radiumConfig"]),O=X3(d1),G=X3(P0),z=Wz({_radiumStyleState:{}}),W=Hz(z,2),f=W[0],L=W[1],B=Uz({state:f,setState:L,_radiumMediaQueryListenersByQuery:void 0,_radiumMouseUpListener:void 0,_radiumIsMounted:!0,_lastRadiumState:void 0,_extraRadiumStateKeys:void 0,_radiumStyleKeeper:G}).current;B.state=f,G3(function(){return function(){I3(B)}},[B]);var F=B._extraRadiumStateKeys&&B._extraRadiumStateKeys.length>0;G3(function(){M3(B)},[F,B]);var K=$(X,Y),q=A3(Q,O,Z);return V3(B,K,q,Q)});return H._isRadiumEnhanced=!0,H.defaultProps=$.defaultProps,K3.default(H,$)}function Mz($,Z,H){var J=function(Y){F3(Q,Y);function Q(){var X;W3(this,Q),X=U3(this,G1(Q).apply(this,arguments)),X.state=X.state||{},X._radiumStyleKeeper=X.props.styleKeeperContext,X._radiumMediaQueryListenersByQuery=X._radiumMediaQueryListenersByQuery,X._radiumMouseUpListener=X._radiumMouseUpListener,X._radiumIsMounted=!0,X._lastRadiumState=void 0,X._extraRadiumStateKeys=void 0,X.state._radiumStyleState={};var O=f3(X);return qz(O,Z),X}return $z(Q,[{key:"componentDidUpdate",value:function(O,G,z){if(V1(G1(Q.prototype),"componentDidUpdate",this))V1(G1(Q.prototype),"componentDidUpdate",this).call(this,O,G,z);M3(this)}},{key:"componentWillUnmount",value:function(){if(V1(G1(Q.prototype),"componentWillUnmount",this))V1(G1(Q.prototype),"componentWillUnmount",this).call(this);I3(this)}},{key:"render",value:function(){var O=V1(G1(Q.prototype),"render",this).call(this),G=A3(this.props.radiumConfig,this.props.radiumConfigContext,H);return V3(this,O,G,this.props.radiumConfig)}}]),Q}(Z);if(J._isRadiumEnhanced=!0,K5=J.prototype,q3=Object.getOwnPropertyNames(K5).filter(function(Y){return Y!=="constructor"&&typeof K5[Y]==="function"}),Lz($,J),J.propTypes&&J.propTypes.style)J.propTypes=N2({},J.propTypes,{style:B5.default.oneOfType([B5.default.array,B5.default.object])});return J.displayName=$.displayName||$.name||"Component",c1(J)}function Iz($){return $=function(Z){function H(){var J=Reflect.construct(Z,arguments,this.constructor);return J}return Reflect.setPrototypeOf(H.prototype,Z.prototype),Reflect.setPrototypeOf(H,Z),H}($),$}var z3=fz(function(){return null}).$$typeof;function l1($){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z3&&$.$$typeof===z3)return O3($.render,Z);if(typeof $!=="function")return Az(Z,$);var H=$;if(Bz(H))return O3(H,Z);var J=H;if(Kz(J))J=Iz(J);if(J===H)J=function(Y){F3(Q,Y);function Q(){return W3(this,Q),U3(this,G1(Q).apply(this,arguments))}return Q}(J);return Mz(H,J,Z)}function Az($,Z){var H=N2({},$,Z);return function(J){return l1(J,H)}}var q5=S(L6(),1);import Tz,{PureComponent as wz}from"react";function i1($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")i1=function(H){return typeof H};else i1=function(H){return H&&typeof Symbol==="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H};return i1($)}function Vz($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function D3($,Z){for(var H=0;H<Z.length;H++){var J=Z[H];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty($,J.key,J)}}function Dz($,Z,H){if(Z)D3($.prototype,Z);if(H)D3($,H);return $}function Rz($,Z){if(Z&&(i1(Z)==="object"||typeof Z==="function"))return Z;return Nz($)}function Nz($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function P2($){return P2=Object.setPrototypeOf?Object.getPrototypeOf:function(H){return H.__proto__||Object.getPrototypeOf(H)},P2($)}function Pz($,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(Z&&Z.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Z)T2($,Z)}function T2($,Z){return T2=Object.setPrototypeOf||function(J,Y){return J.__proto__=Y,J},T2($,Z)}var w2=function($){Pz(Z,$);function Z(){return Vz(this,Z),Rz(this,P2(Z).apply(this,arguments))}return Dz(Z,[{key:"_buildStyles",value:function(J){var Y=this,Q=this.props.radiumConfig&&this.props.radiumConfig.userAgent||this.props.radiumConfigContext&&this.props.radiumConfigContext.userAgent,X=this.props.scopeSelector,O=Object.keys(J).reduce(function(z,W){if(i1(J[W])!=="object")z[W]=J[W];return z},{}),G=Object.keys(O).length?I1(X||"",O,Q):"";return G+Object.keys(J).reduce(function(z,W){var f=J[W];if(W==="mediaQueries")z+=Y._buildMediaQueryString(f);else if(i1(J[W])==="object"){var L=X?W.split(",").map(function(B){return X+" "+B.trim()}).join(","):W;z+=I1(L,f,Q)}return z},"")}},{key:"_buildMediaQueryString",value:function(J){var Y=this,Q="";return Object.keys(J).forEach(function(X){Q+="@media "+X+"{"+Y._buildStyles(J[X])+"}"}),Q}},{key:"render",value:function(){if(!this.props.rules)return null;var J=this._buildStyles(this.props.rules);return Tz.createElement("style",{dangerouslySetInnerHTML:{__html:J}})}}]),Z}(wz);w2.propTypes={radiumConfig:q5.default.object,rules:q5.default.object,scopeSelector:q5.default.string};w2.defaultProps={scopeSelector:""};var R3=c1(w2);import I5,{useContext as bz,useRef as yz}from"react";import gz,{Component as jz}from"react";function M5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")M5=function(H){return typeof H};else M5=function(H){return H&&typeof Symbol==="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H};return M5($)}function xz($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function N3($,Z){for(var H=0;H<Z.length;H++){var J=Z[H];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty($,J.key,J)}}function Ez($,Z,H){if(Z)N3($.prototype,Z);if(H)N3($,H);return $}function Sz($,Z){if(Z&&(M5(Z)==="object"||typeof Z==="function"))return Z;return vz($)}function vz($){if($===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return $}function x2($){return x2=Object.setPrototypeOf?Object.getPrototypeOf:function(H){return H.__proto__||Object.getPrototypeOf(H)},x2($)}function Cz($,Z){if(typeof Z!=="function"&&Z!==null)throw TypeError("Super expression must either be null or a function");if($.prototype=Object.create(Z&&Z.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Z)E2($,Z)}function E2($,Z){return E2=Object.setPrototypeOf||function(J,Y){return J.__proto__=Y,J},E2($,Z)}var hz=function($){Cz(Z,$);function Z(){var H;if(xz(this,Z),H=Sz(this,x2(Z).apply(this,arguments)),H.styleKeeper=void 0,H._subscription=void 0,H._root=void 0,H._css=void 0,H._onChange=function(){var J=H.styleKeeper.getCSS();if(J!==H._css){if(H._root)H._root.innerHTML=J;else throw Error("No root style object found, even after StyleSheet mount.");H._css=J}},!H.props.styleKeeperContext)throw Error("StyleRoot is required to use StyleSheet");return H.styleKeeper=H.props.styleKeeperContext,H._css=H.styleKeeper.getCSS(),H}return Ez(Z,[{key:"componentDidMount",value:function(){this._subscription=this.styleKeeper.subscribe(this._onChange),this._onChange()}},{key:"shouldComponentUpdate",value:function(){return!1}},{key:"componentWillUnmount",value:function(){if(this._subscription)this._subscription.remove()}},{key:"render",value:function(){var J=this;return gz.createElement("style",{dangerouslySetInnerHTML:{__html:this._css},ref:function(Q){J._root=Q}})}}]),Z}(jz),P3=c1(hz);function _z($,Z){if($==null)return{};var H=kz($,Z),J,Y;if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols($);for(Y=0;Y<Q.length;Y++){if(J=Q[Y],Z.indexOf(J)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call($,J))continue;H[J]=$[J]}}return H}function kz($,Z){if($==null)return{};var H={},J=Object.keys($),Y,Q;for(Q=0;Q<J.length;Q++){if(Y=J[Q],Z.indexOf(Y)>=0)continue;H[Y]=$[Y]}return H}function mz($,Z){var H=$&&$.userAgent||Z&&Z.userAgent;return new t4(H)}var uz=l1(function($){var Z=$.children,H=_z($,["children"]);return I5.createElement("div",H,Z,I5.createElement(P3,null))}),dz=function(Z){var H=Z.radiumConfig,J=bz(d1),Y=yz(mz(H,J));return I5.createElement(P0.Provider,{value:Y.current},I5.createElement(uz,Z))},T3=dz;function S2($,Z){return{__radiumKeyframes:!0,__process:function(J){var Y=l4(J),Q=Object.keys($).map(function(G){return I1(G,$[G],J)}).join(`
|
|
30
|
+
`),X=(Z?Z+"-":"")+"radium-animation-"+N0(Q),O="@"+Y+" "+X+` {
|
|
21
31
|
`+Q+`
|
|
22
32
|
}
|
|
23
|
-
`;return{css:
|
|
33
|
+
`;return{css:O,animationName:X}}}}function p1($){return l1($)}p1.Plugins=Z1;p1.Style=R3;p1.StyleRoot=T3;p1.getState=O5;p1.keyframes=S2;var n1=p1;function A5($){if(!$)return{};let Z={...$};if("animationName"in Z&&typeof Z.animationName==="object"){let H="radiumAnimation_"+Math.random().toString(36).substring(2,8);Z.animationName=n1.keyframes(Z.animationName,H)}return Z}import{jsx as v2,jsxs as iz}from"react/jsx-runtime";var lz=({data:$,setUiAjaxConfiguration:Z})=>{let{name:H,title:J,iconUrl:Y,iconPosition:Q,sx:X,pathname:O,kwargs:G,depsNames:z}=$,W=cz(()=>m0(Z,G,z,O),[Z,G,z,O]);return v2(U1,{card:"AjaxButtonCard",data:$,children:iz("button",{id:H,className:"box-border flex min-h-12 w-full min-w-min cursor-pointer items-center justify-center rounded-[16px] border border-[#080318] bg-white text-center font-[TTForsTrial] text-[#080318] hover:bg-neutral-300",value:H,onClick:()=>W(),style:A5(X),type:"button",children:[Y&&Q==="start"&&v2("img",{src:Y,alt:""}),t0(J),Y&&Q==="end"&&v2("img",{src:Y,alt:""})]})})},w3=n1(lz);import{jsx as C2}from"react/jsx-runtime";var pz=({data:$,content:Z,setUiAjaxConfiguration:H})=>{let{name:J,sx:Y}=$;return C2(U1,{card:J,data:$,children:C2("div",{style:A5(Y),id:J,children:Z.map((Q,X)=>{return C2(T1,{uiConfig:Q,setUiAjaxConfiguration:H},`children-${X}`)})})})},x3=n1(pz);import{jsx as E3}from"react/jsx-runtime";var nz=({data:$,content:Z,setUiAjaxConfiguration:H})=>{let{name:J}=$;return E3(U1,{card:J,data:$,children:Z.map((Y,Q)=>{return E3(T1,{uiConfig:Y,setUiAjaxConfiguration:H},`children-${Q}`)})})},S3=nz;export{S3 as UnionCard,T1 as UI,x3 as SequenceCard,U1 as PieCard,A7 as ChatCard,w3 as AjaxButtonCard};
|