@piedata/pieui 1.1.2 → 1.1.4

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.
Files changed (73) hide show
  1. package/dist/cli.js +124 -59
  2. package/dist/components/Buttons/AjaxButtonCard/ui/AjaxButtonCard.d.ts.map +1 -1
  3. package/dist/components/Chats/ChatCard/ui/ChatCard.d.ts.map +1 -1
  4. package/dist/components/PieRoot/index.d.ts.map +1 -1
  5. package/dist/components/index.esm.js +13 -13
  6. package/dist/components/index.js +20 -20
  7. package/dist/index.esm.js +15 -15
  8. package/dist/index.js +23 -23
  9. package/dist/util/ajaxCommonUtils.d.ts +7 -1
  10. package/dist/util/ajaxCommonUtils.d.ts.map +1 -1
  11. package/package.json +2 -5
  12. package/src/components/Buttons/AjaxButtonCard/index.ts +0 -1
  13. package/src/components/Buttons/AjaxButtonCard/types/index.ts +0 -17
  14. package/src/components/Buttons/AjaxButtonCard/ui/AjaxButtonCard.tsx +0 -38
  15. package/src/components/Chats/ChatCard/index.ts +0 -1
  16. package/src/components/Chats/ChatCard/types/annyang.d.ts +0 -11
  17. package/src/components/Chats/ChatCard/types/index.ts +0 -59
  18. package/src/components/Chats/ChatCard/ui/ChatCard.tsx +0 -130
  19. package/src/components/Chats/ChatCard/ui/components/AttachFileButton.tsx +0 -49
  20. package/src/components/Chats/ChatCard/ui/components/AttachedFileView.tsx +0 -29
  21. package/src/components/Chats/ChatCard/ui/components/ChatCardInput.tsx +0 -177
  22. package/src/components/Chats/ChatCard/ui/components/ChatOption.tsx +0 -25
  23. package/src/components/Chats/ChatCard/ui/components/Markdown.tsx +0 -21
  24. package/src/components/Chats/ChatCard/ui/components/MessageAvatar.tsx +0 -17
  25. package/src/components/Chats/ChatCard/ui/components/MessageCard.tsx +0 -80
  26. package/src/components/Chats/ChatCard/ui/components/MessageContent.tsx +0 -27
  27. package/src/components/Chats/ChatCard/ui/components/MessagesBoard.tsx +0 -61
  28. package/src/components/Chats/ChatCard/ui/components/Options.tsx +0 -20
  29. package/src/components/Chats/ChatCard/ui/components/ResizableTextarea.tsx +0 -59
  30. package/src/components/Chats/ChatCard/ui/components/SendButton.tsx +0 -37
  31. package/src/components/Chats/ChatCard/ui/components/VoiceListeningButton.tsx +0 -35
  32. package/src/components/Chats/ChatCard/ui/components/icons/AttachFileIcon.tsx +0 -18
  33. package/src/components/Chats/ChatCard/ui/components/icons/AttachedFileIcon.tsx +0 -18
  34. package/src/components/Chats/ChatCard/ui/components/icons/CancelFileIcon.tsx +0 -14
  35. package/src/components/Chats/ChatCard/ui/components/icons/DefaultAvatar.tsx +0 -10
  36. package/src/components/Chats/ChatCard/ui/components/icons/SendIcon.tsx +0 -18
  37. package/src/components/Chats/ChatCard/ui/components/icons/VoiceRecordIcon.tsx +0 -15
  38. package/src/components/Containers/AjaxGroupCard/index.ts +0 -1
  39. package/src/components/Containers/AjaxGroupCard/types/index.ts +0 -17
  40. package/src/components/Containers/AjaxGroupCard/ui/AjaxGroupCard.tsx +0 -96
  41. package/src/components/Containers/SequenceCard/index.ts +0 -1
  42. package/src/components/Containers/SequenceCard/types/index.ts +0 -10
  43. package/src/components/Containers/SequenceCard/ui/SequenceCard.tsx +0 -32
  44. package/src/components/Containers/UnionCard/index.ts +0 -1
  45. package/src/components/Containers/UnionCard/types/index.ts +0 -8
  46. package/src/components/Containers/UnionCard/ui/UnionCard.tsx +0 -27
  47. package/src/components/PieCard/index.tsx +0 -149
  48. package/src/components/PieCard/types/index.ts +0 -18
  49. package/src/components/PieRoot/index.tsx +0 -154
  50. package/src/components/PieRoot/types/index.ts +0 -14
  51. package/src/components/PieTelegramRoot/index.tsx +0 -161
  52. package/src/components/UI/index.tsx +0 -70
  53. package/src/components/index.ts +0 -6
  54. package/src/index.ts +0 -15
  55. package/src/providers/CentrifugeIOInitProvider.tsx +0 -42
  56. package/src/providers/SocketIOInitProvider.tsx +0 -52
  57. package/src/types/index.ts +0 -139
  58. package/src/util/ajaxCommonUtils.ts +0 -137
  59. package/src/util/centrifuge.ts +0 -33
  60. package/src/util/fallback.tsx +0 -6
  61. package/src/util/initializeComponents.ts +0 -84
  62. package/src/util/lazy.ts +0 -25
  63. package/src/util/mitt.ts +0 -11
  64. package/src/util/pieConfig.ts +0 -43
  65. package/src/util/registry.ts +0 -81
  66. package/src/util/socket.ts +0 -24
  67. package/src/util/sx2radium.ts +0 -15
  68. package/src/util/tailwindCommonUtils.ts +0 -6
  69. package/src/util/useIsSupported.ts +0 -17
  70. package/src/util/useOpenAIWebRTC.ts +0 -176
  71. package/src/util/useWebApp.ts +0 -32
  72. package/src/util/waitForSidAvailable.ts +0 -21
  73. package/src/util/webrtcClient.ts +0 -247
@@ -1,23 +1,23 @@
1
- var w3=Object.create;var{getPrototypeOf:x3,defineProperty:M5,getOwnPropertyNames:E3}=Object;var S3=Object.prototype.hasOwnProperty;var T=($,Z,J)=>{J=$!=null?w3(x3($)):{};let H=Z||!$||!$.__esModule?M5(J,"default",{value:$,enumerable:!0}):J;for(let Y of E3($))if(!S3.call(H,Y))M5(H,Y,{get:()=>$[Y],enumerable:!0});return H};var I=($,Z)=>()=>(Z||$((Z={exports:{}}).exports,Z),Z.exports);var v3=($,Z)=>{for(var J in Z)M5($,J,{get:Z[J],enumerable:!0,configurable:!0,set:(H)=>Z[J]=()=>H})};var C3=($,Z)=>()=>($&&(Z=$($=0)),Z);var u5=I((Z9)=>{Object.defineProperty(Z9,"__esModule",{value:!0});Z9.Doctype=Z9.CDATA=Z9.Tag=Z9.Style=Z9.Script=Z9.Comment=Z9.Directive=Z9.Text=Z9.Root=Z9.isTag=Z9.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=Z9.ElementType||(Z9.ElementType={}));function OJ($){return $.type===n.Tag||$.type===n.Script||$.type===n.Style}Z9.isTag=OJ;Z9.Root=n.Root;Z9.Text=n.Text;Z9.Directive=n.Directive;Z9.Comment=n.Comment;Z9.Script=n.Script;Z9.Style=n.Style;Z9.Tag=n.Tag;Z9.CDATA=n.CDATA;Z9.Doctype=n.Doctype});var i5=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 i=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 y0=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=y0;var H9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=i.ElementType.Text,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),Z}(y0);R.Text=H9;var Y9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=i.ElementType.Comment,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),Z}(y0);R.Comment=Y9;var Q9=function($){O1(Z,$);function Z(J,H){var Y=$.call(this,H)||this;return Y.name=J,Y.type=i.ElementType.Directive,Y}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Z}(y0);R.ProcessingInstruction=Q9;var m0=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=m0;var X9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=i.ElementType.CDATA,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),Z}(m0);R.CDATA=X9;var G9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=i.ElementType.Root,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),Z}(m0);R.Document=G9;var W9=function($){O1(Z,$);function Z(J,H,Y,Q){if(Y===void 0)Y=[];if(Q===void 0)Q=J==="script"?i.ElementType.Script:J==="style"?i.ElementType.Style:i.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}(m0);R.Element=W9;function z9($){return(0,i.isTag)($)}R.isTag=z9;function U9($){return $.type===i.ElementType.CDATA}R.isCDATA=U9;function O9($){return $.type===i.ElementType.Text}R.isText=O9;function L9($){return $.type===i.ElementType.Comment}R.isComment=L9;function B9($){return $.type===i.ElementType.Directive}R.isDirective=B9;function F9($){return $.type===i.ElementType.Root}R.isDocument=F9;function VJ($){return Object.prototype.hasOwnProperty.call($,"children")}R.hasChildren=VJ;function l5($,Z){if(Z===void 0)Z=!1;var J;if(O9($))J=new H9($.data);else if(L9($))J=new Y9($.data);else if(z9($)){var H=Z?d5($.children):[],Y=new W9($.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(U9($)){var H=Z?d5($.children):[],Q=new X9(H);H.forEach(function(z){return z.parent=Q}),J=Q}else if(F9($)){var H=Z?d5($.children):[],X=new G9(H);if(H.forEach(function(z){return z.parent=X}),$["x-mode"])X["x-mode"]=$["x-mode"];J=X}else if(B9($)){var W=new Q9($.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 DJ=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]}),RJ=Z1&&Z1.__exportStar||function($,Z){for(var J in $)if(J!=="default"&&!Object.prototype.hasOwnProperty.call(Z,J))DJ(Z,$,J)};Object.defineProperty(Z1,"__esModule",{value:!0});Z1.DomHandler=void 0;var p5=u5(),L1=i5();RJ(i5(),Z1);var K9={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},q9=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=K9;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:K9,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?p5.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===p5.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===p5.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=q9;Z1.default=q9});var D9=I((M9)=>{Object.defineProperty(M9,"__esModule",{value:!0});M9.CARRIAGE_RETURN_PLACEHOLDER_REGEX=M9.CARRIAGE_RETURN_PLACEHOLDER=M9.CARRIAGE_RETURN_REGEX=M9.CARRIAGE_RETURN=M9.CASE_SENSITIVE_TAG_NAMES_MAP=M9.CASE_SENSITIVE_TAG_NAMES=void 0;M9.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"];M9.CASE_SENSITIVE_TAG_NAMES_MAP=M9.CASE_SENSITIVE_TAG_NAMES.reduce(function($,Z){return $[Z.toLowerCase()]=Z,$},{});M9.CARRIAGE_RETURN="\r";M9.CARRIAGE_RETURN_REGEX=new RegExp(M9.CARRIAGE_RETURN,"g");M9.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now().toString(),"__");M9.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(M9.CARRIAGE_RETURN_PLACEHOLDER,"g")});var o5=I((T9)=>{Object.defineProperty(T9,"__esModule",{value:!0});T9.formatAttributes=R9;T9.escapeSpecialCharacters=xJ;T9.revertEscapedCharacters=N9;T9.formatDOM=P9;var u0=n5(),G0=D9();function TJ($){return G0.CASE_SENSITIVE_TAG_NAMES_MAP[$]}function R9($){var Z={},J=0,H=$.length;for(;J<H;J++){var Y=$[J];Z[Y.name]=Y.value}return Z}function wJ($){$=$.toLowerCase();var Z=TJ($);if(Z)return Z;return $}function xJ($){return $.replace(G0.CARRIAGE_RETURN_REGEX,G0.CARRIAGE_RETURN_PLACEHOLDER)}function N9($){return $.replace(G0.CARRIAGE_RETURN_PLACEHOLDER_REGEX,G0.CARRIAGE_RETURN)}function P9($,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=wJ(L.nodeName);G=new u0.Element(K,R9(L.attributes)),G.children=P9(K==="template"?L.content.childNodes:L.childNodes,G);break}case 3:G=new u0.Text(N9((H=L.nodeValue)!==null&&H!==void 0?H:""));break;case 8:G=new u0.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 u0.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 g9=I((j9)=>{Object.defineProperty(j9,"__esModule",{value:!0});j9.default=_J;var jJ=o5(),w9="html",x9="head",d0="body",gJ=/<([a-zA-Z]+[0-9]?)/,E9=/<head[^]*>/i,S9=/<body[^]*>/i,l0=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`")},v9=typeof window==="object"&&window.DOMParser;if(typeof v9==="function")r5=new v9,s5="text/html",a5=function($,Z){if(Z)$="<".concat(Z,">").concat($,"</").concat(Z,">");return r5.parseFromString($,s5)},l0=a5;var r5,s5;if(typeof document==="object"&&document.implementation)S1=document.implementation.createHTMLDocument(),l0=function($,Z){if(Z){var J=S1.documentElement.querySelector(Z);if(J)J.innerHTML=$;return S1}return S1.documentElement.innerHTML=$,S1};var S1,c0=typeof document==="object"&&document.createElement("template"),t5;if(c0&&c0.content)t5=function($){return c0.innerHTML=$,c0.content.childNodes};var C9=function(){return document.createDocumentFragment().childNodes};function _J($){var Z,J,H,Y,Q,X;$=(0,jJ.escapeSpecialCharacters)($);var W=gJ.exec($),G=(Z=W===null||W===void 0?void 0:W[1])===null||Z===void 0?void 0:Z.toLowerCase();switch(G){case w9:{var z=a5($);if(!E9.test($)){var U=z.querySelector(x9);(J=U===null||U===void 0?void 0:U.parentNode)===null||J===void 0||J.removeChild(U)}if(!S9.test($)){var U=z.querySelector(d0);(H=U===null||U===void 0?void 0:U.parentNode)===null||H===void 0||H.removeChild(U)}return z.querySelectorAll(w9)}case x9:case d0:{var L=l0($).querySelectorAll(G);if(S9.test($)&&E9.test($))return(Q=(Y=L[0].parentNode)===null||Y===void 0?void 0:Y.childNodes)!==null&&Q!==void 0?Q:C9();return L}default:{if(t5)return t5($);var U=l0($,d0).querySelector(d0);return(X=U===null||U===void 0?void 0:U.childNodes)!==null&&X!==void 0?X:C9()}}}});var _9=I((W0)=>{var kJ=W0&&W0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(W0,"__esModule",{value:!0});W0.default=uJ;var bJ=kJ(g9()),yJ=o5(),mJ=/<(![a-zA-Z\s]+)>/;function uJ($){if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];var Z=mJ.exec($),J=Z?Z[1]:void 0;return(0,yJ.formatDOM)((0,bJ.default)($),null,J)}});var h9=I((lJ)=>{var dJ=0;lJ.SAME=dJ;var cJ=1;lJ.CAMELCASE=cJ;lJ.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 b9=I((HH)=>{function oJ($){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={},aJ=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];aJ.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 rJ="xlinkHref";k[rJ]=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:sJ,SAME:tJ,possibleStandardNames:k9}=h9(),eJ=":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",$H=eJ+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ZH=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+$H+"]*$")),JH=Object.keys(k9).reduce(($,Z)=>{let J=k9[Z];if(J===tJ)$[Z]=Z;else if(J===sJ)$[Z.toLowerCase()]=Z;else $[Z]=J;return $},{});HH.BOOLEAN=3;HH.BOOLEANISH_STRING=2;HH.NUMERIC=5;HH.OVERLOADED_BOOLEAN=4;HH.POSITIVE_NUMERIC=6;HH.RESERVED=0;HH.STRING=1;HH.getPropertyInfo=oJ;HH.isCustomAttribute=ZH;HH.possibleStandardNames=JH});var l9=I((fB,c9)=>{var y9=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,FH=/\n/g,KH=/^\s*/,qH=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,MH=/^:\s*/,AH=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,IH=/^[;\s]*/,fH=/^\s+|\s+$/g,VH=`
2
- `,m9="/",u9="*",V1="",DH="comment",RH="declaration";function NH($,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(FH);if(F)J+=F.length;var M=B.lastIndexOf(VH);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(KH)}function U(B){var F;B=B||[];while(F=L())if(F!==!1)B.push(F);return B}function L(){var B=Q();if(m9!=$.charAt(0)||u9!=$.charAt(1))return;var F=2;while(V1!=$.charAt(F)&&(u9!=$.charAt(F)||m9!=$.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:DH,comment:M})}function K(){var B=Q(),F=G(qH);if(!F)return;if(L(),!G(MH))return W("property missing ':'");var M=G(AH),P=B({type:RH,property:d9(F[0].replace(y9,V1)),value:M?d9(M[0].replace(y9,V1)):V1});return G(IH),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 d9($){return $?$.replace(fH,V1):V1}c9.exports=NH});var i9=I((z0)=>{var PH=z0&&z0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(z0,"__esModule",{value:!0});z0.default=wH;var TH=PH(l9());function wH($,Z){let J=null;if(!$||typeof $!=="string")return J;let H=(0,TH.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 a9=I((n9)=>{Object.defineProperty(n9,"__esModule",{value:!0});n9.camelCase=void 0;var xH=/^--[a-zA-Z0-9_-]+$/,EH=/-([a-z])/g,SH=/^[^-]+$/,vH=/^-(webkit|moz|ms|o|khtml)-/,CH=/^-(ms)-/,jH=function($){return!$||SH.test($)||xH.test($)},gH=function($,Z){return Z.toUpperCase()},p9=function($,Z){return"".concat(Z,"-")},_H=function($,Z){if(Z===void 0)Z={};if(jH($))return $;if($=$.toLowerCase(),Z.reactCompat)$=$.replace(CH,p9);else $=$.replace(vH,p9);return $.replace(EH,gH)};n9.camelCase=_H});var s9=I((J6,r9)=>{var hH=J6&&J6.__importDefault||function($){return $&&$.__esModule?$:{default:$}},kH=hH(i9()),bH=a9();function Z6($,Z){var J={};if(!$||typeof $!=="string")return J;return(0,kH.default)($,function(H,Y){if(H&&Y)J[(0,bH.camelCase)(H,Z)]=Y}),J}Z6.default=Z6;r9.exports=Z6});import*as t9 from"react";var H6=I((l)=>{var yH=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=dH;l.setStyleProp=lH;var mH=yH(s9()),uH=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function dH($,Z){if(!$.includes("-"))return Boolean(Z&&typeof Z.is==="string");if(uH.has($))return!1;return!0}var cH={reactCompat:!0};function lH($,Z){if(typeof $!=="string")return;if(!$.trim()){Z.style={};return}try{Z.style=(0,mH.default)($,cH)}catch(J){Z.style={}}}l.PRESERVE_CUSTOM_ATTRIBUTES=Number(t9.version.split(".")[0])>=16;l.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var iH=function($){return!l.ELEMENTS_WITH_NO_TEXT_CHILDREN.has($.name)};l.canTextBeChildOfNode=iH;var pH=function($){return $};l.returnFirstArg=pH});var Y6=I((Z7)=>{Object.defineProperty(Z7,"__esModule",{value:!0});Z7.default=rH;var U0=b9(),e9=H6(),nH=["checked","value"],oH=["input","select","textarea"],aH={reset:!0,submit:!0};function rH($,Z){if($===void 0)$={};var J={},H=Boolean($.type&&aH[$.type]);for(var Y in $){var Q=$[Y];if((0,U0.isCustomAttribute)(Y)){J[Y]=Q;continue}var X=Y.toLowerCase(),W=$7(X);if(W){var G=(0,U0.getPropertyInfo)(W);if(nH.includes(W)&&oH.includes(Z)&&!H)W=$7("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(e9.PRESERVE_CUSTOM_ATTRIBUTES)J[Y]=Q}return(0,e9.setStyleProp)($.style,J),J}function $7($){return U0.possibleStandardNames[$]}});import*as v1 from"react";var H7=I((L0)=>{var tH=L0&&L0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(L0,"__esModule",{value:!0});L0.default=J7;var eH=tH(Y6()),O0=H6(),$Y={cloneElement:v1.cloneElement,createElement:v1.createElement,isValidElement:v1.isValidElement};function J7($,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:$Y,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(ZY(D))(0,O0.setStyleProp)(D.attribs.style,D.attribs),f=D.attribs;else if(D.attribs)f=(0,eH.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=J7(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 ZY($){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=YY;var Y7=Q6(_9());_.htmlToDOM=Y7.default;var JY=Q6(Y6());_.attributesToProps=JY.default;var Q7=Q6(H7());_.domToReact=Q7.default;var i0=n5();Object.defineProperty(_,"Comment",{enumerable:!0,get:function(){return i0.Comment}});Object.defineProperty(_,"Element",{enumerable:!0,get:function(){return i0.Element}});Object.defineProperty(_,"ProcessingInstruction",{enumerable:!0,get:function(){return i0.ProcessingInstruction}});Object.defineProperty(_,"Text",{enumerable:!0,get:function(){return i0.Text}});var HY={lowerCaseAttributeNames:!1};function YY($,Z){var J;if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];return(0,Q7.default)((0,Y7.default)($,(J=Z===null||Z===void 0?void 0:Z.htmlparser2)!==null&&J!==void 0?J:HY),Z)}});var q7=I((XF,K7)=>{var PY="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";K7.exports=PY});var f7=I((GF,I7)=>{var TY=q7();function M7(){}function A7(){}A7.resetWarningCache=M7;I7.exports=function(){function $(H,Y,Q,X,W,G){if(G===TY)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:A7,resetWarningCache:M7};return J.PropTypes=J,J}});var U6=I((WF,V7)=>{V7.exports=f7()();var wY,xY});function mY($){if(typeof $==="object"&&$!==null){var Z=$.$$typeof;switch(Z){case EY:switch($=$.type,$){case hY:case kY:case vY:case jY:case CY:case bY:return $;default:switch($=$&&$.$$typeof,$){case _Y:case D7:case yY:case R7:case gY:return $;default:return Z}}case SY:return Z}}}var o,EY,SY,vY,CY,jY,gY,_Y,hY,kY,D7,bY,R7,yY,O6,L6=function($){return mY($)===R7};var N7=C3(()=>{o=typeof Symbol==="function"&&Symbol.for,EY=o?Symbol.for("react.element"):60103,SY=o?Symbol.for("react.portal"):60106,vY=o?Symbol.for("react.fragment"):60107,CY=o?Symbol.for("react.strict_mode"):60108,jY=o?Symbol.for("react.profiler"):60114,gY=o?Symbol.for("react.provider"):60109,_Y=o?Symbol.for("react.context"):60110,hY=o?Symbol.for("react.async_mode"):60111,kY=o?Symbol.for("react.concurrent_mode"):60111,D7=o?Symbol.for("react.forward_ref"):60112,bY=o?Symbol.for("react.suspense"):60113,R7=o?Symbol.for("react.memo"):60115,yY=o?Symbol.for("react.lazy"):60116;O6=D7});var B6=I((zF,S7)=>{N7();var dY={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},cY={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},lY={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},iY={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},x7={};x7[O6]=lY;function P7($){if(L6($))return iY;return x7[$.$$typeof]||dY}var{defineProperty:pY,getOwnPropertyNames:nY,getOwnPropertySymbols:T7,getOwnPropertyDescriptor:oY,getPrototypeOf:aY,prototype:w7}=Object;function E7($,Z,J){if(typeof Z!=="string"){if(w7){var H=aY(Z);if(H&&H!==w7)E7($,H,J)}var Y=nY(Z);if(T7)Y=Y.concat(T7(Z));var Q=P7($),X=P7(Z);for(var W=0;W<Y.length;++W){var G=Y[W];if(!cY[G]&&!(J&&J[G])&&!(X&&X[G])&&!(Q&&Q[G])){var z=oY(Z,G);try{pY($,G,z)}catch(U){}}}return $}return $}S7.exports=E7});var o0=I((q6,C7)=>{Object.defineProperty(q6,"__esModule",{value:!0});q6.default=$Q;function $Q($){return $.charAt(0).toUpperCase()+$.slice(1)}C7.exports=q6.default});var g7=I((M6,j7)=>{Object.defineProperty(M6,"__esModule",{value:!0});M6.default=QQ;var JQ=o0(),HQ=YQ(JQ);function YQ($){return $&&$.__esModule?$:{default:$}}function QQ($,Z,J){if($.hasOwnProperty(Z)){var H={},Y=$[Z],Q=(0,HQ.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}j7.exports=M6.default});var I6=I((A6,_7)=>{Object.defineProperty(A6,"__esModule",{value:!0});A6.default=GQ;function GQ($,Z,J,H,Y){for(var Q=0,X=$.length;Q<X;++Q){var W=$[Q](Z,J,H,Y);if(W)return W}}_7.exports=A6.default});var V6=I((f6,k7)=>{Object.defineProperty(f6,"__esModule",{value:!0});f6.default=zQ;function h7($,Z){if($.indexOf(Z)===-1)$.push(Z)}function zQ($,Z){if(Array.isArray(Z))for(var J=0,H=Z.length;J<H;++J)h7($,Z[J]);else h7($,Z)}k7.exports=f6.default});var R6=I((D6,b7)=>{Object.defineProperty(D6,"__esModule",{value:!0});D6.default=OQ;function OQ($){return $ instanceof Object&&!Array.isArray($)}b7.exports=D6.default});var u7=I((N6,m7)=>{Object.defineProperty(N6,"__esModule",{value:!0});N6.default=fQ;var BQ=g7(),FQ=a0(BQ),KQ=I6(),y7=a0(KQ),qQ=V6(),MQ=a0(qQ),AQ=R6(),IQ=a0(AQ);function a0($){return $&&$.__esModule?$:{default:$}}function fQ($){var{prefixMap:Z,plugins:J}=$;function H(Y){for(var Q in Y){var X=Y[Q];if((0,IQ.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,y7.default)(J,Q,X[G],Y,Z);(0,MQ.default)(W,U||X[G])}if(W.length>0)Y[Q]=W}else{var L=(0,y7.default)(J,Q,X,Y,Z);if(L)Y[Q]=L;Y=(0,FQ.default)(Z,Q,Y)}}return Y}return H}m7.exports=N6.default});var c7=I((d7,r0)=>{/*!
1
+ var T3=Object.create;var{getPrototypeOf:w3,defineProperty:M5,getOwnPropertyNames:x3}=Object;var E3=Object.prototype.hasOwnProperty;var T=($,Z,J)=>{J=$!=null?T3(w3($)):{};let H=Z||!$||!$.__esModule?M5(J,"default",{value:$,enumerable:!0}):J;for(let Y of x3($))if(!E3.call(H,Y))M5(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)M5($,J,{get:Z[J],enumerable:!0,configurable:!0,set:(H)=>Z[J]=()=>H})};var v3=($,Z)=>()=>($&&(Z=$($=0)),Z);var d5=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 OJ($){return $.type===n.Tag||$.type===n.Script||$.type===n.Style}$9.isTag=OJ;$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((D)=>{var O1=D&&D.__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)}}(),Q0=D&&D.__assign||function(){return Q0=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 $},Q0.apply(this,arguments)};Object.defineProperty(D,"__esModule",{value:!0});D.cloneNode=D.hasChildren=D.isDocument=D.isDirective=D.isComment=D.isText=D.isCDATA=D.isTag=D.Element=D.Document=D.CDATA=D.NodeWithChildren=D.ProcessingInstruction=D.Comment=D.Text=D.DataNode=D.Node=void 0;var i=d5(),l5=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 i5(this,Z)},$}();D.Node=l5;var y0=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}(l5);D.DataNode=y0;var J9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=i.ElementType.Text,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),Z}(y0);D.Text=J9;var H9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=i.ElementType.Comment,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),Z}(y0);D.Comment=H9;var Y9=function($){O1(Z,$);function Z(J,H){var Y=$.call(this,H)||this;return Y.name=J,Y.type=i.ElementType.Directive,Y}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Z}(y0);D.ProcessingInstruction=Y9;var m0=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}(l5);D.NodeWithChildren=m0;var Q9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=i.ElementType.CDATA,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),Z}(m0);D.CDATA=Q9;var X9=function($){O1(Z,$);function Z(){var J=$!==null&&$.apply(this,arguments)||this;return J.type=i.ElementType.Root,J}return Object.defineProperty(Z.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),Z}(m0);D.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"?i.ElementType.Script:J==="style"?i.ElementType.Style:i.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}(m0);D.Element=G9;function W9($){return(0,i.isTag)($)}D.isTag=W9;function z9($){return $.type===i.ElementType.CDATA}D.isCDATA=z9;function U9($){return $.type===i.ElementType.Text}D.isText=U9;function O9($){return $.type===i.ElementType.Comment}D.isComment=O9;function L9($){return $.type===i.ElementType.Directive}D.isDirective=L9;function B9($){return $.type===i.ElementType.Root}D.isDocument=B9;function VJ($){return Object.prototype.hasOwnProperty.call($,"children")}D.hasChildren=VJ;function i5($,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?c5($.children):[],Y=new G9($.name,Q0({},$.attribs),H);if(H.forEach(function(G){return G.parent=Y}),$.namespace!=null)Y.namespace=$.namespace;if($["x-attribsNamespace"])Y["x-attribsNamespace"]=Q0({},$["x-attribsNamespace"]);if($["x-attribsPrefix"])Y["x-attribsPrefix"]=Q0({},$["x-attribsPrefix"]);J=Y}else if(z9($)){var H=Z?c5($.children):[],Q=new Q9(H);H.forEach(function(z){return z.parent=Q}),J=Q}else if(B9($)){var H=Z?c5($.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}D.cloneNode=i5;function c5($){var Z=$.map(function(H){return i5(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 o5=I((Z1)=>{var DJ=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]}),RJ=Z1&&Z1.__exportStar||function($,Z){for(var J in $)if(J!=="default"&&!Object.prototype.hasOwnProperty.call(Z,J))DJ(Z,$,J)};Object.defineProperty(Z1,"__esModule",{value:!0});Z1.DomHandler=void 0;var n5=d5(),L1=p5();RJ(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?n5.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===n5.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===n5.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 a5=I((P9)=>{Object.defineProperty(P9,"__esModule",{value:!0});P9.formatAttributes=D9;P9.escapeSpecialCharacters=xJ;P9.revertEscapedCharacters=R9;P9.formatDOM=N9;var u0=o5(),X0=V9();function TJ($){return X0.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 wJ($){$=$.toLowerCase();var Z=TJ($);if(Z)return Z;return $}function xJ($){return $.replace(X0.CARRIAGE_RETURN_REGEX,X0.CARRIAGE_RETURN_PLACEHOLDER)}function R9($){return $.replace(X0.CARRIAGE_RETURN_PLACEHOLDER_REGEX,X0.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 F=wJ(L.nodeName);G=new u0.Element(F,D9(L.attributes)),G.children=N9(F==="template"?L.content.childNodes:L.childNodes,G);break}case 3:G=new u0.Text(R9((H=L.nodeValue)!==null&&H!==void 0?H:""));break;case 8:G=new u0.Comment((Y=L.nodeValue)!==null&&Y!==void 0?Y:"");break;default:continue}var K=(Q=W[z-1])!==null&&Q!==void 0?Q:null;if(K)K.next=G;G.parent=Z,G.prev=K,G.next=null,W.push(G)}if(J){if(G=new u0.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=_J;var jJ=a5(),T9="html",w9="head",d0="body",gJ=/<([a-zA-Z]+[0-9]?)/,x9=/<head[^]*>/i,E9=/<body[^]*>/i,l0=function($,Z){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},r5=function($,Z){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},S9=typeof window==="object"&&window.DOMParser;if(typeof S9==="function")s5=new S9,t5="text/html",r5=function($,Z){if(Z)$="<".concat(Z,">").concat($,"</").concat(Z,">");return s5.parseFromString($,t5)},l0=r5;var s5,t5;if(typeof document==="object"&&document.implementation)E1=document.implementation.createHTMLDocument(),l0=function($,Z){if(Z){var J=E1.documentElement.querySelector(Z);if(J)J.innerHTML=$;return E1}return E1.documentElement.innerHTML=$,E1};var E1,c0=typeof document==="object"&&document.createElement("template"),e5;if(c0&&c0.content)e5=function($){return c0.innerHTML=$,c0.content.childNodes};var v9=function(){return document.createDocumentFragment().childNodes};function _J($){var Z,J,H,Y,Q,X;$=(0,jJ.escapeSpecialCharacters)($);var W=gJ.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=r5($);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(d0);(H=U===null||U===void 0?void 0:U.parentNode)===null||H===void 0||H.removeChild(U)}return z.querySelectorAll(T9)}case w9:case d0:{var L=l0($).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(e5)return e5($);var U=l0($,d0).querySelector(d0);return(X=U===null||U===void 0?void 0:U.childNodes)!==null&&X!==void 0?X:v9()}}}});var g9=I((G0)=>{var kJ=G0&&G0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(G0,"__esModule",{value:!0});G0.default=uJ;var bJ=kJ(j9()),yJ=a5(),mJ=/<(![a-zA-Z\s]+)>/;function uJ($){if(typeof $!=="string")throw TypeError("First argument must be a string");if(!$)return[];var Z=mJ.exec($),J=Z?Z[1]:void 0;return(0,yJ.formatDOM)((0,bJ.default)($),null,J)}});var _9=I((lJ)=>{var dJ=0;lJ.SAME=dJ;var cJ=1;lJ.CAMELCASE=cJ;lJ.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((HH)=>{function oJ($){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={},aJ=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];aJ.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 $6=/[\-\:]([a-z])/g,Z6=($)=>$[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($6,Z6);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($6,Z6);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($6,Z6);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 rJ="xlinkHref";k[rJ]=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:sJ,SAME:tJ,possibleStandardNames:h9}=_9(),eJ=":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",$H=eJ+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ZH=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+$H+"]*$")),JH=Object.keys(h9).reduce(($,Z)=>{let J=h9[Z];if(J===tJ)$[Z]=Z;else if(J===sJ)$[Z.toLowerCase()]=Z;else $[Z]=J;return $},{});HH.BOOLEAN=3;HH.BOOLEANISH_STRING=2;HH.NUMERIC=5;HH.OVERLOADED_BOOLEAN=4;HH.POSITIVE_NUMERIC=6;HH.RESERVED=0;HH.STRING=1;HH.getPropertyInfo=oJ;HH.isCustomAttribute=ZH;HH.possibleStandardNames=JH});var c9=I((IB,d9)=>{var b9=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,FH=/\n/g,KH=/^\s*/,qH=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,MH=/^:\s*/,AH=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,IH=/^[;\s]*/,fH=/^\s+|\s+$/g,VH=`
2
+ `,y9="/",m9="*",V1="",DH="comment",RH="declaration";function NH($,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 q=B.match(FH);if(q)J+=q.length;var M=B.lastIndexOf(VH);H=~M?B.length-M:H+B.length}function Q(){var B={line:J,column:H};return function(q){return q.position=new X(B),z(),q}}function X(B){this.start=B,this.end={line:J,column:H},this.source=Z.source}X.prototype.content=$;function W(B){var q=Error(Z.source+":"+J+":"+H+": "+B);if(q.reason=B,q.filename=Z.source,q.line=J,q.column=H,q.source=$,Z.silent);else throw q}function G(B){var q=B.exec($);if(!q)return;var M=q[0];return Y(M),$=$.slice(M.length),q}function z(){G(KH)}function U(B){var q;B=B||[];while(q=L())if(q!==!1)B.push(q);return B}function L(){var B=Q();if(y9!=$.charAt(0)||m9!=$.charAt(1))return;var q=2;while(V1!=$.charAt(q)&&(m9!=$.charAt(q)||y9!=$.charAt(q+1)))++q;if(q+=2,V1===$.charAt(q-1))return W("End of comment missing");var M=$.slice(2,q-2);return H+=2,Y(M),$=$.slice(q),H+=2,B({type:DH,comment:M})}function F(){var B=Q(),q=G(qH);if(!q)return;if(L(),!G(MH))return W("property missing ':'");var M=G(AH),P=B({type:RH,property:u9(q[0].replace(b9,V1)),value:M?u9(M[0].replace(b9,V1)):V1});return G(IH),P}function K(){var B=[];U(B);var q;while(q=F())if(q!==!1)B.push(q),U(B);return B}return z(),K()}function u9($){return $?$.replace(fH,V1):V1}d9.exports=NH});var l9=I((W0)=>{var PH=W0&&W0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(W0,"__esModule",{value:!0});W0.default=wH;var TH=PH(c9());function wH($,Z){let J=null;if(!$||typeof $!=="string")return J;let H=(0,TH.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((p9)=>{Object.defineProperty(p9,"__esModule",{value:!0});p9.camelCase=void 0;var xH=/^--[a-zA-Z0-9_-]+$/,EH=/-([a-z])/g,SH=/^[^-]+$/,vH=/^-(webkit|moz|ms|o|khtml)-/,CH=/^-(ms)-/,jH=function($){return!$||SH.test($)||xH.test($)},gH=function($,Z){return Z.toUpperCase()},i9=function($,Z){return"".concat(Z,"-")},_H=function($,Z){if(Z===void 0)Z={};if(jH($))return $;if($=$.toLowerCase(),Z.reactCompat)$=$.replace(CH,i9);else $=$.replace(vH,i9);return $.replace(EH,gH)};p9.camelCase=_H});var r9=I((H6,a9)=>{var hH=H6&&H6.__importDefault||function($){return $&&$.__esModule?$:{default:$}},kH=hH(l9()),bH=o9();function J6($,Z){var J={};if(!$||typeof $!=="string")return J;return(0,kH.default)($,function(H,Y){if(H&&Y)J[(0,bH.camelCase)(H,Z)]=Y}),J}J6.default=J6;a9.exports=J6});import*as s9 from"react";var Y6=I((l)=>{var yH=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=dH;l.setStyleProp=lH;var mH=yH(r9()),uH=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function dH($,Z){if(!$.includes("-"))return Boolean(Z&&typeof Z.is==="string");if(uH.has($))return!1;return!0}var cH={reactCompat:!0};function lH($,Z){if(typeof $!=="string")return;if(!$.trim()){Z.style={};return}try{Z.style=(0,mH.default)($,cH)}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 iH=function($){return!l.ELEMENTS_WITH_NO_TEXT_CHILDREN.has($.name)};l.canTextBeChildOfNode=iH;var pH=function($){return $};l.returnFirstArg=pH});var Q6=I(($7)=>{Object.defineProperty($7,"__esModule",{value:!0});$7.default=rH;var z0=k9(),t9=Y6(),nH=["checked","value"],oH=["input","select","textarea"],aH={reset:!0,submit:!0};function rH($,Z){if($===void 0)$={};var J={},H=Boolean($.type&&aH[$.type]);for(var Y in $){var Q=$[Y];if((0,z0.isCustomAttribute)(Y)){J[Y]=Q;continue}var X=Y.toLowerCase(),W=e9(X);if(W){var G=(0,z0.getPropertyInfo)(W);if(nH.includes(W)&&oH.includes(Z)&&!H)W=e9("default"+X);switch(J[W]=Q,G===null||G===void 0?void 0:G.type){case z0.BOOLEAN:J[W]=!0;break;case z0.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 z0.possibleStandardNames[$]}});import*as S1 from"react";var J7=I((O0)=>{var tH=O0&&O0.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(O0,"__esModule",{value:!0});O0.default=Z7;var eH=tH(Q6()),U0=Y6(),$Y={cloneElement:S1.cloneElement,createElement:S1.createElement,isValidElement:S1.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:U0.returnFirstArg,U=(H=Z.library)!==null&&H!==void 0?H:$Y,L=U.cloneElement,F=U.createElement,K=U.isValidElement,B=$.length;for(var q=0;q<B;q++){var M=$[q];if(G){var P=(Y=Z.replace)===null||Y===void 0?void 0:Y.call(Z,M,q);if(K(P)){if(B>1)P=L(P,{key:(Q=P.key)!==null&&Q!==void 0?Q:q});W.push(z(P,M,q));continue}}if(M.type==="text"){var R=!M.data.trim().length;if(R&&M.parent&&!(0,U0.canTextBeChildOfNode)(M.parent))continue;if(Z.trim&&R)continue;W.push(z(M.data,M,q));continue}var N=M,f={};if(ZY(N))(0,U0.setStyleProp)(N.attribs.style,N.attribs),f=N.attribs;else if(N.attribs)f=(0,eH.default)(N.attribs,N.name);var w=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)w=Z7(M.children,Z);break;default:continue}if(B>1)f.key=q;W.push(z(F(M.name,f,w),M,q))}return W.length===1?W[0]:W}function ZY($){return U0.PRESERVE_CUSTOM_ATTRIBUTES&&$.type==="tag"&&(0,U0.isCustomComponent)($.name,$.attribs)}});var G6=I((_)=>{var X6=_&&_.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(_,"__esModule",{value:!0});_.htmlToDOM=_.domToReact=_.attributesToProps=_.Text=_.ProcessingInstruction=_.Element=_.Comment=void 0;_.default=YY;var H7=X6(g9());_.htmlToDOM=H7.default;var JY=X6(Q6());_.attributesToProps=JY.default;var Y7=X6(J7());_.domToReact=Y7.default;var i0=o5();Object.defineProperty(_,"Comment",{enumerable:!0,get:function(){return i0.Comment}});Object.defineProperty(_,"Element",{enumerable:!0,get:function(){return i0.Element}});Object.defineProperty(_,"ProcessingInstruction",{enumerable:!0,get:function(){return i0.ProcessingInstruction}});Object.defineProperty(_,"Text",{enumerable:!0,get:function(){return i0.Text}});var HY={lowerCaseAttributeNames:!1};function YY($,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:HY),Z)}});var K7=I((XF,F7)=>{var NY="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";F7.exports=NY});var I7=I((GF,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 O6=I((WF,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,L6,B6=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;L6=V7});var F6=I((zF,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[L6]=cY;function N7($){if(B6($))return lY;return w7[$.$$typeof]||uY}var{defineProperty:iY,getOwnPropertyNames:pY,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=pY(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{iY($,G,z)}catch(U){}}}return $}return $}E7.exports=x7});var o0=I((M6,v7)=>{Object.defineProperty(M6,"__esModule",{value:!0});M6.default=eY;function eY($){return $.charAt(0).toUpperCase()+$.slice(1)}v7.exports=M6.default});var j7=I((A6,C7)=>{Object.defineProperty(A6,"__esModule",{value:!0});A6.default=YQ;var ZQ=o0(),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=A6.default});var f6=I((I6,g7)=>{Object.defineProperty(I6,"__esModule",{value:!0});I6.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=I6.default});var D6=I((V6,h7)=>{Object.defineProperty(V6,"__esModule",{value:!0});V6.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=V6.default});var N6=I((R6,k7)=>{Object.defineProperty(R6,"__esModule",{value:!0});R6.default=UQ;function UQ($){return $ instanceof Object&&!Array.isArray($)}k7.exports=R6.default});var m7=I((P6,y7)=>{Object.defineProperty(P6,"__esModule",{value:!0});P6.default=IQ;var LQ=j7(),BQ=a0(LQ),FQ=f6(),b7=a0(FQ),KQ=D6(),qQ=a0(KQ),MQ=N6(),AQ=a0(MQ);function a0($){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=P6.default});var d7=I((u7,r0)=>{/*!
3
3
  * Bowser - a browser detector
4
4
  * https://github.com/ded/bowser
5
5
  * MIT License | (c) Dustin Diaz 2015
6
- */(function($,Z,J){if(typeof r0<"u"&&r0.exports)r0.exports=J();else if(typeof define=="function"&&define.amd)define(Z,J);else $[Z]=J()})(d7,"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),K5=!L&&!P&&/macintosh/i.test(G),q5=!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),P3=/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(K5)O.mac=$,O.osname="macOS";else if(P3)O.xbox=$,O.osname="Xbox";else if(u1)O.windows=$,O.osname="Windows";else if(q5)O.linux=$,O.osname="Linux";function T3(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=T3(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 o7=I((P6,n7)=>{Object.defineProperty(P6,"__esModule",{value:!0});P6.default=PQ;var DQ=c7(),l7=RQ(DQ);function RQ($){return $&&$.__esModule?$:{default:$}}var i7={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 NQ($){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 PQ($){var Z=l7.default._detect($);if(Z.yandexbrowser)Z=l7.default._detect($.replace(/YaBrowser\/[0-9.]*/,""));for(var J in i7)if(Z.hasOwnProperty(J)){var H=i7[J];Z.jsPrefix=H,Z.cssPrefix="-"+H.toLowerCase()+"-";break}if(Z.browserName=NQ(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}n7.exports=P6.default});var r7=I((T6,a7)=>{Object.defineProperty(T6,"__esModule",{value:!0});T6.default=wQ;function wQ($,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}a7.exports=T6.default});var e7=I((w6,t7)=>{Object.defineProperty(w6,"__esModule",{value:!0});var EQ=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=dQ;var SQ=o7(),vQ=C1(SQ),CQ=r7(),jQ=C1(CQ),gQ=o0(),_Q=C1(gQ),hQ=V6(),kQ=C1(hQ),bQ=R6(),yQ=C1(bQ),mQ=I6(),s7=C1(mQ);function C1($){return $&&$.__esModule?$:{default:$}}function uQ($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function dQ($){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]:{};uQ(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,vQ.default)(this._userAgent);if(this._browserInfo&&this._browserInfo.cssPrefix)this.prefixedKeyframes=(0,jQ.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 EQ(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,yQ.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,s7.default)(J,W,G[U],X,this._metaData);(0,kQ.default)(z,K||G[U])}if(z.length>0)X[W]=z}else{var q=(0,s7.default)(J,W,G,X,this._metaData);if(q)X[W]=q;if(this._requiresPrefix.hasOwnProperty(W)){if(X[this._browserInfo.jsPrefix+(0,_Q.default)(W)]=G,!this._keepUnprefixed)delete X[W]}}}return X}}],[{key:"prefixAll",value:function(X){return H(X)}}]),Y}()}t7.exports=w6.default});var x6=I((qF,s0)=>{/*!
6
+ */(function($,Z,J){if(typeof r0<"u"&&r0.exports)r0.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(d1){var q1=G.match(d1);return q1&&q1.length>1&&q1[1]||""}function U(d1){var q1=G.match(d1);return q1&&q1.length>1&&q1[2]||""}var L=z(/(ipod|iphone|ipad)/i).toLowerCase(),F=/like android/i.test(G),K=!F&&/android/i.test(G),B=/nexus\s*[0-6]\s*/i.test(G),q=!B&&/nexus\s*[0-9]+/i.test(G),M=/CrOS/.test(G),P=/silk/i.test(G),R=/sailfish/i.test(G),N=/tizen/i.test(G),f=/(web|hpw)(o|0)s/i.test(G),w=/windows phone/i.test(G),v=/SamsungBrowser/i.test(G),m1=!w&&/windows/i.test(G),K5=!L&&!P&&/macintosh/i.test(G),q5=!K&&!R&&!N&&!f&&/linux/i.test(G),u1=U(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),j=z(/version\/(\d+(\.\d+)?)/i),A0=/tablet/i.test(G)&&!/tablet pc/i.test(G),t=!A0&&/[^-]mobi/i.test(G),N3=/xbox/i.test(G),O;if(/opera/i.test(G))O={name:"Opera",opera:$,version:j||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)||j};else if(/SamsungBrowser/i.test(G))O={name:"Samsung Internet for Android",samsungBrowser:$,version:j||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:j||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:j||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(w)if(O={name:"Windows Phone",osname:"Windows Phone",windowsphone:$},u1)O.msedge=$,O.version=u1;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:u1};else if(/vivaldi/i.test(G))O={name:"Vivaldi",vivaldi:$,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||j};else if(R)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:j||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)};else if(f)O={name:"WebOS",osname:"WebOS",webos:$,version:j||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(N)O={name:"Tizen",osname:"Tizen",tizen:$,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||j};else if(/qupzilla/i.test(G))O={name:"QupZilla",qupzilla:$,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||j};else if(/chromium/i.test(G))O={name:"Chromium",chromium:$,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||j};else if(/chrome|crios|crmo/i.test(G))O={name:"Chrome",chrome:$,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)};else if(K)O={name:"Android",version:j};else if(/safari|applewebkit/i.test(G)){if(O={name:"Safari",safari:$},j)O.version=j}else if(L){if(O={name:L=="iphone"?"iPhone":L=="ipad"?"iPad":"iPod"},j)O.version=j}else if(/googlebot/i.test(G))O={name:"Googlebot",googlebot:$,version:z(/googlebot\/(\d+(\.\d+))/i)||j};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&&j)O.version=j}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&&(K||O.silk))O.android=$,O.osname="Android";else if(!O.windowsphone&&L)O[L]=$,O.ios=$,O.osname="iOS";else if(K5)O.mac=$,O.osname="macOS";else if(N3)O.xbox=$,O.osname="Xbox";else if(m1)O.windows=$,O.osname="Windows";else if(q5)O.linux=$,O.osname="Linux";function P3(d1){switch(d1){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(K)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 S8=!O.windows&&b.split(".")[0];if(A0||q||L=="ipad"||K&&(S8==3||S8>=4&&!t)||O.silk)O.tablet=$;else if(t||L=="iphone"||L=="ipod"||K||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 F=z-H(L);return L=L+Array(F+1).join(".0"),Y(L.split("."),function(K){return Array(20-K.length).join("0")+K}).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 F=""+L.version;for(var K in G)if(G.hasOwnProperty(K)){if(L[K]){if(typeof G[K]!=="string")throw Error("Browser version in the minVersion map should be a string: "+K+": "+String(G));return Q([F,G[K]])<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((T6,p7)=>{Object.defineProperty(T6,"__esModule",{value:!0});T6.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"},i7={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 i7)if($.hasOwnProperty(Z))return i7[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}p7.exports=T6.default});var a7=I((w6,o7)=>{Object.defineProperty(w6,"__esModule",{value:!0});w6.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=w6.default});var t7=I((x6,s7)=>{Object.defineProperty(x6,"__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}}();x6.default=uQ;var EQ=n7(),SQ=v1(EQ),vQ=a7(),CQ=v1(vQ),jQ=o0(),gQ=v1(jQ),_Q=D6(),hQ=v1(_Q),kQ=N6(),bQ=v1(kQ),yQ=f6(),r7=v1(yQ);function v1($){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 F=(0,r7.default)(J,W,G[U],X,this._metaData);(0,hQ.default)(z,F||G[U])}if(z.length>0)X[W]=z}else{var K=(0,r7.default)(J,W,G,X,this._metaData);if(K)X[W]=K;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=x6.default});var E6=I((qF,s0)=>{/*!
7
7
  Copyright (c) 2015 Jed Watson.
8
8
  Based on code that is Copyright 2013-2015, Facebook, Inc.
9
9
  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 s0<"u"&&s0.exports)s0.exports=Z;else window.ExecutionEnvironment=Z})()});var R1=I((E6,$$)=>{Object.defineProperty(E6,"__esModule",{value:!0});E6.default=iQ;var lQ=/-webkit-|-moz-|-ms-/;function iQ($){return typeof $==="string"&&lQ.test($)}$$.exports=E6.default});var J$=I((S6,Z$)=>{Object.defineProperty(S6,"__esModule",{value:!0});S6.default=sQ;var nQ=R1(),oQ=aQ(nQ);function aQ($){return $&&$.__esModule?$:{default:$}}var rQ=["-webkit-","-moz-",""];function sQ($,Z){if(typeof Z==="string"&&!(0,oQ.default)(Z)&&Z.indexOf("calc(")>-1)return rQ.map(function(J){return Z.replace(/calc\(/g,J+"calc(")})}Z$.exports=S6.default});var Y$=I((v6,H$)=>{Object.defineProperty(v6,"__esModule",{value:!0});v6.default=HX;var eQ=R1(),$X=ZX(eQ);function ZX($){return $&&$.__esModule?$:{default:$}}var JX=["-webkit-",""];function HX($,Z){if(typeof Z==="string"&&!(0,$X.default)(Z)&&Z.indexOf("cross-fade(")>-1)return JX.map(function(J){return Z.replace(/cross-fade\(/g,J+"cross-fade(")})}H$.exports=v6.default});var X$=I((C6,Q$)=>{Object.defineProperty(C6,"__esModule",{value:!0});C6.default=GX;var QX=["-webkit-","-moz-",""],XX={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function GX($,Z){if($==="cursor"&&XX.hasOwnProperty(Z))return QX.map(function(J){return J+Z})}Q$.exports=C6.default});var W$=I((j6,G$)=>{Object.defineProperty(j6,"__esModule",{value:!0});j6.default=BX;var zX=R1(),UX=OX(zX);function OX($){return $&&$.__esModule?$:{default:$}}var LX=["-webkit-",""];function BX($,Z){if(typeof Z==="string"&&!(0,UX.default)(Z)&&Z.indexOf("filter(")>-1)return LX.map(function(J){return Z.replace(/filter\(/g,J+"filter(")})}G$.exports=j6.default});var O$=I((g6,U$)=>{Object.defineProperty(g6,"__esModule",{value:!0});g6.default=KX;var z$={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 KX($,Z){if($==="display"&&z$.hasOwnProperty(Z))return z$[Z]}U$.exports=g6.default});var F$=I((_6,B$)=>{Object.defineProperty(_6,"__esModule",{value:!0});_6.default=AX;var MX={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},L$={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"};function AX($,Z,J){if(L$.hasOwnProperty($))J[L$[$]]=MX[Z]||Z}B$.exports=_6.default});var M$=I((h6,q$)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.default=VX;var fX={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},K$={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"};function VX($,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(K$.hasOwnProperty($))J[K$[$]]=fX[Z]||Z}q$.exports=h6.default});var f$=I((k6,I$)=>{Object.defineProperty(k6,"__esModule",{value:!0});k6.default=wX;var RX=R1(),NX=PX(RX);function PX($){return $&&$.__esModule?$:{default:$}}var TX=["-webkit-","-moz-",""],A$=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function wX($,Z){if(typeof Z==="string"&&!(0,NX.default)(Z)&&A$.test(Z))return TX.map(function(J){return Z.replace(A$,function(H){return J+H})})}I$.exports=k6.default});var D$=I((b6,V$)=>{Object.defineProperty(b6,"__esModule",{value:!0});b6.default=jX;var EX=R1(),SX=vX(EX);function vX($){return $&&$.__esModule?$:{default:$}}var CX=["-webkit-",""];function jX($,Z){if(typeof Z==="string"&&!(0,SX.default)(Z)&&Z.indexOf("image-set(")>-1)return CX.map(function(J){return Z.replace(/image-set\(/g,J+"image-set(")})}V$.exports=b6.default});var N$=I((y6,R$)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.default=_X;function _X($,Z){if($==="position"&&Z==="sticky")return["-webkit-sticky","sticky"]}R$.exports=y6.default});var T$=I((m6,P$)=>{Object.defineProperty(m6,"__esModule",{value:!0});m6.default=mX;var kX=["-webkit-","-moz-",""],bX={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},yX={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function mX($,Z){if(bX.hasOwnProperty($)&&yX.hasOwnProperty(Z))return kX.map(function(J){return J+Z})}P$.exports=m6.default});var x$=I((MF,w$)=>{var dX=/[A-Z]/g,cX=/^ms-/,u6={};function lX($){return"-"+$.toLowerCase()}function iX($){if(u6.hasOwnProperty($))return u6[$];var Z=$.replace(dX,lX);return u6[$]=cX.test(Z)?"-"+Z:Z}w$.exports=iX});var c6=I((d6,E$)=>{Object.defineProperty(d6,"__esModule",{value:!0});d6.default=aX;var pX=x$(),nX=oX(pX);function oX($){return $&&$.__esModule?$:{default:$}}function aX($){return(0,nX.default)($)}E$.exports=d6.default});var C$=I((i6,v$)=>{Object.defineProperty(i6,"__esModule",{value:!0});i6.default=QG;var sX=c6(),tX=l6(sX),eX=R1(),$G=l6(eX),ZG=o0(),S$=l6(ZG);function l6($){return $&&$.__esModule?$:{default:$}}var JG={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},HG={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function YG($,Z){if((0,$G.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,tX.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,HG[z[U]]+G))}}J[H]=X.join(",")}return J.join(",")}function QG($,Z,J,H){if(typeof Z==="string"&&JG.hasOwnProperty($)){var Y=YG(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,S$.default)($)]=Q,J["Moz"+(0,S$.default)($)]=X,Y}}v$.exports=i6.default});var a=I((n6,p$)=>{Object.defineProperty(n6,"__esModule",{value:!0});n6.default=GG;function GG($,Z,J){if(J)return[$,Z];return $}p$.exports=n6.default});var o$=I((o6,n$)=>{Object.defineProperty(o6,"__esModule",{value:!0});o6.default=LG;var zG=a(),UG=OG(zG);function OG($){return $&&$.__esModule?$:{default:$}}function LG($,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,UG.default)(Z.replace(/calc\(/g,X+"calc("),Z,W)}n$.exports=o6.default});var r$=I((a6,a$)=>{Object.defineProperty(a6,"__esModule",{value:!0});a6.default=MG;var FG=a(),KG=qG(FG);function qG($){return $&&$.__esModule?$:{default:$}}function MG($,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,KG.default)(Z.replace(/cross-fade\(/g,X+"cross-fade("),Z,W)}a$.exports=a6.default});var e$=I((r6,t$)=>{Object.defineProperty(r6,"__esModule",{value:!0});r6.default=RG;var IG=a(),s$=fG(IG);function fG($){return $&&$.__esModule?$:{default:$}}var VG={grab:!0,grabbing:!0},DG={"zoom-in":!0,"zoom-out":!0};function RG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W}=H;if($==="cursor"&&VG[Z]&&(Y==="firefox"||Y==="chrome"||Y==="safari"||Y==="opera"))return(0,s$.default)(X+Z,Z,W);if($==="cursor"&&DG[Z]&&(Y==="firefox"&&Q<24||Y==="chrome"&&Q<37||Y==="safari"&&Q<9||Y==="opera"&&Q<24))return(0,s$.default)(X+Z,Z,W)}t$.exports=r6.default});var Z4=I((s6,$4)=>{Object.defineProperty(s6,"__esModule",{value:!0});s6.default=xG;var PG=a(),TG=wG(PG);function wG($){return $&&$.__esModule?$:{default:$}}function xG($,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,TG.default)(Z.replace(/filter\(/g,X+"filter("),Z,W)}$4.exports=s6.default});var H4=I((t6,J4)=>{Object.defineProperty(t6,"__esModule",{value:!0});t6.default=gG;var SG=a(),vG=CG(SG);function CG($){return $&&$.__esModule?$:{default:$}}var jG={flex:!0,"inline-flex":!0};function gG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W}=H;if($==="display"&&jG[Z]&&(Y==="chrome"&&Q<29&&Q>20||(Y==="safari"||Y==="ios_saf")&&Q<9&&Q>6||Y==="opera"&&(Q===15||Q===16)))return(0,vG.default)(X+Z,Z,W)}J4.exports=t6.default});var Q4=I((Z8,Y4)=>{Object.defineProperty(Z8,"__esModule",{value:!0});Z8.default=yG;var hG=a(),kG=bG(hG);function bG($){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 yG($,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,kG.default)(X+e6[Z],Z,W);if($8.hasOwnProperty($))J[$8[$]]=e6[Z]||Z}}Y4.exports=Z8.default});var G4=I((Y8,X4)=>{Object.defineProperty(Y8,"__esModule",{value:!0});Y8.default=pG;var uG=a(),dG=cG(uG);function cG($){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"},lG=["alignContent","alignSelf","order","flexGrow","flexShrink","flexBasis","flexDirection"],iG=Object.keys(H8).concat(lG);function pG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W,requiresPrefix:G}=H;if((iG.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,dG.default)(X+J8[Z],Z,W);if(H8.hasOwnProperty($))J[H8[$]]=J8[Z]||Z}}X4.exports=Y8.default});var U4=I((Q8,z4)=>{Object.defineProperty(Q8,"__esModule",{value:!0});Q8.default=sG;var oG=a(),aG=rG(oG);function rG($){return $&&$.__esModule?$:{default:$}}var W4=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function sG($,Z,J,H){var{browserName:Y,browserVersion:Q,cssPrefix:X,keepUnprefixed:W}=H;if(typeof Z==="string"&&W4.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,aG.default)(Z.replace(W4,function(G){return X+G}),Z,W)}z4.exports=Q8.default});var L4=I((X8,O4)=>{Object.defineProperty(X8,"__esModule",{value:!0});X8.default=JW;var eG=a(),$W=ZW(eG);function ZW($){return $&&$.__esModule?$:{default:$}}function JW($,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,$W.default)(Z.replace(/image-set\(/g,Q+"image-set("),Z,X)}O4.exports=X8.default});var F4=I((G8,B4)=>{Object.defineProperty(G8,"__esModule",{value:!0});G8.default=GW;var YW=a(),QW=XW(YW);function XW($){return $&&$.__esModule?$:{default:$}}function GW($,Z,J,H){var{browserName:Y,cssPrefix:Q,keepUnprefixed:X}=H;if($==="position"&&Z==="sticky"&&(Y==="safari"||Y==="ios_saf"))return(0,QW.default)(Q+Z,Z,X)}B4.exports=G8.default});var q4=I((W8,K4)=>{Object.defineProperty(W8,"__esModule",{value:!0});W8.default=FW;var zW=a(),UW=OW(zW);function OW($){return $&&$.__esModule?$:{default:$}}var LW={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},BW={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function FW($,Z,J,H){var{cssPrefix:Y,keepUnprefixed:Q}=H;if(LW.hasOwnProperty($)&&BW.hasOwnProperty(Z))return(0,UW.default)(Y+Z,Z,Q)}K4.exports=W8.default});var A4=I((U8,M4)=>{Object.defineProperty(U8,"__esModule",{value:!0});U8.default=fW;var qW=c6(),MW=AW(qW);function AW($){return $&&$.__esModule?$:{default:$}}var IW={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},z8=void 0;function fW($,Z,J,H){var{cssPrefix:Y,keepUnprefixed:Q,requiresPrefix:X}=H;if(typeof Z==="string"&&IW.hasOwnProperty($)){if(!z8)z8=Object.keys(X).map(function(G){return(0,MW.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(",")}}M4.exports=U8.default});import{useContext as _5,useEffect as h5}from"react";import{createContext as j3,useContext as g3}from"react";var _3=j3(null),S8=()=>{let $=g3(_3);if(!$)throw Error("usePieConfig must be used within PieConfigProvider");return $},h3=()=>{let{apiServer:$}=S8();return $},v8=h3;var k3=()=>{let{enableRenderingLog:$}=S8();return $},w1=k3;import{createContext as $Z}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 b3($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var V5={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 y3($){if(console&&console.warn)console.warn($)}var g8=Number.isNaN||function(Z){return Z!==Z};function w(){w.init.call(this)}V5.exports=w;V5.exports.once=c3;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,y3(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 m3(){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=m3.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 u3(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?d3(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 u3($,Z){for(;Z+1<$.length;Z++)$[Z]=$[Z+1];$.pop()}function d3($){var Z=Array($.length);for(var J=0;J<Z.length;++J)Z[J]=$[J].listener||$[J];return Z}function c3($,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")l3($,Y,{once:!0})})}function l3($,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 i3=V5.exports,d8=b3(i3),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 A5;(function($){$[$.channelCompaction=1]="channelCompaction"})(A5||(A5={}));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 n3($,Z){if(globalThis.console){let J=globalThis.console[$];if(c8(J))J.apply(globalThis.console,Z)}}function o3($,Z){return Math.floor(Math.random()*(Z-$+1)+$)}function R0($,Z,J){if($>31)$=31;let H=o3(0,Math.min(J,Z*Math.pow(2,$)));return Math.min(J,Z+H)}function a3($){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=A5.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 i8{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 I5{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 p8{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 B=X.substring(0,W);H.dispatchEvent(new MessageEvent("message",{data:B})),X=X.substring(W+1),W=0}else++W}else{let B=new Uint8Array(G.length+q.length);B.set(G),B.set(q,G.length),G=B;while(!0){let F=$.options.decoder.decodeReply(G);if(F.ok){let M=G.slice(0,F.pos);H.dispatchEvent(new MessageEvent("message",{data:M})),G=G.slice(F.pos);continue}break}}}catch(B){H.dispatchEvent(new Event("error",{detail:B})),H.dispatchEvent(new Event("close")),U.close();return}L()}).catch(function(K){H.dispatchEvent(new Event("error",{detail:K})),H.dispatchEvent(new Event("close")),U.close();return})}return L()}})}).catch((Q)=>{H.dispatchEvent(new Event("error",{detail:Q})),H.dispatchEvent(new Event("close"))}),H}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,J){this._protocol=$,this._abortController=new AbortController;let H,Y;if($==="json")H={Accept:"application/json","Content-Type":"application/json"},Y=J;else H={Accept:"application/octet-stream","Content-Type":"application/octet-stream"},Y=J;let Q={method:"POST",headers:H,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",(W)=>{this._abortController.abort(),Z.onError(W)}),X.addEventListener("close",()=>{this._abortController.abort(),Z.onClose({code:4,reason:"connection closed"})}),X.addEventListener("message",(W)=>{Z.onMessage(W.data)})}close(){this._abortController.abort()}send($,Z,J){let H,Y,Q={session:Z,node:J,data:$};if(this._protocol==="json")H={"Content-Type":"application/json"},Y=JSON.stringify(Q);else H={"Content-Type":"application/octet-stream"},Y=this.options.encoder.encodeEmulationRequest(Q);let X=this.options.fetch,W={method:"POST",headers:H,body:Y,mode:"cors",credentials:"same-origin"};X(this.options.emulationEndpoint,W)}}class n8{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,J){let H;if(globalThis&&globalThis.document&&globalThis.document.baseURI)H=new URL(this.endpoint,globalThis.document.baseURI);else H=new URL(this.endpoint);H.searchParams.append("cf_connect",J);let Y={},Q=new this.options.eventsource(H.toString(),Y);this._transport=Q;let X=this;Q.onopen=function(){Z.onOpen()},Q.onerror=function(W){Q.close(),Z.onError(W),Z.onClose({code:4,reason:"connection closed"})},Q.onmessage=function(W){Z.onMessage(W.data)},X._onClose=function(){Z.onClose({code:4,reason:"connection closed"})}}close(){if(this._transport.close(),this._onClose!==null)this._onClose()}send($,Z,J){let H={session:Z,node:J,data:$},Y={"Content-Type":"application/json"},Q=JSON.stringify(H),X=this.options.fetch,W={method:"POST",headers:Y,body:Q,mode:"cors",credentials:"same-origin"};X(this.options.emulationEndpoint,W)}}class o8{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 y(this,void 0,void 0,function*(){let J;if(globalThis&&globalThis.document&&globalThis.document.baseURI)J=new URL(this.endpoint,globalThis.document.baseURI);else J=new URL(this.endpoint);if($==="protobuf")J.searchParams.append("cf_protocol","protobuf");this._protocol=$;let H=new EventTarget;this._transport=new this.options.webtransport(J.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(),H.addEventListener("close",()=>{Z.onClose({code:4,reason:"connection closed"})}),H.addEventListener("message",(Q)=>{Z.onMessage(Q.data)}),this._startReading(H),Z.onOpen()})}_startReading($){return y(this,void 0,void 0,function*(){let Z=this._stream.readable.getReader(),J="",H=0,Y=new Uint8Array;try{while(!0){let{done:Q,value:X}=yield Z.read();if(X.length>0)if(this._protocol==="json"){J+=this._utf8decoder.decode(X);while(H<J.length)if(J[H]===`
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 s0<"u"&&s0.exports)s0.exports=Z;else window.ExecutionEnvironment=Z})()});var R1=I((S6,e7)=>{Object.defineProperty(S6,"__esModule",{value:!0});S6.default=lQ;var cQ=/-webkit-|-moz-|-ms-/;function lQ($){return typeof $==="string"&&cQ.test($)}e7.exports=S6.default});var Z$=I((v6,$$)=>{Object.defineProperty(v6,"__esModule",{value:!0});v6.default=rQ;var pQ=R1(),nQ=oQ(pQ);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=v6.default});var H$=I((C6,J$)=>{Object.defineProperty(C6,"__esModule",{value:!0});C6.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=C6.default});var Q$=I((j6,Y$)=>{Object.defineProperty(j6,"__esModule",{value:!0});j6.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=j6.default});var G$=I((g6,X$)=>{Object.defineProperty(g6,"__esModule",{value:!0});g6.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=g6.default});var U$=I((_6,z$)=>{Object.defineProperty(_6,"__esModule",{value:!0});_6.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=_6.default});var B$=I((h6,L$)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.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=h6.default});var q$=I((k6,K$)=>{Object.defineProperty(k6,"__esModule",{value:!0});k6.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=k6.default});var I$=I((b6,A$)=>{Object.defineProperty(b6,"__esModule",{value:!0});b6.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=b6.default});var V$=I((y6,f$)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.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=y6.default});var R$=I((m6,D$)=>{Object.defineProperty(m6,"__esModule",{value:!0});m6.default=gX;function gX($,Z){if($==="position"&&Z==="sticky")return["-webkit-sticky","sticky"]}D$.exports=m6.default});var P$=I((u6,N$)=>{Object.defineProperty(u6,"__esModule",{value:!0});u6.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=u6.default});var w$=I((MF,T$)=>{var uX=/[A-Z]/g,dX=/^ms-/,d6={};function cX($){return"-"+$.toLowerCase()}function lX($){if(d6.hasOwnProperty($))return d6[$];var Z=$.replace(uX,cX);return d6[$]=dX.test(Z)?"-"+Z:Z}T$.exports=lX});var l6=I((c6,x$)=>{Object.defineProperty(c6,"__esModule",{value:!0});c6.default=oX;var iX=w$(),pX=nX(iX);function nX($){return $&&$.__esModule?$:{default:$}}function oX($){return(0,pX.default)($)}x$.exports=c6.default});var v$=I((p6,S$)=>{Object.defineProperty(p6,"__esModule",{value:!0});p6.default=YG;var rX=l6(),sX=i6(rX),tX=R1(),eX=i6(tX),$G=o0(),E$=i6($G);function i6($){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((o6,i$)=>{Object.defineProperty(o6,"__esModule",{value:!0});o6.default=XG;function XG($,Z,J){if(J)return[$,Z];return $}i$.exports=o6.default});var n$=I((a6,p$)=>{Object.defineProperty(a6,"__esModule",{value:!0});a6.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)}p$.exports=a6.default});var a$=I((r6,o$)=>{Object.defineProperty(r6,"__esModule",{value:!0});r6.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=r6.default});var t$=I((s6,s$)=>{Object.defineProperty(s6,"__esModule",{value:!0});s6.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=s6.default});var $4=I((t6,e$)=>{Object.defineProperty(t6,"__esModule",{value:!0});t6.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=t6.default});var J4=I((e6,Z4)=>{Object.defineProperty(e6,"__esModule",{value:!0});e6.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=e6.default});var Y4=I((J8,H4)=>{Object.defineProperty(J8,"__esModule",{value:!0});J8.default=bG;var _G=a(),hG=kG(_G);function kG($){return $&&$.__esModule?$:{default:$}}var $8={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end",flex:"flexbox","inline-flex":"inline-flexbox"},Z8={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((Z8.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"&&$8.hasOwnProperty(Z))return(0,hG.default)(X+$8[Z],Z,W);if(Z8.hasOwnProperty($))J[Z8[$]]=$8[Z]||Z}}H4.exports=J8.default});var X4=I((Q8,Q4)=>{Object.defineProperty(Q8,"__esModule",{value:!0});Q8.default=iG;var mG=a(),uG=dG(mG);function dG($){return $&&$.__esModule?$:{default:$}}var H8={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},Y8={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"},cG=["alignContent","alignSelf","order","flexGrow","flexShrink","flexBasis","flexDirection"],lG=Object.keys(Y8).concat(cG);function iG($,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"&&H8.hasOwnProperty(Z))return(0,uG.default)(X+H8[Z],Z,W);if(Y8.hasOwnProperty($))J[Y8[$]]=H8[Z]||Z}}Q4.exports=Q8.default});var z4=I((X8,W4)=>{Object.defineProperty(X8,"__esModule",{value:!0});X8.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=X8.default});var O4=I((G8,U4)=>{Object.defineProperty(G8,"__esModule",{value:!0});G8.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=G8.default});var B4=I((W8,L4)=>{Object.defineProperty(W8,"__esModule",{value:!0});W8.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=W8.default});var K4=I((z8,F4)=>{Object.defineProperty(z8,"__esModule",{value:!0});z8.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=z8.default});var M4=I((O8,q4)=>{Object.defineProperty(O8,"__esModule",{value:!0});O8.default=IW;var KW=l6(),qW=MW(KW);function MW($){return $&&$.__esModule?$:{default:$}}var AW={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},U8=void 0;function IW($,Z,J,H){var{cssPrefix:Y,keepUnprefixed:Q,requiresPrefix:X}=H;if(typeof Z==="string"&&AW.hasOwnProperty($)){if(!U8)U8=Object.keys(X).map(function(G){return(0,qW.default)(G)});var W=Z.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return U8.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=O8.default});import{useContext as h5,useEffect as k5}from"react";import{createContext as C3,useContext as j3}from"react";var g3=C3(null),A5=()=>{let $=j3(g3);if(!$)throw Error("usePieConfig must be used within PieConfigProvider");return $};var _3=()=>{let{enableRenderingLog:$}=A5();return $},I0=_3;import{createContext as t3}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 h3($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var D5={exports:{}},w1=typeof Reflect==="object"?Reflect:null,v8=w1&&typeof w1.apply==="function"?w1.apply:function(Z,J,H){return Function.prototype.apply.call(Z,J,H)},f0;if(w1&&typeof w1.ownKeys==="function")f0=w1.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 k3($){if(console&&console.warn)console.warn($)}var j8=Number.isNaN||function(Z){return Z!==Z};function x(){x.init.call(this)}D5.exports=x;D5.exports.once=u3;x.EventEmitter=x;x.prototype._events=void 0;x.prototype._eventsCount=0;x.prototype._maxListeners=void 0;var C8=10;function P0($){if(typeof $!=="function")throw TypeError('The "listener" argument must be of type Function. Received type '+typeof $)}Object.defineProperty(x,"defaultMaxListeners",{enumerable:!0,get:function(){return C8},set:function($){if(typeof $!=="number"||$<0||j8($))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+$+".");C8=$}});x.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};x.prototype.setMaxListeners=function(Z){if(typeof Z!=="number"||Z<0||j8(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 g8($){if($._maxListeners===void 0)return x.defaultMaxListeners;return $._maxListeners}x.prototype.getMaxListeners=function(){return g8(this)};x.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")v8(G,this,J);else{var z=G.length,U=y8(G,z);for(var H=0;H<z;++H)v8(U[H],this,J)}return!0};function _8($,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=g8($),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,k3(W)}}return $}x.prototype.addListener=function(Z,J){return _8(this,Z,J,!1)};x.prototype.on=x.prototype.addListener;x.prototype.prependListener=function(Z,J){return _8(this,Z,J,!0)};function b3(){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 h8($,Z,J){var H={fired:!1,wrapFn:void 0,target:$,type:Z,listener:J},Y=b3.bind(H);return Y.listener=J,H.wrapFn=Y,Y}x.prototype.once=function(Z,J){return P0(J),this.on(Z,h8(this,Z,J)),this};x.prototype.prependOnceListener=function(Z,J){return P0(J),this.prependListener(Z,h8(this,Z,J)),this};x.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 y3(H,Q);if(H.length===1)Y[Z]=H[0];if(Y.removeListener!==void 0)this.emit("removeListener",Z,W||J)}return this};x.prototype.off=x.prototype.removeListener;x.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 k8($,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?m3(Y):y8(Y,Y.length)}x.prototype.listeners=function(Z){return k8(this,Z,!0)};x.prototype.rawListeners=function(Z){return k8(this,Z,!1)};x.listenerCount=function($,Z){if(typeof $.listenerCount==="function")return $.listenerCount(Z);else return b8.call($,Z)};x.prototype.listenerCount=b8;function b8($){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}x.prototype.eventNames=function(){return this._eventsCount>0?f0(this._events):[]};function y8($,Z){var J=Array(Z);for(var H=0;H<Z;++H)J[H]=$[H];return J}function y3($,Z){for(;Z+1<$.length;Z++)$[Z]=$[Z+1];$.pop()}function m3($){var Z=Array($.length);for(var J=0;J<Z.length;++J)Z[J]=$[J].listener||$[J];return Z}function u3($,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(m8($,Z,Q,{once:!0}),Z!=="error")d3($,Y,{once:!0})})}function d3($,Z,J){if(typeof $.on==="function")m8($,"error",Z,J)}function m8($,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 c3=D5.exports,u8=h3(c3),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 c1;(function($){$[$.disconnectCalled=0]="disconnectCalled",$[$.unauthorized=1]="unauthorized",$[$.badProtocol=2]="badProtocol",$[$.messageSizeLimit=3]="messageSizeLimit"})(c1||(c1={}));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 I5;(function($){$[$.channelCompaction=1]="channelCompaction"})(I5||(I5={}));var g;(function($){$.Disconnected="disconnected",$.Connecting="connecting",$.Connected="connected"})(g||(g={}));var u;(function($){$.Unsubscribed="unsubscribed",$.Subscribing="subscribing",$.Subscribed="subscribed"})(u||(u={}));function l3($,Z){return $.lastIndexOf(Z,0)===0}function d8($){if($===void 0||$===null)return!1;return typeof $==="function"}function i3($,Z){if(globalThis.console){let J=globalThis.console[$];if(d8(J))J.apply(globalThis.console,Z)}}function p3($,Z){return Math.floor(Math.random()*(Z-$+1)+$)}function R0($,Z,J){if($>31)$=31;let H=p3(0,Math.min(J,Z*Math.pow(2,$)));return Math.min(J,Z+H)}function n3($){return"error"in $&&$.error!==null}function N0($){return Math.min($*1000,2147483647)}class c8 extends u8{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=I5.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 l8{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 f5{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:F,value:K})=>{if(F){H.dispatchEvent(new Event("close")),U.close();return}try{if($._protocol==="json"){X+=$._utf8decoder.decode(K);while(W<X.length)if(X[W]===`
11
+ `){let B=X.substring(0,W);H.dispatchEvent(new MessageEvent("message",{data:B})),X=X.substring(W+1),W=0}else++W}else{let B=new Uint8Array(G.length+K.length);B.set(G),B.set(K,G.length),G=B;while(!0){let q=$.options.decoder.decodeReply(G);if(q.ok){let M=G.slice(0,q.pos);H.dispatchEvent(new MessageEvent("message",{data:M})),G=G.slice(q.pos);continue}break}}}catch(B){H.dispatchEvent(new Event("error",{detail:B})),H.dispatchEvent(new Event("close")),U.close();return}L()}).catch(function(F){H.dispatchEvent(new Event("error",{detail:F})),H.dispatchEvent(new Event("close")),U.close();return})}return L()}})}).catch((Q)=>{H.dispatchEvent(new Event("error",{detail:Q})),H.dispatchEvent(new Event("close"))}),H}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,J){this._protocol=$,this._abortController=new AbortController;let H,Y;if($==="json")H={Accept:"application/json","Content-Type":"application/json"},Y=J;else H={Accept:"application/octet-stream","Content-Type":"application/octet-stream"},Y=J;let Q={method:"POST",headers:H,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",(W)=>{this._abortController.abort(),Z.onError(W)}),X.addEventListener("close",()=>{this._abortController.abort(),Z.onClose({code:4,reason:"connection closed"})}),X.addEventListener("message",(W)=>{Z.onMessage(W.data)})}close(){this._abortController.abort()}send($,Z,J){let H,Y,Q={session:Z,node:J,data:$};if(this._protocol==="json")H={"Content-Type":"application/json"},Y=JSON.stringify(Q);else H={"Content-Type":"application/octet-stream"},Y=this.options.encoder.encodeEmulationRequest(Q);let X=this.options.fetch,W={method:"POST",headers:H,body:Y,mode:"cors",credentials:"same-origin"};X(this.options.emulationEndpoint,W)}}class p8{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,J){let H;if(globalThis&&globalThis.document&&globalThis.document.baseURI)H=new URL(this.endpoint,globalThis.document.baseURI);else H=new URL(this.endpoint);H.searchParams.append("cf_connect",J);let Y={},Q=new this.options.eventsource(H.toString(),Y);this._transport=Q;let X=this;Q.onopen=function(){Z.onOpen()},Q.onerror=function(W){Q.close(),Z.onError(W),Z.onClose({code:4,reason:"connection closed"})},Q.onmessage=function(W){Z.onMessage(W.data)},X._onClose=function(){Z.onClose({code:4,reason:"connection closed"})}}close(){if(this._transport.close(),this._onClose!==null)this._onClose()}send($,Z,J){let H={session:Z,node:J,data:$},Y={"Content-Type":"application/json"},Q=JSON.stringify(H),X=this.options.fetch,W={method:"POST",headers:Y,body:Q,mode:"cors",credentials:"same-origin"};X(this.options.emulationEndpoint,W)}}class n8{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 y(this,void 0,void 0,function*(){let J;if(globalThis&&globalThis.document&&globalThis.document.baseURI)J=new URL(this.endpoint,globalThis.document.baseURI);else J=new URL(this.endpoint);if($==="protobuf")J.searchParams.append("cf_protocol","protobuf");this._protocol=$;let H=new EventTarget;this._transport=new this.options.webtransport(J.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(),H.addEventListener("close",()=>{Z.onClose({code:4,reason:"connection closed"})}),H.addEventListener("message",(Q)=>{Z.onMessage(Q.data)}),this._startReading(H),Z.onOpen()})}_startReading($){return y(this,void 0,void 0,function*(){let Z=this._stream.readable.getReader(),J="",H=0,Y=new Uint8Array;try{while(!0){let{done:Q,value:X}=yield Z.read();if(X.length>0)if(this._protocol==="json"){J+=this._utf8decoder.decode(X);while(H<J.length)if(J[H]===`
12
12
  `){let W=J.substring(0,H);$.dispatchEvent(new MessageEvent("message",{data:W})),J=J.substring(H+1),H=0}else++H}else{let W=new Uint8Array(Y.length+X.length);W.set(Y),W.set(X,Y.length),Y=W;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 y(this,void 0,void 0,function*(){try{if(this._writer)yield this._writer.close();this._transport.close()}catch($){}})}send($){return y(this,void 0,void 0,function*(){let Z;if(this._protocol==="json")Z=new TextEncoder().encode($+`
13
- `);else Z=$;try{yield this._writer.write(Z)}catch(J){this.close()}})}}var r3=[-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 a8{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=r3[127&this.getByte()])>=0)$=($<<6)+Z;return this.pos--,$>>>0}}class r8{constructor(){this.a=[]}toByteArray($){if(Array.isArray($))return this.a;return new Uint8Array(this.a)}putArray($,Z,J){for(let H=Z;H<J;H++)this.a.push($[H])}}function s3($){let Z=0,J=0,H=0,Y=0,Q=0,X=$.length;while(X>=16)Z=Z+$[Q+0]|0,J=J+$[Q+1]|0,H=H+$[Q+2]|0,Y=Y+$[Q+3]|0,Z=Z+$[Q+4]|0,J=J+$[Q+5]|0,H=H+$[Q+6]|0,Y=Y+$[Q+7]|0,Z=Z+$[Q+8]|0,J=J+$[Q+9]|0,H=H+$[Q+10]|0,Y=Y+$[Q+11]|0,Z=Z+$[Q+12]|0,J=J+$[Q+13]|0,H=H+$[Q+14]|0,Y=Y+$[Q+15]|0,Q+=16,X-=16;while(X>=4)Z=Z+$[Q+0]|0,J=J+$[Q+1]|0,H=H+$[Q+2]|0,Y=Y+$[Q+3]|0,Q+=4,X-=4;switch(Y=((Y+(H<<8)|0)+(J<<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 t3($,Z){let J=0,H=new a8(Z),Y=$.length,Q=Z.length,X=H.getInt();if(H.getChar()!==`
14
- `)throw Error("size integer not terminated by '\\n'");let W=new r8;while(H.haveBytes()){let G=H.getInt(),z;switch(H.getChar()){case"@":if(z=H.getInt(),H.haveBytes()&&H.getChar()!==",")throw Error("copy command not terminated by ','");if(J+=G,J>X)throw Error("copy exceeds output file size");if(z+G>Y)throw Error("copy extends past end of input");W.putArray($,z,z+G);break;case":":if(J+=G,J>X)throw Error("insert command gives an output larger than predicted");if(G>Q)throw Error("insert count exceeds size of delta");W.putArray(H.a,H.pos,H.pos+G),H.pos+=G;break;case";":{let U=W.toByteArray($);if(G!==s3(U))throw Error("bad checksum");if(J!==X)throw Error("generated size does not match predicted size");return U}default:throw Error("unknown delta operator")}}throw Error("unterminated delta")}class f5{name(){return"json"}encodeCommands($){return $.map((Z)=>JSON.stringify(Z)).join(`
13
+ `);else Z=$;try{yield this._writer.write(Z)}catch(J){this.close()}})}}var o3=[-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 o8{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=o3[127&this.getByte()])>=0)$=($<<6)+Z;return this.pos--,$>>>0}}class a8{constructor(){this.a=[]}toByteArray($){if(Array.isArray($))return this.a;return new Uint8Array(this.a)}putArray($,Z,J){for(let H=Z;H<J;H++)this.a.push($[H])}}function a3($){let Z=0,J=0,H=0,Y=0,Q=0,X=$.length;while(X>=16)Z=Z+$[Q+0]|0,J=J+$[Q+1]|0,H=H+$[Q+2]|0,Y=Y+$[Q+3]|0,Z=Z+$[Q+4]|0,J=J+$[Q+5]|0,H=H+$[Q+6]|0,Y=Y+$[Q+7]|0,Z=Z+$[Q+8]|0,J=J+$[Q+9]|0,H=H+$[Q+10]|0,Y=Y+$[Q+11]|0,Z=Z+$[Q+12]|0,J=J+$[Q+13]|0,H=H+$[Q+14]|0,Y=Y+$[Q+15]|0,Q+=16,X-=16;while(X>=4)Z=Z+$[Q+0]|0,J=J+$[Q+1]|0,H=H+$[Q+2]|0,Y=Y+$[Q+3]|0,Q+=4,X-=4;switch(Y=((Y+(H<<8)|0)+(J<<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 r3($,Z){let J=0,H=new o8(Z),Y=$.length,Q=Z.length,X=H.getInt();if(H.getChar()!==`
14
+ `)throw Error("size integer not terminated by '\\n'");let W=new a8;while(H.haveBytes()){let G=H.getInt(),z;switch(H.getChar()){case"@":if(z=H.getInt(),H.haveBytes()&&H.getChar()!==",")throw Error("copy command not terminated by ','");if(J+=G,J>X)throw Error("copy exceeds output file size");if(z+G>Y)throw Error("copy extends past end of input");W.putArray($,z,z+G);break;case":":if(J+=G,J>X)throw Error("insert command gives an output larger than predicted");if(G>Q)throw Error("insert count exceeds size of delta");W.putArray(H.a,H.pos,H.pos+G),H.pos+=G;break;case";":{let U=W.toByteArray($);if(G!==a3(U))throw Error("bad checksum");if(J!==X)throw Error("generated size does not match predicted size");return U}default:throw Error("unknown delta operator")}}throw Error("unterminated delta")}class V5{name(){return"json"}encodeCommands($){return $.map((Z)=>JSON.stringify(Z)).join(`
15
15
  `)}decodeReplies($){return $.trim().split(`
16
- `).map((Z)=>JSON.parse(Z))}applyDeltaIfNeeded($,Z){let J,H;if($.delta){let Y=t3(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 e3={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 i1 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 f5,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({},e3),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;n3("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 f5,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 I5(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 I5(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 p8(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 i8(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],!a3($)){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]}}}i1.SubscriptionState=u;i1.State=g;i1.UnauthorizedError=e;var ZZ=$Z(null),s8=ZZ;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 p1=Object.create(null);Object.keys(s).forEach(($)=>{p1[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 D5;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(!D5)D5=new TextEncoder;Z(D5.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 JZ=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:HZ($.substring(1),Z)};if(!p1[J])return n1;return $.length>1?{type:p1[J],data:$.substring(1)}:{type:p1[J]}},HZ=($,Z)=>{if(JZ){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 R5;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(!R5)R5=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:R5.decode(G),Z)),H=0}if(Y===0||Y>$){W.enqueue(n1);break}}}})}var N5=4;function x($){if($)return YZ($)}function YZ($){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 QZ=d.setTimeout,XZ=d.clearTimeout;function Q1($,Z){if(Z.useNativeTimers)$.setTimeoutFn=QZ.bind(d),$.clearTimeoutFn=XZ.bind(d);else $.setTimeoutFn=d.setTimeout.bind(d),$.clearTimeoutFn=d.clearTimeout.bind(d)}var GZ=1.33;function B2($){if(typeof $==="string")return WZ($);return Math.ceil(($.byteLength||$.size)*GZ)}function WZ($){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 P5 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 P5($,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 zZ(){}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=zZ,$)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 UZ=function(){let $=f2({xdomain:!1});return $&&$.responseType!==null}();class M1 extends I2{constructor($){super($);let Z=$&&$.forceBase64;this.supportsBinary=UZ&&!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 T5=d.WebSocket||d.MozWebSocket;class A1 extends D2{createSocket($,Z,J){return!V2?Z?new T5($,Z):new T5($):new T5($,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 w5={websocket:A1,webtransport:s1,polling:M1};var OZ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,LZ=["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=OZ.exec($||""),Q={},X=14;while(X--)Q[LZ[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=BZ(Q,Q.path),Q.queryKey=FZ(Q,Q.query),Q}function BZ($,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 FZ($,Z){let J={};return Z.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(H,Y,Q){if(Y)J[Y]=Q}),J}var x5=typeof addEventListener==="function"&&typeof removeEventListener==="function",v0=[];if(x5)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(x5){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=N5,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(),x5){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=N5;class E5 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 E5{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)=>w5[H]).filter((H)=>!!H);super($,J)}}var ZO=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 j5={};v3(j5,{protocol:()=>x2,isPacketValid:()=>NZ,PacketType:()=>V,Encoder:()=>E2,Decoder:()=>C5});var qZ=typeof ArrayBuffer==="function",MZ=($)=>{return typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView($):$.buffer instanceof ArrayBuffer},N2=Object.prototype.toString,AZ=typeof Blob==="function"||typeof Blob<"u"&&N2.call(Blob)==="[object BlobConstructor]",IZ=typeof File==="function"||typeof File<"u"&&N2.call(File)==="[object FileConstructor]";function $0($){return qZ&&($ instanceof ArrayBuffer||MZ($))||AZ&&$ instanceof Blob||IZ&&$ 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=S5(J,Z),H.attachments=Z.length,{packet:H,buffers:Z}}function S5($,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]=S5($[H],Z);return J}else if(typeof $==="object"&&!($ instanceof Date)){let J={};for(let H in $)if(Object.prototype.hasOwnProperty.call($,H))J[H]=S5($[H],Z);return J}return $}function T2($,Z){return $.data=v5($.data,Z),delete $.attachments,$}function v5($,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]=v5($[J],Z);else if(typeof $==="object"){for(let J in $)if(Object.prototype.hasOwnProperty.call($,J))$[J]=v5($[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 C5 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(C5.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 fZ($){return typeof $==="string"}var VZ=Number.isInteger||function($){return typeof $==="number"&&isFinite($)&&Math.floor($)===$};function DZ($){return $===void 0||VZ($)}function C0($){return Object.prototype.toString.call($)==="[object Object]"}function RZ($,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 NZ($){return fZ($.nsp)&&DZ($.id)&&RZ($.type,$.data)}function p($,Z,J){return $.on(Z,J),function(){$.off(Z,J)}}var PZ=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=[p($,"open",this.onopen.bind(this)),p($,"packet",this.onpacket.bind(this)),p($,"error",this.onerror.bind(this)),p($,"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(PZ.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||j5;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=p(Z,"open",function(){J.onopen(),$&&$()}),Y=(X)=>{if(this.cleanup(),this._readyState="closed",this.emitReserved("error",X),$)$(X);else this.maybeReconnectOnOpen()},Q=p(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(p($,"ping",this.onping.bind(this)),p($,"data",this.ondata.bind(this)),p($,"error",this.onerror.bind(this)),p($,"close",this.onclose.bind(this)),p(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 TZ}from"react";var wZ=TZ(null),v2=wZ;function g5($){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 xZ}from"react";var EZ=g5(),SZ=xZ(EZ),C2=SZ;var vZ=({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=_5(v2),U=_5(s8),L=_5(C2);if(h5(()=>{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]),h5(()=>{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]),h5(()=>{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=vZ;var CZ=new Map;var j2=($)=>{return CZ.get($)};import{Suspense as kZ,useContext as bZ}from"react";import{createContext as jZ}from"react";import{jsx as hZ,Fragment as _Z}from"react/jsx-runtime";var gZ=jZ(hZ(_Z,{})),g2=gZ;import{jsx as _2}from"react/jsx-runtime";function yZ({uiConfig:$,setUiAjaxConfiguration:Z}){let J=bZ(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(kZ,{fallback:Y.fallback??J,children:X},`${Y.name}`)}if(H)console.log("[UI] Rendering component directly:",Y.name);return X}var f1=yZ;function k5($=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 k5();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 GJ,useEffect as s2,useImperativeHandle as WJ,useRef as zJ,useState as b0}from"react";import{useRef as mZ,useState as uZ}from"react";import{jsx as dZ}from"react/jsx-runtime";function b5($){let[Z,J]=uZ(!1),H=mZ(null);return dZ("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 lZ,useCallback as iZ}from"react";import{jsx as h2}from"react/jsx-runtime";var cZ=()=>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=cZ;import{jsx as y5}from"react/jsx-runtime";var pZ=({type:$="button",onClick:Z,icons:J})=>{let H=lZ(null),Y=iZ(()=>{let X=H.current;if(X)X.style.transform="scale(0.8)",setTimeout(()=>{X.style.transform="scale(1)"},600)},[]);return y5("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?y5("img",{src:J.sendIcon,alt:""}):y5(k2,{})})},b2=pZ;import{jsx as y2}from"react/jsx-runtime";var nZ=()=>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=nZ;import{jsx as _0,jsxs as rZ,Fragment as aZ}from"react/jsx-runtime";var oZ=({name:$,accept:Z,fileInputRef:J,onSelectFile:H,icons:Y})=>{return rZ(aZ,{children:[_0("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:Y.attachFileIcon?_0("img",{src:Y.attachFileIcon,alt:""}):_0(m2,{})}),_0("input",{id:$+"__pie__file",name:$+"__pie__file",className:"hidden",type:"file",accept:Z,ref:J,onChange:(Q)=>{if(Q.target.files)H(Q.target.files[0])}})]})},u2=oZ;import{jsx as d2}from"react/jsx-runtime";var sZ=()=>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=sZ;import{jsx as l2}from"react/jsx-runtime";var tZ=()=>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"})}),h0=tZ;import{jsx as Y0,jsxs as $J}from"react/jsx-runtime";var eZ=({name:$,selectedFile:Z,onDropFile:J})=>{return $J("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(h0,{})})]})},i2=eZ;import{jsx as p2,jsxs as JJ}from"react/jsx-runtime";var ZJ=()=>JJ("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:[p2("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"}),p2("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=ZJ;import{jsx as Q0}from"react/jsx-runtime";var HJ=({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(h0,{}):J.voiceRecordingIcon?Q0("img",{src:J.voiceRecordingIcon,alt:""}):Q0(n2,{})})},o2=HJ;import{jsx as a2,jsxs as QJ}from"react/jsx-runtime";var YJ=({option:$,onClickOption:Z})=>{return QJ("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:""})]})},k0=YJ;import{jsx as r2}from"react/jsx-runtime";var XJ=({options:$,handleOptionClick:Z})=>{return r2("div",{className:"flex w-full flex-row flex-wrap justify-start gap-[5px]",children:$.map((J,H)=>{return r2(k0,{option:J,onClickOption:Z},H)})})},m5=XJ;import{jsx as W1,jsxs as t2}from"react/jsx-runtime";var UJ=GJ(({name:$,defaultValue:Z,defaultOptions:J,isArea:H,placeholder:Y,fileAccept:Q,optionsPosition:X,icons:W,handleOptionClick:G,handleSendMessage:z,sx:U},L)=>{let K=zJ(null),[q,B]=b0(null),[F,M]=b0(Z),[P,N]=b0(J),[D,f]=b0(!1);WJ(L,()=>({clear:()=>{if(M(""),B(null),K.current)K.current.value=""},setValue:(j)=>M(j),setOptions:(j)=>N(j)})),s2(()=>{M(Z)},[Z]),s2(()=>{},[]);let E=()=>{};return t2("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:t2("div",{className:"flex w-full grow flex-row items-center rounded-md bg-transparent",children:[q?W1(i2,{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(b5,{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})]})}),e2=UJ;var G6=T(X6(),1),D1=T(X6(),1),p0=G6.default.default||G6.default;import{useState as OY,useEffect as LY}from"react";import{useEffect as QY,useState as XY}from"react";import{jsx as WY}from"react/jsx-runtime";function GY({children:$}){let[Z,J]=XY($);return QY(()=>{J($)},[$]),WY("div",{className:"max-w-full first:mt-0",children:Z})}var X7=GY;import{jsx as G7}from"react/jsx-runtime";var zY=()=>G7("svg",{width:"30",height:"30",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:G7("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"})}),W7=zY;import{jsx as n0}from"react/jsx-runtime";function UY({username:$,avatar:Z}){return n0("div",{className:"w-[30px]",children:n0("div",{className:"relative flex size-[30px] items-center justify-center rounded-sm p-1 text-white",children:Z?n0("img",{src:Z,className:"absolute inset-0 rounded",alt:$}):n0(W7,{})})})}var W6=UY;import{jsx as J1,jsxs as z7}from"react/jsx-runtime";var BY=({message:$,handleOptionClick:Z,setUiAjaxConfiguration:J})=>{let[H,Y]=OY(!1);return LY(()=>{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:z7("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})}),z7("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(X7,{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(k0,{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})})]})})},U7=BY;import{forwardRef as FY,useEffect as KY,useImperativeHandle as qY,useRef as MY,useState as AY}from"react";import{jsx as O7}from"react/jsx-runtime";var IY=FY(({name:$,handleOptionClick:Z,defaultMessages:J,sx:H,setUiAjaxConfiguration:Y},Q)=>{let[X,W]=AY(J),G=MY(null),z=()=>{if(G.current)G.current.scrollTop=G.current.scrollHeight};return KY(()=>{z()},[X]),qY(Q,()=>({setMessages:(U)=>W(U),addMessage:(U)=>W((L)=>[...L,U]),scrollToBottom:z})),O7("div",{id:$+"_messages",className:"flex flex-col items-center overflow-y-scroll",style:H,ref:G,children:X.map((U)=>O7(U7,{message:U,handleOptionClick:Z,setUiAjaxConfiguration:Y},U.id))})}),L7=IY;import{useEffect as fY,useMemo as VY,useRef as B7,useState as DY}from"react";import{jsx as z6,jsxs as NY}from"react/jsx-runtime";var RY=({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=B7(null),D=B7(null),[f,E]=DY(!1),j=VY(()=>g0(Z,B,K,q),[Z,B,K,q]);fY(()=>{if(f)requestAnimationFrame(()=>{j(),E(!1)})},[f]);let u1=(t)=>{if(N.current)N.current.setValue(t),E(!0)},K5=()=>{if(N.current)N.current.clear()},q5=(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:K5,setOptions:q5,addMessage:d1,setMessages:C},useSocketioSupport:F,useCentrifugeSupport:M,centrifugeChannel:P,children:NY("div",{className:"flex size-full flex-col",style:L.container,children:[z6(L7,{ref:D,name:J,defaultMessages:Y,sx:L.messages,handleOptionClick:u1,setUiAjaxConfiguration:Z}),z6(e2,{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})]})})},F7=RY;import{useMemo as mz}from"react";var z5=T(U6(),1),U3=T(B6(),1);import z3,{useState as Gz,useContext as $3,useRef as Wz,useEffect as Z3,forwardRef as zz}from"react";var rY={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=!rY[$]&&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 sY=/([a-z])?([A-Z])/g,tY=function(Z,J,H){return(J||"")+"-"+H.toLowerCase()},K6=function(Z){return Z.replace(sY,tY)},eY=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},{})},v7=eY;var j4=T(u7(),1),g4=T(e7(),1),_4=T(x6(),1);var j$=T(J$(),1),g$=T(Y$(),1),_$=T(X$(),1),h$=T(W$(),1),k$=T(O$(),1),b$=T(F$(),1),y$=T(M$(),1),m$=T(f$(),1),u$=T(D$(),1),d$=T(N$(),1),c$=T(T$(),1),l$=T(C$(),1),A=["Webkit"],p6=["Moz"],v=["ms"],m=["Webkit","Moz"],h=["Webkit","ms"],K0=["Webkit","Moz","ms"],i$={plugins:[j$.default,g$.default,_$.default,h$.default,k$.default,b$.default,y$.default,m$.default,u$.default,d$.default,c$.default,l$.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:p6,textAlignLast:p6,tabSize:p6,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 I4=T(o$(),1),f4=T(r$(),1),V4=T(e$(),1),D4=T(Z4(),1),R4=T(H4(),1),N4=T(Q4(),1),P4=T(G4(),1),T4=T(U4(),1),w4=T(L4(),1),x4=T(F4(),1),E4=T(q4(),1),S4=T(A4(),1),v4={plugins:[I4.default,f4.default,V4.default,D4.default,R4.default,N4.default,P4.default,T4.default,w4.default,x4.default,E4.default,S4.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 e0($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")e0=function(J){return typeof J};else e0=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return e0($)}var h4=j4.default(i$),DW=g4.default(v4,h4);function RW($){return Object.keys($).reduce(function(Z,J){var H=$[J];if(Array.isArray(H))H=H.join(";"+J+":");else if(H&&e0(H)==="object"&&typeof H.toString==="function")H=H.toString();return Z[J]=H,Z},{})}function NW($){return Object.keys($).reduce(function(Z,J){var H=$[J];if(Array.isArray(H))if(_4.default.canUseDOM)H=H[H.length-1].toString();else H=H.join(";".concat(K6(J),":"));return Z[J]=H,Z},{})}var C4,t0;function k4($){var Z=$||global&&global.navigator&&global.navigator.userAgent;if(!t0||Z!==C4){if(Z==="all")t0={prefix:h4,prefixedKeyframes:"keyframes"};else t0=new DW({userAgent:Z});C4=Z}return t0}function b4($){return k4($).prefixedKeyframes||"keyframes"}function $5($,Z){var J=RW($),H=k4(Z),Y=H.prefix(J),Q=NW(Y);return Q}function PW($){return Object.keys($).map(function(Z){return Z+": "+$[Z]+";"}).join(`
18
- `)}function B1($,Z,J){if(!Z)return"";var H=F0(Z,function(W,G){return B0(G,W)}),Y=$5(H,J),Q=v7(Y),X=PW(Q);return $+"{"+X+"}"}var TW=function(Z){return Z===null||typeof Z>"u"?"main":Z.toString()},Z5=TW;var wW=function(Z,J,H){var Y=Z5(J);return!!Z&&!!Z._radiumStyleState&&!!Z._radiumStyleState[Y]&&Z._radiumStyleState[Y][H]},J5=wW;var xW=function(Z){return typeof Z.ref==="string"?Z.ref:Z.key},N1=xW;var EW=function(Z){return Z._lastRadiumState||Z.state&&Z.state._radiumStyleState||{}},q0=EW;function M0($){if(!$)return"";var Z=5381,J=$.length-1;while(J)Z=Z*33^$.charCodeAt(J),J-=1;return(Z>>>0).toString(16)}function H5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")H5=function(J){return typeof J};else H5=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return H5($)}function Y5($){return $&&$.constructor===Object&&$.toString===Object.prototype.toString}function Q5($){var Z={};return $.forEach(function(J){if(!J||H5(J)!=="object")return;if(Array.isArray(J))J=Q5(J);Object.keys(J).forEach(function(H){if(!Y5(J[H])||!Y5(Z[H])){Z[H]=J[H];return}if(H.indexOf("@media")===0){var Y=H;while(!0)if(Y+=" ",!Z[Y]){Z[Y]=J[H];return}}Z[H]=Q5([Z[H],J[H]])})}),Z}var SW=function(){};var y4=SW;function O8($){var{addCSS:Z,config:J,style:H}=$,Y=function(W){var G=W,z=G.__process(J.userAgent),U=z.animationName,L=z.css;return Z(L),U},Q=Object.keys(H).reduce(function(X,W){var G=H[W],z=Array.isArray(G);if(W==="animationName"&&G&&(G.__radiumKeyframes||z))if(z)G=G.map(Y).join(", ");else G=Y(G);return X[W]=G,X},{});return{style:Q}}var vW=function(Z){var{style:J,mergeStyles:H}=Z,Y=Array.isArray(J)?H(J):J;return{style:Y}},m4=vW;function L8($){var{config:Z,style:J}=$,H=$5(J,Z.userAgent);return{style:H}}function B8($){var{isNestedStyle:Z,style:J}=$,H=Object.keys(J).reduce(function(Y,Q){var X=J[Q];if(!Z(X))Y[Q]=X;return Y},{});return{style:H}}var j1=[],X5=!1;function F8(){j1.forEach(function($){$()})}var CW=function(Z){if(j1.indexOf(Z)===-1)j1.push(Z);if(!X5)window.addEventListener("mouseup",F8),X5=!0;return{remove:function(){var H=j1.indexOf(Z);if(j1.splice(H,1),j1.length===0&&X5)window.removeEventListener("mouseup",F8),X5=!1}}},u4={subscribe:CW,__triggerForTests:F8};var d4=function(Z){return Z===":hover"||Z===":active"||Z===":focus"},jW=function(Z){var{ExecutionEnvironment:J,getComponentField:H,getState:Y,mergeStyles:Q,props:X,setState:W,style:G}=Z,z={},U={};if(G[":hover"]){var L=X.onMouseEnter;U.onMouseEnter=function(f){L&&L(f),W(":hover",!0)};var K=X.onMouseLeave;U.onMouseLeave=function(f){K&&K(f),W(":hover",!1)}}if(G[":active"]){var q=X.onMouseDown;U.onMouseDown=function(f){q&&q(f),z._lastMouseDown=Date.now(),W(":active","viamousedown")};var B=X.onKeyDown;U.onKeyDown=function(f){if(B&&B(f),f.key===" "||f.key==="Enter")W(":active","viakeydown")};var F=X.onKeyUp;U.onKeyUp=function(f){if(F&&F(f),f.key===" "||f.key==="Enter")W(":active",!1)}}if(G[":focus"]){var M=X.onFocus;U.onFocus=function(f){M&&M(f),W(":focus",!0)};var P=X.onBlur;U.onBlur=function(f){P&&P(f),W(":focus",!1)}}if(G[":active"]&&!H("_radiumMouseUpListener")&&J.canUseEventListeners)z._radiumMouseUpListener=u4.subscribe(function(){Object.keys(H("state")._radiumStyleState).forEach(function(f){if(Y(":active",f)==="viamousedown")W(":active",!1,f)})});var N=X.disabled?[G[":disabled"]]:Object.keys(G).filter(function(f){return d4(f)&&Y(f)}).map(function(f){return G[f]}),D=Q([G].concat(N));return D=Object.keys(D).reduce(function(f,E){if(!d4(E)&&E!==":disabled")f[E]=D[E];return f},{}),{componentFields:z,props:U,style:D}},c4=jW;function gW($){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){_W($,Y,J[Y])})}return $}function _W($,Z,J){if(Z in $)Object.defineProperty($,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[Z]=J;return $}var K8;function hW($){if(K8===void 0)K8=!!$.canUseDOM&&!!window&&!!window.matchMedia&&function(Z){return window.matchMedia(Z)}||null;return K8}function l4($,Z){return Object.keys($).filter(function(J){return Z($[J],J)}).reduce(function(J,H){return J[H]=$[H],J},{})}function kW($){return Object.keys($).reduce(function(Z,J){if(J.indexOf("@media")!==0)Z[J]=$[J];return Z},{})}function bW($){var{addCSS:Z,appendImportantToEachValue:J,cssRuleSetToString:H,hash:Y,isNestedStyle:Q,style:X,userAgent:W}=$,G="";return Object.keys(X).filter(function(z){return z.indexOf("@media")===0}).map(function(z){var U=J(l4(X[z],function(B){return!Q(B)}));if(!Object.keys(U).length)return;var L=H("",U,W),K="rmq-"+Y(z+L),q=z+"{ ."+K+L+"}";Z(q),G+=(G?" ":"")+K}),G}function yW($){var{listener:Z,listenersByQuery:J,matchMedia:H,mediaQueryListsByQuery:Y,query:Q}=$;Q=Q.replace("@media ","");var X=Y[Q];if(!X&&H)Y[Q]=X=H(Q);if(!J||!J[Q])X.addListener(Z),J[Q]={remove:function(){X.removeListener(Z)}};return X}function q8($){var{ExecutionEnvironment:Z,addCSS:J,appendImportantToEachValue:H,config:Y,cssRuleSetToString:Q,getComponentField:X,getGlobalState:W,hash:G,isNestedStyle:z,mergeStyles:U,props:L,setState:K,style:q}=$,B=kW(q),F=bW({addCSS:J,appendImportantToEachValue:H,cssRuleSetToString:Q,hash:G,isNestedStyle:z,style:q,userAgent:Y.userAgent}),M=F?{className:F+(L.className?" "+L.className:"")}:null,P=Y.matchMedia||hW(Z);if(!P)return{props:M,style:B};var N=gW({},X("_radiumMediaQueryListenersByQuery")),D=W("mediaQueryListsByQuery")||{};return Object.keys(q).filter(function(f){return f.indexOf("@media")===0}).map(function(f){var E=l4(q[f],z);if(!Object.keys(E).length)return;var j=yW({listener:function(){return K(f,j.matches,"_all")},listenersByQuery:N,matchMedia:P,mediaQueryListsByQuery:D,query:f});if(j.matches)B=U([B,E])}),{componentFields:{_radiumMediaQueryListenersByQuery:N},globalState:{mediaQueryListsByQuery:D},props:M,style:B}}function M8($){var{addCSS:Z,appendImportantToEachValue:J,config:H,cssRuleSetToString:Y,hash:Q,props:X,style:W}=$,G=X.className,z=Object.keys(W).reduce(function(U,L){var K=W[L];if(L===":visited"){K=J(K);var q=Y("",K,H.userAgent),B="rad-"+Q(q),F="."+B+":visited"+q;Z(F),G=(G?G+" ":"")+B}else U[L]=K;return U},{});return{props:G===X.className?null:{className:G},style:z}}var r={checkProps:y4,keyframes:O8,mergeStyleArray:m4,prefix:L8,removeNestedStyles:B8,resolveInteractionStyles:c4,resolveMediaQueries:q8,visited:M8};var o4=T(x6(),1);import F1 from"react";function mW($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function i4($,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 uW($,Z,J){if(Z)i4($.prototype,Z);if(J)i4($,J);return $}var p4=function(){function $(Z){mW(this,$),this._userAgent=void 0,this._listeners=void 0,this._cssSet=void 0,this._userAgent=Z,this._listeners=[],this._cssSet={}}return uW($,[{key:"subscribe",value:function(J){var H=this;if(this._listeners.indexOf(J)===-1)this._listeners.push(J);return{remove:function(){var Q=H._listeners.indexOf(J);if(Q>-1)H._listeners.splice(Q,1)}}}},{key:"addCSS",value:function(J){var H=this;if(!this._cssSet[J])this._cssSet[J]=!0,this._emitChange();return{remove:function(){delete H._cssSet[J],H._emitChange()}}}},{key:"getCSS",value:function(){return Object.keys(this._cssSet).join(`
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){dW($,Y,J[Y])})}return $}function dW($,Z,J){if(Z in $)Object.defineProperty($,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[Z]=J;return $}function G5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")G5=function(J){return typeof J};else G5=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return G5($)}var a4={plugins:[r.mergeStyleArray,r.checkProps,r.resolveMediaQueries,r.resolveInteractionStyles,r.keyframes,r.visited,r.removeNestedStyles,r.prefix,r.checkProps]},n4={},cW=!1,P1=null,lW=function(Z){return Z.type&&!Z.type._isRadiumEnhanced},iW=function(Z){var{children:J,component:H,config:Y,existingKeyMap:Q,extraStateKeyMap:X}=Z;if(!J)return J;var W=G5(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},nW=function(Z){var{componentName:J,existingKeyMap:H,renderedElement:Y}=Z,Q=N1(Y),X=Z5(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},oW=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)},aW=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||a4.plugins,z=J.constructor.displayName||J.constructor.name,U=nW({renderedElement:X,existingKeyMap:Y,componentName:z}),L=function(N){return J[N]},K=function(N){return n4[N]},q=function(N,D){return J5(J.state,D||U(),N)},B=function(N,D,f){return oW(J,f||U(),N,D)},F=function(N){var D=J._radiumStyleKeeper;if(!D){if(cW)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:o4.default,addCSS:F,appendImportantToEachValue:F6,componentName:z,config:H,cssRuleSetToString:B1,getComponentField:L,getGlobalState:K,getState:q,hash:M0,mergeStyles:Q5,props:W,setState:B,isNestedStyle:Y5,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){n4[E]=f[E]})}),M!==Q.style)W=g1({},W,{style:M});return W},rW=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]:a4,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&&!lW(J))return{extraStateKeyMap:X,element:J};var z=J.props.children,U=iW({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=aW({component:Z,config:H,existingKeyMap:Y,props:L,renderedElement:J}),U===z&&L===J.props)return{extraStateKeyMap:X,element:J};var K=rW(J,L!==J.props?L:{},U);return{extraStateKeyMap:X,element:K}};var r4=P1;var t4=T(B6(),1);import W5,{useContext as s4}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=W5.createContext(void 0),_1=W5.createContext(void 0);function h1($){var Z=W5.forwardRef(function(J,H){var Y=s4(_1),Q=s4(A0);return W5.createElement($,A8({ref:H},J,{radiumConfigContext:Y,styleKeeperContext:Q}))});return Z.displayName="withRadiumContexts(".concat($.displayName||$.name||"Component",")"),t4.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 Y3($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function e4($,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 sW($,Z,J){if(Z)e4($.prototype,Z);if(J)e4($,J);return $}function Q3($,Z){if(Z&&(T1(Z)==="object"||typeof Z==="function"))return Z;return X3($)}function X3($){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=tW(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 tW($,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 G3($,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 eW($,Z){return Jz($)||Zz($,Z)||$z()}function $z(){throw TypeError("Invalid attempt to destructure non-iterable instance")}function Zz($,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 Jz($){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){Hz($,Y,J[Y])})}return $}function Hz($,Z,J){if(Z in $)Object.defineProperty($,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[Z]=J;return $}function W3($,Z){if($==null)return{};var J=Yz($,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 Yz($,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 Qz($){var Z=Xz($,"string");return T1(Z)==="symbol"?Z:String(Z)}function Xz($,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 Uz=["arguments","callee","caller","length","name","prototype","type"],U5,O3;function Oz($,Z){Object.getOwnPropertyNames($).forEach(function(J){if(Uz.indexOf(J)<0&&!Z.hasOwnProperty(J)){var H=Object.getOwnPropertyDescriptor($,J);H&&Object.defineProperty(Z,J,H)}})}function Lz($){var Z=$.prototype||{};return!$.isReactComponent&&!Z.isReactComponent&&!$.render&&!Z.render}function Bz($){return typeof $==="function"&&/^\s*class\s+/.test($.toString())}function Fz($,Z){O3.forEach(function(J){var H=Object.getOwnPropertyDescriptor($,J),Y=(H||{}).value;if(!Y)return;var Q=Object.getOwnPropertyDescriptor(U5,J),X=(Q||{}).value,W=Z.prototype[J];if(!W&&Y!==X)H&&Object.defineProperty(Z.prototype,J,H),delete $[J]})}function L3($){if($._extraRadiumStateKeys&&$._extraRadiumStateKeys.length>0){var Z=$._extraRadiumStateKeys.reduce(function(J,H){var Y=J[H],Q=W3(J,[H].map(Qz));return Q},q0($));$._lastRadiumState=Z,$.setState({_radiumStyleState:Z})}}function B3($){var{_radiumMouseUpListener:Z,_radiumMediaQueryListenersByQuery:J}=$;if($._radiumIsMounted=!1,Z)Z.remove();if(J)Object.keys(J).forEach(function(H){J[H].remove()},$)}function F3($,Z,J){var H=$||Z||J;if(J&&H!==J)H=f8({},J,H);return H}function K3($,Z,J,H){var Y=r4($,Z,J),Q=Y.extraStateKeyMap,X=Y.element;if($._extraRadiumStateKeys=Object.keys(Q),H)return z3.createElement(_1.Provider,{value:H},X);return X}function J3($,Z){var J=z3.forwardRef(function(H,Y){var Q=H.radiumConfig,X=W3(H,["radiumConfig"]),W=$3(_1),G=$3(A0),z=Gz({_radiumStyleState:{}}),U=eW(z,2),L=U[0],K=U[1],q=Wz({state:L,setState:K,_radiumMediaQueryListenersByQuery:void 0,_radiumMouseUpListener:void 0,_radiumIsMounted:!0,_lastRadiumState:void 0,_extraRadiumStateKeys:void 0,_radiumStyleKeeper:G}).current;q.state=L,Z3(function(){return function(){B3(q)}},[q]);var B=q._extraRadiumStateKeys&&q._extraRadiumStateKeys.length>0;Z3(function(){L3(q)},[B,q]);var F=$(X,Y),M=F3(Q,W,Z);return K3(q,F,M,Q)});return J._isRadiumEnhanced=!0,J.defaultProps=$.defaultProps,U3.default(J,$)}function Kz($,Z,J){var H=function(Y){G3(Q,Y);function Q(){var X;Y3(this,Q),X=Q3(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=X3(X);return Fz(W,Z),X}return sW(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);L3(this)}},{key:"componentWillUnmount",value:function(){if(K1(H1(Q.prototype),"componentWillUnmount",this))K1(H1(Q.prototype),"componentWillUnmount",this).call(this);B3(this)}},{key:"render",value:function(){var W=K1(H1(Q.prototype),"render",this).call(this),G=F3(this.props.radiumConfig,this.props.radiumConfigContext,J);return K3(this,W,G,this.props.radiumConfig)}}]),Q}(Z);if(H._isRadiumEnhanced=!0,U5=H.prototype,O3=Object.getOwnPropertyNames(U5).filter(function(Y){return Y!=="constructor"&&typeof U5[Y]==="function"}),Oz($,H),H.propTypes&&H.propTypes.style)H.propTypes=f8({},H.propTypes,{style:z5.default.oneOfType([z5.default.array,z5.default.object])});return H.displayName=$.displayName||$.name||"Component",h1(H)}function qz($){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 H3=zz(function(){return null}).$$typeof;function k1($){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(H3&&$.$$typeof===H3)return J3($.render,Z);if(typeof $!=="function")return Mz(Z,$);var J=$;if(Lz(J))return J3(J,Z);var H=J;if(Bz(H))H=qz(H);if(H===J)H=function(Y){G3(Q,Y);function Q(){return Y3(this,Q),Q3(this,H1(Q).apply(this,arguments))}return Q}(H);return Kz(J,H,Z)}function Mz($,Z){var J=f8({},$,Z);return function(H){return k1(H,J)}}var O5=T(U6(),1);import Rz,{PureComponent as Nz}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 Az($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function q3($,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 Iz($,Z,J){if(Z)q3($.prototype,Z);if(J)q3($,J);return $}function fz($,Z){if(Z&&(b1(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 V8($){return V8=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},V8($)}function Dz($,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($){Dz(Z,$);function Z(){return Az(this,Z),fz(this,V8(Z).apply(this,arguments))}return Iz(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 Rz.createElement("style",{dangerouslySetInnerHTML:{__html:H}})}}]),Z}(Nz);R8.propTypes={radiumConfig:O5.default.object,rules:O5.default.object,scopeSelector:O5.default.string};R8.defaultProps={scopeSelector:""};var M3=h1(R8);import B5,{useContext as _z,useRef as hz}from"react";import Sz,{Component as vz}from"react";function L5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")L5=function(J){return typeof J};else L5=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return L5($)}function Pz($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function A3($,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 Tz($,Z,J){if(Z)A3($.prototype,Z);if(J)A3($,J);return $}function wz($,Z){if(Z&&(L5(Z)==="object"||typeof Z==="function"))return Z;return xz($)}function xz($){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 Ez($,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 Cz=function($){Ez(Z,$);function Z(){var J;if(Pz(this,Z),J=wz(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 Tz(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 Sz.createElement("style",{dangerouslySetInnerHTML:{__html:this._css},ref:function(Q){H._root=Q}})}}]),Z}(vz),I3=h1(Cz);function jz($,Z){if($==null)return{};var J=gz($,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 gz($,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 kz($,Z){var J=$&&$.userAgent||Z&&Z.userAgent;return new p4(J)}var bz=k1(function($){var Z=$.children,J=jz($,["children"]);return B5.createElement("div",J,Z,B5.createElement(I3,null))}),yz=function(Z){var J=Z.radiumConfig,H=_z(_1),Y=hz(kz(J,H));return B5.createElement(A0.Provider,{value:Y.current},B5.createElement(bz,Z))},f3=yz;function T8($,Z){return{__radiumKeyframes:!0,__process:function(H){var Y=b4(H),Q=Object.keys($).map(function(G){return B1(G,$[G],H)}).join(`
20
- `),X=(Z?Z+"-":"")+"radium-animation-"+M0(Q),W="@"+Y+" "+X+` {
16
+ `).map((Z)=>JSON.parse(Z))}applyDeltaIfNeeded($,Z){let J,H;if($.delta){let Y=r3(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 s3={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 l1 extends u8{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 V5,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({},s3),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 c8(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(c1.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 V5,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(l3(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 f5(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 F=0;while(!0){if(F>=this._transports.length)throw Error("no supported transport found");let K=this._transports[this._currentTransportIndex],B=K.transport,q=K.endpoint;if(B==="websocket"){if(this._debug("trying websocket transport"),this._transport=new f5(q,{websocket:$}),!this._transport.supported()){this._debug("websocket transport not available"),this._currentTransportIndex++,F++;continue}}else if(B==="webtransport"){if(this._debug("trying webtransport transport"),this._transport=new n8(q,{webtransport:globalThis.WebTransport,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("webtransport transport not available"),this._currentTransportIndex++,F++;continue}}else if(B==="http_stream"){if(this._debug("trying http_stream transport"),this._transport=new i8(q,{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++,F++;continue}}else if(B==="sse"){if(this._debug("trying sse transport"),this._transport=new p8(q,{eventsource:J,fetch:H,emulationEndpoint:this._config.emulationEndpoint}),!this._transport.supported()){this._debug("sse transport not available"),this._currentTransportIndex++,F++;continue}}else if(B==="sockjs"){if(this._debug("trying sockjs"),this._transport=new l8(q,{sockjs:Z,sockjsOptions:this._config.sockjsOptions}),!this._transport.supported()){this._debug("sockjs transport not available"),this._currentTransportIndex++,F++;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 F=Q._sendConnect(!0);z.push(F)}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(F){if(Q._transportId!=W){Q._debug("error callback from non-actual transport");return}Q._debug("transport level error",F)},onClose:function(F){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 K="connection closed",B=!0,q=0;if(F&&"code"in F&&F.code)q=F.code;if(F&&F.reason)try{let M=JSON.parse(F.reason);K=M.reason,B=M.reconnect}catch(M){if(K=F.reason,q>=3500&&q<4000||q>=4500&&q<5000)B=!1}if(q<3000){if(q===1009)q=c1.messageSizeLimit,K="message size limit exceeded",B=!1;else q=z1.transportClosed,K="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(q,K,B)},onMessage:function(F){Q._dataReceived(F)}},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(c1.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],!n3($)){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[$],d8(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]}}}l1.SubscriptionState=u;l1.State=g;l1.UnauthorizedError=e;var e3=t3(null),r8=e3;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 p1={type:"error",data:"parser error"};var e8=typeof Blob==="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",$2=typeof ArrayBuffer==="function",Z2=($)=>{return typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView($):$&&$.buffer instanceof ArrayBuffer},n1=({type:$,data:Z},J,H)=>{if(e8&&Z instanceof Blob)if(J)return H(Z);else return s8(Z,H);else if($2&&(Z instanceof ArrayBuffer||Z2(Z)))if(J)return H(Z);else return s8(new Blob([Z]),H);return H(s[$]+(Z||""))},s8=($,Z)=>{let J=new FileReader;return J.onload=function(){let H=J.result.split(",")[1];Z("b"+(H||""))},J.readAsDataURL($)};function t8($){if($ instanceof Uint8Array)return $;else if($ instanceof ArrayBuffer)return new Uint8Array($);else return new Uint8Array($.buffer,$.byteOffset,$.byteLength)}var R5;function J2($,Z){if(e8&&$.data instanceof Blob)return $.data.arrayBuffer().then(t8).then(Z);else if($2&&($.data instanceof ArrayBuffer||Z2($.data)))return Z(t8($.data));n1($,!1,(J)=>{if(!R5)R5=new TextEncoder;Z(R5.encode(J))})}var o1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let $=0;$<64;$++)o1["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt($)]=$;var H2=($)=>{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=o1[$.charCodeAt(H)],X=o1[$.charCodeAt(H+1)],W=o1[$.charCodeAt(H+2)],G=o1[$.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 $Z=typeof ArrayBuffer==="function",a1=($,Z)=>{if(typeof $!=="string")return{type:"message",data:Y2($,Z)};let J=$.charAt(0);if(J==="b")return{type:"message",data:ZZ($.substring(1),Z)};if(!i1[J])return p1;return $.length>1?{type:i1[J],data:$.substring(1)}:{type:i1[J]}},ZZ=($,Z)=>{if($Z){let J=H2($);return Y2(J,Z)}else return{base64:!0,data:$}},Y2=($,Z)=>{switch(Z){case"blob":if($ instanceof Blob)return $;else return new Blob([$]);case"arraybuffer":default:if($ instanceof ArrayBuffer)return $;else return $.buffer}};var Q2=String.fromCharCode(30),X2=($,Z)=>{let J=$.length,H=Array(J),Y=0;$.forEach((Q,X)=>{n1(Q,!1,(W)=>{if(H[X]=W,++Y===J)Z(H.join(Q2))})})},G2=($,Z)=>{let J=$.split(Q2),H=[];for(let Y=0;Y<J.length;Y++){let Q=a1(J[Y],Z);if(H.push(Q),Q.type==="error")break}return H};function W2(){return new TransformStream({transform($,Z){J2($,(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 N5;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 z2($,Z){if(!N5)N5=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(p1);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(a1(Q?G:N5.decode(G),Z)),H=0}if(Y===0||Y>$){W.enqueue(p1);break}}}})}var P5=4;function E($){if($)return JZ($)}function JZ($){for(var Z in E.prototype)$[Z]=E.prototype[Z];return $}E.prototype.on=E.prototype.addEventListener=function($,Z){return this._callbacks=this._callbacks||{},(this._callbacks["$"+$]=this._callbacks["$"+$]||[]).push(Z),this};E.prototype.once=function($,Z){function J(){this.off($,J),Z.apply(this,arguments)}return J.fn=Z,this.on($,J),this};E.prototype.off=E.prototype.removeListener=E.prototype.removeAllListeners=E.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};E.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};E.prototype.emitReserved=E.prototype.emit;E.prototype.listeners=function($){return this._callbacks=this._callbacks||{},this._callbacks["$"+$]||[]};E.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")()})(),U2="arraybuffer";function O2(){}function x0($,...Z){return Z.reduce((J,H)=>{if($.hasOwnProperty(H))J[H]=$[H];return J},{})}var HZ=d.setTimeout,YZ=d.clearTimeout;function Q1($,Z){if(Z.useNativeTimers)$.setTimeoutFn=HZ.bind(d),$.clearTimeoutFn=YZ.bind(d);else $.setTimeoutFn=d.setTimeout.bind(d),$.clearTimeoutFn=d.clearTimeout.bind(d)}var QZ=1.33;function L2($){if(typeof $==="string")return XZ($);return Math.ceil(($.byteLength||$.size)*QZ)}function XZ($){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 B2($){let Z="";for(let J in $)if($.hasOwnProperty(J)){if(Z.length)Z+="&";Z+=encodeURIComponent(J)+"="+encodeURIComponent($[J])}return Z}function F2($){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 T5 extends Error{constructor($,Z,J){super($);this.description=Z,this.context=J,this.type="TransportError"}}class U1 extends E{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 T5($,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=a1($,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=B2($);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(G2($,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,X2($,(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 K2=!1;try{K2=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch($){}var q2=K2;function GZ(){}class A2 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 E{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=GZ,$)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",M2);else if(typeof addEventListener==="function"){let $="onpagehide"in d?"pagehide":"unload";addEventListener($,M2,!1)}}function M2(){for(let $ in $1.requests)if($1.requests.hasOwnProperty($))$1.requests[$].abort()}var WZ=function(){let $=I2({xdomain:!1});return $&&$.responseType!==null}();class M1 extends A2{constructor($){super($);let Z=$&&$.forceBase64;this.supportsBinary=WZ&&!Z}request($={}){return Object.assign($,{xd:this.xd},this.opts),new $1(I2,this.uri(),$)}}function I2($){let Z=$.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!Z||q2))return new XMLHttpRequest}catch(J){}if(!Z)try{return new d[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(J){}}var f2=typeof navigator<"u"&&typeof navigator.product==="string"&&navigator.product.toLowerCase()==="reactnative";class V2 extends U1{get name(){return"websocket"}doOpen(){let $=this.uri(),Z=this.opts.protocols,J=f2?{}: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;n1(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 w5=d.WebSocket||d.MozWebSocket;class A1 extends V2{createSocket($,Z,J){return!f2?Z?new w5($,Z):new w5($):new w5($,Z,J)}doWrite($,Z){this.ws.send(Z)}}class r1 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=z2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),J=$.readable.pipeThrough(Z).getReader(),H=W2();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 x5={websocket:A1,webtransport:r1,polling:M1};var zZ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,UZ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function x1($){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=zZ.exec($||""),Q={},X=14;while(X--)Q[UZ[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=OZ(Q,Q.path),Q.queryKey=LZ(Q,Q.query),Q}function OZ($,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 LZ($,Z){let J={};return Z.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(H,Y,Q){if(Y)J[Y]=Q}),J}var E5=typeof addEventListener==="function"&&typeof removeEventListener==="function",v0=[];if(E5)addEventListener("offline",()=>{v0.forEach(($)=>$())},!1);class X1 extends E{constructor($,Z){super();if(this.binaryType=U2,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=x1($);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=x1(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=F2(this.opts.query);if(E5){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=O2();this._open()}createTransport($){let Z=Object.assign({},this.opts.query);if(Z.EIO=P5,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+=L2(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(),E5){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=P5;class S5 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 s1 extends S5{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)=>x5[H]).filter((H)=>!!H);super($,J)}}var eU=s1.protocol;function D2($,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=x1($)}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 g5={};S3(g5,{protocol:()=>w2,isPacketValid:()=>DZ,PacketType:()=>V,Encoder:()=>x2,Decoder:()=>j5});var FZ=typeof ArrayBuffer==="function",KZ=($)=>{return typeof ArrayBuffer.isView==="function"?ArrayBuffer.isView($):$.buffer instanceof ArrayBuffer},R2=Object.prototype.toString,qZ=typeof Blob==="function"||typeof Blob<"u"&&R2.call(Blob)==="[object BlobConstructor]",MZ=typeof File==="function"||typeof File<"u"&&R2.call(File)==="[object FileConstructor]";function e1($){return FZ&&($ instanceof ArrayBuffer||KZ($))||qZ&&$ instanceof Blob||MZ&&$ instanceof File}function t1($,Z){if(!$||typeof $!=="object")return!1;if(Array.isArray($)){for(let J=0,H=$.length;J<H;J++)if(t1($[J]))return!0;return!1}if(e1($))return!0;if($.toJSON&&typeof $.toJSON==="function"&&arguments.length===1)return t1($.toJSON(),!0);for(let J in $)if(Object.prototype.hasOwnProperty.call($,J)&&t1($[J]))return!0;return!1}function N2($){let Z=[],J=$.data,H=$;return H.data=v5(J,Z),H.attachments=Z.length,{packet:H,buffers:Z}}function v5($,Z){if(!$)return $;if(e1($)){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]=v5($[H],Z);return J}else if(typeof $==="object"&&!($ instanceof Date)){let J={};for(let H in $)if(Object.prototype.hasOwnProperty.call($,H))J[H]=v5($[H],Z);return J}return $}function P2($,Z){return $.data=C5($.data,Z),delete $.attachments,$}function C5($,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]=C5($[J],Z);else if(typeof $==="object"){for(let J in $)if(Object.prototype.hasOwnProperty.call($,J))$[J]=C5($[J],Z)}return $}var T2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],w2=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 x2{constructor($){this.replacer=$}encode($){if($.type===V.EVENT||$.type===V.ACK){if(t1($))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=N2($),J=this.encodeAsString(Z.packet),H=Z.buffers;return H.unshift(J),H}}class j5 extends E{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 E2(Z),Z.attachments===0)super.emitReserved("decoded",Z)}else super.emitReserved("decoded",Z)}else if(e1($)||$.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(j5.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"&&T2.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 E2{constructor($){this.packet=$,this.buffers=[],this.reconPack=$}takeBinaryData($){if(this.buffers.push($),this.buffers.length===this.reconPack.attachments){let Z=P2(this.reconPack,this.buffers);return this.finishedReconstruction(),Z}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function AZ($){return typeof $==="string"}var IZ=Number.isInteger||function($){return typeof $==="number"&&isFinite($)&&Math.floor($)===$};function fZ($){return $===void 0||IZ($)}function C0($){return Object.prototype.toString.call($)==="[object Object]"}function VZ($,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"&&T2.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 DZ($){return AZ($.nsp)&&fZ($.id)&&VZ($.type,$.data)}function p($,Z,J){return $.on(Z,J),function(){$.off(Z,J)}}var RZ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class $0 extends E{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=[p($,"open",this.onopen.bind(this)),p($,"packet",this.onpacket.bind(this)),p($,"error",this.onerror.bind(this)),p($,"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(RZ.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 Z0 extends E{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||g5;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 s1(this.uri,this.opts);let Z=this.engine,J=this;this._readyState="opening",this.skipReconnect=!1;let H=p(Z,"open",function(){J.onopen(),$&&$()}),Y=(X)=>{if(this.cleanup(),this._readyState="closed",this.emitReserved("error",X),$)$(X);else this.maybeReconnectOnOpen()},Q=p(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(p($,"ping",this.onping.bind(this)),p($,"data",this.ondata.bind(this)),p($,"error",this.onerror.bind(this)),p($,"close",this.onclose.bind(this)),p(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 $0(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 J0={};function j0($,Z){if(typeof $==="object")Z=$,$=void 0;Z=Z||{};let J=D2($,Z.path||"/socket.io"),H=J.source,Y=J.id,Q=J.path,X=J0[Y]&&Q in J0[Y].nsps,W=Z.forceNew||Z["force new connection"]||Z.multiplex===!1||X,G;if(W)G=new Z0(H,Z);else{if(!J0[Y])J0[Y]=new Z0(H,Z);G=J0[Y]}if(J.query&&!Z.query)Z.query=J.queryKey;return G.socket(J.path,Z)}Object.assign(j0,{Manager:Z0,Socket:$0,io:j0,connect:j0});import{createContext as NZ}from"react";var PZ=NZ(null),S2=PZ;function _5($){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 TZ}from"react";var wZ=_5(),xZ=TZ(wZ),v2=xZ;var EZ=({card:$,data:Z,children:J,useSocketioSupport:H=!1,useCentrifugeSupport:Y=!1,useMittSupport:Q=!1,centrifugeChannel:X=void 0,methods:W=void 0})=>{let G=I0();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=h5(S2),U=h5(r8),L=h5(v2);if(k5(()=>{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(([F,K])=>{let B=`pie${F}_${Z.name}`;if(G)console.log(`[PieCard] Socket.IO registering event: ${B}`);z.on(B,K)}),()=>{Object.entries(W).forEach(([F,K])=>{let B=`pie${F}_${Z.name}`;if(G)console.log(`[PieCard] Socket.IO unregistering event: ${B}`);z.off(B,K)})}},[z,W,Z.name]),k5(()=>{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 F=Object.entries(W).map(([K,B])=>{let q=`pie${K}_${Z.name}_${X}`;if(G)console.log(`[PieCard] Centrifuge subscribing to channel: ${q}`);let M=U.newSubscription(q);return M.on("publication",(P)=>{if(G)console.log(`[PieCard] Centrifuge received data on ${q}:`,P.data);B(P.data)}),M.subscribe(),M});return()=>{F.forEach((K)=>{if(G)console.log("[PieCard] Centrifuge unsubscribing from channel");K.unsubscribe(),U.removeSubscription(K)})}},[U,X,W,Z.name]),k5(()=>{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(([F,K])=>{let B=`pie${F}_${Z.name}`;if(G)console.log(`[PieCard] Mitt registering event: ${B}`);L.on(B,K)}),()=>{Object.entries(W).forEach(([F,K])=>{let B=`pie${F}_${Z.name}`;if(G)console.log(`[PieCard] Mitt unregistering event: ${B}`);L.off(B,K)})}},[L,W,Z.name]),G)console.log("[PieCard] Rendering complete, returning children");return J},G1=EZ;var SZ=new Map;var C2=($)=>{return SZ.get($)};import{Suspense as _Z,useContext as hZ}from"react";import{createContext as vZ}from"react";import{jsx as gZ,Fragment as jZ}from"react/jsx-runtime";var CZ=vZ(gZ(jZ,{})),j2=CZ;import{jsx as g2}from"react/jsx-runtime";function kZ({uiConfig:$,setUiAjaxConfiguration:Z}){let J=hZ(j2),H=I0();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=C2($.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=g2(Q,{data:$.data,content:$.content,setUiAjaxConfiguration:Z});if(Y.isLazy){if(H)console.log("[UI] Rendering lazy component with Suspense:",Y.name);return g2(_Z,{fallback:Y.fallback??J,children:X},`${Y.name}`)}if(H)console.log("[UI] Rendering component directly:",Y.name);return X}var f1=kZ;function b5($=1000){return new Promise((Z)=>{if(typeof window>"u"){Z();return}let J=()=>{if(typeof window.sid<"u")Z();else setTimeout(J,$)};J()})}import{useMemo as bZ}from"react";var yZ=($,Z={},J=[],H,Y)=>{let Q=Y?.renderingLogEnabled??!1,X=Y?.apiServer??"";if(Q)console.log("Registering AJAX: ",H,Z,J);if(!H||!$){if(Q)console.warn("Registration FAILED: pathname or setUiAjaxConfiguration is missing!");return()=>{}}return async(W={})=>{if(typeof window>"u"||typeof document>"u"){if(Q)console.warn("getAjaxSubmit called on server, skipping DOM-dependent logic");return}if(J.includes("sid"))await b5();let G=new FormData;for(let[U,L]of Object.entries({...Z,...W}))G.append(U,L);for(let U of J)if(U==="sid"){if(!window.sid)throw Error("SocketIO isn't initialized properly");G.append("sid",window.sid)}else{let L=document.getElementsByName(U);if(!L.length){if(Q)console.warn(`No input found with name ${U}`);continue}let F=L[0];if(F instanceof HTMLInputElement)if(F.type==="file"&&F.files)Array.from(F.files).forEach((K)=>G.append(U,K));else G.append(U,F.value);else if(F instanceof HTMLTextAreaElement)G.append(U,F.value)}let z=X+"api/ajax_content"+H;return $(null),await fetch(z,{method:"POST",body:G}).then(async(U)=>{let F=(U.headers.get("content-type")||"").includes("application/json");if(!!U.body?.getReader&&!F){let B=U.body.getReader(),q=new TextDecoder,M="";while(!0){let{done:P,value:R}=await B.read();if(P)break;M+=q.decode(R,{stream:!0});let N=M.split(`
17
+ `);M=N.pop()??"";for(let f of N){let w=f.trim();if(!w)continue;try{let v=JSON.parse(w);$([v])}catch(v){if(Q)console.warn("Failed to parse streamed line:",w)}}}if(M.trim())try{let P=JSON.parse(M);$([P])}catch(P){if(Q)console.warn("Failed to parse final streamed line:",M)}return{}}else{let B=await U.json();return $(B),B}}).catch((U)=>{if(Q)console.error("AJAX request failed:",U);return $(null),U})}},g0=($,Z={},J=[],H)=>{let{apiServer:Y,enableRenderingLog:Q}=A5();return bZ(()=>yZ($,Z,J,H,{apiServer:Y,renderingLogEnabled:Q}),[$,Z,J,H,Y,Q])};import{forwardRef as GJ,useEffect as r2,useImperativeHandle as WJ,useRef as zJ,useState as b0}from"react";import{useRef as mZ,useState as uZ}from"react";import{jsx as dZ}from"react/jsx-runtime";function y5($){let[Z,J]=uZ(!1),H=mZ(null);return dZ("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 lZ,useCallback as iZ}from"react";import{jsx as _2}from"react/jsx-runtime";var cZ=()=>_2("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:_2("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"})}),h2=cZ;import{jsx as m5}from"react/jsx-runtime";var pZ=({type:$="button",onClick:Z,icons:J})=>{let H=lZ(null),Y=iZ(()=>{let X=H.current;if(X)X.style.transform="scale(0.8)",setTimeout(()=>{X.style.transform="scale(1)"},600)},[]);return m5("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?m5("img",{src:J.sendIcon,alt:""}):m5(h2,{})})},k2=pZ;import{jsx as b2}from"react/jsx-runtime";var nZ=()=>b2("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:b2("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"})}),y2=nZ;import{jsx as _0,jsxs as rZ,Fragment as aZ}from"react/jsx-runtime";var oZ=({name:$,accept:Z,fileInputRef:J,onSelectFile:H,icons:Y})=>{return rZ(aZ,{children:[_0("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:Y.attachFileIcon?_0("img",{src:Y.attachFileIcon,alt:""}):_0(y2,{})}),_0("input",{id:$+"__pie__file",name:$+"__pie__file",className:"hidden",type:"file",accept:Z,ref:J,onChange:(Q)=>{if(Q.target.files)H(Q.target.files[0])}})]})},m2=oZ;import{jsx as u2}from"react/jsx-runtime";var sZ=()=>u2("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:u2("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"})}),d2=sZ;import{jsx as c2}from"react/jsx-runtime";var tZ=()=>c2("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-5",children:c2("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),h0=tZ;import{jsx as H0,jsxs as $J}from"react/jsx-runtime";var eZ=({name:$,selectedFile:Z,onDropFile:J})=>{return $J("div",{className:"flex w-full cursor-default flex-row items-center gap-2",children:[H0(d2,{}),H0("span",{className:"flex-1",children:Z.name}),H0("input",{type:"hidden",name:$,value:""}),H0("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:H0(h0,{})})]})},l2=eZ;import{jsx as i2,jsxs as JJ}from"react/jsx-runtime";var ZJ=()=>JJ("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"})]}),p2=ZJ;import{jsx as Y0}from"react/jsx-runtime";var HJ=({isListening:$,toggleListening:Z,icons:J})=>{return 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:Z,children:$?J.cancelIcon?Y0("img",{src:J.cancelIcon,alt:""}):Y0(h0,{}):J.voiceRecordingIcon?Y0("img",{src:J.voiceRecordingIcon,alt:""}):Y0(p2,{})})},n2=HJ;import{jsx as o2,jsxs as QJ}from"react/jsx-runtime";var YJ=({option:$,onClickOption:Z})=>{return QJ("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"&&o2("img",{src:$.iconUrl,alt:""}),$.title,$.iconPosition==="end"&&o2("img",{src:$.iconUrl,alt:""})]})},k0=YJ;import{jsx as a2}from"react/jsx-runtime";var XJ=({options:$,handleOptionClick:Z})=>{return a2("div",{className:"flex w-full flex-row flex-wrap justify-start gap-[5px]",children:$.map((J,H)=>{return a2(k0,{option:J,onClickOption:Z},H)})})},u5=XJ;import{jsx as W1,jsxs as s2}from"react/jsx-runtime";var UJ=GJ(({name:$,defaultValue:Z,defaultOptions:J,isArea:H,placeholder:Y,fileAccept:Q,optionsPosition:X,icons:W,handleOptionClick:G,handleSendMessage:z,sx:U},L)=>{let F=zJ(null),[K,B]=b0(null),[q,M]=b0(Z),[P,R]=b0(J),[N,f]=b0(!1);WJ(L,()=>({clear:()=>{if(M(""),B(null),F.current)F.current.value=""},setValue:(v)=>M(v),setOptions:(v)=>R(v)})),r2(()=>{M(Z)},[Z]),r2(()=>{},[]);let w=()=>{};return s2("div",{className:"flex flex-col items-center gap-[0.1rem]",id:$+"_chat_input",style:U,children:[P&&X==="top"&&W1(u5,{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:[K?W1(l2,{name:$,selectedFile:K,onDropFile:()=>{if(B(null),F.current)F.current.value=""}}):!H?W1("input",{name:$,value:q,onChange:(v)=>M(v.target.value),onKeyDown:(v)=>{if(v.key==="Enter")v.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(y5,{name:$,value:q,onChange:(v)=>M(v.target.value),onKeyDown:(v)=>{if(v.key==="Enter"&&!v.shiftKey)v.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(n2,{isListening:N,toggleListening:w,icons:W}),W1(m2,{name:$,fileInputRef:F,accept:Q,onSelectFile:B,icons:W}),W1(k2,{onClick:z,icons:W})]})}),P&&X==="bottom"&&W1(u5,{options:P,handleOptionClick:G})]})}),t2=UJ;var W6=T(G6(),1),D1=T(G6(),1),p0=W6.default.default||W6.default;import{useState as OY,useEffect as LY}from"react";import{useEffect as QY,useState as XY}from"react";import{jsx as WY}from"react/jsx-runtime";function GY({children:$}){let[Z,J]=XY($);return QY(()=>{J($)},[$]),WY("div",{className:"max-w-full first:mt-0",children:Z})}var Q7=GY;import{jsx as X7}from"react/jsx-runtime";var zY=()=>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=zY;import{jsx as n0}from"react/jsx-runtime";function UY({username:$,avatar:Z}){return n0("div",{className:"w-[30px]",children:n0("div",{className:"relative flex size-[30px] items-center justify-center rounded-sm p-1 text-white",children:Z?n0("img",{src:Z,className:"absolute inset-0 rounded",alt:$}):n0(G7,{})})})}var z6=UY;import{jsx as J1,jsxs as W7}from"react/jsx-runtime";var BY=({message:$,handleOptionClick:Z,setUiAjaxConfiguration:J})=>{let[H,Y]=OY(!1);return LY(()=>{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(z6,{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(k0,{onClickOption:Z,option:Q},X))})]}),$.align==="right"&&J1("div",{className:"relative flex shrink-0 flex-col items-end",children:J1(z6,{username:$.username,avatar:$.avatar})})]})})},z7=BY;import{forwardRef as FY,useEffect as KY,useImperativeHandle as qY,useRef as MY,useState as AY}from"react";import{jsx as U7}from"react/jsx-runtime";var IY=FY(({name:$,handleOptionClick:Z,defaultMessages:J,sx:H,setUiAjaxConfiguration:Y},Q)=>{let[X,W]=AY(J),G=MY(null),z=()=>{if(G.current)G.current.scrollTop=G.current.scrollHeight};return KY(()=>{z()},[X]),qY(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=IY;import{useEffect as fY,useRef as L7,useState as VY}from"react";import{jsx as U6,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:F,pathname:K,kwargs:B,useSocketioSupport:q,useCentrifugeSupport:M,centrifugeChannel:P}=$,R=L7(null),N=L7(null),[f,w]=VY(!1),v=g0(Z,B,F,K);fY(()=>{if(f)requestAnimationFrame(()=>{v(),w(!1)})},[f]);let m1=(t)=>{if(R.current)R.current.setValue(t),w(!0)},K5=()=>{if(R.current)R.current.clear()},q5=(t)=>{if(R.current)R.current.setOptions(t.options)},u1=(t)=>{if(N.current)N.current.addMessage(t.message)},j=(t)=>{if(N.current)N.current.setMessages(t.messages)},A0=()=>{w(!0)};return U6(G1,{card:"ChatCard",data:$,methods:{clearInput:K5,setOptions:q5,addMessage:u1,setMessages:j},useSocketioSupport:q,useCentrifugeSupport:M,centrifugeChannel:P,children:RY("div",{className:"flex size-full flex-col",style:L.container,children:[U6(O7,{ref:N,name:J,defaultMessages:Y,sx:L.messages,handleOptionClick:m1,setUiAjaxConfiguration:Z}),U6(t2,{ref:R,name:J,isArea:X,defaultOptions:Q,placeholder:G,defaultValue:H,fileAccept:W,sx:L.chatInput,handleSendMessage:A0,handleOptionClick:m1,optionsPosition:U,icons:z})]})})},B7=DY;var z5=T(O6(),1),z3=T(F6(),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 L0($,Z){var J=!aY[$]&&typeof Z==="number"&&Z!==0;return J?Z+"px":Z}function B0($,Z){return Object.keys($).reduce(function(J,H){return J[H]=Z($[H],H),J},{})}function K6($){return B0($,function(Z,J){return L0(J,$[J])+" !important"})}var rY=/([a-z])?([A-Z])/g,sY=function(Z,J,H){return(J||"")+"-"+H.toLowerCase()},q6=function(Z){return Z.replace(rY,sY)},tY=function(Z){return Object.keys(Z).reduce(function(J,H){var Y=q6(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(E6(),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"],n6=["Moz"],C=["ms"],m=["Webkit","Moz"],h=["Webkit","ms"],F0=["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:F0,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:F0,breakBefore:F0,breakInside:F0,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:F0,flowInto:h,flowFrom:h,regionFragment:h,boxSizing:n6,textAlignLast:n6,tabSize:n6,wrapFlow:C,wrapThrough:C,wrapMargin:C,touchAction:C,gridTemplateColumns:C,gridTemplateRows:C,gridTemplateAreas:C,gridTemplate:C,gridAutoColumns:C,gridAutoRows:C,gridAutoFlow:C,grid:C,gridRowStart:C,gridColumnStart:C,gridRowEnd:C,gridRow:C,gridColumn:C,gridColumnEnd:C,gridColumnGap:C,gridRowGap:C,gridArea:C,gridGap:C,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 e0($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")e0=function(J){return typeof J};else e0=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return e0($)}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&&e0(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(q6(J),":"));return Z[J]=H,Z},{})}var v4,t0;function h4($){var Z=$||global&&global.navigator&&global.navigator.userAgent;if(!t0||Z!==v4){if(Z==="all")t0={prefix:_4,prefixedKeyframes:"keyframes"};else t0=new VW({userAgent:Z});v4=Z}return t0}function k4($){return h4($).prefixedKeyframes||"keyframes"}function $5($,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 B1($,Z,J){if(!Z)return"";var H=B0(Z,function(W,G){return L0(G,W)}),Y=$5(H,J),Q=S7(Y),X=NW(Q);return $+"{"+X+"}"}var PW=function(Z){return Z===null||typeof Z>"u"?"main":Z.toString()},Z5=PW;var TW=function(Z,J,H){var Y=Z5(J);return!!Z&&!!Z._radiumStyleState&&!!Z._radiumStyleState[Y]&&Z._radiumStyleState[Y][H]},J5=TW;var wW=function(Z){return typeof Z.ref==="string"?Z.ref:Z.key},N1=wW;var xW=function(Z){return Z._lastRadiumState||Z.state&&Z.state._radiumStyleState||{}},K0=xW;function q0($){if(!$)return"";var Z=5381,J=$.length-1;while(J)Z=Z*33^$.charCodeAt(J),J-=1;return(Z>>>0).toString(16)}function H5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")H5=function(J){return typeof J};else H5=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return H5($)}function Y5($){return $&&$.constructor===Object&&$.toString===Object.prototype.toString}function Q5($){var Z={};return $.forEach(function(J){if(!J||H5(J)!=="object")return;if(Array.isArray(J))J=Q5(J);Object.keys(J).forEach(function(H){if(!Y5(J[H])||!Y5(Z[H])){Z[H]=J[H];return}if(H.indexOf("@media")===0){var Y=H;while(!0)if(Y+=" ",!Z[Y]){Z[Y]=J[H];return}}Z[H]=Q5([Z[H],J[H]])})}),Z}var EW=function(){};var b4=EW;function L8($){var{addCSS:Z,config:J,style:H}=$,Y=function(W){var G=W,z=G.__process(J.userAgent),U=z.animationName,L=z.css;return Z(L),U},Q=Object.keys(H).reduce(function(X,W){var G=H[W],z=Array.isArray(G);if(W==="animationName"&&G&&(G.__radiumKeyframes||z))if(z)G=G.map(Y).join(", ");else G=Y(G);return X[W]=G,X},{});return{style:Q}}var SW=function(Z){var{style:J,mergeStyles:H}=Z,Y=Array.isArray(J)?H(J):J;return{style:Y}},y4=SW;function B8($){var{config:Z,style:J}=$,H=$5(J,Z.userAgent);return{style:H}}function F8($){var{isNestedStyle:Z,style:J}=$,H=Object.keys(J).reduce(function(Y,Q){var X=J[Q];if(!Z(X))Y[Q]=X;return Y},{});return{style:H}}var C1=[],X5=!1;function K8(){C1.forEach(function($){$()})}var vW=function(Z){if(C1.indexOf(Z)===-1)C1.push(Z);if(!X5)window.addEventListener("mouseup",K8),X5=!0;return{remove:function(){var H=C1.indexOf(Z);if(C1.splice(H,1),C1.length===0&&X5)window.removeEventListener("mouseup",K8),X5=!1}}},m4={subscribe:vW,__triggerForTests:K8};var u4=function(Z){return Z===":hover"||Z===":active"||Z===":focus"},CW=function(Z){var{ExecutionEnvironment:J,getComponentField:H,getState:Y,mergeStyles:Q,props:X,setState:W,style:G}=Z,z={},U={};if(G[":hover"]){var L=X.onMouseEnter;U.onMouseEnter=function(f){L&&L(f),W(":hover",!0)};var F=X.onMouseLeave;U.onMouseLeave=function(f){F&&F(f),W(":hover",!1)}}if(G[":active"]){var K=X.onMouseDown;U.onMouseDown=function(f){K&&K(f),z._lastMouseDown=Date.now(),W(":active","viamousedown")};var B=X.onKeyDown;U.onKeyDown=function(f){if(B&&B(f),f.key===" "||f.key==="Enter")W(":active","viakeydown")};var q=X.onKeyUp;U.onKeyUp=function(f){if(q&&q(f),f.key===" "||f.key==="Enter")W(":active",!1)}}if(G[":focus"]){var M=X.onFocus;U.onFocus=function(f){M&&M(f),W(":focus",!0)};var P=X.onBlur;U.onBlur=function(f){P&&P(f),W(":focus",!1)}}if(G[":active"]&&!H("_radiumMouseUpListener")&&J.canUseEventListeners)z._radiumMouseUpListener=m4.subscribe(function(){Object.keys(H("state")._radiumStyleState).forEach(function(f){if(Y(":active",f)==="viamousedown")W(":active",!1,f)})});var R=X.disabled?[G[":disabled"]]:Object.keys(G).filter(function(f){return u4(f)&&Y(f)}).map(function(f){return G[f]}),N=Q([G].concat(R));return N=Object.keys(N).reduce(function(f,w){if(!u4(w)&&w!==":disabled")f[w]=N[w];return f},{}),{componentFields:z,props:U,style:N}},d4=CW;function jW($){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){gW($,Y,J[Y])})}return $}function gW($,Z,J){if(Z in $)Object.defineProperty($,Z,{value:J,enumerable:!0,configurable:!0,writable:!0});else $[Z]=J;return $}var q8;function _W($){if(q8===void 0)q8=!!$.canUseDOM&&!!window&&!!window.matchMedia&&function(Z){return window.matchMedia(Z)}||null;return q8}function c4($,Z){return Object.keys($).filter(function(J){return Z($[J],J)}).reduce(function(J,H){return J[H]=$[H],J},{})}function hW($){return Object.keys($).reduce(function(Z,J){if(J.indexOf("@media")!==0)Z[J]=$[J];return Z},{})}function kW($){var{addCSS:Z,appendImportantToEachValue:J,cssRuleSetToString:H,hash:Y,isNestedStyle:Q,style:X,userAgent:W}=$,G="";return Object.keys(X).filter(function(z){return z.indexOf("@media")===0}).map(function(z){var U=J(c4(X[z],function(B){return!Q(B)}));if(!Object.keys(U).length)return;var L=H("",U,W),F="rmq-"+Y(z+L),K=z+"{ ."+F+L+"}";Z(K),G+=(G?" ":"")+F}),G}function bW($){var{listener:Z,listenersByQuery:J,matchMedia:H,mediaQueryListsByQuery:Y,query:Q}=$;Q=Q.replace("@media ","");var X=Y[Q];if(!X&&H)Y[Q]=X=H(Q);if(!J||!J[Q])X.addListener(Z),J[Q]={remove:function(){X.removeListener(Z)}};return X}function M8($){var{ExecutionEnvironment:Z,addCSS:J,appendImportantToEachValue:H,config:Y,cssRuleSetToString:Q,getComponentField:X,getGlobalState:W,hash:G,isNestedStyle:z,mergeStyles:U,props:L,setState:F,style:K}=$,B=hW(K),q=kW({addCSS:J,appendImportantToEachValue:H,cssRuleSetToString:Q,hash:G,isNestedStyle:z,style:K,userAgent:Y.userAgent}),M=q?{className:q+(L.className?" "+L.className:"")}:null,P=Y.matchMedia||_W(Z);if(!P)return{props:M,style:B};var R=jW({},X("_radiumMediaQueryListenersByQuery")),N=W("mediaQueryListsByQuery")||{};return Object.keys(K).filter(function(f){return f.indexOf("@media")===0}).map(function(f){var w=c4(K[f],z);if(!Object.keys(w).length)return;var v=bW({listener:function(){return F(f,v.matches,"_all")},listenersByQuery:R,matchMedia:P,mediaQueryListsByQuery:N,query:f});if(v.matches)B=U([B,w])}),{componentFields:{_radiumMediaQueryListenersByQuery:R},globalState:{mediaQueryListsByQuery:N},props:M,style:B}}function A8($){var{addCSS:Z,appendImportantToEachValue:J,config:H,cssRuleSetToString:Y,hash:Q,props:X,style:W}=$,G=X.className,z=Object.keys(W).reduce(function(U,L){var F=W[L];if(L===":visited"){F=J(F);var K=Y("",F,H.userAgent),B="rad-"+Q(K),q="."+B+":visited"+K;Z(q),G=(G?G+" ":"")+B}else U[L]=F;return U},{});return{props:G===X.className?null:{className:G},style:z}}var r={checkProps:b4,keyframes:L8,mergeStyleArray:y4,prefix:B8,removeNestedStyles:F8,resolveInteractionStyles:d4,resolveMediaQueries:M8,visited:A8};var n4=T(E6(),1);import F1 from"react";function yW($,Z){if(!($ instanceof Z))throw TypeError("Cannot call a class as a function")}function l4($,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 mW($,Z,J){if(Z)l4($.prototype,Z);if(J)l4($,J);return $}var i4=function(){function $(Z){yW(this,$),this._userAgent=void 0,this._listeners=void 0,this._cssSet=void 0,this._userAgent=Z,this._listeners=[],this._cssSet={}}return mW($,[{key:"subscribe",value:function(J){var H=this;if(this._listeners.indexOf(J)===-1)this._listeners.push(J);return{remove:function(){var Q=H._listeners.indexOf(J);if(Q>-1)H._listeners.splice(Q,1)}}}},{key:"addCSS",value:function(J){var H=this;if(!this._cssSet[J])this._cssSet[J]=!0,this._emitChange();return{remove:function(){delete H._cssSet[J],H._emitChange()}}}},{key:"getCSS",value:function(){return Object.keys(this._cssSet).join(`
19
+ `)}},{key:"_emitChange",value:function(){this._listeners.forEach(function(J){return J()})}}]),$}();function j1($){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 G5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")G5=function(J){return typeof J};else G5=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return G5($)}var o4={plugins:[r.mergeStyleArray,r.checkProps,r.resolveMediaQueries,r.resolveInteractionStyles,r.keyframes,r.visited,r.removeNestedStyles,r.prefix,r.checkProps]},p4={},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=G5(J);if(W==="string"||W==="number")return J;if(W==="function")return function(){var F=J.apply(this,arguments);if(F1.isValidElement(F)){var K=N1(F);delete X[K];var B=P1(H,F,Y,Q,!0,X),q=B.element;return q}return F};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(F){if(F1.isValidElement(F)){var K=N1(F);delete X[K];var B=P1(H,F,Y,Q,!0,X),q=B.element;return q}return F})},iW=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=j1({},W);var L=P1(J,z,H,Y,!0,X),F=L.element;W[G]=F}}),W},pW=function(Z){var{componentName:J,existingKeyMap:H,renderedElement:Y}=Z,Q=N1(Y),X=Z5(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=K0(Z),X={_radiumStyleState:j1({},Q)};X._radiumStyleState[J]=j1({},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=pW({renderedElement:X,existingKeyMap:Y,componentName:z}),L=function(R){return J[R]},F=function(R){return p4[R]},K=function(R,N){return J5(J.state,N||U(),R)},B=function(R,N,f){return nW(J,f||U(),R,N)},q=function(R){var N=J._radiumStyleKeeper;if(!N){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 N.addCSS(R)},M=Q.style;if(G.forEach(function(P){var R=P({ExecutionEnvironment:n4.default,addCSS:q,appendImportantToEachValue:K6,componentName:z,config:H,cssRuleSetToString:B1,getComponentField:L,getGlobalState:F,getState:K,hash:q0,mergeStyles:Q5,props:W,setState:B,isNestedStyle:Y5,style:M})||{};M=R.style||M,W=R.props&&Object.keys(R.props).length?j1({},W,R.props):W;var N=R.componentFields||{};Object.keys(N).forEach(function(w){J[w]=N[w]});var f=R.globalState||{};Object.keys(f).forEach(function(w){p4[w]=f[w]})}),M!==Q.style)W=j1({},W,{style:M});return W},aW=function(Z,J,H){if(typeof Z.type==="string")J=j1({},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=K0(Z);X=Object.keys(W).reduce(function(K,B){if(B!=="main")K[B]=!0;return K},{})}if(Array.isArray(J)&&!J.props){var G=J.map(function(K){if(X){var B=N1(K);delete X[B]}return P1(Z,K,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=iW({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 F=aW(J,L!==J.props?L:{},U);return{extraStateKeyMap:X,element:F}};var a4=P1;var s4=T(F6(),1);import W5,{useContext as r4}from"react";function I8(){return I8=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 $},I8.apply(this,arguments)}var M0=W5.createContext(void 0),g1=W5.createContext(void 0);function _1($){var Z=W5.forwardRef(function(J,H){var Y=r4(g1),Q=r4(M0);return W5.createElement($,I8({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)f8($,Z)}function f8($,Z){return f8=Object.setPrototypeOf||function(H,Y){return H.__proto__=Y,H},f8($,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 V8($){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"],U5,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(U5,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},K0($));$._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=V8({},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(g1.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(g1),G=e4(M0),z=Xz({_radiumStyleState:{}}),U=tW(z,2),L=U[0],F=U[1],K=Gz({state:L,setState:F,_radiumMediaQueryListenersByQuery:void 0,_radiumMouseUpListener:void 0,_radiumIsMounted:!0,_lastRadiumState:void 0,_extraRadiumStateKeys:void 0,_radiumStyleKeeper:G}).current;K.state=L,$3(function(){return function(){L3(K)}},[K]);var B=K._extraRadiumStateKeys&&K._extraRadiumStateKeys.length>0;$3(function(){O3(K)},[B,K]);var q=$(X,Y),M=B3(Q,W,Z);return F3(K,q,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,U5=H.prototype,U3=Object.getOwnPropertyNames(U5).filter(function(Y){return Y!=="constructor"&&typeof U5[Y]==="function"}),Uz($,H),H.propTypes&&H.propTypes.style)H.propTypes=V8({},H.propTypes,{style:z5.default.oneOfType([z5.default.array,z5.default.object])});return H.displayName=$.displayName||$.name||"Component",_1(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 h1($){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=V8({},$,Z);return function(H){return h1(H,J)}}var O5=T(O6(),1);import Dz,{PureComponent as Rz}from"react";function k1($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")k1=function(J){return typeof J};else k1=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return k1($)}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&&(k1(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 D8($){return D8=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},D8($)}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)R8($,Z)}function R8($,Z){return R8=Object.setPrototypeOf||function(H,Y){return H.__proto__=Y,H},R8($,Z)}var N8=function($){Vz(Z,$);function Z(){return Mz(this,Z),Iz(this,D8(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(k1(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(k1(H[U])==="object"){var F=X?U.split(",").map(function(K){return X+" "+K.trim()}).join(","):U;z+=B1(F,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);N8.propTypes={radiumConfig:O5.default.object,rules:O5.default.object,scopeSelector:O5.default.string};N8.defaultProps={scopeSelector:""};var q3=_1(N8);import B5,{useContext as gz,useRef as _z}from"react";import Ez,{Component as Sz}from"react";function L5($){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol")L5=function(J){return typeof J};else L5=function(J){return J&&typeof Symbol==="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};return L5($)}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&&(L5(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 P8($){return P8=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},P8($)}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)T8($,Z)}function T8($,Z){return T8=Object.setPrototypeOf||function(H,Y){return H.__proto__=Y,H},T8($,Z)}var vz=function($){xz(Z,$);function Z(){var J;if(Nz(this,Z),J=Tz(this,P8(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=_1(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 i4(J)}var kz=h1(function($){var Z=$.children,J=Cz($,["children"]);return B5.createElement("div",J,Z,B5.createElement(A3,null))}),bz=function(Z){var J=Z.radiumConfig,H=gz(g1),Y=_z(hz(J,H));return B5.createElement(M0.Provider,{value:Y.current},B5.createElement(kz,Z))},I3=bz;function w8($,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-"+q0(Q),W="@"+Y+" "+X+` {
21
21
  `+Q+`
22
22
  }
23
- `;return{css:W,animationName:X}}}}function y1($){return k1($)}y1.Plugins=r;y1.Style=M3;y1.StyleRoot=f3;y1.getState=J5;y1.keyframes=T8;var m1=y1;function F5($){if(!$)return{};let Z={...$};if("animationName"in Z&&typeof Z.animationName==="object"){let J="radiumAnimation_"+Math.random().toString(36).substring(2,8);Z.animationName=m1.keyframes(Z.animationName,J)}return Z}import{jsx as w8,jsxs as dz}from"react/jsx-runtime";var uz=({data:$,setUiAjaxConfiguration:Z})=>{let{name:J,title:H,iconUrl:Y,iconPosition:Q,sx:X,pathname:W,kwargs:G,depsNames:z}=$,U=mz(()=>g0(Z,G,z,W),[Z,G,z,W]);return w8(G1,{card:"AjaxButtonCard",data:$,children:dz("button",{id:J,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:J,onClick:()=>U(),style:F5(X),type:"button",children:[Y&&Q==="start"&&w8("img",{src:Y,alt:""}),p0(H),Y&&Q==="end"&&w8("img",{src:Y,alt:""})]})})},V3=m1(uz);import{jsx as x8}from"react/jsx-runtime";var cz=({data:$,content:Z,setUiAjaxConfiguration:J})=>{let{name:H,sx:Y}=$;return x8(G1,{card:H,data:$,children:x8("div",{style:F5(Y),id:H,children:Z.map((Q,X)=>{return x8(f1,{uiConfig:Q,setUiAjaxConfiguration:J},`children-${X}`)})})})},D3=m1(cz);import{jsx as R3}from"react/jsx-runtime";var lz=({data:$,content:Z,setUiAjaxConfiguration:J})=>{let{name:H}=$;return R3(G1,{card:H,data:$,children:Z.map((Y,Q)=>{return R3(f1,{uiConfig:Y,setUiAjaxConfiguration:J},`children-${Q}`)})})},N3=lz;export{N3 as UnionCard,f1 as UI,D3 as SequenceCard,G1 as PieCard,F7 as ChatCard,V3 as AjaxButtonCard};
23
+ `;return{css:W,animationName:X}}}}function b1($){return h1($)}b1.Plugins=r;b1.Style=q3;b1.StyleRoot=I3;b1.getState=J5;b1.keyframes=w8;var y1=b1;function F5($){if(!$)return{};let Z={...$};if("animationName"in Z&&typeof Z.animationName==="object"){let J="radiumAnimation_"+Math.random().toString(36).substring(2,8);Z.animationName=y1.keyframes(Z.animationName,J)}return Z}import{jsx as x8,jsxs as mz}from"react/jsx-runtime";var yz=({data:$,setUiAjaxConfiguration:Z})=>{let{name:J,title:H,iconUrl:Y,iconPosition:Q,sx:X,pathname:W,kwargs:G,depsNames:z}=$,U=g0(Z,G,z,W);return x8(G1,{card:"AjaxButtonCard",data:$,children:mz("button",{id:J,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:J,onClick:()=>U(),style:F5(X),type:"button",children:[Y&&Q==="start"&&x8("img",{src:Y,alt:""}),p0(H),Y&&Q==="end"&&x8("img",{src:Y,alt:""})]})})},f3=y1(yz);import{jsx as E8}from"react/jsx-runtime";var uz=({data:$,content:Z,setUiAjaxConfiguration:J})=>{let{name:H,sx:Y}=$;return E8(G1,{card:H,data:$,children:E8("div",{style:F5(Y),id:H,children:Z.map((Q,X)=>{return E8(f1,{uiConfig:Q,setUiAjaxConfiguration:J},`children-${X}`)})})})},V3=y1(uz);import{jsx as D3}from"react/jsx-runtime";var dz=({data:$,content:Z,setUiAjaxConfiguration:J})=>{let{name:H}=$;return D3(G1,{card:H,data:$,children:Z.map((Y,Q)=>{return D3(f1,{uiConfig:Y,setUiAjaxConfiguration:J},`children-${Q}`)})})},R3=dz;export{R3 as UnionCard,f1 as UI,V3 as SequenceCard,G1 as PieCard,B7 as ChatCard,f3 as AjaxButtonCard};