!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.ChatWidget=t(require("React"),require("ReactDOM")):e.ChatWidget=t(e.React,e.ReactDOM)}(this,((e,t)=>(()=>{var n={482:(e,t,n)=>{"use strict";t.A=function(e){let{description:t,lineLimit:n=2,padding:r="0.5ch 1ch",position:a="top",width:c="max-content",maxWidth:d="200px",fontSize:p="1rem",fontColor:f="#ffffff",backgroundColor:m="#00000066",children:h,follow:g="mouse",gap:_="0px"}=e;const y=(0,o.useMemo)((()=>!!h&&o.default.cloneElement(h,{onMouseEnter:x,onMouseLeave:S,onMouseMove:w})),[h]),b=(0,o.useMemo)((()=>{let e=document.createElement("div"),o=document.createElement("div");return e.className="garenatooltip__content",o.className="garenatooltip__text",o.innerHTML=i.default.sanitize(t),e.appendChild(o),u(o,{...s.text,"-webkit-line-clamp":n}),u(e,{...s.content,width:c,"max-width":d,"font-size":p,color:f,"background-color":m,padding:r}),e}),[t,n,c,d,p,f,m,r]),v=(0,o.useMemo)((()=>{let e=document.createElement("div");e.className="garenatooltip__gap";let t=_.split(" ");return u(e,{...s.gap,width:t[0],height:t[1]||t[0]}),e}),[_]);function x(e){l.appendChild(b),l.appendChild(v),u(l,{...s.main,"--show":"1"})}function w(e){t&&function(e,t){let n=0,r=0,o=b.getBoundingClientRect(),i=v.getBoundingClientRect();r=a.indexOf("top")>=0?t-i.height-o.height:a.indexOf("bottom")>=0?t+i.height:t-.5*o.height,r<0?r=t+i.height:r+o.height>window.innerHeight&&(r=t-i.height-o.height),n=a.indexOf("left")>=0?e-i.width-o.width:a.indexOf("right")>=0?e+i.width:e-.5*o.width,n<0?n=e+i.width:n+o.width>window.innerWidth&&(n=e-i.width-o.width),u(l,{"--x":n+"px","--y":r+"px"})}(e.clientX,e.clientY)}function S(e){l.innerHTML="",u(l,{"--show":"0"})}return(0,o.useEffect)((()=>{}),[]),y||!1};var r,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(883)),i=(r=n(454))&&r.__esModule?r:{default:r};function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}const s={main:{position:"fixed",top:"0",left:"0",width:"100%",height:"100%","pointer-events":"none","user-select":"none","z-index":"800"},gap:{position:"absolute",top:"0",left:"0",opacity:"0","pointer-events":"none","user-select":"none"},content:{"font-size":"1em",position:"absolute",top:"var(--y)",left:"var(--x)","pointer-events":"none","user-select":"none"},text:{width:"100%",display:"-webkit-box",overflow:"hidden","text-overflow":"ellipsis","-webkit-box-orient":"vertical","pointer-events":"none","user-select":"none"}},c=document.getElementsByTagName("body")[0],l=document.getElementById("garenaTooltip")||document.createElement("div");function u(e,t){e&&Object.keys(t).map((n=>{e.style.setProperty(n,t[n])}))}l.id="garenaTooltip",l.className="garenatooltip",c.appendChild(l),u(l,s.main)},454:e=>{"use strict";const{entries:t,setPrototypeOf:n,isFrozen:r,getPrototypeOf:o,getOwnPropertyDescriptor:i}=Object;let{freeze:a,seal:s,create:c}=Object,{apply:l,construct:u}="undefined"!=typeof Reflect&&Reflect;a||(a=function(e){return e}),s||(s=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),u||(u=function(e,t){return new e(...t)});const d=T(Array.prototype.forEach),p=T(Array.prototype.pop),f=T(Array.prototype.push),m=T(String.prototype.toLowerCase),h=T(String.prototype.toString),g=T(String.prototype.match),_=T(String.prototype.replace),y=T(String.prototype.indexOf),b=T(String.prototype.trim),v=T(Object.prototype.hasOwnProperty),x=T(RegExp.prototype.test),w=(S=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(S,t)});var S;function T(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return l(e,t,r)}}function E(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m;n&&n(e,null);let i=t.length;for(;i--;){let n=t[i];if("string"==typeof n){const e=o(n);e!==n&&(r(t)||(t[i]=e),n=e)}e[n]=!0}return e}function A(e){for(let t=0;t<e.length;t++){v(e,t)||(e[t]=null)}return e}function N(e){const n=c(null);for(const[r,o]of t(e)){v(e,r)&&(Array.isArray(o)?n[r]=A(o):o&&"object"==typeof o&&o.constructor===Object?n[r]=N(o):n[r]=o)}return n}function k(e,t){for(;null!==e;){const n=i(e,t);if(n){if(n.get)return T(n.get);if("function"==typeof n.value)return T(n.value)}e=o(e)}return function(){return null}}const C=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),O=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),R=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),D=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),L=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=a(["#text"]),j=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=a(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=s(/<%[\w\W]*|[\w\W]*%>/gm),H=s(/\$\{[\w\W]*}/gm),G=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),W=s(/^aria-[\-\w]+$/),B=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=s(/^(?:\w+script|data):/i),q=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=s(/^html$/i),X=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,ARIA_ATTR:W,ATTR_WHITESPACE:q,CUSTOM_ELEMENT:X,DATA_ATTR:G,DOCTYPE_NAME:V,ERB_EXPR:F,IS_ALLOWED_URI:B,IS_SCRIPT_OR_DATA:Y,MUSTACHE_EXPR:U,TMPLIT_EXPR:H});const Z=1,J=3,Q=7,ee=8,te=9,ne=function(){return"undefined"==typeof window?null:window};var re=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne();const r=t=>e(t);if(r.version="3.2.3",r.removed=[],!n||!n.document||n.document.nodeType!==te)return r.isSupported=!1,r;let{document:o}=n;const i=o,s=i.currentScript,{DocumentFragment:l,HTMLTemplateElement:u,Node:S,Element:T,NodeFilter:A,NamedNodeMap:U=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:F,DOMParser:H,trustedTypes:G}=n,W=T.prototype,Y=k(W,"cloneNode"),q=k(W,"remove"),X=k(W,"nextSibling"),re=k(W,"childNodes"),oe=k(W,"parentNode");if("function"==typeof u){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let ie,ae="";const{implementation:se,createNodeIterator:ce,createDocumentFragment:le,getElementsByTagName:ue}=o,{importNode:de}=i;let pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof t&&"function"==typeof oe&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:me,TMPLIT_EXPR:he,DATA_ATTR:ge,ARIA_ATTR:_e,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:be,CUSTOM_ELEMENT:ve}=K;let{IS_ALLOWED_URI:xe}=K,we=null;const Se=E({},[...C,...O,...R,...D,...M]);let Te=null;const Ee=E({},[...j,...P,...z,...$]);let Ae=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,ke=null,Ce=!0,Oe=!0,Re=!1,Ie=!0,De=!1,Le=!0,Me=!1,je=!1,Pe=!1,ze=!1,$e=!1,Ue=!1,Fe=!0,He=!1,Ge=!0,We=!1,Be={},Ye=null;const qe=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Xe=E({},["audio","video","img","source","image","track"]);let Ke=null;const Ze=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,rt=null;const ot=E({},[Je,Qe,et],h);let it=E({},["mi","mo","mn","ms","mtext"]),at=E({},["annotation-xml"]);const st=E({},["title","style","font","a","script"]);let ct=null;const lt=["application/xhtml+xml","text/html"];let ut=null,dt=null;const pt=o.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=N(e),ct=-1===lt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===ct?h:m,we=v(e,"ALLOWED_TAGS")?E({},e.ALLOWED_TAGS,ut):Se,Te=v(e,"ALLOWED_ATTR")?E({},e.ALLOWED_ATTR,ut):Ee,rt=v(e,"ALLOWED_NAMESPACES")?E({},e.ALLOWED_NAMESPACES,h):ot,Ke=v(e,"ADD_URI_SAFE_ATTR")?E(N(Ze),e.ADD_URI_SAFE_ATTR,ut):Ze,Ve=v(e,"ADD_DATA_URI_TAGS")?E(N(Xe),e.ADD_DATA_URI_TAGS,ut):Xe,Ye=v(e,"FORBID_CONTENTS")?E({},e.FORBID_CONTENTS,ut):qe,Ne=v(e,"FORBID_TAGS")?E({},e.FORBID_TAGS,ut):{},ke=v(e,"FORBID_ATTR")?E({},e.FORBID_ATTR,ut):{},Be=!!v(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,Oe=!1!==e.ALLOW_DATA_ATTR,Re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,De=e.SAFE_FOR_TEMPLATES||!1,Le=!1!==e.SAFE_FOR_XML,Me=e.WHOLE_DOCUMENT||!1,ze=e.RETURN_DOM||!1,$e=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,He=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,xe=e.ALLOWED_URI_REGEXP||B,tt=e.NAMESPACE||et,it=e.MATHML_TEXT_INTEGRATION_POINTS||it,at=e.HTML_INTEGRATION_POINTS||at,Ae=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Oe=!1),$e&&(ze=!0),Be&&(we=E({},M),Te=[],!0===Be.html&&(E(we,C),E(Te,j)),!0===Be.svg&&(E(we,O),E(Te,P),E(Te,$)),!0===Be.svgFilters&&(E(we,R),E(Te,P),E(Te,$)),!0===Be.mathMl&&(E(we,D),E(Te,z),E(Te,$))),e.ADD_TAGS&&(we===Se&&(we=N(we)),E(we,e.ADD_TAGS,ut)),e.ADD_ATTR&&(Te===Ee&&(Te=N(Te)),E(Te,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&E(Ke,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Ye===qe&&(Ye=N(Ye)),E(Ye,e.FORBID_CONTENTS,ut)),Ge&&(we["#text"]=!0),Me&&E(we,["html","head","body"]),we.table&&(E(we,["tbody"]),delete Ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(G,s)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));a&&a(e),dt=e}},ht=E({},[...O,...R,...I]),gt=E({},[...D,...L]),_t=function(e){f(r.removed,{element:e});try{oe(e).removeChild(e)}catch(t){q(e)}},yt=function(e,t){try{f(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ze||$e)try{_t(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Pe)e="<remove></remove>"+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ct&&tt===et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=ie?ie.createHTML(e):e;if(tt===et)try{t=(new H).parseFromString(r,ct)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,Me?"html":"body")[0]:Me?t.documentElement:i},vt=function(e){return ce.call(e.ownerDocument||e,e,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT|A.SHOW_PROCESSING_INSTRUCTION|A.SHOW_CDATA_SECTION,null)},xt=function(e){return e instanceof F&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof U)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},wt=function(e){return"function"==typeof S&&e instanceof S};function St(e,t,n){d(e,(e=>{e.call(r,t,n,dt)}))}const Tt=function(e){let t=null;if(St(pe.beforeSanitizeElements,e,null),xt(e))return _t(e),!0;const n=ut(e.nodeName);if(St(pe.uponSanitizeElement,e,{tagName:n,allowedTags:we}),e.hasChildNodes()&&!wt(e.firstElementChild)&&x(/<[/\w]/g,e.innerHTML)&&x(/<[/\w]/g,e.textContent))return _t(e),!0;if(e.nodeType===Q)return _t(e),!0;if(Le&&e.nodeType===ee&&x(/<[/\w]/g,e.data))return _t(e),!0;if(!we[n]||Ne[n]){if(!Ne[n]&&At(n)){if(Ae.tagNameCheck instanceof RegExp&&x(Ae.tagNameCheck,n))return!1;if(Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))return!1}if(Ge&&!Ye[n]){const t=oe(e)||e.parentNode,n=re(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=Y(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,X(e))}}}return _t(e),!0}return e instanceof T&&!function(e){let t=oe(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=m(e.tagName),r=m(t.tagName);return!!rt[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===r||it[r]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&at[r]:Boolean(gt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!at[r])&&!(t.namespaceURI===Je&&!it[r])&&!gt[n]&&(st[n]||!ht[n]):!("application/xhtml+xml"!==ct||!rt[e.namespaceURI]))}(e)?(_t(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!x(/<\/no(script|embed|frames)/i,e.innerHTML)?(De&&e.nodeType===J&&(t=e.textContent,d([fe,me,he],(e=>{t=_(t,e," ")})),e.textContent!==t&&(f(r.removed,{element:e.cloneNode()}),e.textContent=t)),St(pe.afterSanitizeElements,e,null),!1):(_t(e),!0)},Et=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in o||n in pt))return!1;if(Oe&&!ke[t]&&x(ge,t));else if(Ce&&x(_e,t));else if(!Te[t]||ke[t]){if(!(At(e)&&(Ae.tagNameCheck instanceof RegExp&&x(Ae.tagNameCheck,e)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(e))&&(Ae.attributeNameCheck instanceof RegExp&&x(Ae.attributeNameCheck,t)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(t))||"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&x(Ae.tagNameCheck,n)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))))return!1}else if(Ke[t]);else if(x(xe,_(n,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Ve[e]){if(Re&&!x(ye,_(n,be,"")));else if(n)return!1}else;return!0},At=function(e){return"annotation-xml"!==e&&g(e,ve)},Nt=function(e){St(pe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||xt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:c}=i,l=ut(a);let u="value"===a?c:b(c);if(n.attrName=l,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,St(pe.uponSanitizeAttribute,e,n),u=n.attrValue,!He||"id"!==l&&"name"!==l||(yt(a,e),u="user-content-"+u),Le&&x(/((--!?|])>)|<\/(style|title)/i,u)){yt(a,e);continue}if(n.forceKeepAttr)continue;if(yt(a,e),!n.keepAttr)continue;if(!Ie&&x(/\/>/i,u)){yt(a,e);continue}De&&d([fe,me,he],(e=>{u=_(u,e," ")}));const f=ut(e.nodeName);if(Et(f,l,u)){if(ie&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(s);else switch(G.getAttributeType(f,l)){case"TrustedHTML":u=ie.createHTML(u);break;case"TrustedScriptURL":u=ie.createScriptURL(u)}try{s?e.setAttributeNS(s,a,u):e.setAttribute(a,u),xt(e)?_t(e):p(r.removed)}catch(e){}}}St(pe.afterSanitizeAttributes,e,null)},kt=function e(t){let n=null;const r=vt(t);for(St(pe.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)St(pe.uponSanitizeShadowNode,n,null),Tt(n),Nt(n),n.content instanceof l&&e(n.content);St(pe.afterSanitizeShadowDOM,t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,a=null,s=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!wt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!r.isSupported)return e;if(je||mt(t),r.removed=[],"string"==typeof e&&(We=!1),We){if(e.nodeName){const t=ut(e.nodeName);if(!we[t]||Ne[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)n=bt("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),o.nodeType===Z&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!ze&&!De&&!Me&&-1===e.indexOf("<"))return ie&&Ue?ie.createHTML(e):e;if(n=bt(e),!n)return ze?null:Ue?ae:""}n&&Pe&&_t(n.firstChild);const c=vt(We?e:n);for(;a=c.nextNode();)Tt(a),Nt(a),a.content instanceof l&&kt(a.content);if(We)return e;if(ze){if($e)for(s=le.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(Te.shadowroot||Te.shadowrootmode)&&(s=de.call(i,s,!0)),s}let u=Me?n.outerHTML:n.innerHTML;return Me&&we["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&x(V,n.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+u),De&&d([fe,me,he],(e=>{u=_(u,e," ")})),ie&&Ue?ie.createHTML(u):u},r.setConfig=function(){mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),je=!0},r.clearConfig=function(){dt=null,je=!1},r.isValidAttribute=function(e,t,n){dt||mt({});const r=ut(e),o=ut(t);return Et(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&f(pe[e],t)},r.removeHook=function(e){return p(pe[e])},r.removeHooks=function(e){pe[e]=[]},r.removeAllHooks=function(){pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}();e.exports=re},228:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var l in i=Object(arguments[c]))n.call(i,l)&&(s[l]=i[l]);if(t){a=t(i);for(var u=0;u<a.length;u++)r.call(i,a[u])&&(s[a[u]]=i[a[u]])}}return s}},20:(e,t,n)=>{"use strict";n(228);var r=n(883),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,i={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:u,props:i,_owner:a.current}}t.jsx=l,t.jsxs=l},848:(e,t,n)=>{"use strict";e.exports=n(20)},833:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<i.length;c++){var l=i[c];if(!s(l))return!1;var u=e[l],d=t[l];if(!1===(o=n?n.call(r,u,d,l):void 0)||void 0===o&&u!==d)return!1}return!0}},883:t=>{"use strict";t.exports=e},845:e=>{"use strict";e.exports=t}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.nc=void 0;var i={};return(()=>{"use strict";o.d(i,{default:()=>Qn});var e=o(883),t=o.n(e),n=o(845),r=o.n(n);var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};Object.create;function s(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var c=o(833),l=o.n(c),u="-ms-",d="-moz-",p="-webkit-",f="comm",m="rule",h="decl",g="@keyframes",_=Math.abs,y=String.fromCharCode,b=Object.assign;function v(e){return e.trim()}function x(e,t){return(e=t.exec(e))?e[0]:e}function w(e,t,n){return e.replace(t,n)}function S(e,t,n){return e.indexOf(t,n)}function T(e,t){return 0|e.charCodeAt(t)}function E(e,t,n){return e.slice(t,n)}function A(e){return e.length}function N(e){return e.length}function k(e,t){return t.push(e),e}function C(e,t){return e.filter((function(e){return!x(e,t)}))}var O=1,R=1,I=0,D=0,L=0,M="";function j(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:O,column:R,length:a,return:"",siblings:s}}function P(e,t){return b(j("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function z(e){for(;e.root;)e=P(e.root,{children:[e]});k(e,e.siblings)}function $(){return L=D>0?T(M,--D):0,R--,10===L&&(R=1,O--),L}function U(){return L=D<I?T(M,D++):0,R++,10===L&&(R=1,O++),L}function F(){return T(M,D)}function H(){return D}function G(e,t){return E(M,e,t)}function W(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function B(e){return O=R=1,I=A(M=e),D=0,[]}function Y(e){return M="",e}function q(e){return v(G(D-1,K(91===e?e+2:40===e?e+1:e)))}function V(e){for(;(L=F())&&L<33;)U();return W(e)>2||W(L)>3?"":" "}function X(e,t){for(;--t&&U()&&!(L<48||L>102||L>57&&L<65||L>70&&L<97););return G(e,H()+(t<6&&32==F()&&32==U()))}function K(e){for(;U();)switch(L){case e:return D;case 34:case 39:34!==e&&39!==e&&K(L);break;case 40:41===e&&K(e);break;case 92:U()}return D}function Z(e,t){for(;U()&&e+L!==57&&(e+L!==84||47!==F()););return"/*"+G(t,D-1)+"*"+y(47===e?e:U())}function J(e){for(;!W(F());)U();return G(e,D)}function Q(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function ee(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case h:return e.return=e.return||e.value;case f:return"";case g:return e.return=e.value+"{"+Q(e.children,r)+"}";case m:if(!A(e.value=e.props.join(",")))return""}return A(n=Q(e.children,r))?e.return=e.value+"{"+n+"}":""}function te(e,t,n){switch(function(e,t){return 45^T(e,0)?(((t<<2^T(e,0))<<2^T(e,1))<<2^T(e,2))<<2^T(e,3):0}(e,t)){case 5103:return p+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return p+e+e;case 4855:return p+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return d+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return p+e+d+e+u+e+e;case 5936:switch(T(e,t+11)){case 114:return p+e+u+w(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return p+e+u+w(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return p+e+u+w(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return p+e+u+e+e;case 6165:return p+e+u+"flex-"+e+e;case 5187:return p+e+w(e,/(\w+).+(:[^]+)/,p+"box-$1$2"+u+"flex-$1$2")+e;case 5443:return p+e+u+"flex-item-"+w(e,/flex-|-self/g,"")+(x(e,/flex-|baseline/)?"":u+"grid-row-"+w(e,/flex-|-self/g,""))+e;case 4675:return p+e+u+"flex-line-pack"+w(e,/align-content|flex-|-self/g,"")+e;case 5548:return p+e+u+w(e,"shrink","negative")+e;case 5292:return p+e+u+w(e,"basis","preferred-size")+e;case 6060:return p+"box-"+w(e,"-grow","")+p+e+u+w(e,"grow","positive")+e;case 4554:return p+w(e,/([^-])(transform)/g,"$1"+p+"$2")+e;case 6187:return w(w(w(e,/(zoom-|grab)/,p+"$1"),/(image-set)/,p+"$1"),e,"")+e;case 5495:case 3959:return w(e,/(image-set\([^]*)/,p+"$1$`$1");case 4968:return w(w(e,/(.+:)(flex-)?(.*)/,p+"box-pack:$3"+u+"flex-pack:$3"),/space-between/,"justify")+p+e+e;case 4200:if(!x(e,/flex-|baseline/))return u+"grid-column-align"+E(e,t)+e;break;case 2592:case 3360:return u+w(e,"template-","")+e;case 4384:case 3616:return n&&n.some((function(e,n){return t=n,x(e.props,/grid-\w+-end/)}))?~S(e+(n=n[t].value),"span",0)?e:u+w(e,"-start","")+e+u+"grid-row-span:"+(~S(n,"span",0)?x(n,/\d+/):+x(n,/\d+/)-+x(e,/\d+/))+";":u+w(e,"-start","")+e;case 4896:case 4128:return n&&n.some((function(e){return x(e.props,/grid-\w+-start/)}))?e:u+w(w(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return w(e,/(.+)-inline(.+)/,p+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(A(e)-1-t>6)switch(T(e,t+1)){case 109:if(45!==T(e,t+4))break;case 102:return w(e,/(.+:)(.+)-([^]+)/,"$1"+p+"$2-$3$1"+d+(108==T(e,t+3)?"$3":"$2-$3"))+e;case 115:return~S(e,"stretch",0)?te(w(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return w(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,i,a,s){return u+n+":"+r+s+(o?u+n+"-span:"+(i?a:+a-+r)+s:"")+e}));case 4949:if(121===T(e,t+6))return w(e,":",":"+p)+e;break;case 6444:switch(T(e,45===T(e,14)?18:11)){case 120:return w(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+p+(45===T(e,14)?"inline-":"")+"box$3$1"+p+"$2$3$1"+u+"$2box$3")+e;case 100:return w(e,":",":"+u)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return w(e,"scroll-","scroll-snap-")+e}return e}function ne(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case h:return void(e.return=te(e.value,e.length,n));case g:return Q([P(e,{value:w(e.value,"@","@"+p)})],r);case m:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(x(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":z(P(e,{props:[w(t,/:(read-\w+)/,":-moz-$1")]})),z(P(e,{props:[t]})),b(e,{props:C(n,r)});break;case"::placeholder":z(P(e,{props:[w(t,/:(plac\w+)/,":"+p+"input-$1")]})),z(P(e,{props:[w(t,/:(plac\w+)/,":-moz-$1")]})),z(P(e,{props:[w(t,/:(plac\w+)/,u+"input-$1")]})),z(P(e,{props:[t]})),b(e,{props:C(n,r)})}return""}))}}function re(e){return Y(oe("",null,null,null,[""],e=B(e),0,[0],e))}function oe(e,t,n,r,o,i,a,s,c){for(var l=0,u=0,d=a,p=0,f=0,m=0,h=1,g=1,b=1,v=0,x="",N=o,C=i,O=r,R=x;g;)switch(m=v,v=U()){case 40:if(108!=m&&58==T(R,d-1)){-1!=S(R+=w(q(v),"&","&\f"),"&\f",_(l?s[l-1]:0))&&(b=-1);break}case 34:case 39:case 91:R+=q(v);break;case 9:case 10:case 13:case 32:R+=V(m);break;case 92:R+=X(H()-1,7);continue;case 47:switch(F()){case 42:case 47:k(ae(Z(U(),H()),t,n,c),c),5!=W(m||1)&&5!=W(F()||1)||!A(R)||" "===E(R,-1,void 0)||(R+=" ");break;default:R+="/"}break;case 123*h:s[l++]=A(R)*b;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==b&&(R=w(R,/\f/g,"")),f>0&&(A(R)-d||0===h&&47===m)&&k(f>32?se(R+";",r,n,d-1,c):se(w(R," ","")+";",r,n,d-2,c),c);break;case 59:R+=";";default:if(k(O=ie(R,t,n,l,u,o,s,x,N=[],C=[],d,i),i),123===v)if(0===u)oe(R,t,O,O,N,i,d,s,C);else switch(99===p&&110===T(R,3)?100:p){case 100:case 108:case 109:case 115:oe(e,O,O,r&&k(ie(e,O,O,0,0,o,s,x,o,N=[],d,C),C),o,C,d,s,r?N:C);break;default:oe(R,O,O,O,[""],C,0,s,C)}}l=u=f=0,h=b=1,x=R="",d=a;break;case 58:d=1+A(R),f=m;default:if(h<1)if(123==v)--h;else if(125==v&&0==h++&&125==$())continue;switch(R+=y(v),v*h){case 38:b=u>0?1:(R+="\f",-1);break;case 44:s[l++]=(A(R)-1)*b,b=1;break;case 64:45===F()&&(R+=q(U())),p=F(),u=d=A(x=R+=J(H())),v++;break;case 45:45===m&&2==A(R)&&(h=0)}}return i}function ie(e,t,n,r,o,i,a,s,c,l,u,d){for(var p=o-1,f=0===o?i:[""],h=N(f),g=0,y=0,b=0;g<r;++g)for(var x=0,S=E(e,p+1,p=_(y=a[g])),T=e;x<h;++x)(T=v(y>0?f[x]+" "+S:w(S,/&\f/g,f[x])))&&(c[b++]=T);return j(e,t,n,0===o?m:s,c,l,u,d)}function ae(e,t,n,r){return j(e,t,n,f,y(L),E(e,2,-2),0,r)}function se(e,t,n,r,o){return j(e,t,n,h,E(e,0,r),E(e,r+1,-1),r,o)}var ce={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},le="undefined"!=typeof process&&("MISSING_ENV_VAR".REACT_APP_SC_ATTR||"MISSING_ENV_VAR".SC_ATTR)||"data-styled",ue="undefined"!=typeof window&&"HTMLElement"in window,de=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY&&""!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY?"false"!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY&&"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&""!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&("false"!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY)),pe=(new Set,Object.freeze([])),fe=Object.freeze({});function me(e,t,n){return void 0===n&&(n=fe),e.theme!==n.theme&&e.theme||t||n.theme}var he=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),ge=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,_e=/(^-|-$)/g;function ye(e){return e.replace(ge,"-").replace(_e,"")}var be=/(a)(d)/gi,ve=function(e){return String.fromCharCode(e+(e>25?39:97))};function xe(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ve(t%52)+n;return(ve(t%52)+n).replace(be,"$1-$2")}var we,Se=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Te=function(e){return Se(5381,e)};function Ee(e){return xe(Te(e)>>>0)}function Ae(e){return e.displayName||e.name||"Component"}function Ne(e){return"string"==typeof e&&!0}var ke="function"==typeof Symbol&&Symbol.for,Ce=ke?Symbol.for("react.memo"):60115,Oe=ke?Symbol.for("react.forward_ref"):60112,Re={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ie={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},De={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Le=((we={})[Oe]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},we[Ce]=De,we);function Me(e){return("type"in(t=e)&&t.type.$$typeof)===Ce?De:"$$typeof"in e?Le[e.$$typeof]:Re;var t}var je=Object.defineProperty,Pe=Object.getOwnPropertyNames,ze=Object.getOwnPropertySymbols,$e=Object.getOwnPropertyDescriptor,Ue=Object.getPrototypeOf,Fe=Object.prototype;function He(e,t,n){if("string"!=typeof t){if(Fe){var r=Ue(t);r&&r!==Fe&&He(e,r,n)}var o=Pe(t);ze&&(o=o.concat(ze(t)));for(var i=Me(e),a=Me(t),s=0;s<o.length;++s){var c=o[s];if(!(c in Ie||n&&n[c]||a&&c in a||i&&c in i)){var l=$e(t,c);try{je(e,c,l)}catch(e){}}}}return e}function Ge(e){return"function"==typeof e}function We(e){return"object"==typeof e&&"styledComponentId"in e}function Be(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Ye(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function qe(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Ve(e,t,n){if(void 0===n&&(n=!1),!n&&!qe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Ve(e[r],t[r]);else if(qe(t))for(var r in t)e[r]=Ve(e[r],t[r]);return e}function Xe(e,t){Object.defineProperty(e,"toString",{value:t})}function Ke(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var Ze=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw Ke(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=(i=0,t.length);i<s;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+="".concat(this.tag.getRule(i)).concat("/*!sc*/\n");return t},e}(),Je=new Map,Qe=new Map,et=1,tt=function(e){if(Je.has(e))return Je.get(e);for(;Qe.has(et);)et++;var t=et++;return Je.set(e,t),Qe.set(t,e),t},nt=function(e,t){et=t+1,Je.set(e,t),Qe.set(t,e)},rt="style[".concat(le,"][").concat("data-styled-version",'="').concat("6.1.1",'"]'),ot=new RegExp("^".concat(le,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),it=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},at=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split("/*!sc*/\n"),o=[],i=0,a=r.length;i<a;i++){var s=r[i].trim();if(s){var c=s.match(ot);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(nt(u,l),it(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(s)}}};function st(){return o.nc}var ct=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(le,"]")));return t[t.length-1]}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(le,"active"),r.setAttribute("data-styled-version","6.1.1");var a=st();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},lt=function(){function e(e){this.element=ct(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw Ke(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),ut=function(){function e(e){this.element=ct(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),dt=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),pt=ue,ft={isServer:!ue,useCSSOMInjection:!de},mt=function(){function e(e,t,n){void 0===e&&(e=fe),void 0===t&&(t={});var r=this;this.options=a(a({},ft),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&ue&&pt&&(pt=!1,function(e){for(var t=document.querySelectorAll(rt),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(le)&&(at(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this)),Xe(this,(function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return Qe.get(e)}(n);if(void 0===o)return"continue";var i=e.names.get(o),a=t.getGroup(n);if(void 0===i||0===a.length)return"continue";var s="".concat(le,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==i&&i.forEach((function(e){e.length>0&&(c+="".concat(e,","))})),r+="".concat(a).concat(s,'{content:"').concat(c,'"}').concat("/*!sc*/\n")},i=0;i<n;i++)o(i);return r}(r)}))}return e.registerId=function(e){return tt(e)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(a(a({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new dt(n):t?new lt(n):new ut(n)}(this.options),new Ze(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(tt(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(tt(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(tt(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),ht=/&/g,gt=/^\s*\/\/.*$/gm;function _t(e,t){return e.map((function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map((function(e){return"".concat(t," ").concat(e)}))),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=_t(e.children,t)),e}))}function yt(e){var t,n,r,o=void 0===e?fe:e,i=o.options,a=void 0===i?fe:i,s=o.plugins,c=void 0===s?pe:s,l=function(e,r,o){return o===n||o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();u.push((function(e){e.type===m&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(ht,n).replace(r,l))})),a.prefix&&u.push(ne),u.push(ee);var d=function(e,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),t=s,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(gt,""),l=re(i||o?"".concat(i," ").concat(o," { ").concat(c," }"):c);a.namespace&&(l=_t(l,a.namespace));var d,p,f,m=[];return Q(l,(d=u.concat((f=function(e){return m.push(e)},function(e){e.root||(e=e.return)&&f(e)})),p=N(d),function(e,t,n,r){for(var o="",i=0;i<p;i++)o+=d[i](e,t,n,r)||"";return o})),m};return d.hash=c.length?c.reduce((function(e,t){return t.name||Ke(15),Se(e,t.name)}),5381).toString():"",d}var bt=new mt,vt=yt(),xt=t().createContext({shouldForwardProp:void 0,styleSheet:bt,stylis:vt}),wt=(xt.Consumer,t().createContext(void 0));function St(){return(0,e.useContext)(xt)}function Tt(n){var r=(0,e.useState)(n.stylisPlugins),o=r[0],i=r[1],a=St().styleSheet,s=(0,e.useMemo)((function(){var e=a;return n.sheet?e=n.sheet:n.target&&(e=e.reconstructWithOptions({target:n.target},!1)),n.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[n.disableCSSOMInjection,n.sheet,n.target,a]),c=(0,e.useMemo)((function(){return yt({options:{namespace:n.namespace,prefix:n.enableVendorPrefixes},plugins:o})}),[n.enableVendorPrefixes,n.namespace,o]);(0,e.useEffect)((function(){l()(o,n.stylisPlugins)||i(n.stylisPlugins)}),[n.stylisPlugins]);var u=(0,e.useMemo)((function(){return{shouldForwardProp:n.shouldForwardProp,styleSheet:s,stylis:c}}),[n.shouldForwardProp,s,c]);return t().createElement(xt.Provider,{value:u},t().createElement(wt.Provider,{value:c},n.children))}var Et=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=vt);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,Xe(this,(function(){throw Ke(12,String(n.name))}))}return e.prototype.getName=function(e){return void 0===e&&(e=vt),this.name+e.hash},e}(),At=function(e){return e>="A"&&e<="Z"};function Nt(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;At(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var kt=function(e){return null==e||!1===e||""===e},Ct=function(e){var t,n,r=[];for(var o in e){var i=e[o];e.hasOwnProperty(o)&&!kt(i)&&(Array.isArray(i)&&i.isCss||Ge(i)?r.push("".concat(Nt(o),":"),i,";"):qe(i)?r.push.apply(r,s(s(["".concat(o," {")],Ct(i),!1),["}"],!1)):r.push("".concat(Nt(o),": ").concat((t=o,null==(n=i)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in ce||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function Ot(e,t,n,r){return kt(e)?[]:We(e)?[".".concat(e.styledComponentId)]:Ge(e)?!Ge(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:Ot(e(t),t,n,r):e instanceof Et?n?(e.inject(n,r),[e.getName(r)]):[e]:qe(e)?Ct(e):Array.isArray(e)?Array.prototype.concat.apply(pe,e.map((function(e){return Ot(e,t,n,r)}))):[e.toString()];var o}function Rt(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Ge(n)&&!We(n))return!1}return!0}var It=Te("6.1.1"),Dt=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&Rt(e),this.componentId=t,this.baseHash=Se(It,t),this.baseStyle=n,mt.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=Be(r,this.staticRulesId);else{var o=Ye(Ot(this.rules,e,t,n)),i=xe(Se(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,i)){var a=n(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}r=Be(r,i),this.staticRulesId=i}else{for(var s=Se(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u;else if(u){var d=Ye(Ot(u,e,t,n));s=Se(s,d+l),c+=d}}if(c){var p=xe(s>>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,n(c,".".concat(p),void 0,this.componentId)),r=Be(r,p)}}return r},e}(),Lt=t().createContext(void 0);Lt.Consumer;var Mt={};new Set;function jt(n,r,o){var i=We(n),s=n,c=!Ne(n),l=r.attrs,u=void 0===l?pe:l,d=r.componentId,p=void 0===d?function(e,t){var n="string"!=typeof e?"sc":ye(e);Mt[n]=(Mt[n]||0)+1;var r="".concat(n,"-").concat(Ee("6.1.1"+n+Mt[n]));return t?"".concat(t,"-").concat(r):r}(r.displayName,r.parentComponentId):d,f=r.displayName,m=void 0===f?function(e){return Ne(e)?"styled.".concat(e):"Styled(".concat(Ae(e),")")}(n):f,h=r.displayName&&r.componentId?"".concat(ye(r.displayName),"-").concat(r.componentId):r.componentId||p,g=i&&s.attrs?s.attrs.concat(u).filter(Boolean):u,_=r.shouldForwardProp;if(i&&s.shouldForwardProp){var y=s.shouldForwardProp;if(r.shouldForwardProp){var b=r.shouldForwardProp;_=function(e,t){return y(e,t)&&b(e,t)}}else _=y}var v=new Dt(o,h,i?s.componentStyle:void 0);function x(n,r){return function(n,r,o){var i=n.attrs,s=n.componentStyle,c=n.defaultProps,l=n.foldedComponentIds,u=n.styledComponentId,d=n.target,p=t().useContext(Lt),f=St(),m=n.shouldForwardProp||f.shouldForwardProp,h=function(e,t,n){for(var r,o=a(a({},t),{className:void 0,theme:n}),i=0;i<e.length;i+=1){var s=Ge(r=e[i])?r(o):r;for(var c in s)o[c]="className"===c?Be(o[c],s[c]):"style"===c?a(a({},o[c]),s[c]):s[c]}return t.className&&(o.className=Be(o.className,t.className)),o}(i,r,me(r,p,c)||fe),g=h.as||d,_={};for(var y in h)void 0===h[y]||"$"===y[0]||"as"===y||"theme"===y||("forwardedAs"===y?_.as=h.forwardedAs:m&&!m(y,g)||(_[y]=h[y]));var b=function(e,t){var n=St();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(s,h),v=Be(l,u);return b&&(v+=" "+b),h.className&&(v+=" "+h.className),_[Ne(g)&&!he.has(g)?"class":"className"]=v,_.ref=o,(0,e.createElement)(g,_)}(w,n,r)}x.displayName=m;var w=t().forwardRef(x);return w.attrs=g,w.componentStyle=v,w.displayName=m,w.shouldForwardProp=_,w.foldedComponentIds=i?Be(s.foldedComponentIds,s.styledComponentId):"",w.styledComponentId=h,w.target=i?s.target:n,Object.defineProperty(w,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)Ve(e,o[r],!0);return e}({},s.defaultProps,e):e}}),Xe(w,(function(){return".".concat(w.styledComponentId)})),c&&He(w,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),w}function Pt(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var zt=function(e){return Object.assign(e,{isCss:!0})};function $t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Ge(e)||qe(e))return zt(Ot(Pt(pe,s([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?Ot(r):zt(Ot(Pt(r,t)))}function Ut(e,t,n){if(void 0===n&&(n=fe),!t)throw Ke(1,t);var r=function(r){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];return e(t,n,$t.apply(void 0,s([r],o,!1)))};return r.attrs=function(r){return Ut(e,t,a(a({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return Ut(e,t,a(a({},n),r))},r}var Ft=function(e){return Ut(jt,e)},Ht=Ft;he.forEach((function(e){Ht[e]=Ft(e)}));!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Rt(e),mt.registerId(this.componentId+1)}e.prototype.createStyles=function(e,t,n,r){var o=r(Ye(Ot(this.rules,t,n,r)),""),i=this.componentId+e;n.insertRules(i,i,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&mt.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=st(),r=Ye([n&&'nonce="'.concat(n,'"'),"".concat(le,'="true"'),"".concat("data-styled-version",'="').concat("6.1.1",'"')].filter(Boolean)," ");return"<style ".concat(r,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw Ke(2);return e._emitSheetCSS()},this.getStyleElement=function(){var n;if(e.sealed)throw Ke(2);var r=((n={})[le]="",n["data-styled-version"]="6.1.1",n.dangerouslySetInnerHTML={__html:e.instance.toString()},n),o=st();return o&&(r.nonce=o),[t().createElement("style",a({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new mt({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw Ke(2);return t().createElement(Tt,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw Ke(3)}})(),"__sc-".concat(le,"__");const{entries:Gt,setPrototypeOf:Wt,isFrozen:Bt,getPrototypeOf:Yt,getOwnPropertyDescriptor:qt}=Object;let{freeze:Vt,seal:Xt,create:Kt}=Object,{apply:Zt,construct:Jt}="undefined"!=typeof Reflect&&Reflect;Vt||(Vt=function(e){return e}),Xt||(Xt=function(e){return e}),Zt||(Zt=function(e,t,n){return e.apply(t,n)}),Jt||(Jt=function(e,t){return new e(...t)});const Qt=fn(Array.prototype.forEach),en=fn(Array.prototype.pop),tn=fn(Array.prototype.push),nn=fn(String.prototype.toLowerCase),rn=fn(String.prototype.toString),on=fn(String.prototype.match),an=fn(String.prototype.replace),sn=fn(String.prototype.indexOf),cn=fn(String.prototype.trim),ln=fn(Object.prototype.hasOwnProperty),un=fn(RegExp.prototype.test),dn=(pn=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Jt(pn,t)});var pn;function fn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Zt(e,t,r)}}function mn(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nn;Wt&&Wt(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Bt(t)||(t[r]=e),o=e)}e[o]=!0}return e}function hn(e){for(let t=0;t<e.length;t++){ln(e,t)||(e[t]=null)}return e}function gn(e){const t=Kt(null);for(const[n,r]of Gt(e)){ln(e,n)&&(Array.isArray(r)?t[n]=hn(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=gn(r):t[n]=r)}return t}function _n(e,t){for(;null!==e;){const n=qt(e,t);if(n){if(n.get)return fn(n.get);if("function"==typeof n.value)return fn(n.value)}e=Yt(e)}return function(){return null}}const yn=Vt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bn=Vt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),vn=Vt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),xn=Vt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),wn=Vt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Sn=Vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tn=Vt(["#text"]),En=Vt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),An=Vt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Nn=Vt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),kn=Vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Cn=Xt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),On=Xt(/<%[\w\W]*|[\w\W]*%>/gm),Rn=Xt(/\$\{[\w\W]*}/gm),In=Xt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Dn=Xt(/^aria-[\-\w]+$/),Ln=Xt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mn=Xt(/^(?:\w+script|data):/i),jn=Xt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Pn=Xt(/^html$/i),zn=Xt(/^[a-z][.\w]*(-[.\w]+)+$/i);var $n=Object.freeze({__proto__:null,ARIA_ATTR:Dn,ATTR_WHITESPACE:jn,CUSTOM_ELEMENT:zn,DATA_ATTR:In,DOCTYPE_NAME:Pn,ERB_EXPR:On,IS_ALLOWED_URI:Ln,IS_SCRIPT_OR_DATA:Mn,MUSTACHE_EXPR:Cn,TMPLIT_EXPR:Rn});const Un=1,Fn=3,Hn=7,Gn=8,Wn=9,Bn=function(){return"undefined"==typeof window?null:window};var Yn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Bn();const n=t=>e(t);if(n.version="3.2.3",n.removed=[],!t||!t.document||t.document.nodeType!==Wn)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:c,Element:l,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:f,trustedTypes:m}=t,h=l.prototype,g=_n(h,"cloneNode"),_=_n(h,"remove"),y=_n(h,"nextSibling"),b=_n(h,"childNodes"),v=_n(h,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let x,w="";const{implementation:S,createNodeIterator:T,createDocumentFragment:E,getElementsByTagName:A}=r,{importNode:N}=o;let k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Gt&&"function"==typeof v&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:O,TMPLIT_EXPR:R,DATA_ATTR:I,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:j}=$n;let{IS_ALLOWED_URI:P}=$n,z=null;const $=mn({},[...yn,...bn,...vn,...wn,...Tn]);let U=null;const F=mn({},[...En,...An,...Nn,...kn]);let H=Object.seal(Kt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,W=null,B=!0,Y=!0,q=!1,V=!0,X=!1,K=!0,Z=!1,J=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!0,oe=!1,ie=!0,ae=!1,se={},ce=null;const le=mn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const de=mn({},["audio","video","img","source","image","track"]);let pe=null;const fe=mn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let _e=ge,ye=!1,be=null;const ve=mn({},[me,he,ge],rn);let xe=mn({},["mi","mo","mn","ms","mtext"]),we=mn({},["annotation-xml"]);const Se=mn({},["title","style","font","a","script"]);let Te=null;const Ee=["application/xhtml+xml","text/html"];let Ae=null,Ne=null;const ke=r.createElement("form"),Ce=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ne||Ne!==e){if(e&&"object"==typeof e||(e={}),e=gn(e),Te=-1===Ee.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ae="application/xhtml+xml"===Te?rn:nn,z=ln(e,"ALLOWED_TAGS")?mn({},e.ALLOWED_TAGS,Ae):$,U=ln(e,"ALLOWED_ATTR")?mn({},e.ALLOWED_ATTR,Ae):F,be=ln(e,"ALLOWED_NAMESPACES")?mn({},e.ALLOWED_NAMESPACES,rn):ve,pe=ln(e,"ADD_URI_SAFE_ATTR")?mn(gn(fe),e.ADD_URI_SAFE_ATTR,Ae):fe,ue=ln(e,"ADD_DATA_URI_TAGS")?mn(gn(de),e.ADD_DATA_URI_TAGS,Ae):de,ce=ln(e,"FORBID_CONTENTS")?mn({},e.FORBID_CONTENTS,Ae):le,G=ln(e,"FORBID_TAGS")?mn({},e.FORBID_TAGS,Ae):{},W=ln(e,"FORBID_ATTR")?mn({},e.FORBID_ATTR,Ae):{},se=!!ln(e,"USE_PROFILES")&&e.USE_PROFILES,B=!1!==e.ALLOW_ARIA_ATTR,Y=!1!==e.ALLOW_DATA_ATTR,q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,V=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,X=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,oe=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||Ln,_e=e.NAMESPACE||ge,xe=e.MATHML_TEXT_INTEGRATION_POINTS||xe,we=e.HTML_INTEGRATION_POINTS||we,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(Y=!1),te&&(ee=!0),se&&(z=mn({},Tn),U=[],!0===se.html&&(mn(z,yn),mn(U,En)),!0===se.svg&&(mn(z,bn),mn(U,An),mn(U,kn)),!0===se.svgFilters&&(mn(z,vn),mn(U,An),mn(U,kn)),!0===se.mathMl&&(mn(z,wn),mn(U,Nn),mn(U,kn))),e.ADD_TAGS&&(z===$&&(z=gn(z)),mn(z,e.ADD_TAGS,Ae)),e.ADD_ATTR&&(U===F&&(U=gn(U)),mn(U,e.ADD_ATTR,Ae)),e.ADD_URI_SAFE_ATTR&&mn(pe,e.ADD_URI_SAFE_ATTR,Ae),e.FORBID_CONTENTS&&(ce===le&&(ce=gn(ce)),mn(ce,e.FORBID_CONTENTS,Ae)),ie&&(z["#text"]=!0),Z&&mn(z,["html","head","body"]),z.table&&(mn(z,["tbody"]),delete G.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=e.TRUSTED_TYPES_POLICY,w=x.createHTML("")}else void 0===x&&(x=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(m,i)),null!==x&&"string"==typeof w&&(w=x.createHTML(""));Vt&&Vt(e),Ne=e}},Re=mn({},[...bn,...vn,...xn]),Ie=mn({},[...wn,...Sn]),De=function(e){tn(n.removed,{element:e});try{v(e).removeChild(e)}catch(t){_(e)}},Le=function(e,t){try{tn(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){tn(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{De(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Me=function(e){let t=null,n=null;if(Q)e="<remove></remove>"+e;else{const t=on(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Te&&_e===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=x?x.createHTML(e):e;if(_e===ge)try{t=(new f).parseFromString(o,Te)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(_e,"template",null);try{t.documentElement.innerHTML=ye?w:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),_e===ge?A.call(t,Z?"html":"body")[0]:Z?t.documentElement:i},je=function(e){return T.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Pe=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},ze=function(e){return"function"==typeof c&&e instanceof c};function $e(e,t,r){Qt(e,(e=>{e.call(n,t,r,Ne)}))}const Ue=function(e){let t=null;if($e(k.beforeSanitizeElements,e,null),Pe(e))return De(e),!0;const r=Ae(e.nodeName);if($e(k.uponSanitizeElement,e,{tagName:r,allowedTags:z}),e.hasChildNodes()&&!ze(e.firstElementChild)&&un(/<[/\w]/g,e.innerHTML)&&un(/<[/\w]/g,e.textContent))return De(e),!0;if(e.nodeType===Hn)return De(e),!0;if(K&&e.nodeType===Gn&&un(/<[/\w]/g,e.data))return De(e),!0;if(!z[r]||G[r]){if(!G[r]&&He(r)){if(H.tagNameCheck instanceof RegExp&&un(H.tagNameCheck,r))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(r))return!1}if(ie&&!ce[r]){const t=v(e)||e.parentNode,n=b(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,y(e))}}}return De(e),!0}return e instanceof l&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:_e,tagName:"template"});const n=nn(e.tagName),r=nn(t.tagName);return!!be[e.namespaceURI]&&(e.namespaceURI===he?t.namespaceURI===ge?"svg"===n:t.namespaceURI===me?"svg"===n&&("annotation-xml"===r||xe[r]):Boolean(Re[n]):e.namespaceURI===me?t.namespaceURI===ge?"math"===n:t.namespaceURI===he?"math"===n&&we[r]:Boolean(Ie[n]):e.namespaceURI===ge?!(t.namespaceURI===he&&!we[r])&&!(t.namespaceURI===me&&!xe[r])&&!Ie[n]&&(Se[n]||!Re[n]):!("application/xhtml+xml"!==Te||!be[e.namespaceURI]))}(e)?(De(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!un(/<\/no(script|embed|frames)/i,e.innerHTML)?(X&&e.nodeType===Fn&&(t=e.textContent,Qt([C,O,R],(e=>{t=an(t,e," ")})),e.textContent!==t&&(tn(n.removed,{element:e.cloneNode()}),e.textContent=t)),$e(k.afterSanitizeElements,e,null),!1):(De(e),!0)},Fe=function(e,t,n){if(re&&("id"===t||"name"===t)&&(n in r||n in ke))return!1;if(Y&&!W[t]&&un(I,t));else if(B&&un(D,t));else if(!U[t]||W[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&un(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&un(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&un(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(pe[t]);else if(un(P,an(n,M,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==sn(n,"data:")||!ue[e]){if(q&&!un(L,an(n,M,"")));else if(n)return!1}else;return!0},He=function(e){return"annotation-xml"!==e&&on(e,j)},Ge=function(e){$e(k.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Pe(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:c}=i,l=Ae(a);let u="value"===a?c:cn(c);if(r.attrName=l,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,$e(k.uponSanitizeAttribute,e,r),u=r.attrValue,!oe||"id"!==l&&"name"!==l||(Le(a,e),u="user-content-"+u),K&&un(/((--!?|])>)|<\/(style|title)/i,u)){Le(a,e);continue}if(r.forceKeepAttr)continue;if(Le(a,e),!r.keepAttr)continue;if(!V&&un(/\/>/i,u)){Le(a,e);continue}X&&Qt([C,O,R],(e=>{u=an(u,e," ")}));const d=Ae(e.nodeName);if(Fe(d,l,u)){if(x&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(s);else switch(m.getAttributeType(d,l)){case"TrustedHTML":u=x.createHTML(u);break;case"TrustedScriptURL":u=x.createScriptURL(u)}try{s?e.setAttributeNS(s,a,u):e.setAttribute(a,u),Pe(e)?De(e):en(n.removed)}catch(e){}}}$e(k.afterSanitizeAttributes,e,null)},We=function e(t){let n=null;const r=je(t);for($e(k.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)$e(k.uponSanitizeShadowNode,n,null),Ue(n),Ge(n),n.content instanceof a&&e(n.content);$e(k.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,l=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ze(e)){if("function"!=typeof e.toString)throw dn("toString is not a function");if("string"!=typeof(e=e.toString()))throw dn("dirty is not a string, aborting")}if(!n.isSupported)return e;if(J||Oe(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ae(e.nodeName);if(!z[t]||G[t])throw dn("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=Me("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===Un&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!ee&&!X&&!Z&&-1===e.indexOf("<"))return x&&ne?x.createHTML(e):e;if(r=Me(e),!r)return ee?null:ne?w:""}r&&Q&&De(r.firstChild);const u=je(ae?e:r);for(;s=u.nextNode();)Ue(s),Ge(s),s.content instanceof a&&We(s.content);if(ae)return e;if(ee){if(te)for(l=E.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(U.shadowroot||U.shadowrootmode)&&(l=N.call(o,l,!0)),l}let d=Z?r.outerHTML:r.innerHTML;return Z&&z["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&un(Pn,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),X&&Qt([C,O,R],(e=>{d=an(d,e," ")})),x&&ne?x.createHTML(d):d},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},n.clearConfig=function(){Ne=null,J=!1},n.isValidAttribute=function(e,t,n){Ne||Oe({});const r=Ae(e),o=Ae(t);return Fe(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&tn(k[e],t)},n.removeHook=function(e){return en(k[e])},n.removeHooks=function(e){k[e]=[]},n.removeAllHooks=function(){k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),qn=o(482);const Vn=function(t,n){const[r,o]=(0,e.useState)(t);return(0,e.useEffect)((()=>{const e=setTimeout((()=>{o(t)}),n);return()=>{clearTimeout(e)}}),[t,n]),r};var Xn=o(848);function Kn(t){let{float_icon_width:n="150px",ratio:r=1,duration:o=.5,ease:i="ease",...a}=t;const s=(0,e.useRef)(null),c=(0,e.useRef)(null),l=(0,e.useRef)(null),[u,d]=(0,e.useState)(!1),[p,f]=(0,e.useState)(!1),[m,h]=(0,e.useState)(!1),[g,_]=(0,e.useState)(!1),[y,b]=(0,e.useState)(!1),[v,x]=(0,e.useState)(0),[w,S]=(0,e.useState)(null),[T,E]=(0,e.useState)(5),[A,N]=(0,e.useState)(!1),[k,C]=(0,e.useState)(!1),[O,R]=(0,e.useState)(""),[I,D]=(0,e.useState)(""),[L,M]=(0,e.useState)(""),[j,P]=(0,e.useState)({}),[z,$]=(0,e.useState)([]),[U,F]=(0,e.useState)([]),[H,G]=(0,e.useState)(!1),[W,B]=(0,e.useState)(!1),[Y,q]=(0,e.useState)([]),[V,X]=(0,e.useState)(!1),[K,Z]=(0,e.useState)(!1),[J,Q]=(0,e.useState)(!1),[ee,te]=(0,e.useState)(!1),[ne,re]=(0,e.useState)(!1),[oe,ie]=(0,e.useState)(!1),[ae,se]=(0,e.useState)([]),[ce,le]=(0,e.useState)([]),ue=Vn(z,3e5);(0,e.useEffect)((()=>{V&&(b(!0),G(!1),F(!1),re(!0))}),[ue]),(0,e.useEffect)((()=>{!async function(){const e=await fetch(`${de}/api/v1/init`),{data:t}=await e.json();P({...t.asset,...t.config,...t.config_ticket})}()}),[]),(0,e.useEffect)((()=>{m&&j?.end_message&&$([...z,{message:{text:j?.end_message,user:!1}}])}),[m]),(0,e.useEffect)((()=>{fe("topic_id_scope")}),[]),(0,e.useEffect)((()=>{const e=parseInt(pe("is_ban_word_count")||0),t=parseInt(pe("rating_1_count")||0);(e>=20||t>=5)&&me("chat_close",!0,1/24),te(pe("chat_close")),pe("chat_close")&&(q([]),ge(`${de}/api/v1/blacklist_ip`,{}).then((e=>{})))}),[K,J]);const de="https://chatbot.garena.in.th",pe=e=>{var t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));if(t)return t[2]},fe=e=>{document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;"},me=(e,t,n)=>{var r="";if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),r="; expires="+o.toUTCString()}document.cookie=e+"="+(t||"")+r+"; path=/"};async function he(){let e=pe("chat_id"),t=pe("chat_close");if(!e){if(fe("topic_id_scope"),fe("selected_topic_id"),fe("registered_topic"),!t){const e=await fetch(`${de}/api/v1/start_chat`),t=await e.json();me("chat_id",t?.data?.chat_id,1)}$(t?[{message:{text:j?.start_chat,user:!1}},{message:{text:j?.ban_message||"คุณโดนแบน",user:!1}}]:[{message:{text:j?.start_chat,user:!1}}]),f(!1),h(!1),b(!1),B(!1),re(!1),q([]),t||C(!0)}}async function ge(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()}function _e(e,t){const n=e.toLowerCase(),r=j?.ban_word?.reduce(((e,t)=>e.replaceAll(t.toLowerCase(),"*".repeat(t.length))),n);let o=e.split("");for(let e=0;e<o.length;e++)"*"===r.charAt(e)&&(o[e]=r.charAt(e));if(o?.includes("*")&&"previous"!==t){const e="is_ban_word_count",t=(+pe(e)||0)+1||1;me(e,t,5/1440),Q(t)}return o.join("")}(0,e.useEffect)((()=>{l?.current&&l?.current?.scrollTo({top:l.current.scrollHeight,left:0,behavior:"smooth"}),z.length<1&&!pe("chat_close")&&C(!0)}),[l,z,y,U,A]);const ye=e=>{let t=e?.text?.match(/https?:\/\/support\.(?:test|uat)?\.?garena\.in\.th\/[^\s<>"]+/g),n=t?.map((e=>e.lastIndexOf("'")>-1?e.slice(0,e.lastIndexOf("'")):e)),r=n?.map((t=>{let n=t;return n=t.includes("#")?t.substring(0,t.indexOf("#"))+"?chatbot=true"+t.substring(t.indexOf("#")):t+"?chatbot=true",e?.text.replace(t,n)}));return{...e,text:r?.[0]||e?.text}},be=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(ee)return;let o=null;if(U?.length>0&&U.find((t=>(Yn.sanitize(t?.text,{ALLOWED_TAGS:""})===e&&(o=t),o?.text))),n&&me("topic_id_scope",n,1),p)return;if(!O&&"id"!==t)return;X(!0),d(!0),F([]),G(!1),b(!1),C(!1),re(!1);let i=Yn.sanitize(e),a=o?.id?"id":t,c=o?.id?o?.id:+pe("topic_id_scope");if(e){let t={id:c,text:e,type:a};q([...Y,t])}ge(`${de}/api/v1/chat`,{chat_id:pe("chat_id"),message:{id:c||o?.id,text:i},type:a,scope:+pe("topic_id_scope")||null}).then((t=>{const n=+pe("topic_id_scope"),o=j?.topics?.some((e=>e?.question_id===n)),i=j?.topics?.find((e=>e?.question_id===n))?.emergency_text,a=t?.data?.result?.filter((e=>e.emergency_text));if(le([...ce,...a]),o)se(i||null);else{const e=ce?.find((e=>e?.id===n))?.emergency_text;se(e||null)}const c={message:{text:_e(O)||e,user:!0,msgType:r}},l=[...z,c];$(l);let u=t?.data?.result.find((e=>e?.parent))?.parent;u&&me("topic_id_scope",u,1);const p=setTimeout((()=>{if("choice"===t?.data?.type)return F(t?.data?.result?.map((e=>ye(e)))),s?.current?.focus(),void(t?.data?.result?.find((e=>"image"===e?.type))&&G(!0));const e={message:{text:t?.data?.result?.length<=0?j?.default_message:t?.data?.result?.map((e=>ye(e)?.text)),user:!1,type:t?.data?.result?.map((e=>e?.type)).toString(),choice:t?.data?.result?.map((e=>e?.choice))}},n=[...l,e],r=parseInt(pe("is_ban_word_count")||0),o=parseInt(pe("rating_1_count")||0);10!==r&&4!==o||oe?pe("chat_close")?$([...n,{message:{text:j?.ban_message||"คุณโดนแบน",user:!1}}]):$([...n]):(ie(!0),$([...n,{message:{text:j?.warning_ban_message||"คุณกำลังจะโดนแบน",user:!1}}])),"choice"!==t?.data?.type&&t?.data?.result?.find((e=>e?.end))&&b(!0),d(!1),s?.current?.focus(),clearTimeout(p)}),1e3);"choice"!==t?.data?.type?$([...l,{message:{text:"<div class='loader'></div>",user:!1}}]):d(!1)})),R("")},ve=()=>{if(ee)return;if(!L)return;$([...z,{message:{text:L,user:!0}}]);let e=!pe(`sent_ticket_${pe("chat_id")}`);ge(`${de}/api/v1/ticket_status`,{chat_id:pe("chat_id"),ticket_id:+L,new:e}).then((e=>{try{if(d(!0),pe(`sent_ticket_${pe("chat_id")}`)||me(`sent_ticket_${pe("chat_id")}`,!0,1),"bmsg_ok"===e?.status){M("");const t={message:{text:L,user:!0}},n=[...z,t];$(n);const r=setTimeout((()=>{const t={message:{text:e?.data?.message,user:!1,choice:[e?.data?.choice?.map((e=>({key:e?.key,value:e?.value})))]}},o=[...n,t];$([...o]),d(!1),b(!0),s?.current?.focus(),clearTimeout(r)}),1e3);$([...n,{message:{text:"<div class='loader'></div>",user:!1}}])}if("bmsg_not_found"===e?.status){const t={message:{text:L,user:!0}},n=[...z,t];$(n);const r=setTimeout((()=>{const t={message:{text:e?.data?.message,user:!1,choice:[e?.data?.choice?.map((e=>({key:e?.key,value:e?.value})))]}},o=[...n,t];$([...o]),d(!1),s?.current?.focus(),clearTimeout(r)}),1e3);$([...n,{message:{text:"<div class='loader'></div>",user:!1}}])}M("")}catch(e){console.log("error",e)}}))},xe=()=>{if(ee)return;if(v<=0)return;if(1===v){const e="rating_1_count",t=(+pe(e)||0)+1;me(e,t,5/1440),Z(t)}ge(`${de}/api/v1/rate`,{chat_id:pe("chat_id"),rate:v,comment:I}).then((e=>{"bmsg_ok"===e?.status&&(f(!0),fe("chat_id"),fe("is_rated"),D(""),R(""),x(0),h(!1),B(!0))}));const e=parseInt(pe("is_ban_word_count")||0),t=parseInt(pe("rating_1_count")||0);10!==e&&4!==t||$([...z,{message:{text:j?.warning_ban_message||"คุณกำลังจะโดนแบน",user:!1}}]),t>=5&&$([...z,{message:{text:j?.ban_message||"คุณโดนแบน",user:!1}}])},we={float_icon_width:n,ratio:r,duration:o,ease:i,enableRatingState:m,initChat:j,...a};return j?.is_active?(0,Xn.jsx)(Zn,{...we,className:"chat",msgLength:O.length,children:A?(0,Xn.jsx)(Xn.Fragment,{children:(0,Xn.jsx)("div",{className:"chat__box",children:(0,Xn.jsxs)("div",{className:"chat__container",children:[(0,Xn.jsxs)("div",{className:"chat__header",children:[H&&(0,Xn.jsx)("div",{className:"back",onClick:()=>{G(!1),F([])},children:(0,Xn.jsx)(Jn,{bg:j?.back_menu_icon||"https://cdn-webth.garenanow.com/webth/cdn/garena/chat-bot/back_menu_icon.png",ratio:"60 * 60",width:"100%"})}),Y.length>1&&!H&&!m&&!ee&&(0,Xn.jsx)("div",{className:"back",onClick:()=>{if(!ee&&!(Y.length<=1)&&Y.length>0){let e=Y[Y.length-2];q([...Y.slice(0,-1)]),d(!0),F([]),G(!1),b(!1),C(!1),e?.id&&me("topic_id_scope",e?.id,1),ge(`${de}/api/v1/chat`,{chat_id:pe("chat_id"),message:{id:e?.id,text:e?.text},type:e?.type,back:!0,scope:+pe("topic_id_scope")||null}).then((t=>{const n={message:{text:e?.text||e?.text,user:!0,msgType:e?.type}},r=[...z,n];$(r);const o=setTimeout((()=>{if("choice"===t?.data?.type)return F(t?.data?.result?.map((e=>ye(e)))),s?.current?.focus(),void(t?.data?.result?.find((e=>"image"===e?.type))&&G(!0));const e={message:{text:t?.data?.result?.length<=0?j?.default_message:t?.data?.result?.map((e=>ye(e)?.text)),user:!1,type:t?.data?.result?.map((e=>e?.type)).toString()}},n=[...r,e];$([...n]),"choice"!==t?.data?.type&&t?.data?.result?.find((e=>e?.end))&&b(!0),d(!1),s?.current?.focus(),clearTimeout(o)}),1e3);"choice"!==t?.data?.type?$([...r,{message:{text:"<div class='loader'></div>",user:!1}}]):d(!1)}))}},children:(0,Xn.jsx)(Jn,{bg:j?.back_menu_icon||"https://cdn-webth.garenanow.com/webth/cdn/garena/chat-bot/back_menu_icon.png",ratio:"60 * 60",width:"100%"})}),(0,Xn.jsx)("div",{className:"title",children:j?.chat_title}),(0,Xn.jsx)("div",{className:"minimize",onClick:()=>{N(!1),pe("chat_id")||$([]),pe("is_rated")&&(fe("chat_id"),fe("is_rated"),$([])),fe("topic_id_scope")},children:(0,Xn.jsx)(Jn,{bg:j?.close_menu_icon||"https://cdn-webth.garenanow.com/webth/cdn/garena/chat-bot/button_close.png",ratio:"60 * 60",width:"100%"})})]}),U?.length>0&&U?.find((e=>"image"===e?.type))&&H?(0,Xn.jsx)("div",{className:"chat__content",children:(0,Xn.jsx)("div",{className:"chat__imagelist",children:U?.map(((e,t)=>(0,Xn.jsxs)("div",{onClick:()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=document.getElementsByClassName("garenatooltip__content");if(i[0]?.parentNode.removeChild(i[0]),u||be(e,t,n,r),!pe("registered_topic")&&+pe("selected_topic_id")==+o){let t={chat_id:pe("chat_id"),topic:Yn.sanitize(e,{ALLOWED_TAGS:""})};ge(`${de}/api/v1/register_topic`,t).then((e=>{try{"bmsg_ok"===e?.status&&me("registered_topic",!0,1)}catch(e){console.log("error",e)}}))}}(e?.text,"id",e?.id,e.type,e?.parent),className:"imageitem",children:[(0,Xn.jsx)(qn.A,{backgroundColor:j?.chat_background||"#eee",fontColor:j?.text_color_bot||"#000",fontSize:"1.5rem",description:Yn.sanitize(e?.text||"",{ALLOWED_TAGS:[""],ADD_ATTR:["target"]}),children:"image"===e.type&&""!==e.image&&(0,Xn.jsx)("div",{className:"imageitem__game",children:(0,Xn.jsx)("img",{src:e?.image,alt:"image_item"})})}),(0,Xn.jsx)("div",{className:e.image?"nameimg":"name",children:(0,Xn.jsx)("div",{className:e.image?"":"desc",dangerouslySetInnerHTML:{__html:Yn.sanitize(e?.text||"",{ALLOWED_TAGS:[""],ADD_ATTR:["target"]})}})})]},`imageitem_${t}`)))})}):(0,Xn.jsxs)("div",{className:"chat__content",ref:l,children:[!!j?.emergency_text&&j?.emergency_text?.map(((e,t)=>(0,Xn.jsx)("div",{className:"chat__emergency",dangerouslySetInnerHTML:{__html:Yn.sanitize(e||"",{ADD_ATTR:["target"]})}},`emergency_${t}`))),z?.map(((e,t)=>(0,Xn.jsxs)("div",{className:`textbox ${!!e?.message?.user&&"right"}`,children:[!e?.message?.user&&(0,Xn.jsx)("div",{className:"textbox__profile",children:(0,Xn.jsx)("img",{src:j?.bot_profile||"https://cdn-webth.garenanow.com/webth/logo/garena/garena_84x84.png",alt:"bot_profile"})}),(0,Xn.jsxs)(Xn.Fragment,{children:[(0,Xn.jsx)("div",{className:"textbox__message",dangerouslySetInnerHTML:{__html:Yn.sanitize(e?.message?.text||"",{ADD_ATTR:["target"]})}}),e?.message?.choice&&(0,Xn.jsx)("div",{className:"textbox__choice",children:e?.message?.choice?.[0]?.map(((e,t)=>(0,Xn.jsx)("div",{className:"textbox boxaction",onClick:()=>(e=>{const t={message:{text:e,user:!1}},n=[...z,t];$([...n])})(e.value),dangerouslySetInnerHTML:{__html:Yn.sanitize(e.key||"",{ALLOWED_TAGS:[""],ADD_ATTR:["target"]})}},`choice_${t}`)))})]})]},`textbox_${t}`))),!!ae&&ae?.map(((e,t)=>(0,Xn.jsx)("div",{className:"chat__emergency",dangerouslySetInnerHTML:{__html:Yn.sanitize(e||"",{ADD_ATTR:["target"]})}},`emergency_question${t}`))),U?.length>0&&U?.sort(((e,t)=>e.order-t.order))?.map(((e,t)=>(0,Xn.jsx)("div",{onClick:()=>(e=>{if(!ee&&(be(e?.text,"id",e?.id),!pe("registered_topic")&&+pe("selected_topic_id")==+e?.parent)){let t={chat_id:pe("chat_id"),topic:Yn.sanitize(e?.text,{ALLOWED_TAGS:""})};ge(`${de}/api/v1/register_topic`,t).then((e=>{try{"bmsg_ok"===e?.status&&me("registered_topic",!0,1)}catch(e){console.log("error",e)}}))}})(e),className:"textbox boxcenter",dangerouslySetInnerHTML:{__html:Yn.sanitize(e?.text||"",{ADD_ATTR:["target"]})}},`boxcenter_${t}`))),y&&!m&&!p&&(0,Xn.jsx)("div",{className:"textbox boxend",onClick:()=>{h(!0),X(!1),_(!1),M(""),q([])},children:j?.text_end_chat||"จบการสนทนา"}),j?.auto_end_message&&y&&ne&&(0,Xn.jsx)("div",{className:"boxautoend",dangerouslySetInnerHTML:{__html:Yn.sanitize(j?.auto_end_message||"",{ADD_ATTR:["target"]})}}),W&&!pe("chat_close")&&(0,Xn.jsx)("div",{className:"textbox boxend",onClick:()=>{W&&he()},children:j?.text_start_chat||"เริ่มการสนทนา"})]}),m&&(0,Xn.jsx)("div",{className:"chat__message",children:(0,Xn.jsxs)("div",{className:"chat__rate",children:[(0,Xn.jsxs)("div",{className:"left",children:[(0,Xn.jsx)("div",{className:"star",children:[...Array(T)]?.map(((e,t)=>{const n=t+1;return(0,Xn.jsxs)("label",{children:[(0,Xn.jsx)("input",{type:"radio",name:"rating",value:n,onChange:()=>x(n)},e),(0,Xn.jsx)("span",{className:"star",style:{color:n<=(w||v)?"#ffc107":"gray"},onMouseEnter:()=>S(n),onMouseLeave:()=>S(null),children:"★"})]},`label_${t}`)}))}),(0,Xn.jsx)("div",{className:"text",children:(0,Xn.jsx)("input",{type:"text",placeholder:"ความคิดเห็น",value:I,onChange:e=>{return t=e.target.value,void D(t);var t},onKeyDown:e=>"Enter"===e.key&&xe()})})]}),(0,Xn.jsx)("div",{className:"right",children:(0,Xn.jsx)(Jn,{className:v<=0?"disabled":"",onClick:xe,bg:j?.button_send||"https://cdn-webth.garenanow.com/webth/cdn/garena/chat-bot/button_send.png",ratio:"94 * 94",width:"100%"})})]})}),g&&(0,Xn.jsxs)("div",{className:"chat__ticket",children:[(0,Xn.jsx)("div",{className:"closeticket",onClick:()=>{_(!1),setTimeout((()=>{s?.current?.focus()}),0)},children:(0,Xn.jsx)(Jn,{bg:j?.close_menu_icon||"https://cdn-webth.garenanow.com/webth/cdn/garena/chat-bot/button_close.png",ratio:"60 * 60",width:"100%"})}),(0,Xn.jsx)("div",{className:"input",children:(0,Xn.jsx)("input",{ref:c,type:"text",placeholder:"ระบุหมายเลข Ticket",value:L,maxLength:10,onChange:e=>{var t;(t=e.target.value)<0||isNaN(t)||M(t)},onKeyDown:e=>"Enter"===e.key&&ve()})}),(0,Xn.jsx)("div",{className:"send",children:(0,Xn.jsx)(Jn,{className:L?"":"disabled",onClick:ve,bg:j?.button_send||"https://cdn-webth.garenanow.com/webth/cdn/garena/chat-bot/button_send.png",ratio:"94 * 94",width:"4vmin"})})]}),!m&&!g&&(0,Xn.jsxs)("div",{className:"chat__message",children:[(0,Xn.jsx)("div",{className:"menu",children:(0,Xn.jsx)(Jn,{className:"button_action "+(u||p||pe("is_rated")||ee?"disabled":""),bg:j?.menu_icon||"https://cdn-webth.garenanow.com/webth/cdn/garena/chat-bot/button_menu.png",ratio:"94 * 94",width:"4vmin",onClick:()=>{ee||p||j?.topics?.length<=0||C(!k)}})}),(0,Xn.jsx)("div",{className:"input",children:(0,Xn.jsx)("input",{ref:s,name:"text_msg",type:"text",disabled:!!(u||p||pe("is_rated")||ee),value:O,placeholder:pe("chat_close")&&Yn.sanitize(j?.ban_message||"คุณโดนแบน",{ALLOWED_TAGS:[""]}),maxLength:255,onChange:e=>{return t=e.target.value,void(p||R(t));var t},onKeyDown:e=>"Enter"===e.key&&be(O,"text")})}),(0,Xn.jsx)("div",{className:"send",children:(0,Xn.jsx)(Jn,{className:"button_action "+(!O||u||p||pe("is_rated")?"disabled":""),bg:j?.send_icon||"https://cdn-webth.garenanow.com/webth/cdn/garena/chat-bot/button_send.png",ratio:"94 * 94",width:"4vmin",onClick:()=>be(O,"text")})}),k&&(0,Xn.jsx)("div",{className:"richmenus",children:(0,Xn.jsxs)("div",{className:"richmenus__container",children:[j?.topics?.map(((e,t)=>(0,Xn.jsx)("div",{className:"richmenus__item",children:(0,Xn.jsx)("img",{onClick:()=>!u&&(e=>{if(ee)return;if(be(e?.text,"id",e?.question_id),pe("selected_topic_id"))return;me("selected_topic_id",e?.question_id,1);let t={chat_id:pe("chat_id"),topic:Yn.sanitize(e?.text,{ALLOWED_TAGS:""})};ge(`${de}/api/v1/register_topic`,t).then((e=>{}))})(e),src:`${e.icon||"https://cdn-webth.garenanow.com/webth/logo/garena/garena_84x84.png"}`,alt:"richmenus_img"})},`richmenus_${t}`))),(0,Xn.jsx)("div",{className:"richmenus__item",children:(0,Xn.jsx)("img",{onClick:()=>!u&&(()=>{if(ee)return;if(_(!0),C(!1),F([]),b(!1),G(!1),$([...z,{message:{text:j?.ticket_text,user:!1}}]),setTimeout((()=>{c?.current?.focus()}),0),pe("selected_topic_id"))return;setTimeout((()=>{c?.current?.focus()}),0),me("selected_topic_id","-1",1);let e={chat_id:pe("chat_id"),topic:Yn.sanitize("Ticket Status",{ALLOWED_TAGS:""})};ge(`${de}/api/v1/register_topic`,e).then((e=>{}))})(),src:j?.ticket_image||"https://cdn-webth.garenanow.com/webth/logo/garena/garena_84x84.png",alt:"richmenus_img"})}),(0,Xn.jsx)("div",{className:"richmenus__close",onClick:()=>{C(!1),s?.current?.focus()},children:(0,Xn.jsx)(Jn,{bg:j?.close_menu_icon||"https://cdn-webth.garenanow.com/webth/cdn/garena/chat-bot/button_close.png",ratio:"60 * 60",width:"100%"})})]})})]})]})})}):(0,Xn.jsx)(Xn.Fragment,{children:(0,Xn.jsx)("div",{className:"chat__float",onClick:()=>{N(!0),he(),z?.length<=0&&(pe("chat_close")?$([{message:{text:j?.start_chat,user:!1}},{message:{text:j?.ban_message||"คุณโดนแบน",user:!1}}]):$([{message:{text:j?.start_chat,user:!1}},...z]))},children:(0,Xn.jsx)(Jn,{bg:j?.chat_icon||"https://cdn-webth.garenanow.com/webth/cdn/garena/chat-bot/button_chat.png",ratio:"60 * 60",width:"100%"})})})}):null}const Zn=Ht.div((e=>{let{float_icon_width:t,ratio:n,duration:r,ease:o,enableRatingState:i,initChat:a}=e;return $t`
    --chatbox-width: 25%;
    --chatbox-ratio: 350 * 500;
    position: fixed;
    width: 100%;
    height: 100%;
    display: inline-block;
    top: 0;
    left: 0;
    pointer-events: none;
    font-size: .7rem;
    font-family: "HelveticaLTStd-Light", arial, Tahoma;

    a {
      color: #007bff;
    }

    img {
      -webkit-tap-highlight-color: transparent;
      -webkit-touch-callout: none;
      -webkit-user-select: none;
      user-select: none;
      -webkit-user-drag: none;
    }

    //disable arrows from number input
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    input:focus,
    select:focus,
    textarea:focus,
    button:focus {
      outline: none;
    }
    input[type="text"] {
      -moz-appearance: textfield;
      width: 100%;
      height: 100%;
    }
    input:placeholder-shown {
      text-overflow: ellipsis;
    }

    .button_action {
      @media screen and (max-width: 720px) {
        width: 8vmin;
        height: 8vmin;
        aspect-ratio: 1/1;
      }
    }

    .chat {
      &__box {
        position: absolute;
        pointer-events: all;
        width: var(--chatbox-width);
        padding-top: calc(var(--chatbox-width) / var(--chatbox-ratio));
        background: ${a?.chat_background||"#eee"};
        bottom: 5%;
        right: 5%;
        transform-style: preserve-3d;
        transform-origin: center;
        transition: ${r}s ${o};

        @media screen and (max-width: 720px) {
          bottom: 0%;
          right: 0%;
          width: 100%;
          height: 90%;
        }
      }
      &__container {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        flex-flow: column;
      }
      &__header {
        width: 100%;
        height: 10%;
        padding: 0 5%;
        background-color: ${a?.chat_theme||"#e41e26"};
        color: #fff;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: bolder;
        font-size: 1.5em;

        .minimize {
          width: 5%;
          cursor: pointer;
          position: relative;
        }

        .back {
          width: 5%;
          cursor: pointer;
          position: relative;
        }

        .title {
          color: ${a?.chat_title_color||"#fff"};
        }
      }
      &__emergency {
        width: 100%;
        padding: 2% 2%;
        margin-bottom: 5%;
        text-align: left;
        font-size: 1.2em;
        line-height: 1.3;
        color: ${a?.emergency_color||"#e41e26"};
        background-color: ${a?.emergency_background||"#fff"};

        > * {
          line-height: 1.3;
        }
      }
      &__content {
        position: relative;
        flex: 1;
        width: 100%;
        padding: 5% 10%;
        background-color: ${a?.chat_background||"#eee"};
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        color: ${a?.text_color_bot||"#000"};

        .textbox {
          position: relative;
          max-width: 100%;
          background-color: ${a?.background_message_bot||"#fff"};
          margin: 3% 0;
          border-radius: 4px;
          line-height: 1.3;
          font-size: 1.3em;
          word-break: break-word;
          padding: 1ch 1ch;
          /* display: flex;
                align-items: center;
                justify-content: flex-start; */

          &__profile {
            position: absolute;
            width: 2.5vmin;
            border-radius: 100%;
            top: 0;
            left: 0;
            transform: translate(-100%, -50%);

            > img {
              display: block;
              width: 100%;
            }

            @media screen and (max-width: 720px) {
              width: 4vmin;
            }
          }

          &__message {
            text-align: left;

            p:last-child {
              margin: 0 !important;
            }
          }

          &__choice {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            flex-wrap: wrap;
            gap: 0 1ch;
            .boxaction {
              font-size: 1em;
              text-align: center;
              border-radius: 8px;
              cursor: pointer;
              background-color: ${a?.chat_theme||"#e41e26"};
              color: #fff;
            }
          }

          &__image {
            position: relative;
            width: 5vmin;
            top: 0;
            left: 0;

            > img {
              position: relative;
              display: block;
              width: 100%;
            }
          }
        }

        .right {
          align-self: flex-end;
          text-align: right;
          display: flex;
          align-items: center;
          justify-content: flex-end;
          background-color: ${a?.background_message_user||"#e41e26"};
          color: ${a?.text_color_user||"#fff"};

          p {
            margin: 0 !important;
          }
        }

        .boxcenter {
          align-self: center;
          border-radius: 8px;
          cursor: pointer;
          color: ${a?.choice_color_message||"#fff"};
          background-color: ${a?.choice_background_message||"transparent"};
          border: 1px solid
            ${a?.choice_background_border_message||"#fff"};

          &:hover {
            background-color: ${a?.choice_background_message_hover||"#fff"};
            color: ${a?.choice_color_message_hover||"#000"};
          }

          p:last-child {
            margin: 0 !important;
          }
        }

        .boxend {
          align-self: center;
          border-radius: 8px;
          cursor: pointer;
          background-color: ${a?.chat_theme||"#e41e26"};
          color: #fff;
        }

        .boxautoend {
          align-self: center;
          border-radius: 8px;
          color: #fff;
          cursor: auto;
        }
      }
      &__imagelist {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-flow: row wrap;
        overflow-y: auto;
        background: ${a?.chat_background||"#eee"};

        .imageitem {
          width: calc(100% / 3);
          cursor: pointer;
          padding: 2%;
          display: flex;
          justify-content: center;
          align-items: center!important;
          position: relative;
          flex-direction: column;
          min-height: 20%;
          align-self: flex-start;

          &__game {
            position: relative;
            width: 100%;
            aspect-ratio: 1 / 1;

            > img {
              display: block;
              width: 100%;
              position: relative;
            }
          }

          .name {
            width: 100%;
            text-align: center;
            color: ${a?.text_color_bot||"#000"};
            font-size: 1rem;
            font-weight: bold;
            text-overflow: ellipsis;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            white-space: unset;
            aspect-ratio: 1 / 1;
            display: flex;
            justify-content: center;
            align-items: center;

            .desc {
              display: -webkit-box;
              -webkit-line-clamp: 3;
              -webkit-box-orient: vertical;
              overflow: hidden;
              white-space: unset;
            }

            @media screen and (max-width: 720px) {
              
            }
          }

          .nameimg {
            width: 100%;
            text-align: center;
            color: ${a?.text_color_bot||"#000"};
            font-size: 1rem;
            font-weight: bold;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            display: none;
            @media screen and (max-width: 720px) {
              display: -webkit-box;
              -webkit-line-clamp: 2;
              -webkit-box-orient: vertical;
              overflow: hidden;
              white-space: unset;
              position: relative;
              margin-top: 5%;
            }
          }

          > img {
            display: block;
            width: 100%;
          }
        }
      }
      &__rate {
        width: 100%;
        height: 100%;
        left: 0;
        bottom: 0;
        display: flex;
        justify-content: space-evenly;
        align-items: center;

        .left {
          width: 70%;
          .star {
            width: 100%;
            font-size: 1.1em;
            gap: 0.1em;
            display: flex;
            justify-content: center;
            align-items: center;

            > label {
              margin: 0;
              cursor: pointer;
            }

            @media screen and (max-width: 720px) {
              font-size: 1.3em;
            }

            @media screen and (max-width: 340px) {
              font-size: 1em;
            }
          }

          .text {
            width: 100%;

            > input {
              width: 100%;
              background: transparent;
              border-radius: 8px;
              border: 1px solid ${a?.rate_border_input_color||"#000"};
              padding: 2% 5%;
              color: ${a?.rate_text_color||"#fff"};
            }
          }
        }

        .right {
          width: 12%;
          display: flex;
          justify-content: center;
          align-items: center;
        }

        input[type="radio"] {
          cursor: pointer;
          display: none;
          margin: 0 1%;
        }
      }
      &__ticket {
        width: 100%;
        height: ${i?"12vmin":"6vmin"};
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1.5em;
        background-color: ${a?.background_message_input||"#fff"};
        padding: 0.5rem;
        position: relative;

        @media screen and (max-width: 720px) {
          height: ${i?"25vmin":"20vmin"};
        }

        .closeticket {
          position: absolute;
          top: 0;
          right: 0;
          transform: translate(0, -100%);
          background-color: ${a?.chat_theme||"#e41e26"};
          width: 10%;
          padding: 2%;
          display: flex;
          justify-content: center;
          align-items: center;
          cursor: pointer;
        }

        .input {
          height: 100%;
          flex: 1;
          display: flex;
          align-items: center;
          justify-content: center;
          position: relative;
          > input {
            background: transparent;
            border: none;
            padding: 0 5%;
            color: ${a?.chat_input_color||"#fff"};
          }
        }

        .send {
          width: 13%;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
      &__message {
        position: relative;
        width: 100%;
        height: ${i?"12vmin":"6vmin"};
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1.5em;
        background-color: ${a?.background_message_input||"#fff"};
        padding: 0.5rem;

        @media screen and (max-width: 720px) {
          height: ${i?"25vmin":"20vmin"};
        }

        .menu {
          width: 15%;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        .input {
          height: 100%;
          flex: 1;
          display: flex;
          align-items: center;
          justify-content: center;
          position: relative;
          > input {
            background: transparent;
            border: none;
            padding: 0 5%;
            color: ${a?.chat_input_color||"#fff"};
          }
        }

        .send {
          width: 15%;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        .richmenus {
          position: absolute;
          top: 0;
          transform: translateY(-100%);
          left: 0;
          width: 100%;

          &__container {
            position: relative;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            flex-wrap: wrap;
            background-color: ${a?.background_message_input||"#fff"};
            gap: 0.5rem;
          }

          &__item {
            display: flex;
            justify-content: center;
            align-items: center;
            width: calc((100% - 2rem) / 5);

            > img {
              cursor: pointer;
              display: block;
              width: 100%;
              aspect-ratio: 1/1;
            }
          }

          &__close {
            position: absolute;
            top: 0;
            right: 0;
            transform: translate(0, -100%);
            background-color: ${a?.chat_theme||"#e41e26"};
            width: 10%;
            padding: 2%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
          }
        }
      }
      &__float {
        position: absolute;
        pointer-events: all;
        cursor: pointer;
        width: ${t};
        bottom: 5%;
        right: 5%;
        transform-style: preserve-3d;
        transform-origin: center;
        box-shadow: 0 5px 11px 1px rgba(47, 47, 47, 0.3);

        @media screen and (max-width: 720px) {
          padding-top: calc(10% / var(--chatbox-ratio));
        }
      }
    }

    .loader {
      position: relative;
      width: 6ch;
      height: 2ch;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      &::after {
        content: "";
        position: absolute;
        top: 0%;
        left: 50%;
        transform: translate(-50%, 0%);
        aspect-ratio: 1;
        border-radius: 50%;
        display: inline-block;
        position: relative;
        width: 1vmin;
        aspect-ratio: 1;
        animation: l5 1s infinite linear alternate;
      }
    }
    @keyframes l5 {
      0% {
        box-shadow: 2.2vmin 0 ${a?.chat_loader_color||"#000"},
          -2.2vmin 0 #0002;
        background: ${a?.chat_loader_color||"#000"};
      }
      33% {
        box-shadow: 2.2vmin 0 ${a?.chat_loader_color||"#000"},
          -2.2vmin 0 #0002;
        background: #0002;
      }
      66% {
        box-shadow: 2.2vmin 0 #0002,
          -2.2vmin 0 ${a?.chat_loader_color||"#000"};
        background: #0002;
      }
      100% {
        box-shadow: 2.2vmin 0 #0002,
          -2.2vmin 0 ${a?.chat_loader_color||"#000"};
        background: ${a?.chat_loader_color||"#000"};
      }
    }
  `})),Jn=Ht.div((e=>{let{bg:t,ratio:n=1,width:r="100%"}=e;return $t`
    background: url(${t}) top center / 100% 300%;
    width: ${r};
    padding-top: calc(${r} / ${n});
    cursor: pointer;
    display: inline-block;

    &.disabled {
      background-position-y: bottom;
      pointer-events: none;
    }

    &:hover {
      background-position-y: center;
    }
  `}));const Qn={renderChatWidget:function(e,t){r().render((0,Xn.jsx)(Kn,{...t}),document.getElementById(e))}}})(),i=i.default})()));