@smarttalks.ai/widget 0.9.11 → 0.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +2218 -2252
- package/lib/index.umd.cjs +27 -27
- package/package.json +1 -1
package/lib/index.umd.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(Tt){typeof define=="function"&&define.amd?define(Tt):Tt()})(function(){"use strict";function Tt(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Tt(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function po(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Tt(e))&&(r&&(r+=" "),r+=t);return r}const jn="-",la=e=>{const t=ua(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(jn);return a[0]===""&&a.length!==1&&a.shift(),mo(a,t)||ca(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},mo=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?mo(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(jn);return t.validators.find(({validator:s})=>s(i))?.classGroupId},yo=/^\[(.+)\]$/,ca=e=>{if(yo.test(e)){const t=yo.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ua=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return fa(Object.entries(e.classGroups),n).forEach(([i,s])=>{qn(s,r,i,t)}),r},qn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:bo(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(da(o)){qn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{qn(s,bo(t,i),n,r)})})},bo=(e,t)=>{let n=e;return t.split(jn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},da=e=>e.isThemeGetter,fa=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e,ha=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},wo="!",ga=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=a=>{const l=[];let c=0,d=0,u;for(let p=0;p<a.length;p++){let b=a[p];if(c===0){if(b===o&&(r||a.slice(p,p+i)===t)){l.push(a.slice(d,p)),d=p+i;continue}if(b==="/"){u=p;continue}}b==="["?c++:b==="]"&&c--}const h=l.length===0?a:a.substring(d),m=h.startsWith(wo),f=m?h.substring(1):h,g=u&&u>d?u-d:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:f,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:s}):s},pa=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},ma=e=>({cache:ha(e.cacheSize),parseClassName:ga(e),...la(e)}),ya=/\s+/,ba=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(ya);let a="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:d,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:m}=n(c);let f=!!m,g=r(f?h.substring(0,m):h);if(!g){if(!f){a=c+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=c+(a.length>0?" "+a:a);continue}f=!1}const p=pa(d).join(":"),b=u?p+wo:p,w=b+g;if(i.includes(w))continue;i.push(w);const v=o(g,f);for(let x=0;x<v.length;++x){const C=v[x];i.push(b+C)}a=c+(a.length>0?" "+a:a)}return a};function wa(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=vo(t))&&(r&&(r+=" "),r+=n);return r}const vo=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=vo(e[r]))&&(n&&(n+=" "),n+=t);return n};function va(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((d,u)=>u(d),e());return n=ma(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=ba(l,n);return o(l,d),d}return function(){return i(wa.apply(null,arguments))}}const X=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},xo=/^\[(?:([a-z-]+):)?(.+)\]$/i,xa=/^\d+\/\d+$/,Sa=new Set(["px","full","screen"]),Ea=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ka=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ca=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Oa=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_a=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ne=e=>dt(e)||Sa.has(e)||xa.test(e),We=e=>ft(e,"length",Ra),dt=e=>!!e&&!Number.isNaN(Number(e)),Hn=e=>ft(e,"number",dt),Lt=e=>!!e&&Number.isInteger(Number(e)),Pa=e=>e.endsWith("%")&&dt(e.slice(0,-1)),N=e=>xo.test(e),Ge=e=>Ea.test(e),Aa=new Set(["length","size","percentage"]),Ta=e=>ft(e,Aa,So),La=e=>ft(e,"position",So),Ma=new Set(["image","url"]),Da=e=>ft(e,Ma,$a),Ia=e=>ft(e,"",Fa),Mt=()=>!0,ft=(e,t,n)=>{const r=xo.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Ra=e=>ka.test(e)&&!Ca.test(e),So=()=>!1,Fa=e=>Oa.test(e),$a=e=>_a.test(e),Na=va(()=>{const e=X("colors"),t=X("spacing"),n=X("blur"),r=X("brightness"),o=X("borderColor"),i=X("borderRadius"),s=X("borderSpacing"),a=X("borderWidth"),l=X("contrast"),c=X("grayscale"),d=X("hueRotate"),u=X("invert"),h=X("gap"),m=X("gradientColorStops"),f=X("gradientColorStopPositions"),g=X("inset"),p=X("margin"),b=X("opacity"),w=X("padding"),v=X("saturate"),x=X("scale"),C=X("sepia"),E=X("skew"),k=X("space"),F=X("translate"),P=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",N,t],I=()=>[N,t],oe=()=>["",Ne,We],Y=()=>["auto",dt,N],fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",N],At=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Ae=()=>[dt,N];return{cacheSize:500,separator:":",theme:{colors:[Mt],spacing:[Ne,We],blur:["none","",Ge,N],brightness:Ae(),borderColor:[e],borderRadius:["none","","full",Ge,N],borderSpacing:I(),borderWidth:oe(),contrast:Ae(),grayscale:se(),hueRotate:Ae(),invert:se(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[Pa,We],inset:M(),margin:M(),opacity:Ae(),padding:I(),saturate:Ae(),scale:Ae(),sepia:se(),skew:Ae(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[Ge]}],"break-after":[{"break-after":At()}],"break-before":[{"break-before":At()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...fe(),N]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Lt,N]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",Lt,N]}],"grid-cols":[{"grid-cols":[Mt]}],"col-start-end":[{col:["auto",{span:["full",Lt,N]},N]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[Mt]}],"row-start-end":[{row:["auto",{span:[Lt,N]},N]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[p]}],mx:[{mx:[p]}],my:[{my:[p]}],ms:[{ms:[p]}],me:[{me:[p]}],mt:[{mt:[p]}],mr:[{mr:[p]}],mb:[{mb:[p]}],ml:[{ml:[p]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[Ge]},Ge]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ge,We]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hn]}],"font-family":[{font:[Mt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",N]}],"line-clamp":[{"line-clamp":["none",dt,Hn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ne,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ne,We]}],"underline-offset":[{"underline-offset":["auto",Ne,N]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...fe(),La]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ta]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Da]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:$()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[Ne,N]}],"outline-w":[{outline:[Ne,We]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Ne,We]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ge,Ia]}],"shadow-color":[{shadow:[Mt]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ge,N]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[v]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:Ae()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:Ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Lt,N]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ne,We,Hn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function Ye(...e){return Na(po(e))}function Ka(e){try{if(!e)return;const t=document.querySelector(":root");if(!t)throw new Error("could not find root layer");console.log("loading theme for",e.title),e.style.primary&&t.style.setProperty("--primary",Xt(e.style.primary)),e.style.primaryForeground&&t.style.setProperty("--primary-foreground",Xt(e.style.primaryForeground)),e.style.background&&t.style.setProperty("--background",Xt(e.style.background)),e.style.foreground&&t.style.setProperty("--foreground",Xt(e.style.foreground))}catch(t){console.error("failed to load widget theme",t)}}function Xt(e){e.length>=8&&(e=e.substring(0,7));let t=0,n=0,r=0;e.length==4?(t="0x"+e[1]+e[1],n="0x"+e[2]+e[2],r="0x"+e[3]+e[3]):e.length==7&&(t="0x"+e[1]+e[2],n="0x"+e[3]+e[4],r="0x"+e[5]+e[6]),t/=255,n/=255,r/=255;let o=Math.min(t,n,r),i=Math.max(t,n,r),s=i-o,a=0,l=0,c=0;return s==0?a=0:i==t?a=(n-r)/s%6:i==n?a=(r-t)/s+2:a=(t-n)/s+4,a=Math.round(a*60),a<0&&(a+=360),c=(i+o)/2,l=s==0?0:s/(1-Math.abs(2*c-1)),l=+(l*100).toFixed(1),c=+(c*100).toFixed(1),a+","+l+"%,"+c+"%"}function za(e){if(e.includes("<a")||e.includes("</a>")||e.includes('href="')||e.includes('target="_blank"'))return e;const t=/(https?\:\/\/)(www\.)?[^\s]+\.[^\s\<]+/g;return e.replace(t,n=>{let r=n;return n.includes("<br>")?n:(r.startsWith("http")||(r="http://"+n),`<a class="underline" href="${r}" target="_blank">${n}</a>`)})}function Ba(e){return e&&e.replace(/\n/gm,"<br>").replace(/(?:\*)([^*]*)(?:\*)/gm,"<strong>$1</strong>").replace(/(?:_)([^_]*)(?:_)/gm,"<i>$1</i>").replace(/(?:~)([^~]*)(?:~)/gm,"<strike>$1</strike>").replace(/(?:```)([^```]*)(?:```)/gm,"<tt>$1</tt>")}function Jt(){const e=document.querySelector("smarttalks-widget");let t;if(e?t=e.shadowRoot?.getElementById("smarttalks-widget"):t=document.getElementById("smarttalks-widget"),!t)throw new Error("could not find widget element");return t}const Va={en:{inputPlaceholder:"Type your message here...",emptyMessages:"No messages yet...",selectOption:"Select an option",send:"Send",restart:"Restart"},pt:{inputPlaceholder:"Escreva sua mensagem aqui...",emptyMessages:"Nenhuma mensagem ainda...",selectOption:"Selecione uma opção",send:"Enviar",restart:"Reiniciar"},es:{inputPlaceholder:"Escribe tu mensaje aqui...",emptyMessages:"No hay mensajes aún...",selectOption:"Seleccione una opción",send:"Enviar",restart:"Reiniciar"}};function ht(e){const t=navigator.language?.toLowerCase();let n="en";return(t==="pt-br"||t.includes("pt"))&&(n="pt"),(t==="es-es"||t.includes("es"))&&(n="es"),Va[n][e]}const Zt="https://heimdall.smarttalks.ai/api",Ua="wss://heimdall.smarttalks.ai",Eo="smarttalkswidget";function ee(e,...t){window.postMessage({from:Eo,command:e,args:t})}function re(e,t){window.addEventListener("message",n=>{n.data?.from===Eo&&n.data?.command===e&&(n.stopImmediatePropagation(),console.info("received command:",e),t(...n.data.args||[]))})}function ja(){typeof window<"u"&&(window.SmartTalksWidget={registerContactData:e=>{ee("registerContactData",e)},open:e=>{ee("open"),e&&ee("setInput",e)},close:()=>{ee("close")},toggle:()=>{ee("toggle")},toggleFullscreen:()=>{ee("toggleFullscreen")},reset:()=>{ee("reset")},onOpen:e=>{re("onOpen",e)},onClose:e=>{re("onClose",e)},onToggle:e=>{re("onToggle",e)},onReset:e=>{re("onReset",e)},onInput:e=>{re("onInput",e)},onAnswer:e=>{re("onAnswer",e)},onLoad:e=>{re("onLoad",e)}})}function ko(e,t,n=0){localStorage.setItem(e,JSON.stringify({value:t,ttl:new Date().getTime()+n}))}function Co(e){const t=localStorage.getItem(e);if(!t)return null;const n=JSON.parse(t),r=new Date;return n.ttl!==0&&r.getTime()>n.ttl?(localStorage.removeItem(e),null):n.value}function qa(e){return Object.keys(e).reduce((n,r)=>{const o=e[r];return n[r]=Object.assign({},o),Po(o.value)&&!Xa(o.value)&&!Array.isArray(o.value)&&(n[r].value=Object.assign({},o.value)),Array.isArray(o.value)&&(n[r].value=o.value.slice(0)),n},{})}function Ha(e){return e?Object.keys(e).reduce((n,r)=>{const o=e[r];return n[r]=Po(o)&&"value"in o?o:{value:o},n[r].attribute||(n[r].attribute=Ya(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function Wa(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function Ga(e,t){const n=qa(t);return Object.keys(t).forEach(o=>{const i=n[o],s=e.getAttribute(i.attribute),a=e[o];s!=null&&(i.value=i.parse?Oo(s):s),a!=null&&(i.value=Array.isArray(a)?a.slice(0):a),i.reflect&&_o(e,i.attribute,i.value,!!i.parse),Object.defineProperty(e,o,{get(){return i.value},set(l){const c=i.value;i.value=l,i.reflect&&_o(this,i.attribute,i.value,!!i.parse);for(let d=0,u=this.__propertyChangedCallbacks.length;d<u;d++)this.__propertyChangedCallbacks[d](o,l,c)},enumerable:!0,configurable:!0})}),n}function Oo(e){if(e)try{return JSON.parse(e)}catch{return e}}function _o(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let o=r?JSON.stringify(n):n;e.__updating[t]=!0,o==="true"&&(o=""),e.setAttribute(t,o),Promise.resolve().then(()=>delete e.__updating[t])}function Ya(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function Po(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function Xa(e){return Object.prototype.toString.call(e)==="[object Function]"}function Ja(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let Wn;function Za(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(o=>t[o].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=Ga(this,t);const o=Wa(this.props),i=this.Component,s=Wn;try{Wn=this,this.__initialized=!0,Ja(i)?new i(o,{element:this}):i(o,{element:this})}finally{Wn=s}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let o=null;for(;o=this.__releaseCallbacks.pop();)o(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(o,i,s){if(this.__initialized&&!this.__updating[o]&&(o=this.lookupProp(o),o in t)){if(s==null&&!this[o])return;this[o]=t[o].parse?Oo(s):s}}lookupProp(o){if(t)return n.find(i=>o===i||o===t[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(o){this.__releaseCallbacks.push(o)}addPropertyChangedCallback(o){this.__propertyChangedCallbacks.push(o)}}}function Qa(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:o,customElements:i=window.customElements}=n;return s=>{let a=i.get(e);return a?(a.prototype.Component=s,a):(a=Za(r,Ha(t)),a.prototype.Component=s,a.prototype.registeredTag=e,i.define(e,a,o),a)}}const z={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Ao(this.context.count)},getNextContextId(){return Ao(this.context.count++)}};function Ao(e){const t=String(e),n=t.length-1;return z.context.id+(n?String.fromCharCode(96+n):"")+t}function el(e){z.context=e}const tl=!1,nl=(e,t)=>e===t,be=Symbol("solid-proxy"),To=typeof Proxy=="function",Gn=Symbol("solid-track"),Qt={equals:nl};let Lo=$o;const Ke=1,en=2,Mo={owned:null,cleanups:null,context:null,owner:null},Yn={};var q=null;let Xn=null,rl=null,W=null,ae=null,ze=null,tn=0;function Be(e,t){const n=W,r=q,o=e.length===0,i=t===void 0?r:t,s=o?Mo:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>H(()=>Dt(s)));q=s,W=null;try{return Ve(a,!0)}finally{W=n,q=r}}function O(e,t){t=t?Object.assign({},Qt,t):Qt;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Fo(n,o));return[Ro.bind(n),r]}function Do(e,t,n){const r=nn(e,t,!0,Ke);gt(r)}function te(e,t,n){const r=nn(e,t,!1,Ke);gt(r)}function T(e,t,n){Lo=ul;const r=nn(e,t,!1,Ke);(!n||!n.render)&&(r.user=!0),ze?ze.push(r):gt(r)}function _(e,t,n){n=n?Object.assign({},Qt,n):Qt;const r=nn(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,gt(r),Ro.bind(r)}function ol(e){return e&&typeof e=="object"&&"then"in e}function il(e,t,n){let r,o,i;typeof t=="function"?(r=e,o=t,i={}):(r=!0,o=e,i=t||{});let s=null,a=Yn,l=null,c=!1,d="initialValue"in i,u=typeof r=="function"&&_(r);const h=new Set,[m,f]=(i.storage||O)(i.initialValue),[g,p]=O(void 0),[b,w]=O(void 0,{equals:!1}),[v,x]=O(d?"ready":"unresolved");z.context&&(l=z.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:z.load&&z.has(l)&&(a=z.load(l)));function C(P,R,M,I){return s===P&&(s=null,I!==void 0&&(d=!0),(P===a||R===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(I,{value:R})),a=Yn,E(R,M)),R}function E(P,R){Ve(()=>{R===void 0&&f(()=>P),x(R!==void 0?"errored":d?"ready":"unresolved"),p(R);for(const M of h.keys())M.decrement();h.clear()},!1)}function k(){const P=al,R=m(),M=g();if(M!==void 0&&!s)throw M;return W&&W.user,R}function F(P=!0){if(P!==!1&&c)return;c=!1;const R=u?u():r;if(R==null||R===!1){C(s,H(m));return}const M=a!==Yn?a:H(()=>o(R,{value:m(),refetching:P}));return ol(M)?(s=M,"value"in M?(M.status==="success"?C(s,M.value,void 0,R):C(s,void 0,Qn(M.value),R),M):(c=!0,queueMicrotask(()=>c=!1),Ve(()=>{x(d?"refreshing":"pending"),w()},!1),M.then(I=>C(M,I,void 0,R),I=>C(M,void 0,Qn(I),R)))):(C(s,M,void 0,R),M)}return Object.defineProperties(k,{state:{get:()=>v()},error:{get:()=>g()},loading:{get(){const P=v();return P==="pending"||P==="refreshing"}},latest:{get(){if(!d)return k();const P=g();if(P&&!s)throw P;return m()}}}),u?Do(()=>F(!1)):F(!1),[k,{refetch:F,mutate:f}]}function Ee(e){return Ve(e,!1)}function H(e){if(W===null)return e();const t=W;W=null;try{return e()}finally{W=t}}function nt(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const l=H(()=>t(a,o,s));return o=a,l}}function rt(e){T(()=>H(e))}function K(e){return q===null||(q.cleanups===null?q.cleanups=[e]:q.cleanups.push(e)),e}function Jn(){return W}function Io(){return q}function sl(e,t){const n=q,r=W;q=e,W=null;try{return Ve(t,!0)}catch(o){er(o)}finally{q=n,W=r}}function ce(e,t){const n=Symbol("context");return{id:n,Provider:dl(n),defaultValue:e}}function he(e){let t;return q&&q.context&&(t=q.context[e.id])!==void 0?t:e.defaultValue}function Zn(e){const t=_(e),n=_(()=>tr(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let al;function Ro(){if(this.sources&&this.state)if(this.state===Ke)gt(this);else{const e=ae;ae=null,Ve(()=>on(this),!1),ae=e}if(W){const e=this.observers?this.observers.length:0;W.sources?(W.sources.push(this),W.sourceSlots.push(e)):(W.sources=[this],W.sourceSlots=[e]),this.observers?(this.observers.push(W),this.observerSlots.push(W.sources.length-1)):(this.observers=[W],this.observerSlots=[W.sources.length-1])}return this.value}function Fo(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Ve(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=Xn&&Xn.running;s&&Xn.disposed.has(i),(s?!i.tState:!i.state)&&(i.pure?ae.push(i):ze.push(i),i.observers&&No(i)),s||(i.state=Ke)}if(ae.length>1e6)throw ae=[],new Error},!1)),t}function gt(e){if(!e.fn)return;Dt(e);const t=tn;ll(e,e.value,t)}function ll(e,t,n){let r;const o=q,i=W;W=q=e;try{r=e.fn(t)}catch(s){return e.pure&&(e.state=Ke,e.owned&&e.owned.forEach(Dt),e.owned=null),e.updatedAt=n+1,er(s)}finally{W=i,q=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Fo(e,r):e.value=r,e.updatedAt=n)}function nn(e,t,n,r=Ke,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:q,context:q?q.context:null,pure:n};return q===null||q!==Mo&&(q.owned?q.owned.push(i):q.owned=[i]),i}function rn(e){if(e.state===0)return;if(e.state===en)return on(e);if(e.suspense&&H(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<tn);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Ke)gt(e);else if(e.state===en){const r=ae;ae=null,Ve(()=>on(e,t[0]),!1),ae=r}}function Ve(e,t){if(ae)return e();let n=!1;t||(ae=[]),ze?n=!0:ze=[],tn++;try{const r=e();return cl(n),r}catch(r){n||(ze=null),ae=null,er(r)}}function cl(e){if(ae&&($o(ae),ae=null),e)return;const t=ze;ze=null,t.length&&Ve(()=>Lo(t),!1)}function $o(e){for(let t=0;t<e.length;t++)rn(e[t])}function ul(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:rn(r)}if(z.context){if(z.count){z.effects||(z.effects=[]),z.effects.push(...e.slice(0,n));return}el()}for(z.effects&&(z.done||!z.count)&&(e=[...z.effects,...e],n+=z.effects.length,delete z.effects),t=0;t<n;t++)rn(e[t])}function on(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const o=r.state;o===Ke?r!==t&&(!r.updatedAt||r.updatedAt<tn)&&rn(r):o===en&&on(r,t)}}}function No(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=en,n.pure?ae.push(n):ze.push(n),n.observers&&No(n))}}function Dt(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Dt(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Dt(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Qn(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function er(e,t=q){throw Qn(e)}function tr(e){if(typeof e=="function"&&!e.length)return tr(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=tr(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function dl(e,t){return function(r){let o;return te(()=>o=H(()=>(q.context={...q.context,[e]:r.value},Zn(()=>r.children))),void 0),o}}const fl=Symbol("fallback");function Ko(e){for(let t=0;t<e.length;t++)e[t]()}function hl(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return K(()=>Ko(i)),()=>{let l=e()||[],c=l.length,d,u;return l[Gn],H(()=>{let m,f,g,p,b,w,v,x,C;if(c===0)s!==0&&(Ko(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[fl],o[0]=Be(E=>(i[0]=E,n.fallback())),s=1);else if(s===0){for(o=new Array(c),u=0;u<c;u++)r[u]=l[u],o[u]=Be(h);s=c}else{for(g=new Array(c),p=new Array(c),a&&(b=new Array(c)),w=0,v=Math.min(s,c);w<v&&r[w]===l[w];w++);for(v=s-1,x=c-1;v>=w&&x>=w&&r[v]===l[x];v--,x--)g[x]=o[v],p[x]=i[v],a&&(b[x]=a[v]);for(m=new Map,f=new Array(x+1),u=x;u>=w;u--)C=l[u],d=m.get(C),f[u]=d===void 0?-1:d,m.set(C,u);for(d=w;d<=v;d++)C=r[d],u=m.get(C),u!==void 0&&u!==-1?(g[u]=o[d],p[u]=i[d],a&&(b[u]=a[d]),u=f[u],m.set(C,u)):i[d]();for(u=w;u<c;u++)u in g?(o[u]=g[u],i[u]=p[u],a&&(a[u]=b[u],a[u](u))):o[u]=Be(h);o=o.slice(0,s=c),r=l.slice(0)}return o});function h(m){if(i[u]=m,a){const[f,g]=O(u);return a[u]=g,t(l[u],f)}return t(l[u])}}}function y(e,t){return H(()=>e(t||{}))}function sn(){return!0}const nr={get(e,t,n){return t===be?n:e.get(t)},has(e,t){return t===be?!0:e.has(t)},set:sn,deleteProperty:sn,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:sn,deleteProperty:sn}},ownKeys(e){return e.keys()}};function rr(e){return(e=typeof e=="function"?e():e)?e:{}}function gl(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function L(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&be in a,e[s]=typeof a=="function"?(t=!0,_(a)):a}if(To&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const l=rr(e[a])[s];if(l!==void 0)return l}},has(s){for(let a=e.length-1;a>=0;a--)if(s in rr(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(rr(e[a])));return[...new Set(s)]}},nr);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const d=l[c];if(d==="__proto__"||d==="constructor")continue;const u=Object.getOwnPropertyDescriptor(a,d);if(!r[d])r[d]=u.get?{enumerable:!0,configurable:!0,get:gl.bind(n[d]=[u.get.bind(a)])}:u.value!==void 0?u:void 0;else{const h=n[d];h&&(u.get?h.push(u.get.bind(a)):u.value!==void 0&&h.push(()=>u.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],l=r[a];l&&l.get?Object.defineProperty(o,a,l):o[a]=l?l.value:void 0}return o}function j(e,...t){if(To&&be in e){const o=new Set(t.length>1?t.flat():t[0]),i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},nr));return i.push(new Proxy({get(s){return o.has(s)?void 0:e[s]},has(s){return o.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.has(s))}},nr)),i}const n={},r=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,o),s=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let a=!1,l=0;for(const c of t)c.includes(o)&&(a=!0,s?r[l][o]=i.value:Object.defineProperty(r[l],o,i)),++l;a||(s?n[o]=i.value:Object.defineProperty(n,o,i))}return[...r,n]}let pl=0;function Te(){return z.context?z.getNextContextId():`cl-${pl++}`}const zo=e=>`Stale read from <${e}>.`;function pt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return _(hl(()=>e.each,e.children,t||void 0))}function J(e){const t=e.keyed,n=_(()=>e.when,void 0,void 0),r=t?n:_(n,void 0,{equals:(o,i)=>!o==!i});return _(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?H(()=>i(t?o:()=>{if(!H(r))throw zo("Show");return n()})):i}return e.fallback},void 0,void 0)}function Bo(e){const t=Zn(()=>e.children),n=_(()=>{const r=t(),o=Array.isArray(r)?r:[r];let i=()=>{};for(let s=0;s<o.length;s++){const a=s,l=o[s],c=i,d=_(()=>c()?void 0:l.when,void 0,void 0),u=l.keyed?d:_(d,void 0,{equals:(h,m)=>!h==!m});i=()=>c()||(u()?[a,d,l]:void 0)}return i});return _(()=>{const r=n()();if(!r)return e.fallback;const[o,i,s]=r,a=s.children;return typeof a=="function"&&a.length>0?H(()=>a(s.keyed?i():()=>{if(H(n)()?.[0]!==o)throw zo("Match");return i()})):a},void 0,void 0)}function It(e){return e}const ml=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],yl=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...ml]),bl=new Set(["innerHTML","textContent","innerText","children"]),wl=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),vl=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function xl(e,t){const n=vl[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Sl=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),El=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","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","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),kl={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Cl(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const d=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],d)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const d=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],d),t[o]=n[i]}else{if(!c){c=new Map;let u=a;for(;u<i;)c.set(n[u],u++)}const d=c.get(t[s]);if(d!=null)if(a<d&&d<i){let u=s,h=1,m;for(;++u<o&&u<i&&!((m=c.get(t[u]))==null||m!==d+h);)h++;if(h>d-a){const f=t[s];for(;a<d;)e.insertBefore(n[a++],f)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Vo="_$DX_DELEGATE";function D(e,t,n,r){let o;const i=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function Ol(e,t=window.document){const n=t[Vo]||(t[Vo]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Il))}}function ue(e,t,n){it(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function _l(e,t,n,r){it(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Pl(e,t,n){it(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Ue(e,t){it(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Al(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Tl(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(Uo(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(Uo(e,a,!0),n[a]=l)}return n}function an(e,t,n){if(!t)return n?ue(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function ot(e,t={},n,r){const o={};return r||te(()=>o.children=Rt(e,t.children,o.children)),te(()=>typeof t.ref=="function"&&or(t.ref,e)),te(()=>Ll(e,t,n,!0,o,!0)),o}function or(e,t,n){return H(()=>e(t,n))}function A(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Rt(e,t,r,n);te(o=>Rt(e,t(),o,n),r)}function Ll(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=jo(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=jo(e,s,a,o[s],n,i,t)}}function Ml(e){let t,n;return!it()||!(t=z.registry.get(n=Rl()))?e():(z.completed&&z.completed.add(t),z.registry.delete(n),t)}function it(e){return!!z.context&&!z.done&&(!e||e.isConnected)}function Dl(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Uo(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function jo(e,t,n,r,o,i,s){let a,l,c,d,u;if(t==="style")return an(e,n,r);if(t==="classList")return Tl(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);r&&e.removeEventListener(h,r,typeof r!="function"&&r),n&&e.addEventListener(h,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);r&&e.removeEventListener(h,r,!0),n&&e.addEventListener(h,n,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),m=Sl.has(h);if(!m&&r){const f=Array.isArray(r)?r[0]:r;e.removeEventListener(h,f)}(m||n)&&(Al(e,h,n,m),m&&Ol([h]))}else if(t.slice(0,5)==="attr:")ue(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Pl(e,t.slice(5),n);else if((u=t.slice(0,5)==="prop:")||(c=bl.has(t))||!o&&((d=xl(t,e.tagName))||(l=yl.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(u)t=t.slice(5),l=!0;else if(it(e))return n;t==="class"||t==="className"?Ue(e,n):a&&!l&&!c?e[Dl(t)]=n:e[d||t]=n}else{const h=o&&t.indexOf(":")>-1&&kl[t.split(":")[0]];h?_l(e,h,t,n):ue(e,wl[t]||t,n)}return n}function Il(e){if(z.registry&&z.events&&z.events.find(([l,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),s=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),z.registry&&!z.done&&(z.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();i(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function Rt(e,t,n,r,o){const i=it(e);if(i){!n&&(n=[...e.childNodes]);let l=[];for(let c=0;c<n.length;c++){const d=n[c];d.nodeType===8&&d.data.slice(0,2)==="!$"?d.remove():l.push(d)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=mt(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=mt(e,n,r)}else{if(s==="function")return te(()=>{let l=t();for(;typeof l=="function";)l=l();n=Rt(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(ir(l,t,n,o))return te(()=>n=Rt(e,l,n,r,!0)),()=>n;if(i){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let d=l[0];if(d.parentNode!==e)return n;const u=[d];for(;(d=d.nextSibling)!==r;)u.push(d);return n=u}if(l.length===0){if(n=mt(e,n,r),a)return n}else c?n.length===0?qo(e,l,r):Cl(e,n,l):(n&&mt(e),qo(e,l));n=l}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=mt(e,n,r,t);mt(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function ir(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=ir(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=ir(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o}else e.push(a),o=!0;else{const d=String(a);l&&l.nodeType===3&&l.data===d?e.push(l):e.push(document.createTextNode(d))}}return o}function qo(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function mt(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function Rl(){return z.getNextContextId()}const Fl=!1,$l="http://www.w3.org/2000/svg";function Ho(e,t=!1){return t?document.createElementNS($l,e):document.createElement(e)}function Wo(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Io();let i,s=!!z.context;return T(()=>{s&&(Io().user=s=!1),i||(i=sl(o,()=>_(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=O(!1),d=()=>c(!0);Be(u=>A(a,()=>l()?u():i(),null)),K(d)}else{const l=Ho(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),A(c,i),a.appendChild(l),e.ref&&e.ref(l),K(()=>a.removeChild(l))}},void 0,{render:!s}),n}function Nl(e,t){const n=_(e);return _(()=>{const r=n();switch(typeof r){case"function":return H(()=>r(t));case"string":const o=El.has(r),i=z.context?Ml():Ho(r,o);return ot(i,t,o),i}})}function ln(e){const[,t]=j(e,["component"]);return Nl(()=>e.component,t)}function Kl(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[o,i]=O(e[t[r]]);Object.defineProperty(n,t[r],{get:o,set(s){i(()=>s)}})}return n}function zl(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function Bl(e){return(t,n)=>{const{element:r}=n;return Be(o=>{const i=Kl(t);r.addPropertyChangedCallback((a,l)=>i[a]=l),r.addReleaseCallback(()=>{r.renderRoot.textContent="",o()});const s=e(i,n);return A(r.renderRoot,s)},zl(r))}}function Vl(e,t,n){return arguments.length===2&&(n=t,t={}),Qa(e,t)(Bl(n))}const Ul='*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-feature-settings:"rlig" 1,"calt" 1}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-x-0{left:0;right:0}.-top-12{top:-48px}.bottom-0{bottom:0}.bottom-5{bottom:20px}.left-0{left:0}.left-2{left:8px}.right-0{right:0}.right-5{right:20px}.top-0{top:0}.z-20{z-index:20}.z-50{z-index:50}.z-\\[99999\\]{z-index:99999}.z-\\[9999\\]{z-index:9999}.m-0{margin:0}.-mx-1{margin-left:-4px;margin-right:-4px}.mx-1{margin-left:4px;margin-right:4px}.mx-\\[-16px\\]{margin-left:-16px;margin-right:-16px}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:4px;margin-bottom:4px}.mb-1{margin-bottom:4px}.ml-1{margin-left:4px}.ml-auto{margin-left:auto}.mt-0{margin-top:0}.mt-2{margin-top:8px}.mt-24{margin-top:96px}.mt-4{margin-top:16px}.box-border{box-sizing:border-box}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.size-10{width:40px;height:40px}.size-14{width:56px;height:56px}.size-2{width:8px;height:8px}.size-3\\.5{width:14px;height:14px}.size-4{width:16px;height:16px}.size-8{width:32px;height:32px}.size-9{width:36px;height:36px}.size-full{width:100%;height:100%}.h-10{height:40px}.h-11{height:44px}.h-2{height:8px}.h-4{height:16px}.h-5{height:20px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-\\[44px\\]{height:44px}.h-\\[85vh\\]{height:85vh}.h-\\[min\\(85vh\\,700px\\)\\]{height:min(85vh,700px)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\\[120px\\]{max-height:120px}.max-h-\\[80\\%\\]{max-height:80%}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-\\[44px\\]{min-height:44px}.w-11\\/12{width:91.666667%}.w-4{width:16px}.w-5{width:20px}.w-7{width:28px}.w-8{width:32px}.w-\\[100px\\]{width:100px}.w-\\[400px\\]{width:400px}.w-\\[44px\\]{width:44px}.w-\\[90vw\\]{width:90vw}.w-\\[calc\\(var\\(--reference-width\\)-\\(12px\\*2\\)\\)\\]{width:calc(var(--reference-width) - (12px * 2))}.w-full{width:100%}.min-w-\\[128px\\]{min-width:128px}.max-w-64{max-width:256px}.max-w-80{max-width:320px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-none{flex:none}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-\\[var\\(--kb-menu-content-transform-origin\\)\\]{transform-origin:var(--kb-menu-content-transform-origin)}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes content-hide{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}.animate-content-hide{animation:content-hide .2s ease-out}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:2px}.gap-1\\.5{gap:6px}.gap-2{gap:8px}.gap-3{gap:12px}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(4px * var(--tw-space-x-reverse));margin-left:calc(4px * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(8px * var(--tw-space-x-reverse));margin-left:calc(8px * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(16px * var(--tw-space-x-reverse));margin-left:calc(16px * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(8px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(8px * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(16px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(16px * var(--tw-space-y-reverse))}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.text-nowrap{text-wrap:nowrap}.rounded-full{border-radius:9999px}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-l-xl{border-top-left-radius:calc(var(--radius) + 4px);border-bottom-left-radius:calc(var(--radius) + 4px)}.rounded-r-xl{border-top-right-radius:calc(var(--radius) + 4px);border-bottom-right-radius:calc(var(--radius) + 4px)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-tl-xl{border-top-left-radius:calc(var(--radius) + 4px)}.rounded-tr-xl{border-top-right-radius:calc(var(--radius) + 4px)}.border{border-width:1px}.border-t{border-top-width:1px}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.bg-background{background-color:hsl(var(--background))}.bg-black\\/50{background-color:#00000080}.bg-destructive{background-color:hsl(var(--destructive))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-200\\/40{background-color:#e2e8f066}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:4px}.p-3{padding:12px}.p-4{padding:16px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:4px;padding-right:4px}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-8{padding-left:32px;padding-right:32px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:4px;padding-bottom:4px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2{padding-top:8px;padding-bottom:8px}.py-4{padding-top:16px;padding-bottom:16px}.py-6{padding-top:24px;padding-bottom:24px}.pb-1{padding-bottom:4px}.pb-2{padding-bottom:8px}.pb-\\[max\\(1rem\\,env\\(safe-area-inset-bottom\\)\\)\\]{padding-bottom:max(1rem,env(safe-area-inset-bottom))}.pl-3{padding-left:12px}.pl-8{padding-left:32px}.pr-1{padding-right:4px}.pr-2{padding-right:8px}.pt-1{padding-top:4px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-\\[12\\.8px\\]{font-size:12.8px}.text-base{font-size:16px}.text-lg{font-size:18px}.text-sm{font-size:14px}.text-xs{font-size:12px}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-80{opacity:.8}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-primary\\/40{--tw-shadow-color: hsl(var(--primary) / .4);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-150{transition-delay:.15s}.delay-300{transition-delay:.3s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-80{--tw-enter-opacity: .8}.duration-300{animation-duration:.3s}.delay-150{animation-delay:.15s}.delay-300{animation-delay:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}#smarttalks-widget{--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 346.8 77.2% 49.8%;--radius: 8px}.st-fullscreen{position:fixed!important;top:env(safe-area-inset-top)!important;left:env(safe-area-inset-left)!important;right:env(safe-area-inset-right)!important;bottom:env(safe-area-inset-bottom)!important;width:100dvw!important;height:100dvh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important;z-index:2147483647!important}@supports not (height: 100dvh){.st-fullscreen{inset:0!important;width:100vw!important;height:100vh!important}}@media (max-width: 640px){.container{padding-left:16px;padding-right:16px}}::-webkit-scrollbar{width:8px;height:6.4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:var(--radius);--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-base::file-selector-button{font-size:16px}.file\\:font-medium::file-selector-button{font-weight:500}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-x-0:after{content:var(--tw-content);left:0;right:0}.after\\:top-full:after{content:var(--tw-content);top:100%}.after\\:h-\\[50\\%\\]:after{content:var(--tw-content);height:50%}.after\\:bg-inherit:after{content:var(--tw-content);background-color:inherit}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-accent\\/10:hover{background-color:hsl(var(--accent) / .1)}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\\:bg-green-400:hover{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.hover\\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-primary:hover{--tw-shadow-color: hsl(var(--primary));--tw-shadow: var(--tw-shadow-colored)}.hover\\:brightness-50:hover{--tw-brightness: brightness(.5);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\\:brightness-75:hover{--tw-brightness: brightness(.75);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-\\[1\\.5px\\]:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1.5px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-primary:focus-visible{--tw-ring-color: hsl(var(--primary))}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.has-\\[\\[data-range-end\\]\\]\\:rounded-r-md:has([data-range-end]){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.has-\\[\\[data-range-start\\]\\]\\:rounded-l-md:has([data-range-start]){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.has-\\[\\[data-in-range\\]\\]\\:bg-accent:has([data-in-range]){background-color:hsl(var(--accent))}.has-\\[\\[data-outside-range\\]\\[data-in-range\\]\\]\\:bg-accent\\/50:has([data-outside-range][data-in-range]){background-color:hsl(var(--accent) / .5)}.has-\\[\\[data-in-range\\]\\]\\:first-of-type\\:rounded-l-md:first-of-type:has([data-in-range]){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.has-\\[\\[data-in-range\\]\\]\\:last-of-type\\:rounded-r-md:last-of-type:has([data-in-range]){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}@keyframes content-show{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.data-\\[expanded\\]\\:animate-content-show[data-expanded]{animation:content-show .2s ease-out}.data-\\[selected\\]\\:bg-primary[data-selected]{background-color:hsl(var(--primary))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open],.data-\\[today\\]\\:bg-accent[data-today]{background-color:hsl(var(--accent))}.data-\\[disabled\\]\\:text-muted-foreground[data-disabled],.data-\\[outside-range\\]\\:text-muted-foreground[data-outside-range]{color:hsl(var(--muted-foreground))}.data-\\[selected\\]\\:text-primary-foreground[data-selected]{color:hsl(var(--primary-foreground))}.data-\\[today\\]\\:text-accent-foreground[data-today]{color:hsl(var(--accent-foreground))}.data-\\[disabled\\]\\:opacity-50[data-disabled],.data-\\[outside-range\\]\\:opacity-50[data-outside-range]{opacity:.5}.data-\\[selected\\]\\:opacity-100[data-selected]{opacity:1}.data-\\[transitioning\\]\\:transition-colors[data-transitioning]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.data-\\[transitioning\\]\\:transition-transform[data-transitioning]{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.data-\\[transitioning\\]\\:duration-300[data-transitioning]{transition-duration:.3s}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[transitioning\\]\\:duration-300[data-transitioning]{animation-duration:.3s}.data-\\[selected\\]\\:hover\\:bg-primary:hover[data-selected]{background-color:hsl(var(--primary))}.data-\\[selected\\]\\:hover\\:text-primary-foreground:hover[data-selected]{color:hsl(var(--primary-foreground))}@media (min-width: 640px){.sm\\:text-left{text-align:left}}@media (min-width: 768px){.md\\:bottom-5{bottom:20px}.md\\:h-\\[min\\(100vh\\,500px\\)\\]{height:min(100vh,500px)}.md\\:max-h-\\[90\\%\\]{max-height:90%}.md\\:w-\\[400px\\]{width:400px}.md\\:w-\\[min\\(100vw\\,425px\\)\\]{width:min(100vw,425px)}.md\\:max-w-\\[90\\%\\]{max-width:90%}.md\\:select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.md\\:rounded-xl{border-radius:calc(var(--radius) + 4px)}.md\\:text-lg{font-size:18px}.md\\:text-sm{font-size:14px}.md\\:file\\:text-sm::file-selector-button{font-size:14px}}.\\[\\&\\:is\\(\\[data-outside-range\\]\\[data-in-range\\]\\)\\]\\:bg-accent\\/50:is([data-outside-range][data-in-range]){background-color:hsl(var(--accent) / .5)}.\\[\\&\\:is\\(\\[data-outside-range\\]\\[data-in-range\\]\\)\\]\\:text-muted-foreground:is([data-outside-range][data-in-range]){color:hsl(var(--muted-foreground))}.\\[\\&\\:is\\(\\[data-outside-range\\]\\[data-in-range\\]\\)\\]\\:opacity-30:is([data-outside-range][data-in-range]){opacity:.3}.\\[\\&\\:is\\(\\[data-today\\]\\[data-selected\\]\\)\\]\\:bg-primary:is([data-today][data-selected]){background-color:hsl(var(--primary))}.\\[\\&\\:is\\(\\[data-today\\]\\[data-selected\\]\\)\\]\\:text-primary-foreground:is([data-today][data-selected]){color:hsl(var(--primary-foreground))}',[Go,sr]=O(!1),Yo=[],jl=e=>Yo.push(e),Xo=()=>{Yo.forEach(e=>e())},ql=()=>{const e=!Go();sr(e),ee("onToggle"),ee(e?"onOpen":"onClose"),Xo()},Hl=()=>{sr(!1),ee("onClose")},Wl=()=>{sr(!0),ee("onOpen"),Xo()},Jo=()=>({bubble:Go,show:Wl,hide:Hl,toggle:ql,onOpen:jl}),ar=Symbol("store-raw"),yt=Symbol("store-node"),je=Symbol("store-has"),Zo=Symbol("store-self");function Qo(e){let t=e[be];if(!t&&(Object.defineProperty(e,be,{value:t=new Proxy(e,Xl)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,i=n.length;o<i;o++){const s=n[o];r[s].get&&Object.defineProperty(e,s,{enumerable:r[s].enumerable,get:r[s].get.bind(t)})}}return t}function cn(e){let t;return e!=null&&typeof e=="object"&&(e[be]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Ft(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[ar])return n;if(!cn(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=Ft(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let l=0,c=s.length;l<c;l++)i=s[l],!a[i].get&&(o=e[i],(r=Ft(o,t))!==o&&(e[i]=r))}return e}function un(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function $t(e,t,n){if(e[t])return e[t];const[r,o]=O(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Gl(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===be||t===yt||(delete n.value,delete n.writable,n.get=()=>e[be][t]),n}function ei(e){Jn()&&$t(un(e,yt),Zo)()}function Yl(e){return ei(e),Reflect.ownKeys(e)}const Xl={get(e,t,n){if(t===ar)return e;if(t===be)return n;if(t===Gn)return ei(e),n;const r=un(e,yt),o=r[t];let i=o?o():e[t];if(t===yt||t===je||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);Jn()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=$t(r,t,i)())}return cn(i)?Qo(i):i},has(e,t){return t===ar||t===be||t===Gn||t===yt||t===je||t==="__proto__"?!0:(Jn()&&$t(un(e,je),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Yl,getOwnPropertyDescriptor:Gl};function dn(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[je]&&e[je][t]&&o!==void 0&&e[je][t].$()):(e[t]=n,e[je]&&e[je][t]&&o===void 0&&e[je][t].$());let s=un(e,yt),a;if((a=$t(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let l=e.length;l<i;l++)(a=s[l])&&a.$();(a=$t(s,"length",i))&&a.$(e.length)}(a=s[Zo])&&a.$()}function ti(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];dn(e,o,t[o])}}function Jl(e,t){if(typeof t=="function"&&(t=t(e)),t=Ft(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&dn(e,n,o)}dn(e,"length",r)}else ti(e,t)}function Nt(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let l=0;l<r.length;l++)Nt(e,[r[l]].concat(t),n);return}else if(a&&s==="function"){for(let l=0;l<e.length;l++)r(e[l],l)&&Nt(e,[l].concat(t),n);return}else if(a&&s==="object"){const{from:l=0,to:c=e.length-1,by:d=1}=r;for(let u=l;u<=c;u+=d)Nt(e,[u].concat(t),n);return}else if(t.length>1){Nt(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=Ft(i),r===void 0||cn(o)&&cn(i)&&!Array.isArray(i)?ti(o,i):dn(e,r,i))}function Zl(...[e,t]){const n=Ft(e||{}),r=Array.isArray(n),o=Qo(n);function i(...s){Ee(()=>{r&&s.length===1?Jl(n,s[0]):Nt(n,s)})}return[o,i]}function ni(e,t,n){return Be(()=>{const r=Co(e),[o,i]=Zl(r?JSON.parse(r):t);return T(()=>ko(e,JSON.stringify(o),n)),[o,i]})}function Ql(e,t,n){return Be(()=>{const r=Co(e),[o,i]=O(r?JSON.parse(r):t);return T(()=>ko(e,JSON.stringify(o()),n)),[o,i]})}const[gm,pm]=Ql("lang","en");function ec(e){return{type:"chat",_id:e._id,accountId:e.accountId,fullscreen:e.settings.fullScreen,mode:"standard",dismissable:e.settings.closeButton,avatar:e.settings.avatar,title:e.settings.title,subtitle:e.settings.subtitle,balloonMessage:e.settings.balloonMessage,openDelay:e.settings.automatedOpen?2e3:0,chat:{flowId:e.typeId},style:{width:+e.settings.style.width.replace("px",""),height:+e.settings.style.height.replace("px",""),position:"right",primary:e.settings.style.headerBackground,primaryForeground:e.settings.style.color,background:"#FAFAFA",foreground:"#000000"},showSettings:!1}}function tc(e){return{type:"form",_id:e._id,accountId:e.accountId,fullscreen:e.settings.fullScreen,mode:"static",dismissable:e.settings.closeButton,avatar:e.settings.avatar,title:e.settings.title,subtitle:e.settings.subtitle,balloonMessage:e.settings.balloonMessage,openDelay:e.settings.automatedOpen?2e3:0,form:{formId:e.typeId},style:{width:+e.settings.style.width.replace("px",""),height:+e.settings.style.height.replace("px",""),position:"right",primary:e.settings.style.headerBackground,primaryForeground:e.settings.style.color,background:"#FAFAFA",foreground:"#000000"}}}const nc=async e=>{const t=e.split("?"),n=t[0],r=t[1]?.split("&")??[];if(!n)return;console.info("fetching widget:",n);const o=`${Zt}/v1/widget/${n}`,{result:i}=await(await fetch(o,{credentials:"include"})).json();if(i.type==="flow")return ec(i);if(i.type==="entity")return tc(i);if(i.type==="chat"&&r.includes("showSettings")&&(i.showSettings=!0),(r.includes("right")||r.includes("left"))&&(i.style.position=r.includes("right")?"right":"left"),r.some(s=>s.includes("margin"))){const s=r.find(a=>a.includes("margin"));s&&(i.style.margin=Number(s.split("=")[1]??"5"))}if(r.some(s=>s.includes("mode"))){const s=r.find(a=>a.includes("mode"))?.split("=")[1];(s==="popup"||s==="static"||s==="standard")&&(i.mode=s)}return re("registerContactData",s=>{s&&Object.keys(s).length&&fetch(`${Zt}/v1/contact-data/${n}`,{credentials:"include",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).catch(console.error)}),i._id=n,i},[ri,rc]=O(""),[st]=Be(()=>il(ri,nc)),oc=()=>{if(st()?.type==="chat")return st()},ic=()=>{if(st()?.type==="form")return st()},lr=()=>{const e=st();if(e&&e.sessionId)return e.sessionId;if(typeof window<"u")return localStorage.getItem("chat_session_id")};Be(()=>T(()=>{const e=st();Ka(e),e&&(ee("onLoad"),e.sessionId&&(console.log("currentWidget.sessionId",e.sessionId),localStorage.setItem("chat_session_id",e.sessionId)))}));const ie=()=>({widgetId:ri,setWidgetId:rc,widget:st,chatWidget:oc,formWidget:ic,getSessionId:lr}),oi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ii=po,sc=(e,t)=>n=>{var r;if(t?.variants==null)return ii(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const d=n?.[c],u=i?.[c];if(d===null)return null;const h=oi(d)||oi(u);return o[c][h]}),a=n&&Object.entries(n).reduce((c,d)=>{let[u,h]=d;return h===void 0||(c[u]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:u,className:h,...m}=d;return Object.entries(m).every(f=>{let[g,p]=f;return Array.isArray(p)?p.includes({...i,...a}[g]):{...i,...a}[g]===p})?[...c,u,h]:c},[]);return ii(e,s,l,n?.class,n?.className)};var ac=D("<button>");const lc=sc("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}}),ke=e=>{const[,t]=j(e,["variant","size","class"]);return(()=>{var n=ac();return ot(n,L({get class(){return Ye(lc({variant:e.variant,size:e.size}),e.class)}},t),!1,!1),n})()};var cc=D('<img alt="widget logo">');const si=e=>{const[,t]=j(e,["class","src"]);return(()=>{var n=cc();return ot(n,L({get src(){return e.src??"/src/assets/izi.jpeg"},get class(){return Ye("size-14 bg-transparent rounded-full",e.class)}},t),!1,!1),n})()};var uc=D('<div class="flex space-x-4"><div class="flex flex-col"><span class="font-bold md:text-lg"></span><span class="text-xs md:text-sm truncate">');const dc=()=>{const{chatWidget:e}=ie(),t=()=>e()?.title?(e()?.title?.length||0)>24?`${e()?.title?.slice(0,21)}...`:e()?.title:"SmartTalks.ai",n=()=>e()?.subtitle?(e()?.subtitle?.length||0)>30?`${e()?.subtitle?.slice(0,27)}...`:e()?.subtitle:"Chat";return(()=>{var r=uc(),o=r.firstChild,i=o.firstChild,s=i.nextSibling;return A(r,y(si,{get src(){return e()?.avatar}}),o),A(i,t),A(s,n),r})()};var fc=D("<svg stroke-width=0>");function we(e,t){const n=L(e.a,t),[r,o]=j(n,["src"]),[i,s]=O(""),a=_(()=>t.title?`${e.c}<title>${t.title}</title>`:e.c);return T(()=>s(a())),K(()=>{s("")}),(()=>{var l=fc();return ot(l,L({get stroke(){return e.a?.stroke},get color(){return t.color||"currentColor"},get fill(){return t.color||"currentColor"},get style(){return{...t.style,overflow:"visible"}}},o,{get height(){return t.size||"1em"},get width(){return t.size||"1em"},xmlns:"http://www.w3.org/2000/svg",get innerHTML(){return i()}}),!0,!0),A(l,()=>Fl),l})()}function hc(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path fill-rule="evenodd" d="M12.75 8a4.5 4.5 0 0 1-8.61 1.834l-1.391.565A6.001 6.001 0 0 0 14.25 8 6 6 0 0 0 3.5 4.334V2.5H2v4l.75.75h3.5v-1.5H4.352A4.5 4.5 0 0 1 12.75 8z" clip-rule="evenodd"/>'},e)}function gc(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path fill-rule="evenodd" d="M7.444 13.832a1 1 0 1 0 1.111-1.663 1 1 0 0 0-1.11 1.662zM8 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0-5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z" clip-rule="evenodd"/>'},e)}function pc(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path fill-rule="evenodd" d="M13.917 7A6.002 6.002 0 0 0 2.083 7H1.071a7.002 7.002 0 0 1 13.858 0h-1.012z" clip-rule="evenodd"/>'},e)}function mc(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path d="m1 1.91.78-.41L15 7.449v.95L1.78 14.33 1 13.91 2.583 8 1 1.91ZM3.612 8.5 2.33 13.13 13.5 7.9 2.33 2.839l1.282 4.6L9 7.5v1H3.612Z"/>'},e)}const cr={equals:!1};function ai(e){return(...t)=>{for(const n of e)n&&n(...t)}}function yc(e){return(...t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n];r&&r(...t)}}}const S=e=>typeof e=="function"&&!e.length?e():e,li=e=>Array.isArray(e)?e:e?[e]:[];function bc(e,...t){return typeof e=="function"?e(...t):e}const wc=K;function vc(e,t,n,r){return e.addEventListener(t,n,r),wc(e.removeEventListener.bind(e,t,n,r))}function xc(e,t,n,r){const o=()=>{li(S(e)).forEach(i=>{i&&li(S(t)).forEach(s=>vc(i,s,n,r))})};typeof e=="function"?T(o):te(o)}function fn(){return!0}const Sc={get(e,t,n){return t===be?n:e.get(t)},has(e,t){return e.has(t)},set:fn,deleteProperty:fn,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:fn,deleteProperty:fn}},ownKeys(e){return e.keys()}},Ec=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function ci(e){const t={};let n;for(;n=Ec.exec(e);)t[n[1]]=n[2];return t}function kc(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=ci(e)}else typeof t=="string"&&(t=ci(t));return{...e,...t}}const ur=(e,t,n)=>{let r;for(const o of e){const i=S(o)[t];r?i&&(r=n(r,i)):r=i}return r};function Cc(...e){const t=Array.isArray(e[0]),n=t?e[0]:e;if(n.length===1)return n[0];const r=t&&e[1]?.reverseEventHandlers?yc:ai,o={};for(const s of n){const a=S(s);for(const l in a)if(l[0]==="o"&&l[1]==="n"&&l[2]){const c=a[l],d=l.toLowerCase(),u=typeof c=="function"?c:Array.isArray(c)?c.length===1?c[0]:c[0].bind(void 0,c[1]):void 0;u?o[d]?o[d].push(u):o[d]=[u]:delete o[d]}}const i=L(...n);return new Proxy({get(s){if(typeof s!="string")return Reflect.get(i,s);if(s==="style")return ur(n,"style",kc);if(s==="ref"){const a=[];for(const l of n){const c=S(l)[s];typeof c=="function"&&a.push(c)}return r(a)}if(s[0]==="o"&&s[1]==="n"&&s[2]){const a=o[s.toLowerCase()];return a?r(a):Reflect.get(i,s)}return s==="class"||s==="className"?ur(n,s,(a,l)=>`${a} ${l}`):s==="classList"?ur(n,s,(a,l)=>({...a,...l})):Reflect.get(i,s)},has(s){return Reflect.has(i,s)},keys(){return Object.keys(i)}},Sc)}function at(...e){return ai(e)}function Oc(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function dr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _c(e){return typeof e=="number"}function Pc(e){return Array.isArray(e)}function bt(e){return Object.prototype.toString.call(e)==="[object String]"}function Ac(e){return typeof e=="function"}function ui(e){return t=>`${e()}-${t}`}function Le(e,t){return e?e===t||e.contains(t):!1}function Kt(e,t=!1){const{activeElement:n}=qe(e);if(!n?.nodeName)return null;if(di(n)&&n.contentDocument)return Kt(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=qe(n).getElementById(r);if(o)return o}}return n}function qe(e){return e?e.ownerDocument||e:document}function di(e){return e.tagName==="IFRAME"}var fi=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(fi||{});function fr(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function hn(){return fr(/^Mac/i)}function Tc(){return fr(/^iPhone/i)}function Lc(){return fr(/^iPad/i)||hn()&&navigator.maxTouchPoints>1}function Mc(){return Tc()||Lc()}function Dc(){return hn()||Mc()}function ge(e,t){return t&&(Ac(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function ve(e){return t=>{for(const n of e)ge(t,n)}}function Ic(e){return hn()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function de(e){if(e)if(Rc())e.focus({preventScroll:!0});else{const t=Fc(e);e.focus(),$c(t)}}var gn=null;function Rc(){if(gn==null){gn=!1;try{document.createElement("div").focus({get preventScroll(){return gn=!0,!0}})}catch{}}return gn}function Fc(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function $c(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var hi=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],Nc=[...hi,'[tabindex]:not([tabindex="-1"]):not([disabled])'],hr=`${hi.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,Kc=Nc.join(':not([hidden]):not([tabindex="-1"]),');function gi(e,t){const r=Array.from(e.querySelectorAll(hr)).filter(pi);return t&&pi(e)&&r.unshift(e),r.forEach((o,i)=>{if(di(o)&&o.contentDocument){const s=o.contentDocument.body,a=gi(s,!1);r.splice(i,1,...a)}}),r}function pi(e){return mi(e)&&!zc(e)}function mi(e){return e.matches(hr)&&gr(e)}function zc(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function gr(e,t){return e.nodeName!=="#comment"&&Bc(e)&&Vc(e,t)&&(!e.parentElement||gr(e.parentElement,e))}function Bc(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function Vc(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Uc(e,t,n){const r=t?.tabbable?Kc:hr,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&gr(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function yi(e){let t=e;for(;t&&!jc(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function jc(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function qc(){}function Hc(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,l=s-1;a<s;l=a++){const[c,d]=t[a],[u,h]=t[l],[,m]=t[l===0?s-1:l-1]||[0,0],f=(d-h)*(n-c)-(c-u)*(r-d);if(h<d){if(r>=h&&r<d){if(f===0)return!0;f>0&&(r===h?r>m&&(o=!o):o=!o)}}else if(d<h){if(r>d&&r<=h){if(f===0)return!0;f<0&&(r===h?r<m&&(o=!o):o=!o)}}else if(r===d&&(n>=u&&n<=c||n>=c&&n<=u))return!0}return o}function Me(e,t){return L(e,t)}var zt=new Map,bi=new Set;function wi(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=zt.get(n.target);r||(r=new Set,zt.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=zt.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),zt.delete(n.target)),zt.size===0)){for(const o of bi)o();bi.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?wi():document.addEventListener("DOMContentLoaded",wi));function pr(e,t){const n=vi(e,t,"left"),r=vi(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const l=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>l&&(s+=n+o-l),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function vi(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function Wc(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=yi(e);for(;e&&o&&e!==n&&o!==n;)pr(o,e),e=o,o=yi(e)}else{const{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:s,top:a}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var Gc={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function mr(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=l=>{if(l==null)return"";const c=e.getKey??"key",d=bt(c)?l[c]:c(l);return d!=null?String(d):""},i=l=>{if(l==null)return"";const c=e.getTextValue??"textValue",d=bt(c)?l[c]:c(l);return d!=null?String(d):""},s=l=>{if(l==null)return!1;const c=e.getDisabled??"disabled";return(bt(c)?l[c]:c(l))??!1},a=l=>{if(l!=null)return bt(e.getSectionChildren)?l[e.getSectionChildren]:e.getSectionChildren?.(l)};for(const l of e.dataSource){if(bt(l)||_c(l)){r.push({type:"item",rawValue:l,key:String(l),textValue:String(l),disabled:s(l),level:n,index:t}),t++;continue}if(a(l)!=null){r.push({type:"section",rawValue:l,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(l)??[];if(c.length>0){const d=mr({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...d),t+=d.length}}else r.push({type:"item",rawValue:l,key:o(l),textValue:i(l),disabled:s(l),level:n,index:t}),t++}return r}/*!
|
|
1
|
+
(function(Tt){typeof define=="function"&&define.amd?define(Tt):Tt()})(function(){"use strict";function Tt(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Tt(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function po(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Tt(e))&&(r&&(r+=" "),r+=t);return r}const jn="-",aa=e=>{const t=ca(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(jn);return a[0]===""&&a.length!==1&&a.shift(),mo(a,t)||la(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},mo=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?mo(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(jn);return t.validators.find(({validator:s})=>s(i))?.classGroupId},yo=/^\[(.+)\]$/,la=e=>{if(yo.test(e)){const t=yo.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ca=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return da(Object.entries(e.classGroups),n).forEach(([i,s])=>{qn(s,r,i,t)}),r},qn=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:bo(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(ua(o)){qn(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{qn(s,bo(t,i),n,r)})})},bo=(e,t)=>{let n=e;return t.split(jn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ua=e=>e.isThemeGetter,da=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e,fa=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},wo="!",ha=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=a=>{const l=[];let c=0,d=0,u;for(let m=0;m<a.length;m++){let b=a[m];if(c===0){if(b===o&&(r||a.slice(m,m+i)===t)){l.push(a.slice(d,m)),d=m+i;continue}if(b==="/"){u=m;continue}}b==="["?c++:b==="]"&&c--}const f=l.length===0?a:a.substring(d),g=f.startsWith(wo),h=g?f.substring(1):f,p=u&&u>d?u-d:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:h,maybePostfixModifierPosition:p}};return n?a=>n({className:a,parseClassName:s}):s},ga=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},pa=e=>({cache:fa(e.cacheSize),parseClassName:ha(e),...aa(e)}),ma=/\s+/,ya=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(ma);let a="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:d,hasImportantModifier:u,baseClassName:f,maybePostfixModifierPosition:g}=n(c);let h=!!g,p=r(h?f.substring(0,g):f);if(!p){if(!h){a=c+(a.length>0?" "+a:a);continue}if(p=r(f),!p){a=c+(a.length>0?" "+a:a);continue}h=!1}const m=ga(d).join(":"),b=u?m+wo:m,w=b+p;if(i.includes(w))continue;i.push(w);const v=o(p,h);for(let x=0;x<v.length;++x){const _=v[x];i.push(b+_)}a=c+(a.length>0?" "+a:a)}return a};function ba(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=vo(t))&&(r&&(r+=" "),r+=n);return r}const vo=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=vo(e[r]))&&(n&&(n+=" "),n+=t);return n};function wa(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((d,u)=>u(d),e());return n=pa(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=ya(l,n);return o(l,d),d}return function(){return i(ba.apply(null,arguments))}}const X=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},xo=/^\[(?:([a-z-]+):)?(.+)\]$/i,va=/^\d+\/\d+$/,xa=new Set(["px","full","screen"]),Sa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ka=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ea=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ca=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Oa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ne=e=>ut(e)||xa.has(e)||va.test(e),He=e=>dt(e,"length",Ia),ut=e=>!!e&&!Number.isNaN(Number(e)),Hn=e=>dt(e,"number",ut),Lt=e=>!!e&&Number.isInteger(Number(e)),_a=e=>e.endsWith("%")&&ut(e.slice(0,-1)),N=e=>xo.test(e),We=e=>Sa.test(e),Pa=new Set(["length","size","percentage"]),Aa=e=>dt(e,Pa,So),Ta=e=>dt(e,"position",So),La=new Set(["image","url"]),Ma=e=>dt(e,La,Fa),Da=e=>dt(e,"",Ra),Mt=()=>!0,dt=(e,t,n)=>{const r=xo.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Ia=e=>ka.test(e)&&!Ea.test(e),So=()=>!1,Ra=e=>Ca.test(e),Fa=e=>Oa.test(e),$a=wa(()=>{const e=X("colors"),t=X("spacing"),n=X("blur"),r=X("brightness"),o=X("borderColor"),i=X("borderRadius"),s=X("borderSpacing"),a=X("borderWidth"),l=X("contrast"),c=X("grayscale"),d=X("hueRotate"),u=X("invert"),f=X("gap"),g=X("gradientColorStops"),h=X("gradientColorStopPositions"),p=X("inset"),m=X("margin"),b=X("opacity"),w=X("padding"),v=X("saturate"),x=X("scale"),_=X("sepia"),E=X("skew"),k=X("space"),F=X("translate"),P=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",N,t],I=()=>[N,t],re=()=>["",Ne,He],Y=()=>["auto",ut,N],fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",N],At=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Ae=()=>[ut,N];return{cacheSize:500,separator:":",theme:{colors:[Mt],spacing:[Ne,He],blur:["none","",We,N],brightness:Ae(),borderColor:[e],borderRadius:["none","","full",We,N],borderSpacing:I(),borderWidth:re(),contrast:Ae(),grayscale:se(),hueRotate:Ae(),invert:se(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[_a,He],inset:M(),margin:M(),opacity:Ae(),padding:I(),saturate:Ae(),scale:Ae(),sepia:se(),skew:Ae(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",N]}],container:["container"],columns:[{columns:[We]}],"break-after":[{"break-after":At()}],"break-before":[{"break-before":At()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...fe(),N]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Lt,N]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",Lt,N]}],"grid-cols":[{"grid-cols":[Mt]}],"col-start-end":[{col:["auto",{span:["full",Lt,N]},N]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[Mt]}],"row-start-end":[{row:["auto",{span:[Lt,N]},N]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N,t]}],"min-w":[{"min-w":[N,t,"min","max","fit"]}],"max-w":[{"max-w":[N,t,"none","full","min","max","fit","prose",{screen:[We]},We]}],h:[{h:[N,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N,t,"auto","min","max","fit"]}],"font-size":[{text:["base",We,He]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hn]}],"font-family":[{font:[Mt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",N]}],"line-clamp":[{"line-clamp":["none",ut,Hn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ne,N]}],"list-image":[{"list-image":["none",N]}],"list-style-type":[{list:["none","disc","decimal",N]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ne,He]}],"underline-offset":[{"underline-offset":["auto",Ne,N]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...fe(),Ta]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Aa]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ma]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:$()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[Ne,N]}],"outline-w":[{outline:[Ne,He]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Ne,He]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",We,Da]}],"shadow-color":[{shadow:[Mt]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",We,N]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[v]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N]}],duration:[{duration:Ae()}],ease:[{ease:["linear","in","out","in-out",N]}],delay:[{delay:Ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",N]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Lt,N]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ne,He,Hn]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function Ge(...e){return $a(po(e))}function Na(e){try{if(!e)return;const t=document.querySelector(":root");if(!t)throw new Error("could not find root layer");console.log("loading theme for",e.title),e.style.primary&&t.style.setProperty("--primary",Xt(e.style.primary)),e.style.primaryForeground&&t.style.setProperty("--primary-foreground",Xt(e.style.primaryForeground)),e.style.background&&t.style.setProperty("--background",Xt(e.style.background)),e.style.foreground&&t.style.setProperty("--foreground",Xt(e.style.foreground))}catch(t){console.error("failed to load widget theme",t)}}function Xt(e){e.length>=8&&(e=e.substring(0,7));let t=0,n=0,r=0;e.length==4?(t="0x"+e[1]+e[1],n="0x"+e[2]+e[2],r="0x"+e[3]+e[3]):e.length==7&&(t="0x"+e[1]+e[2],n="0x"+e[3]+e[4],r="0x"+e[5]+e[6]),t/=255,n/=255,r/=255;let o=Math.min(t,n,r),i=Math.max(t,n,r),s=i-o,a=0,l=0,c=0;return s==0?a=0:i==t?a=(n-r)/s%6:i==n?a=(r-t)/s+2:a=(t-n)/s+4,a=Math.round(a*60),a<0&&(a+=360),c=(i+o)/2,l=s==0?0:s/(1-Math.abs(2*c-1)),l=+(l*100).toFixed(1),c=+(c*100).toFixed(1),a+","+l+"%,"+c+"%"}function Ka(e){if(e.includes("<a")||e.includes("</a>")||e.includes('href="')||e.includes('target="_blank"'))return e;const t=/(https?\:\/\/)(www\.)?[^\s]+\.[^\s\<]+/g;return e.replace(t,n=>{let r=n;return n.includes("<br>")?n:(r.startsWith("http")||(r="http://"+n),`<a class="underline" href="${r}" target="_blank">${n}</a>`)})}function za(e){return e&&e.replace(/\n/gm,"<br>").replace(/(?:\*)([^*]*)(?:\*)/gm,"<strong>$1</strong>").replace(/(?:_)([^_]*)(?:_)/gm,"<i>$1</i>").replace(/(?:~)([^~]*)(?:~)/gm,"<strike>$1</strike>").replace(/(?:```)([^```]*)(?:```)/gm,"<tt>$1</tt>")}function Jt(){const e=document.querySelector("smarttalks-widget");let t;if(e?t=e.shadowRoot?.getElementById("smarttalks-widget"):t=document.getElementById("smarttalks-widget"),!t)throw new Error("could not find widget element");return t}const Ba={en:{inputPlaceholder:"Type your message here...",emptyMessages:"No messages yet...",selectOption:"Select an option",send:"Send",restart:"Restart"},pt:{inputPlaceholder:"Escreva sua mensagem aqui...",emptyMessages:"Nenhuma mensagem ainda...",selectOption:"Selecione uma opção",send:"Enviar",restart:"Reiniciar"},es:{inputPlaceholder:"Escribe tu mensaje aqui...",emptyMessages:"No hay mensajes aún...",selectOption:"Seleccione una opción",send:"Enviar",restart:"Reiniciar"}};function ft(e){const t=navigator.language?.toLowerCase();let n="en";return(t==="pt-br"||t.includes("pt"))&&(n="pt"),(t==="es-es"||t.includes("es"))&&(n="es"),Ba[n][e]}const Zt="https://heimdall.smarttalks.ai/api",Va="wss://heimdall.smarttalks.ai",ko="smarttalkswidget";function ee(e,...t){window.postMessage({from:ko,command:e,args:t})}function ne(e,t){window.addEventListener("message",n=>{n.data?.from===ko&&n.data?.command===e&&(n.stopImmediatePropagation(),console.info("received command:",e),t(...n.data.args||[]))})}function Ua(){typeof window<"u"&&(window.SmartTalksWidget={registerContactData:e=>{ee("registerContactData",e)},open:e=>{ee("open"),e&&ee("setInput",e)},close:()=>{ee("close")},toggle:()=>{ee("toggle")},toggleFullscreen:()=>{ee("toggleFullscreen")},reset:()=>{ee("reset")},onOpen:e=>{ne("onOpen",e)},onClose:e=>{ne("onClose",e)},onToggle:e=>{ne("onToggle",e)},onReset:e=>{ne("onReset",e)},onInput:e=>{ne("onInput",e)},onAnswer:e=>{ne("onAnswer",e)},onLoad:e=>{ne("onLoad",e)}})}function Eo(e,t,n=0){localStorage.setItem(e,JSON.stringify({value:t,ttl:new Date().getTime()+n}))}function Co(e){const t=localStorage.getItem(e);if(!t)return null;const n=JSON.parse(t),r=new Date;return n.ttl!==0&&r.getTime()>n.ttl?(localStorage.removeItem(e),null):n.value}function ja(e){return Object.keys(e).reduce((n,r)=>{const o=e[r];return n[r]=Object.assign({},o),Po(o.value)&&!Ya(o.value)&&!Array.isArray(o.value)&&(n[r].value=Object.assign({},o.value)),Array.isArray(o.value)&&(n[r].value=o.value.slice(0)),n},{})}function qa(e){return e?Object.keys(e).reduce((n,r)=>{const o=e[r];return n[r]=Po(o)&&"value"in o?o:{value:o},n[r].attribute||(n[r].attribute=Ga(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function Ha(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function Wa(e,t){const n=ja(t);return Object.keys(t).forEach(o=>{const i=n[o],s=e.getAttribute(i.attribute),a=e[o];s!=null&&(i.value=i.parse?Oo(s):s),a!=null&&(i.value=Array.isArray(a)?a.slice(0):a),i.reflect&&_o(e,i.attribute,i.value,!!i.parse),Object.defineProperty(e,o,{get(){return i.value},set(l){const c=i.value;i.value=l,i.reflect&&_o(this,i.attribute,i.value,!!i.parse);for(let d=0,u=this.__propertyChangedCallbacks.length;d<u;d++)this.__propertyChangedCallbacks[d](o,l,c)},enumerable:!0,configurable:!0})}),n}function Oo(e){if(e)try{return JSON.parse(e)}catch{return e}}function _o(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let o=r?JSON.stringify(n):n;e.__updating[t]=!0,o==="true"&&(o=""),e.setAttribute(t,o),Promise.resolve().then(()=>delete e.__updating[t])}function Ga(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function Po(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function Ya(e){return Object.prototype.toString.call(e)==="[object Function]"}function Xa(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let Wn;function Ja(e,t){const n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(o=>t[o].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=Wa(this,t);const o=Ha(this.props),i=this.Component,s=Wn;try{Wn=this,this.__initialized=!0,Xa(i)?new i(o,{element:this}):i(o,{element:this})}finally{Wn=s}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let o=null;for(;o=this.__releaseCallbacks.pop();)o(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(o,i,s){if(this.__initialized&&!this.__updating[o]&&(o=this.lookupProp(o),o in t)){if(s==null&&!this[o])return;this[o]=t[o].parse?Oo(s):s}}lookupProp(o){if(t)return n.find(i=>o===i||o===t[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(o){this.__releaseCallbacks.push(o)}addPropertyChangedCallback(o){this.__propertyChangedCallbacks.push(o)}}}function Za(e,t={},n={}){const{BaseElement:r=HTMLElement,extension:o,customElements:i=window.customElements}=n;return s=>{let a=i.get(e);return a?(a.prototype.Component=s,a):(a=Ja(r,qa(t)),a.prototype.Component=s,a.prototype.registeredTag=e,i.define(e,a,o),a)}}const z={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Ao(this.context.count)},getNextContextId(){return Ao(this.context.count++)}};function Ao(e){const t=String(e),n=t.length-1;return z.context.id+(n?String.fromCharCode(96+n):"")+t}function Qa(e){z.context=e}const el=!1,tl=(e,t)=>e===t,be=Symbol("solid-proxy"),To=typeof Proxy=="function",Gn=Symbol("solid-track"),Qt={equals:tl};let Lo=$o;const Ke=1,en=2,Mo={owned:null,cleanups:null,context:null,owner:null},Yn={};var q=null;let Xn=null,nl=null,W=null,ae=null,ze=null,tn=0;function Be(e,t){const n=W,r=q,o=e.length===0,i=t===void 0?r:t,s=o?Mo:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>H(()=>Dt(s)));q=s,W=null;try{return Ve(a,!0)}finally{W=n,q=r}}function O(e,t){t=t?Object.assign({},Qt,t):Qt;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Fo(n,o));return[Ro.bind(n),r]}function Do(e,t,n){const r=nn(e,t,!0,Ke);gt(r)}function oe(e,t,n){const r=nn(e,t,!1,Ke);gt(r)}function T(e,t,n){Lo=cl;const r=nn(e,t,!1,Ke);(!n||!n.render)&&(r.user=!0),ze?ze.push(r):gt(r)}function C(e,t,n){n=n?Object.assign({},Qt,n):Qt;const r=nn(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,gt(r),Ro.bind(r)}function rl(e){return e&&typeof e=="object"&&"then"in e}function ol(e,t,n){let r,o,i;typeof t=="function"?(r=e,o=t,i={}):(r=!0,o=e,i=t||{});let s=null,a=Yn,l=null,c=!1,d="initialValue"in i,u=typeof r=="function"&&C(r);const f=new Set,[g,h]=(i.storage||O)(i.initialValue),[p,m]=O(void 0),[b,w]=O(void 0,{equals:!1}),[v,x]=O(d?"ready":"unresolved");z.context&&(l=z.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:z.load&&z.has(l)&&(a=z.load(l)));function _(P,R,M,I){return s===P&&(s=null,I!==void 0&&(d=!0),(P===a||R===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(I,{value:R})),a=Yn,E(R,M)),R}function E(P,R){Ve(()=>{R===void 0&&h(()=>P),x(R!==void 0?"errored":d?"ready":"unresolved"),m(R);for(const M of f.keys())M.decrement();f.clear()},!1)}function k(){const P=sl,R=g(),M=p();if(M!==void 0&&!s)throw M;return W&&W.user,R}function F(P=!0){if(P!==!1&&c)return;c=!1;const R=u?u():r;if(R==null||R===!1){_(s,H(g));return}const M=a!==Yn?a:H(()=>o(R,{value:g(),refetching:P}));return rl(M)?(s=M,"value"in M?(M.status==="success"?_(s,M.value,void 0,R):_(s,void 0,Qn(M.value),R),M):(c=!0,queueMicrotask(()=>c=!1),Ve(()=>{x(d?"refreshing":"pending"),w()},!1),M.then(I=>_(M,I,void 0,R),I=>_(M,void 0,Qn(I),R)))):(_(s,M,void 0,R),M)}return Object.defineProperties(k,{state:{get:()=>v()},error:{get:()=>p()},loading:{get(){const P=v();return P==="pending"||P==="refreshing"}},latest:{get(){if(!d)return k();const P=p();if(P&&!s)throw P;return g()}}}),u?Do(()=>F(!1)):F(!1),[k,{refetch:F,mutate:h}]}function ke(e){return Ve(e,!1)}function H(e){if(W===null)return e();const t=W;W=null;try{return e()}finally{W=t}}function tt(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const l=H(()=>t(a,o,s));return o=a,l}}function ht(e){T(()=>H(e))}function K(e){return q===null||(q.cleanups===null?q.cleanups=[e]:q.cleanups.push(e)),e}function Jn(){return W}function Io(){return q}function il(e,t){const n=q,r=W;q=e,W=null;try{return Ve(t,!0)}catch(o){er(o)}finally{q=n,W=r}}function ce(e,t){const n=Symbol("context");return{id:n,Provider:ul(n),defaultValue:e}}function he(e){let t;return q&&q.context&&(t=q.context[e.id])!==void 0?t:e.defaultValue}function Zn(e){const t=C(e),n=C(()=>tr(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let sl;function Ro(){if(this.sources&&this.state)if(this.state===Ke)gt(this);else{const e=ae;ae=null,Ve(()=>on(this),!1),ae=e}if(W){const e=this.observers?this.observers.length:0;W.sources?(W.sources.push(this),W.sourceSlots.push(e)):(W.sources=[this],W.sourceSlots=[e]),this.observers?(this.observers.push(W),this.observerSlots.push(W.sources.length-1)):(this.observers=[W],this.observerSlots=[W.sources.length-1])}return this.value}function Fo(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Ve(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=Xn&&Xn.running;s&&Xn.disposed.has(i),(s?!i.tState:!i.state)&&(i.pure?ae.push(i):ze.push(i),i.observers&&No(i)),s||(i.state=Ke)}if(ae.length>1e6)throw ae=[],new Error},!1)),t}function gt(e){if(!e.fn)return;Dt(e);const t=tn;al(e,e.value,t)}function al(e,t,n){let r;const o=q,i=W;W=q=e;try{r=e.fn(t)}catch(s){return e.pure&&(e.state=Ke,e.owned&&e.owned.forEach(Dt),e.owned=null),e.updatedAt=n+1,er(s)}finally{W=i,q=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Fo(e,r):e.value=r,e.updatedAt=n)}function nn(e,t,n,r=Ke,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:q,context:q?q.context:null,pure:n};return q===null||q!==Mo&&(q.owned?q.owned.push(i):q.owned=[i]),i}function rn(e){if(e.state===0)return;if(e.state===en)return on(e);if(e.suspense&&H(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<tn);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Ke)gt(e);else if(e.state===en){const r=ae;ae=null,Ve(()=>on(e,t[0]),!1),ae=r}}function Ve(e,t){if(ae)return e();let n=!1;t||(ae=[]),ze?n=!0:ze=[],tn++;try{const r=e();return ll(n),r}catch(r){n||(ze=null),ae=null,er(r)}}function ll(e){if(ae&&($o(ae),ae=null),e)return;const t=ze;ze=null,t.length&&Ve(()=>Lo(t),!1)}function $o(e){for(let t=0;t<e.length;t++)rn(e[t])}function cl(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:rn(r)}if(z.context){if(z.count){z.effects||(z.effects=[]),z.effects.push(...e.slice(0,n));return}Qa()}for(z.effects&&(z.done||!z.count)&&(e=[...z.effects,...e],n+=z.effects.length,delete z.effects),t=0;t<n;t++)rn(e[t])}function on(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const o=r.state;o===Ke?r!==t&&(!r.updatedAt||r.updatedAt<tn)&&rn(r):o===en&&on(r,t)}}}function No(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=en,n.pure?ae.push(n):ze.push(n),n.observers&&No(n))}}function Dt(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Dt(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Dt(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Qn(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function er(e,t=q){throw Qn(e)}function tr(e){if(typeof e=="function"&&!e.length)return tr(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=tr(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function ul(e,t){return function(r){let o;return oe(()=>o=H(()=>(q.context={...q.context,[e]:r.value},Zn(()=>r.children))),void 0),o}}const dl=Symbol("fallback");function Ko(e){for(let t=0;t<e.length;t++)e[t]()}function fl(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return K(()=>Ko(i)),()=>{let l=e()||[],c=l.length,d,u;return l[Gn],H(()=>{let g,h,p,m,b,w,v,x,_;if(c===0)s!==0&&(Ko(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[dl],o[0]=Be(E=>(i[0]=E,n.fallback())),s=1);else if(s===0){for(o=new Array(c),u=0;u<c;u++)r[u]=l[u],o[u]=Be(f);s=c}else{for(p=new Array(c),m=new Array(c),a&&(b=new Array(c)),w=0,v=Math.min(s,c);w<v&&r[w]===l[w];w++);for(v=s-1,x=c-1;v>=w&&x>=w&&r[v]===l[x];v--,x--)p[x]=o[v],m[x]=i[v],a&&(b[x]=a[v]);for(g=new Map,h=new Array(x+1),u=x;u>=w;u--)_=l[u],d=g.get(_),h[u]=d===void 0?-1:d,g.set(_,u);for(d=w;d<=v;d++)_=r[d],u=g.get(_),u!==void 0&&u!==-1?(p[u]=o[d],m[u]=i[d],a&&(b[u]=a[d]),u=h[u],g.set(_,u)):i[d]();for(u=w;u<c;u++)u in p?(o[u]=p[u],i[u]=m[u],a&&(a[u]=b[u],a[u](u))):o[u]=Be(f);o=o.slice(0,s=c),r=l.slice(0)}return o});function f(g){if(i[u]=g,a){const[h,p]=O(u);return a[u]=p,t(l[u],h)}return t(l[u])}}}function y(e,t){return H(()=>e(t||{}))}function sn(){return!0}const nr={get(e,t,n){return t===be?n:e.get(t)},has(e,t){return t===be?!0:e.has(t)},set:sn,deleteProperty:sn,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:sn,deleteProperty:sn}},ownKeys(e){return e.keys()}};function rr(e){return(e=typeof e=="function"?e():e)?e:{}}function hl(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function L(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&be in a,e[s]=typeof a=="function"?(t=!0,C(a)):a}if(To&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const l=rr(e[a])[s];if(l!==void 0)return l}},has(s){for(let a=e.length-1;a>=0;a--)if(s in rr(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(rr(e[a])));return[...new Set(s)]}},nr);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const d=l[c];if(d==="__proto__"||d==="constructor")continue;const u=Object.getOwnPropertyDescriptor(a,d);if(!r[d])r[d]=u.get?{enumerable:!0,configurable:!0,get:hl.bind(n[d]=[u.get.bind(a)])}:u.value!==void 0?u:void 0;else{const f=n[d];f&&(u.get?f.push(u.get.bind(a)):u.value!==void 0&&f.push(()=>u.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],l=r[a];l&&l.get?Object.defineProperty(o,a,l):o[a]=l?l.value:void 0}return o}function j(e,...t){if(To&&be in e){const o=new Set(t.length>1?t.flat():t[0]),i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},nr));return i.push(new Proxy({get(s){return o.has(s)?void 0:e[s]},has(s){return o.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.has(s))}},nr)),i}const n={},r=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,o),s=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let a=!1,l=0;for(const c of t)c.includes(o)&&(a=!0,s?r[l][o]=i.value:Object.defineProperty(r[l],o,i)),++l;a||(s?n[o]=i.value:Object.defineProperty(n,o,i))}return[...r,n]}let gl=0;function Te(){return z.context?z.getNextContextId():`cl-${gl++}`}const zo=e=>`Stale read from <${e}>.`;function pt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return C(fl(()=>e.each,e.children,t||void 0))}function Z(e){const t=e.keyed,n=C(()=>e.when,void 0,void 0),r=t?n:C(n,void 0,{equals:(o,i)=>!o==!i});return C(()=>{const o=r();if(o){const i=e.children;return typeof i=="function"&&i.length>0?H(()=>i(t?o:()=>{if(!H(r))throw zo("Show");return n()})):i}return e.fallback},void 0,void 0)}function Bo(e){const t=Zn(()=>e.children),n=C(()=>{const r=t(),o=Array.isArray(r)?r:[r];let i=()=>{};for(let s=0;s<o.length;s++){const a=s,l=o[s],c=i,d=C(()=>c()?void 0:l.when,void 0,void 0),u=l.keyed?d:C(d,void 0,{equals:(f,g)=>!f==!g});i=()=>c()||(u()?[a,d,l]:void 0)}return i});return C(()=>{const r=n()();if(!r)return e.fallback;const[o,i,s]=r,a=s.children;return typeof a=="function"&&a.length>0?H(()=>a(s.keyed?i():()=>{if(H(n)()?.[0]!==o)throw zo("Match");return i()})):a},void 0,void 0)}function It(e){return e}const pl=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],ml=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...pl]),yl=new Set(["innerHTML","textContent","innerText","children"]),bl=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),wl=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function vl(e,t){const n=wl[e];return typeof n=="object"?n[t]?n.$:void 0:n}const xl=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Sl=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","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","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),kl={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function El(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const d=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],d)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const d=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],d),t[o]=n[i]}else{if(!c){c=new Map;let u=a;for(;u<i;)c.set(n[u],u++)}const d=c.get(t[s]);if(d!=null)if(a<d&&d<i){let u=s,f=1,g;for(;++u<o&&u<i&&!((g=c.get(t[u]))==null||g!==d+f);)f++;if(f>d-a){const h=t[s];for(;a<d;)e.insertBefore(n[a++],h)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const Vo="_$DX_DELEGATE";function D(e,t,n,r){let o;const i=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(!0);return s.cloneNode=s,s}function Cl(e,t=window.document){const n=t[Vo]||(t[Vo]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Dl))}}function ue(e,t,n){ot(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Ol(e,t,n,r){ot(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function _l(e,t,n){ot(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function nt(e,t){ot(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Pl(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function Al(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(Uo(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(Uo(e,a,!0),n[a]=l)}return n}function an(e,t,n){if(!t)return n?ue(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function rt(e,t={},n,r){const o={};return r||oe(()=>o.children=Rt(e,t.children,o.children)),oe(()=>typeof t.ref=="function"&&or(t.ref,e)),oe(()=>Tl(e,t,n,!0,o,!0)),o}function or(e,t,n){return H(()=>e(t,n))}function A(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Rt(e,t,r,n);oe(o=>Rt(e,t(),o,n),r)}function Tl(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=jo(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=jo(e,s,a,o[s],n,i,t)}}function Ll(e){let t,n;return!ot()||!(t=z.registry.get(n=Il()))?e():(z.completed&&z.completed.add(t),z.registry.delete(n),t)}function ot(e){return!!z.context&&!z.done&&(!e||e.isConnected)}function Ml(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Uo(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function jo(e,t,n,r,o,i,s){let a,l,c,d,u;if(t==="style")return an(e,n,r);if(t==="classList")return Al(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),g=xl.has(f);if(!g&&r){const h=Array.isArray(r)?r[0]:r;e.removeEventListener(f,h)}(g||n)&&(Pl(e,f,n,g),g&&Cl([f]))}else if(t.slice(0,5)==="attr:")ue(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")_l(e,t.slice(5),n);else if((u=t.slice(0,5)==="prop:")||(c=yl.has(t))||!o&&((d=vl(t,e.tagName))||(l=ml.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(u)t=t.slice(5),l=!0;else if(ot(e))return n;t==="class"||t==="className"?nt(e,n):a&&!l&&!c?e[Ml(t)]=n:e[d||t]=n}else{const f=o&&t.indexOf(":")>-1&&kl[t.split(":")[0]];f?Ol(e,f,t,n):ue(e,bl[t]||t,n)}return n}function Dl(e){if(z.registry&&z.events&&z.events.find(([l,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),s=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),z.registry&&!z.done&&(z.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();i(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function Rt(e,t,n,r,o){const i=ot(e);if(i){!n&&(n=[...e.childNodes]);let l=[];for(let c=0;c<n.length;c++){const d=n[c];d.nodeType===8&&d.data.slice(0,2)==="!$"?d.remove():l.push(d)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=mt(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=mt(e,n,r)}else{if(s==="function")return oe(()=>{let l=t();for(;typeof l=="function";)l=l();n=Rt(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(ir(l,t,n,o))return oe(()=>n=Rt(e,l,n,r,!0)),()=>n;if(i){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let d=l[0];if(d.parentNode!==e)return n;const u=[d];for(;(d=d.nextSibling)!==r;)u.push(d);return n=u}if(l.length===0){if(n=mt(e,n,r),a)return n}else c?n.length===0?qo(e,l,r):El(e,n,l):(n&&mt(e),qo(e,l));n=l}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=mt(e,n,r,t);mt(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function ir(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=ir(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=ir(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o}else e.push(a),o=!0;else{const d=String(a);l&&l.nodeType===3&&l.data===d?e.push(l):e.push(document.createTextNode(d))}}return o}function qo(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function mt(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function Il(){return z.getNextContextId()}const Rl=!1,Fl="http://www.w3.org/2000/svg";function Ho(e,t=!1){return t?document.createElementNS(Fl,e):document.createElement(e)}function Wo(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Io();let i,s=!!z.context;return T(()=>{s&&(Io().user=s=!1),i||(i=il(o,()=>C(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=O(!1),d=()=>c(!0);Be(u=>A(a,()=>l()?u():i(),null)),K(d)}else{const l=Ho(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),A(c,i),a.appendChild(l),e.ref&&e.ref(l),K(()=>a.removeChild(l))}},void 0,{render:!s}),n}function $l(e,t){const n=C(e);return C(()=>{const r=n();switch(typeof r){case"function":return H(()=>r(t));case"string":const o=Sl.has(r),i=z.context?Ll():Ho(r,o);return rt(i,t,o),i}})}function ln(e){const[,t]=j(e,["component"]);return $l(()=>e.component,t)}function Nl(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const[o,i]=O(e[t[r]]);Object.defineProperty(n,t[r],{get:o,set(s){i(()=>s)}})}return n}function Kl(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function zl(e){return(t,n)=>{const{element:r}=n;return Be(o=>{const i=Nl(t);r.addPropertyChangedCallback((a,l)=>i[a]=l),r.addReleaseCallback(()=>{r.renderRoot.textContent="",o()});const s=e(i,n);return A(r.renderRoot,s)},Kl(r))}}function Bl(e,t,n){return arguments.length===2&&(n=t,t={}),Za(e,t)(zl(n))}const Vl='*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-feature-settings:"rlig" 1,"calt" 1}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-x-0{left:0;right:0}.-top-12{top:-48px}.bottom-0{bottom:0}.bottom-5{bottom:20px}.left-0{left:0}.left-1\\/2{left:50%}.left-2{left:8px}.right-0{right:0}.top-0{top:0}.z-20{z-index:20}.z-50{z-index:50}.z-\\[99999\\]{z-index:99999}.z-\\[9999\\]{z-index:9999}.m-0{margin:0}.-mx-1{margin-left:-4px;margin-right:-4px}.mx-1{margin-left:4px;margin-right:4px}.mx-\\[-16px\\]{margin-left:-16px;margin-right:-16px}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:4px;margin-bottom:4px}.mb-1{margin-bottom:4px}.ml-1{margin-left:4px}.ml-auto{margin-left:auto}.mt-0{margin-top:0}.mt-2{margin-top:8px}.mt-24{margin-top:96px}.mt-4{margin-top:16px}.box-border{box-sizing:border-box}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.size-10{width:40px;height:40px}.size-14{width:56px;height:56px}.size-2{width:8px;height:8px}.size-3\\.5{width:14px;height:14px}.size-4{width:16px;height:16px}.size-8{width:32px;height:32px}.size-9{width:36px;height:36px}.size-full{width:100%;height:100%}.h-10{height:40px}.h-11{height:44px}.h-2{height:8px}.h-4{height:16px}.h-5{height:20px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-\\[44px\\]{height:44px}.h-\\[85vh\\]{height:85vh}.h-\\[min\\(85vh\\,700px\\)\\]{height:min(85vh,700px)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\\[120px\\]{max-height:120px}.max-h-\\[80\\%\\]{max-height:80%}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-\\[44px\\]{min-height:44px}.w-11\\/12{width:91.666667%}.w-4{width:16px}.w-5{width:20px}.w-7{width:28px}.w-8{width:32px}.w-\\[100px\\]{width:100px}.w-\\[400px\\]{width:400px}.w-\\[44px\\]{width:44px}.w-\\[90vw\\]{width:90vw}.w-\\[calc\\(var\\(--reference-width\\)-\\(12px\\*2\\)\\)\\]{width:calc(var(--reference-width) - (12px * 2))}.w-full{width:100%}.min-w-\\[128px\\]{min-width:128px}.max-w-64{max-width:256px}.max-w-80{max-width:320px}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-none{flex:none}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-\\[var\\(--kb-menu-content-transform-origin\\)\\]{transform-origin:var(--kb-menu-content-transform-origin)}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes content-hide{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}.animate-content-hide{animation:content-hide .2s ease-out}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\\.5{gap:2px}.gap-1\\.5{gap:6px}.gap-2{gap:8px}.gap-3{gap:12px}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(4px * var(--tw-space-x-reverse));margin-left:calc(4px * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(8px * var(--tw-space-x-reverse));margin-left:calc(8px * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(16px * var(--tw-space-x-reverse));margin-left:calc(16px * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(8px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(8px * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(16px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(16px * var(--tw-space-y-reverse))}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.text-nowrap{text-wrap:nowrap}.rounded-full{border-radius:9999px}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-l-xl{border-top-left-radius:calc(var(--radius) + 4px);border-bottom-left-radius:calc(var(--radius) + 4px)}.rounded-r-xl{border-top-right-radius:calc(var(--radius) + 4px);border-bottom-right-radius:calc(var(--radius) + 4px)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-tl-xl{border-top-left-radius:calc(var(--radius) + 4px)}.rounded-tr-xl{border-top-right-radius:calc(var(--radius) + 4px)}.border{border-width:1px}.border-t{border-top-width:1px}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.bg-background{background-color:hsl(var(--background))}.bg-black\\/50{background-color:#00000080}.bg-destructive{background-color:hsl(var(--destructive))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-200\\/40{background-color:#e2e8f066}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:4px}.p-3{padding:12px}.p-4{padding:16px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:4px;padding-right:4px}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-8{padding-left:32px;padding-right:32px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:4px;padding-bottom:4px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2{padding-top:8px;padding-bottom:8px}.py-3{padding-top:12px;padding-bottom:12px}.py-4{padding-top:16px;padding-bottom:16px}.py-6{padding-top:24px;padding-bottom:24px}.pb-1{padding-bottom:4px}.pb-2{padding-bottom:8px}.pb-\\[\\.\\.\\.\\]{padding-bottom:...}.pb-\\[max\\(1rem\\,env\\(safe-area-inset-bottom\\)\\)\\]{padding-bottom:max(1rem,env(safe-area-inset-bottom))}.pl-3{padding-left:12px}.pl-8{padding-left:32px}.pr-1{padding-right:4px}.pr-2{padding-right:8px}.pt-1{padding-top:4px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-\\[12\\.8px\\]{font-size:12.8px}.text-base{font-size:16px}.text-lg{font-size:18px}.text-sm{font-size:14px}.text-xs{font-size:12px}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-80{opacity:.8}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-primary\\/40{--tw-shadow-color: hsl(var(--primary) / .4);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-150{transition-delay:.15s}.delay-300{transition-delay:.3s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-80{--tw-enter-opacity: .8}.duration-300{animation-duration:.3s}.delay-150{animation-delay:.15s}.delay-300{animation-delay:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}#smarttalks-widget{--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 346.8 77.2% 49.8%;--radius: 8px}.st-fullscreen{position:fixed!important;top:env(safe-area-inset-top)!important;left:env(safe-area-inset-left)!important;right:env(safe-area-inset-right)!important;bottom:env(safe-area-inset-bottom)!important;width:100dvw!important;height:100dvh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important;z-index:2147483647!important}@supports not (height: 100dvh){.st-fullscreen{inset:0!important;width:100vw!important;height:100vh!important}}@media (max-width: 640px){.container{padding-left:16px;padding-right:16px}}::-webkit-scrollbar{width:8px;height:6.4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:var(--radius);--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-base::file-selector-button{font-size:16px}.file\\:font-medium::file-selector-button{font-weight:500}.placeholder\\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-x-0:after{content:var(--tw-content);left:0;right:0}.after\\:top-full:after{content:var(--tw-content);top:100%}.after\\:h-\\[50\\%\\]:after{content:var(--tw-content);height:50%}.after\\:bg-inherit:after{content:var(--tw-content);background-color:inherit}.hover\\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\\:bg-accent\\/10:hover{background-color:hsl(var(--accent) / .1)}.hover\\:bg-destructive\\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\\:bg-green-400:hover{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity, 1))}.hover\\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\\:bg-primary\\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\\:bg-secondary\\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.hover\\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-primary:hover{--tw-shadow-color: hsl(var(--primary));--tw-shadow: var(--tw-shadow-colored)}.hover\\:brightness-50:hover{--tw-brightness: brightness(.5);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\\:brightness-75:hover{--tw-brightness: brightness(.75);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-\\[1\\.5px\\]:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1.5px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-primary:focus-visible{--tw-ring-color: hsl(var(--primary))}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.has-\\[\\[data-range-end\\]\\]\\:rounded-r-md:has([data-range-end]){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.has-\\[\\[data-range-start\\]\\]\\:rounded-l-md:has([data-range-start]){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.has-\\[\\[data-in-range\\]\\]\\:bg-accent:has([data-in-range]){background-color:hsl(var(--accent))}.has-\\[\\[data-outside-range\\]\\[data-in-range\\]\\]\\:bg-accent\\/50:has([data-outside-range][data-in-range]){background-color:hsl(var(--accent) / .5)}.has-\\[\\[data-in-range\\]\\]\\:first-of-type\\:rounded-l-md:first-of-type:has([data-in-range]){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.has-\\[\\[data-in-range\\]\\]\\:last-of-type\\:rounded-r-md:last-of-type:has([data-in-range]){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}@keyframes content-show{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.data-\\[expanded\\]\\:animate-content-show[data-expanded]{animation:content-show .2s ease-out}.data-\\[selected\\]\\:bg-primary[data-selected]{background-color:hsl(var(--primary))}.data-\\[state\\=open\\]\\:bg-accent[data-state=open],.data-\\[today\\]\\:bg-accent[data-today]{background-color:hsl(var(--accent))}.data-\\[disabled\\]\\:text-muted-foreground[data-disabled],.data-\\[outside-range\\]\\:text-muted-foreground[data-outside-range]{color:hsl(var(--muted-foreground))}.data-\\[selected\\]\\:text-primary-foreground[data-selected]{color:hsl(var(--primary-foreground))}.data-\\[today\\]\\:text-accent-foreground[data-today]{color:hsl(var(--accent-foreground))}.data-\\[disabled\\]\\:opacity-50[data-disabled],.data-\\[outside-range\\]\\:opacity-50[data-outside-range]{opacity:.5}.data-\\[selected\\]\\:opacity-100[data-selected]{opacity:1}.data-\\[transitioning\\]\\:transition-colors[data-transitioning]{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.data-\\[transitioning\\]\\:transition-transform[data-transitioning]{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.data-\\[transitioning\\]\\:duration-300[data-transitioning]{transition-duration:.3s}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[transitioning\\]\\:duration-300[data-transitioning]{animation-duration:.3s}.data-\\[selected\\]\\:hover\\:bg-primary:hover[data-selected]{background-color:hsl(var(--primary))}.data-\\[selected\\]\\:hover\\:text-primary-foreground:hover[data-selected]{color:hsl(var(--primary-foreground))}@media (min-width: 640px){.sm\\:text-left{text-align:left}}@media (min-width: 768px){.md\\:bottom-5{bottom:20px}.md\\:h-\\[min\\(100vh\\,500px\\)\\]{height:min(100vh,500px)}.md\\:max-h-\\[90\\%\\]{max-height:90%}.md\\:w-\\[400px\\]{width:400px}.md\\:w-\\[min\\(100vw\\,425px\\)\\]{width:min(100vw,425px)}.md\\:max-w-\\[90\\%\\]{max-width:90%}.md\\:select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.md\\:rounded-xl{border-radius:calc(var(--radius) + 4px)}.md\\:text-lg{font-size:18px}.md\\:text-sm{font-size:14px}.md\\:file\\:text-sm::file-selector-button{font-size:14px}}.\\[\\&\\:is\\(\\[data-outside-range\\]\\[data-in-range\\]\\)\\]\\:bg-accent\\/50:is([data-outside-range][data-in-range]){background-color:hsl(var(--accent) / .5)}.\\[\\&\\:is\\(\\[data-outside-range\\]\\[data-in-range\\]\\)\\]\\:text-muted-foreground:is([data-outside-range][data-in-range]){color:hsl(var(--muted-foreground))}.\\[\\&\\:is\\(\\[data-outside-range\\]\\[data-in-range\\]\\)\\]\\:opacity-30:is([data-outside-range][data-in-range]){opacity:.3}.\\[\\&\\:is\\(\\[data-today\\]\\[data-selected\\]\\)\\]\\:bg-primary:is([data-today][data-selected]){background-color:hsl(var(--primary))}.\\[\\&\\:is\\(\\[data-today\\]\\[data-selected\\]\\)\\]\\:text-primary-foreground:is([data-today][data-selected]){color:hsl(var(--primary-foreground))}',[Go,sr]=O(!1),Yo=[],Ul=e=>Yo.push(e),Xo=()=>{Yo.forEach(e=>e())},jl=()=>{const e=!Go();sr(e),ee("onToggle"),ee(e?"onOpen":"onClose"),Xo()},ql=()=>{sr(!1),ee("onClose")},Hl=()=>{sr(!0),ee("onOpen"),Xo()},Jo=()=>({bubble:Go,show:Hl,hide:ql,toggle:jl,onOpen:Ul}),ar=Symbol("store-raw"),yt=Symbol("store-node"),Ue=Symbol("store-has"),Zo=Symbol("store-self");function Qo(e){let t=e[be];if(!t&&(Object.defineProperty(e,be,{value:t=new Proxy(e,Yl)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,i=n.length;o<i;o++){const s=n[o];r[s].get&&Object.defineProperty(e,s,{enumerable:r[s].enumerable,get:r[s].get.bind(t)})}}return t}function cn(e){let t;return e!=null&&typeof e=="object"&&(e[be]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Ft(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[ar])return n;if(!cn(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=Ft(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let l=0,c=s.length;l<c;l++)i=s[l],!a[i].get&&(o=e[i],(r=Ft(o,t))!==o&&(e[i]=r))}return e}function un(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function $t(e,t,n){if(e[t])return e[t];const[r,o]=O(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Wl(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===be||t===yt||(delete n.value,delete n.writable,n.get=()=>e[be][t]),n}function ei(e){Jn()&&$t(un(e,yt),Zo)()}function Gl(e){return ei(e),Reflect.ownKeys(e)}const Yl={get(e,t,n){if(t===ar)return e;if(t===be)return n;if(t===Gn)return ei(e),n;const r=un(e,yt),o=r[t];let i=o?o():e[t];if(t===yt||t===Ue||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);Jn()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=$t(r,t,i)())}return cn(i)?Qo(i):i},has(e,t){return t===ar||t===be||t===Gn||t===yt||t===Ue||t==="__proto__"?!0:(Jn()&&$t(un(e,Ue),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Gl,getOwnPropertyDescriptor:Wl};function dn(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[Ue]&&e[Ue][t]&&o!==void 0&&e[Ue][t].$()):(e[t]=n,e[Ue]&&e[Ue][t]&&o===void 0&&e[Ue][t].$());let s=un(e,yt),a;if((a=$t(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let l=e.length;l<i;l++)(a=s[l])&&a.$();(a=$t(s,"length",i))&&a.$(e.length)}(a=s[Zo])&&a.$()}function ti(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];dn(e,o,t[o])}}function Xl(e,t){if(typeof t=="function"&&(t=t(e)),t=Ft(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&dn(e,n,o)}dn(e,"length",r)}else ti(e,t)}function Nt(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let l=0;l<r.length;l++)Nt(e,[r[l]].concat(t),n);return}else if(a&&s==="function"){for(let l=0;l<e.length;l++)r(e[l],l)&&Nt(e,[l].concat(t),n);return}else if(a&&s==="object"){const{from:l=0,to:c=e.length-1,by:d=1}=r;for(let u=l;u<=c;u+=d)Nt(e,[u].concat(t),n);return}else if(t.length>1){Nt(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=Ft(i),r===void 0||cn(o)&&cn(i)&&!Array.isArray(i)?ti(o,i):dn(e,r,i))}function Jl(...[e,t]){const n=Ft(e||{}),r=Array.isArray(n),o=Qo(n);function i(...s){ke(()=>{r&&s.length===1?Xl(n,s[0]):Nt(n,s)})}return[o,i]}function ni(e,t,n){return Be(()=>{const r=Co(e),[o,i]=Jl(r?JSON.parse(r):t);return T(()=>Eo(e,JSON.stringify(o),n)),[o,i]})}function Zl(e,t,n){return Be(()=>{const r=Co(e),[o,i]=O(r?JSON.parse(r):t);return T(()=>Eo(e,JSON.stringify(o()),n)),[o,i]})}const[gm,pm]=Zl("lang","en");function Ql(e){return{type:"chat",_id:e._id,accountId:e.accountId,fullscreen:e.settings.fullScreen,mode:"standard",dismissable:e.settings.closeButton,avatar:e.settings.avatar,title:e.settings.title,subtitle:e.settings.subtitle,balloonMessage:e.settings.balloonMessage,openDelay:e.settings.automatedOpen?2e3:0,chat:{flowId:e.typeId},style:{width:+e.settings.style.width.replace("px",""),height:+e.settings.style.height.replace("px",""),position:"right",primary:e.settings.style.headerBackground,primaryForeground:e.settings.style.color,background:"#FAFAFA",foreground:"#000000"},showSettings:!1}}function ec(e){return{type:"form",_id:e._id,accountId:e.accountId,fullscreen:e.settings.fullScreen,mode:"static",dismissable:e.settings.closeButton,avatar:e.settings.avatar,title:e.settings.title,subtitle:e.settings.subtitle,balloonMessage:e.settings.balloonMessage,openDelay:e.settings.automatedOpen?2e3:0,form:{formId:e.typeId},style:{width:+e.settings.style.width.replace("px",""),height:+e.settings.style.height.replace("px",""),position:"right",primary:e.settings.style.headerBackground,primaryForeground:e.settings.style.color,background:"#FAFAFA",foreground:"#000000"}}}const tc=async e=>{const t=e.split("?"),n=t[0],r=t[1]?.split("&")??[];if(!n)return;console.info("fetching widget:",n);const o=`${Zt}/v1/widget/${n}`,{result:i}=await(await fetch(o,{credentials:"include"})).json();if(i.type==="flow")return Ql(i);if(i.type==="entity")return ec(i);if(i.type==="chat"&&r.includes("showSettings")&&(i.showSettings=!0),(r.includes("right")||r.includes("left"))&&(i.style.position=r.includes("right")?"right":"left"),r.some(s=>s.includes("margin"))){const s=r.find(a=>a.includes("margin"));s&&(i.style.margin=Number(s.split("=")[1]??"5"))}if(r.some(s=>s.includes("mode"))){const s=r.find(a=>a.includes("mode"))?.split("=")[1];(s==="popup"||s==="static"||s==="standard")&&(i.mode=s)}return ne("registerContactData",s=>{s&&Object.keys(s).length&&fetch(`${Zt}/v1/contact-data/${n}`,{credentials:"include",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).catch(console.error)}),i._id=n,i},[ri,nc]=O(""),[it]=Be(()=>ol(ri,tc)),rc=()=>{if(it()?.type==="chat")return it()},oc=()=>{if(it()?.type==="form")return it()},lr=()=>{const e=it();if(e&&e.sessionId)return e.sessionId;if(typeof window<"u")return localStorage.getItem("chat_session_id")};Be(()=>T(()=>{const e=it();Na(e),e&&(ee("onLoad"),e.sessionId&&(console.log("currentWidget.sessionId",e.sessionId),localStorage.setItem("chat_session_id",e.sessionId)))}));const ie=()=>({widgetId:ri,setWidgetId:nc,widget:it,chatWidget:rc,formWidget:oc,getSessionId:lr}),oi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ii=po,ic=(e,t)=>n=>{var r;if(t?.variants==null)return ii(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const d=n?.[c],u=i?.[c];if(d===null)return null;const f=oi(d)||oi(u);return o[c][f]}),a=n&&Object.entries(n).reduce((c,d)=>{let[u,f]=d;return f===void 0||(c[u]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:u,className:f,...g}=d;return Object.entries(g).every(h=>{let[p,m]=h;return Array.isArray(m)?m.includes({...i,...a}[p]):{...i,...a}[p]===m})?[...c,u,f]:c},[]);return ii(e,s,l,n?.class,n?.className)};var sc=D("<button>");const ac=ic("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}}),Ee=e=>{const[,t]=j(e,["variant","size","class"]);return(()=>{var n=sc();return rt(n,L({get class(){return Ge(ac({variant:e.variant,size:e.size}),e.class)}},t),!1,!1),n})()};var lc=D('<img alt="widget logo">');const si=e=>{const[,t]=j(e,["class","src"]);return(()=>{var n=lc();return rt(n,L({get src(){return e.src??"/src/assets/izi.jpeg"},get class(){return Ge("size-14 bg-transparent rounded-full",e.class)}},t),!1,!1),n})()};var cc=D('<div class="flex space-x-4"><div class="flex flex-col"><span class="font-bold md:text-lg"></span><span class="text-xs md:text-sm truncate">');const uc=()=>{const{chatWidget:e}=ie(),t=()=>e()?.title?(e()?.title?.length||0)>24?`${e()?.title?.slice(0,21)}...`:e()?.title:"SmartTalks.ai",n=()=>e()?.subtitle?(e()?.subtitle?.length||0)>30?`${e()?.subtitle?.slice(0,27)}...`:e()?.subtitle:"Chat";return(()=>{var r=cc(),o=r.firstChild,i=o.firstChild,s=i.nextSibling;return A(r,y(si,{get src(){return e()?.avatar}}),o),A(i,t),A(s,n),r})()};var dc=D("<svg stroke-width=0>");function we(e,t){const n=L(e.a,t),[r,o]=j(n,["src"]),[i,s]=O(""),a=C(()=>t.title?`${e.c}<title>${t.title}</title>`:e.c);return T(()=>s(a())),K(()=>{s("")}),(()=>{var l=dc();return rt(l,L({get stroke(){return e.a?.stroke},get color(){return t.color||"currentColor"},get fill(){return t.color||"currentColor"},get style(){return{...t.style,overflow:"visible"}}},o,{get height(){return t.size||"1em"},get width(){return t.size||"1em"},xmlns:"http://www.w3.org/2000/svg",get innerHTML(){return i()}}),!0,!0),A(l,()=>Rl),l})()}function fc(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path fill-rule="evenodd" d="M12.75 8a4.5 4.5 0 0 1-8.61 1.834l-1.391.565A6.001 6.001 0 0 0 14.25 8 6 6 0 0 0 3.5 4.334V2.5H2v4l.75.75h3.5v-1.5H4.352A4.5 4.5 0 0 1 12.75 8z" clip-rule="evenodd"/>'},e)}function hc(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path fill-rule="evenodd" d="M7.444 13.832a1 1 0 1 0 1.111-1.663 1 1 0 0 0-1.11 1.662zM8 9a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0-5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z" clip-rule="evenodd"/>'},e)}function gc(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path fill-rule="evenodd" d="M13.917 7A6.002 6.002 0 0 0 2.083 7H1.071a7.002 7.002 0 0 1 13.858 0h-1.012z" clip-rule="evenodd"/>'},e)}function pc(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path d="m1 1.91.78-.41L15 7.449v.95L1.78 14.33 1 13.91 2.583 8 1 1.91ZM3.612 8.5 2.33 13.13 13.5 7.9 2.33 2.839l1.282 4.6L9 7.5v1H3.612Z"/>'},e)}const cr={equals:!1};function ai(e){return(...t)=>{for(const n of e)n&&n(...t)}}function mc(e){return(...t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n];r&&r(...t)}}}const S=e=>typeof e=="function"&&!e.length?e():e,li=e=>Array.isArray(e)?e:e?[e]:[];function yc(e,...t){return typeof e=="function"?e(...t):e}const bc=K;function wc(e,t,n,r){return e.addEventListener(t,n,r),bc(e.removeEventListener.bind(e,t,n,r))}function vc(e,t,n,r){const o=()=>{li(S(e)).forEach(i=>{i&&li(S(t)).forEach(s=>wc(i,s,n,r))})};typeof e=="function"?T(o):oe(o)}function fn(){return!0}const xc={get(e,t,n){return t===be?n:e.get(t)},has(e,t){return e.has(t)},set:fn,deleteProperty:fn,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:fn,deleteProperty:fn}},ownKeys(e){return e.keys()}},Sc=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function ci(e){const t={};let n;for(;n=Sc.exec(e);)t[n[1]]=n[2];return t}function kc(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=ci(e)}else typeof t=="string"&&(t=ci(t));return{...e,...t}}const ur=(e,t,n)=>{let r;for(const o of e){const i=S(o)[t];r?i&&(r=n(r,i)):r=i}return r};function Ec(...e){const t=Array.isArray(e[0]),n=t?e[0]:e;if(n.length===1)return n[0];const r=t&&e[1]?.reverseEventHandlers?mc:ai,o={};for(const s of n){const a=S(s);for(const l in a)if(l[0]==="o"&&l[1]==="n"&&l[2]){const c=a[l],d=l.toLowerCase(),u=typeof c=="function"?c:Array.isArray(c)?c.length===1?c[0]:c[0].bind(void 0,c[1]):void 0;u?o[d]?o[d].push(u):o[d]=[u]:delete o[d]}}const i=L(...n);return new Proxy({get(s){if(typeof s!="string")return Reflect.get(i,s);if(s==="style")return ur(n,"style",kc);if(s==="ref"){const a=[];for(const l of n){const c=S(l)[s];typeof c=="function"&&a.push(c)}return r(a)}if(s[0]==="o"&&s[1]==="n"&&s[2]){const a=o[s.toLowerCase()];return a?r(a):Reflect.get(i,s)}return s==="class"||s==="className"?ur(n,s,(a,l)=>`${a} ${l}`):s==="classList"?ur(n,s,(a,l)=>({...a,...l})):Reflect.get(i,s)},has(s){return Reflect.has(i,s)},keys(){return Object.keys(i)}},xc)}function st(...e){return ai(e)}function Cc(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function dr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Oc(e){return typeof e=="number"}function _c(e){return Array.isArray(e)}function bt(e){return Object.prototype.toString.call(e)==="[object String]"}function Pc(e){return typeof e=="function"}function ui(e){return t=>`${e()}-${t}`}function Le(e,t){return e?e===t||e.contains(t):!1}function Kt(e,t=!1){const{activeElement:n}=je(e);if(!n?.nodeName)return null;if(di(n)&&n.contentDocument)return Kt(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=je(n).getElementById(r);if(o)return o}}return n}function je(e){return e?e.ownerDocument||e:document}function di(e){return e.tagName==="IFRAME"}var fi=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(fi||{});function fr(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function hn(){return fr(/^Mac/i)}function Ac(){return fr(/^iPhone/i)}function Tc(){return fr(/^iPad/i)||hn()&&navigator.maxTouchPoints>1}function Lc(){return Ac()||Tc()}function Mc(){return hn()||Lc()}function ge(e,t){return t&&(Pc(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function ve(e){return t=>{for(const n of e)ge(t,n)}}function Dc(e){return hn()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function de(e){if(e)if(Ic())e.focus({preventScroll:!0});else{const t=Rc(e);e.focus(),Fc(t)}}var gn=null;function Ic(){if(gn==null){gn=!1;try{document.createElement("div").focus({get preventScroll(){return gn=!0,!0}})}catch{}}return gn}function Rc(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Fc(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var hi=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],$c=[...hi,'[tabindex]:not([tabindex="-1"]):not([disabled])'],hr=`${hi.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,Nc=$c.join(':not([hidden]):not([tabindex="-1"]),');function gi(e,t){const r=Array.from(e.querySelectorAll(hr)).filter(pi);return t&&pi(e)&&r.unshift(e),r.forEach((o,i)=>{if(di(o)&&o.contentDocument){const s=o.contentDocument.body,a=gi(s,!1);r.splice(i,1,...a)}}),r}function pi(e){return mi(e)&&!Kc(e)}function mi(e){return e.matches(hr)&&gr(e)}function Kc(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function gr(e,t){return e.nodeName!=="#comment"&&zc(e)&&Bc(e,t)&&(!e.parentElement||gr(e.parentElement,e))}function zc(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function Bc(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Vc(e,t,n){const r=t?.tabbable?Nc:hr,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return t?.from?.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&gr(i)&&(!t?.accept||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(o.currentNode=t.from),o}function yi(e){let t=e;for(;t&&!Uc(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function Uc(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function jc(){}function qc(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,l=s-1;a<s;l=a++){const[c,d]=t[a],[u,f]=t[l],[,g]=t[l===0?s-1:l-1]||[0,0],h=(d-f)*(n-c)-(c-u)*(r-d);if(f<d){if(r>=f&&r<d){if(h===0)return!0;h>0&&(r===f?r>g&&(o=!o):o=!o)}}else if(d<f){if(r>d&&r<=f){if(h===0)return!0;h<0&&(r===f?r<g&&(o=!o):o=!o)}}else if(r===d&&(n>=u&&n<=c||n>=c&&n<=u))return!0}return o}function Me(e,t){return L(e,t)}var zt=new Map,bi=new Set;function wi(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=zt.get(n.target);r||(r=new Set,zt.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=zt.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),zt.delete(n.target)),zt.size===0)){for(const o of bi)o();bi.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?wi():document.addEventListener("DOMContentLoaded",wi));function pr(e,t){const n=vi(e,t,"left"),r=vi(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const l=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>l&&(s+=n+o-l),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function vi(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function Hc(e,t){if(document.contains(e)){const n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let o=yi(e);for(;e&&o&&e!==n&&o!==n;)pr(o,e),e=o,o=yi(e)}else{const{left:o,top:i}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});const{left:s,top:a}=e.getBoundingClientRect();(Math.abs(o-s)>1||Math.abs(i-a)>1)&&e.scrollIntoView?.({block:"nearest"})}}}var Wc={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function mr(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=l=>{if(l==null)return"";const c=e.getKey??"key",d=bt(c)?l[c]:c(l);return d!=null?String(d):""},i=l=>{if(l==null)return"";const c=e.getTextValue??"textValue",d=bt(c)?l[c]:c(l);return d!=null?String(d):""},s=l=>{if(l==null)return!1;const c=e.getDisabled??"disabled";return(bt(c)?l[c]:c(l))??!1},a=l=>{if(l!=null)return bt(e.getSectionChildren)?l[e.getSectionChildren]:e.getSectionChildren?.(l)};for(const l of e.dataSource){if(bt(l)||Oc(l)){r.push({type:"item",rawValue:l,key:String(l),textValue:String(l),disabled:s(l),level:n,index:t}),t++;continue}if(a(l)!=null){r.push({type:"section",rawValue:l,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(l)??[];if(c.length>0){const d=mr({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...d),t+=d.length}}else r.push({type:"item",rawValue:l,key:o(l),textValue:i(l),disabled:s(l),level:n,index:t}),t++}return r}/*!
|
|
2
2
|
* Portions of this file are based on code from react-spectrum.
|
|
3
3
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
4
4
|
*
|
|
5
5
|
* Credits to the React Spectrum team:
|
|
6
6
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/collections/src/useCollection.ts
|
|
7
|
-
*/function
|
|
7
|
+
*/function Gc(e,t=[]){const n=mr({dataSource:S(e.dataSource),getKey:S(e.getKey),getTextValue:S(e.getTextValue),getDisabled:S(e.getDisabled),getSectionChildren:S(e.getSectionChildren)}),[r,o]=O(e.factory(n));return T(tt([()=>S(e.dataSource),()=>S(e.getKey),()=>S(e.getTextValue),()=>S(e.getDisabled),()=>S(e.getSectionChildren),()=>e.factory,...t],([i,s,a,l,c,d])=>{const u=mr({dataSource:i,getKey:s,getTextValue:a,getDisabled:l,getSectionChildren:c});o(()=>d(u))},{defer:!0})),r}function yr(e){const[t,n]=O(e.defaultValue?.()),r=C(()=>e.value?.()!==void 0),o=C(()=>r()?e.value?.():t());return[o,s=>{H(()=>{const a=yc(s,o());return Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})}]}function Yc(e){const[t,n]=yr(e);return[()=>t()??!1,n]}function Xc(e){const[t,n]=yr(e);return[()=>t()??[],n]}function xi(e={}){const[t,n]=Yc({value:()=>S(e.open),defaultValue:()=>!!S(e.defaultOpen),onChange:s=>e.onOpenChange?.(s)}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}function Jc(e){const t=n=>{n.key===fi.Escape&&e.onEscapeKeyDown?.(n)};T(()=>{if(S(e.isDisabled))return;const n=e.ownerDocument?.()??je();n.addEventListener("keydown",t),K(()=>{n.removeEventListener("keydown",t)})})}/*!
|
|
8
8
|
* Portions of this file are based on code from radix-ui-primitives.
|
|
9
9
|
* MIT Licensed, Copyright (c) 2022 WorkOS.
|
|
10
10
|
*
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Credits to the Chakra UI team:
|
|
18
18
|
* https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/dismissable/src/layer-stack.ts
|
|
19
|
-
*/const pn="data-kb-top-layer";let Si,br=!1;const
|
|
19
|
+
*/const pn="data-kb-top-layer";let Si,br=!1;const qe=[];function Bt(e){return qe.findIndex(t=>t.node===e)}function Zc(e){return qe[Bt(e)]}function Qc(e){return qe[qe.length-1].node===e}function ki(){return qe.filter(e=>e.isPointerBlocking)}function eu(){return[...ki()].slice(-1)[0]}function wr(){return ki().length>0}function Ei(e){const t=Bt(eu()?.node);return Bt(e)<t}function tu(e){qe.push(e)}function nu(e){const t=Bt(e);t<0||qe.splice(t,1)}function ru(){for(const{node:e}of qe)e.style.pointerEvents=Ei(e)?"none":"auto"}function ou(e){if(wr()&&!br){const t=je(e);Si=document.body.style.pointerEvents,t.body.style.pointerEvents="none",br=!0}}function iu(e){if(wr())return;const t=je(e);t.body.style.pointerEvents=Si,t.body.style.length===0&&t.body.removeAttribute("style"),br=!1}const pe={layers:qe,isTopMostLayer:Qc,hasPointerBlockingLayer:wr,isBelowPointerBlockingLayer:Ei,addLayer:tu,removeLayer:nu,indexOf:Bt,find:Zc,assignPointerEventToLayers:ru,disableBodyPointerEvents:ou,restoreBodyPointerEvents:iu};/*!
|
|
20
20
|
* Portions of this file are based on code from radix-ui-primitives.
|
|
21
21
|
* MIT Licensed, Copyright (c) 2022 WorkOS.
|
|
22
22
|
*
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
* Credits to the Chakra UI team:
|
|
30
30
|
* https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/focus-scope/src/focus-on-child-unmount.ts
|
|
31
31
|
* https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/focus-scope/src/focus-containment.ts
|
|
32
|
-
*/const vr="focusScope.autoFocusOnMount",xr="focusScope.autoFocusOnUnmount",Ci={bubbles:!1,cancelable:!0},Oi={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=dr(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=dr(this.stack,e),this.active()?.resume()}};function
|
|
32
|
+
*/const vr="focusScope.autoFocusOnMount",xr="focusScope.autoFocusOnUnmount",Ci={bubbles:!1,cancelable:!0},Oi={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=dr(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=dr(this.stack,e),this.active()?.resume()}};function su(e,t){const[n,r]=O(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=h=>e.onMountAutoFocus?.(h),a=h=>e.onUnmountAutoFocus?.(h),l=()=>je(t()),c=()=>{const h=l().createElement("span");return h.setAttribute("data-focus-trap",""),h.tabIndex=0,Object.assign(h.style,Wc),h},d=()=>{const h=t();return h?gi(h,!0).filter(p=>!p.hasAttribute("data-focus-trap")):[]},u=()=>{const h=d();return h.length>0?h[0]:null},f=()=>{const h=d();return h.length>0?h[h.length-1]:null},g=()=>{const h=t();if(!h)return!1;const p=Kt(h);return!p||Le(h,p)?!1:mi(p)};T(()=>{const h=t();if(!h)return;Oi.add(o);const p=Kt(h);if(!Le(h,p)){const b=new CustomEvent(vr,Ci);h.addEventListener(vr,s),h.dispatchEvent(b),b.defaultPrevented||setTimeout(()=>{de(u()),Kt(h)===p&&de(h)},0)}K(()=>{h.removeEventListener(vr,s),setTimeout(()=>{const b=new CustomEvent(xr,Ci);g()&&b.preventDefault(),h.addEventListener(xr,a),h.dispatchEvent(b),b.defaultPrevented||de(p??l().body),h.removeEventListener(xr,a),Oi.remove(o)},0)})}),T(()=>{const h=t();if(!h||!S(e.trapFocus)||n())return;const p=b=>{const w=b.target;w?.closest(`[${pn}]`)||(Le(h,w)?i=w:de(i))},m=b=>{const v=b.relatedTarget??Kt(h);v?.closest(`[${pn}]`)||Le(h,v)||de(i)};l().addEventListener("focusin",p),l().addEventListener("focusout",m),K(()=>{l().removeEventListener("focusin",p),l().removeEventListener("focusout",m)})}),T(()=>{const h=t();if(!h||!S(e.trapFocus)||n())return;const p=c();h.insertAdjacentElement("afterbegin",p);const m=c();h.insertAdjacentElement("beforeend",m);function b(v){const x=u(),_=f();v.relatedTarget===x?de(_):de(x)}p.addEventListener("focusin",b),m.addEventListener("focusin",b);const w=new MutationObserver(v=>{for(const x of v)x.previousSibling===m&&(m.remove(),h.insertAdjacentElement("beforeend",m)),x.nextSibling===p&&(p.remove(),h.insertAdjacentElement("afterbegin",p))});w.observe(h,{childList:!0,subtree:!1}),K(()=>{p.removeEventListener("focusin",b),m.removeEventListener("focusin",b),p.remove(),m.remove(),w.disconnect()})})}/*!
|
|
33
33
|
* Portions of this file are based on code from react-spectrum.
|
|
34
34
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
35
35
|
*
|
|
36
36
|
* Credits to the React Spectrum team:
|
|
37
37
|
* https://github.com/adobe/react-spectrum/blob/15e101b74966bd5eb719c6529ce71ce57eaed430/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx
|
|
38
|
-
*/const
|
|
38
|
+
*/const au="data-live-announcer";/*!
|
|
39
39
|
* This file is based on code from react-spectrum.
|
|
40
40
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
41
41
|
*
|
|
42
42
|
* Credits to the React Spectrum team:
|
|
43
43
|
* https://github.com/adobe/react-spectrum/blob/810579b671791f1593108f62cdc1893de3a220e3/packages/@react-aria/overlays/src/ariaHideOutside.ts
|
|
44
|
-
*/function
|
|
44
|
+
*/function lu(e){T(()=>{S(e.isDisabled)||K(cu(S(e.targets),S(e.root)))})}const Vt=new WeakMap,xe=[];function cu(e,t=document.body){const n=new Set(e),r=new Set,o=l=>{for(const f of l.querySelectorAll(`[${au}], [${pn}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const g of n)if(f.contains(g))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),u=c(l);if(u===NodeFilter.FILTER_ACCEPT&&i(l),u!==NodeFilter.FILTER_REJECT){let f=d.nextNode();for(;f!=null;)i(f),f=d.nextNode()}},i=l=>{const c=Vt.get(l)??0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),Vt.set(l,c+1))};xe.length&&xe[xe.length-1].disconnect(),o(t);const s=new MutationObserver(l=>{for(const c of l)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(d=>d.contains(c.target))){for(const d of c.removedNodes)d instanceof Element&&(n.delete(d),r.delete(d));for(const d of c.addedNodes)(d instanceof HTMLElement||d instanceof SVGElement)&&(d.dataset.liveAnnouncer==="true"||d.dataset.reactAriaTopLayer==="true")?n.add(d):d instanceof Element&&o(d)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return xe.push(a),()=>{s.disconnect();for(const l of r){const c=Vt.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),Vt.delete(l)):Vt.set(l,c-1)}a===xe[xe.length-1]?(xe.pop(),xe.length&&xe[xe.length-1].observe()):xe.splice(xe.indexOf(a),1)}}/*!
|
|
45
45
|
* Portions of this file are based on code from radix-ui-primitives.
|
|
46
46
|
* MIT Licensed, Copyright (c) 2022 WorkOS.
|
|
47
47
|
*
|
|
@@ -53,38 +53,38 @@
|
|
|
53
53
|
*
|
|
54
54
|
* Credits to the Chakra UI team:
|
|
55
55
|
* https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/interact-outside/src/index.ts
|
|
56
|
-
*/const _i="interactOutside.pointerDownOutside",Pi="interactOutside.focusOutside";function
|
|
56
|
+
*/const _i="interactOutside.pointerDownOutside",Pi="interactOutside.focusOutside";function uu(e,t){let n,r=jc;const o=()=>je(t()),i=u=>e.onPointerDownOutside?.(u),s=u=>e.onFocusOutside?.(u),a=u=>e.onInteractOutside?.(u),l=u=>{const f=u.target;return!(f instanceof HTMLElement)||f.closest(`[${pn}]`)||!Le(o(),f)||Le(t(),f)?!1:!e.shouldExcludeElement?.(f)},c=u=>{function f(){const g=t(),h=u.target;if(!g||!h||!l(u))return;const p=ve([i,a]);h.addEventListener(_i,p,{once:!0});const m=new CustomEvent(_i,{bubbles:!1,cancelable:!0,detail:{originalEvent:u,isContextMenu:u.button===2||Dc(u)&&u.button===0}});h.dispatchEvent(m)}u.pointerType==="touch"?(o().removeEventListener("click",f),r=f,o().addEventListener("click",f,{once:!0})):f()},d=u=>{const f=t(),g=u.target;if(!f||!g||!l(u))return;const h=ve([s,a]);g.addEventListener(Pi,h,{once:!0});const p=new CustomEvent(Pi,{bubbles:!1,cancelable:!0,detail:{originalEvent:u,isContextMenu:!1}});g.dispatchEvent(p)};T(()=>{S(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",d,!0),K(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",d,!0)}))})}/*!
|
|
57
57
|
* Portions of this file are based on code from radix-ui-primitives.
|
|
58
58
|
* MIT Licensed, Copyright (c) 2022 WorkOS.
|
|
59
59
|
*
|
|
60
60
|
* Credits to the Radix UI team:
|
|
61
61
|
* https://github.com/radix-ui/primitives/blob/21a7c97dc8efa79fecca36428eec49f187294085/packages/react/presence/src/Presence.tsx
|
|
62
62
|
* https://github.com/radix-ui/primitives/blob/21a7c97dc8efa79fecca36428eec49f187294085/packages/react/presence/src/useStateMachine.tsx
|
|
63
|
-
*/function
|
|
63
|
+
*/function du(e){const[t,n]=O();let r={},o=e(),i="none";const[s,a]=fu(e()?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T(tt(s,l=>{const c=mn(r);i=l==="mounted"?c:"none"})),T(tt(e,l=>{if(o===l)return;const c=mn(r);l?a("MOUNT"):r?.display==="none"?a("UNMOUNT"):a(o&&i!==c?"ANIMATION_OUT":"UNMOUNT"),o=l})),T(tt(t,l=>{if(l){const c=u=>{const g=mn(r).includes(u.animationName);u.target===l&&g&&a("ANIMATION_END")},d=u=>{u.target===l&&(i=mn(r))};l.addEventListener("animationstart",d),l.addEventListener("animationcancel",c),l.addEventListener("animationend",c),K(()=>{l.removeEventListener("animationstart",d),l.removeEventListener("animationcancel",c),l.removeEventListener("animationend",c)})}else a("ANIMATION_END")})),{isPresent:()=>["mounted","unmountSuspended"].includes(s()),setRef:l=>{l&&(r=getComputedStyle(l)),n(l)}}}function mn(e){return e?.animationName||"none"}function fu(e,t){const n=(s,a)=>t[s][a]??s,[r,o]=O(e);return[r,s=>{o(a=>n(a,s))}]}function yn(e){return t=>(e(t),()=>e(void 0))}/*!
|
|
64
64
|
* Portions of this file are based on code from ariakit.
|
|
65
65
|
* MIT Licensed, Copyright (c) Diego Haz.
|
|
66
66
|
*
|
|
67
67
|
* Credits to the ariakit team:
|
|
68
68
|
* https://github.com/ariakit/ariakit/blob/8a13899ff807bbf39f3d89d2d5964042ba4d5287/packages/ariakit-react-utils/src/hooks.ts
|
|
69
|
-
*/function
|
|
69
|
+
*/function hu(e,t){const[n,r]=O(Ai(t?.()));return T(()=>{r(e()?.tagName.toLowerCase()||Ai(t?.()))}),n}function Ai(e){return bt(e)?e:void 0}function bn(e){const[t,n]=j(e,["asChild","as","children"]);if(!t.asChild)return y(ln,L({get component(){return t.as}},n,{get children(){return t.children}}));const r=Zn(()=>t.children);if(Ti(r())){const o=Li(n,r()?.props??{});return y(ln,o)}if(_c(r())){const o=r().find(Ti);if(o){const i=()=>y(pt,{get each(){return r()},children:a=>y(Z,{when:a===o,fallback:a,get children(){return o.props.children}})}),s=Li(n,o?.props??{});return y(ln,L(s,{children:i}))}}throw new Error("[kobalte]: Component is expected to render `asChild` but no children `As` component was found.")}const gu=Symbol("$$KobalteAsComponent");function Ti(e){return e?.[gu]===!0}function Li(e,t){return Ec([e,t],{reverseEventHandlers:!0})}/*!
|
|
70
70
|
* Portions of this file are based on code from react-spectrum.
|
|
71
71
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
72
72
|
*
|
|
73
73
|
* Credits to the React Spectrum team:
|
|
74
74
|
* https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/i18n/src/utils.ts
|
|
75
|
-
*/const
|
|
75
|
+
*/const pu=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),mu=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function yu(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return pu.has(n)}const t=e.split("-")[0];return mu.has(t)}function bu(e){return yu(e)?"rtl":"ltr"}/*!
|
|
76
76
|
* Portions of this file are based on code from react-spectrum.
|
|
77
77
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
78
78
|
*
|
|
79
79
|
* Credits to the React Spectrum team:
|
|
80
80
|
* https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/i18n/src/useDefaultLocale.ts
|
|
81
|
-
*/function Mi(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:
|
|
81
|
+
*/function Mi(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:bu(e)}}let Sr=Mi();const Ut=new Set;function Di(){Sr=Mi();for(const e of Ut)e(Sr)}function wu(){const[e,t]=O(Sr),n=C(()=>e());return ht(()=>{Ut.size===0&&window.addEventListener("languagechange",Di),Ut.add(t),K(()=>{Ut.delete(t),Ut.size===0&&window.removeEventListener("languagechange",Di)})}),{locale:()=>n().locale,direction:()=>n().direction}}const vu=ce();function kr(){const e=wu();return he(vu)||e}/*!
|
|
82
82
|
* Portions of this file are based on code from react-spectrum.
|
|
83
83
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
84
84
|
*
|
|
85
85
|
* Credits to the React Spectrum team:
|
|
86
86
|
* https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/i18n/src/useCollator.ts
|
|
87
|
-
*/const
|
|
87
|
+
*/const Er=new Map;function xu(e){const{locale:t}=kr(),n=C(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return C(()=>{const r=n();let o;return Er.has(r)&&(o=Er.get(r)),o||(o=new Intl.Collator(t(),e),Er.set(r,o)),o})}/*!
|
|
88
88
|
* Portions of this file are based on code from react-spectrum.
|
|
89
89
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
90
90
|
*
|
|
@@ -92,43 +92,43 @@
|
|
|
92
92
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/Selection.ts
|
|
93
93
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/types.ts
|
|
94
94
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-types/shared/src/selection.d.ts
|
|
95
|
-
*/class Ce extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof Ce?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function
|
|
95
|
+
*/class Ce extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof Ce?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function Su(e){const[t,n]=yr(e);return[()=>t()??new Ce,n]}/*!
|
|
96
96
|
* Portions of this file are based on code from react-spectrum.
|
|
97
97
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
98
98
|
*
|
|
99
99
|
* Credits to the React Spectrum team:
|
|
100
100
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/utils.ts
|
|
101
|
-
*/function Ii(e){return
|
|
101
|
+
*/function Ii(e){return Mc()?e.altKey:e.ctrlKey}function wt(e){return hn()?e.metaKey:e.ctrlKey}function Ri(e){return new Ce(e)}function ku(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}/*!
|
|
102
102
|
* Portions of this file are based on code from react-spectrum.
|
|
103
103
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
104
104
|
*
|
|
105
105
|
* Credits to the React Spectrum team:
|
|
106
106
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/useMultipleSelectionState.ts
|
|
107
|
-
*/function
|
|
107
|
+
*/function Eu(e){const t=Me({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=O(!1),[o,i]=O(),s=C(()=>{const p=S(t.selectedKeys);return p!=null?Ri(p):p}),a=C(()=>{const p=S(t.defaultSelectedKeys);return p!=null?Ri(p):new Ce}),[l,c]=Su({value:s,defaultValue:a,onChange:p=>t.onSelectionChange?.(p)}),[d,u]=O(S(t.selectionBehavior)),f=()=>S(t.selectionMode),g=()=>S(t.disallowEmptySelection)??!1,h=p=>{(S(t.allowDuplicateSelectionEvents)||!ku(p,l()))&&c(p)};return T(()=>{const p=l();S(t.selectionBehavior)==="replace"&&d()==="toggle"&&typeof p=="object"&&p.size===0&&u("replace")}),T(()=>{u(S(t.selectionBehavior)??"toggle")}),{selectionMode:f,disallowEmptySelection:g,selectionBehavior:d,setSelectionBehavior:u,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:l,setSelectedKeys:h}}/*!
|
|
108
108
|
* Portions of this file are based on code from react-spectrum.
|
|
109
109
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
110
110
|
*
|
|
111
111
|
* Credits to the React Spectrum team:
|
|
112
112
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useTypeSelect.ts
|
|
113
|
-
*/function
|
|
113
|
+
*/function Cu(e){const[t,n]=O(""),[r,o]=O(-1);return{typeSelectHandlers:{onKeyDown:s=>{if(S(e.isDisabled))return;const a=S(e.keyboardDelegate),l=S(e.selectionManager);if(!a.getKeyForSearch)return;const c=Ou(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let d=n(f=>f+c),u=a.getKeyForSearch(d,l.focusedKey())??a.getKeyForSearch(d);u==null&&_u(d)&&(d=d[0],u=a.getKeyForSearch(d,l.focusedKey())??a.getKeyForSearch(d)),u!=null&&(l.setFocusedKey(u),e.onTypeSelect?.(u)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function Ou(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function _u(e){return e.split("").every(t=>t===e[0])}/*!
|
|
114
114
|
* Portions of this file are based on code from react-spectrum.
|
|
115
115
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
116
116
|
*
|
|
117
117
|
* Credits to the React Spectrum team:
|
|
118
118
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useSelectableCollection.ts
|
|
119
|
-
*/function
|
|
119
|
+
*/function Pu(e,t,n){const o=L({selectOnFocus:()=>S(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>t(),{direction:s}=kr();let a={top:0,left:0};vc(()=>S(o.isVirtualized)?void 0:i(),"scroll",()=>{const p=i();p&&(a={top:p.scrollTop,left:p.scrollLeft})});const{typeSelectHandlers:l}=Cu({isDisabled:()=>S(o.disallowTypeAhead),keyboardDelegate:()=>S(o.keyboardDelegate),selectionManager:()=>S(o.selectionManager)}),c=p=>{ge(p,l.onKeyDown),p.altKey&&p.key==="Tab"&&p.preventDefault();const m=t();if(!m?.contains(p.target))return;const b=S(o.selectionManager),w=S(o.selectOnFocus),v=k=>{k!=null&&(b.setFocusedKey(k),p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(k):w&&!Ii(p)&&b.replaceSelection(k))},x=S(o.keyboardDelegate),_=S(o.shouldFocusWrap),E=b.focusedKey();switch(p.key){case"ArrowDown":{if(x.getKeyBelow){p.preventDefault();let k;E!=null?k=x.getKeyBelow(E):k=x.getFirstKey?.(),k==null&&_&&(k=x.getFirstKey?.(E)),v(k)}break}case"ArrowUp":{if(x.getKeyAbove){p.preventDefault();let k;E!=null?k=x.getKeyAbove(E):k=x.getLastKey?.(),k==null&&_&&(k=x.getLastKey?.(E)),v(k)}break}case"ArrowLeft":{if(x.getKeyLeftOf){p.preventDefault();const k=s()==="rtl";let F;E!=null?F=x.getKeyLeftOf(E):F=k?x.getFirstKey?.():x.getLastKey?.(),v(F)}break}case"ArrowRight":{if(x.getKeyRightOf){p.preventDefault();const k=s()==="rtl";let F;E!=null?F=x.getKeyRightOf(E):F=k?x.getLastKey?.():x.getFirstKey?.(),v(F)}break}case"Home":if(x.getFirstKey){p.preventDefault();const k=x.getFirstKey(E,wt(p));k!=null&&(b.setFocusedKey(k),wt(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(k):w&&b.replaceSelection(k))}break;case"End":if(x.getLastKey){p.preventDefault();const k=x.getLastKey(E,wt(p));k!=null&&(b.setFocusedKey(k),wt(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(k):w&&b.replaceSelection(k))}break;case"PageDown":if(x.getKeyPageBelow&&E!=null){p.preventDefault();const k=x.getKeyPageBelow(E);v(k)}break;case"PageUp":if(x.getKeyPageAbove&&E!=null){p.preventDefault();const k=x.getKeyPageAbove(E);v(k)}break;case"a":wt(p)&&b.selectionMode()==="multiple"&&S(o.disallowSelectAll)!==!0&&(p.preventDefault(),b.selectAll());break;case"Escape":p.defaultPrevented||(p.preventDefault(),S(o.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!S(o.allowsTabNavigation)){if(p.shiftKey)m.focus();else{const k=Vc(m,{tabbable:!0});let F,P;do P=k.lastChild(),P&&(F=P);while(P);F&&!F.contains(document.activeElement)&&de(F)}break}}},d=p=>{const m=S(o.selectionManager),b=S(o.keyboardDelegate),w=S(o.selectOnFocus);if(m.isFocused()){p.currentTarget.contains(p.target)||m.setFocused(!1);return}if(p.currentTarget.contains(p.target)){if(m.setFocused(!0),m.focusedKey()==null){const v=_=>{_!=null&&(m.setFocusedKey(_),w&&m.replaceSelection(_))},x=p.relatedTarget;x&&p.currentTarget.compareDocumentPosition(x)&Node.DOCUMENT_POSITION_FOLLOWING?v(m.lastSelectedKey()??b.getLastKey?.()):v(m.firstSelectedKey()??b.getFirstKey?.())}else if(!S(o.isVirtualized)){const v=i();if(v){v.scrollTop=a.top,v.scrollLeft=a.left;const x=v.querySelector(`[data-key="${m.focusedKey()}"]`);x&&(de(x),pr(v,x))}}}},u=p=>{const m=S(o.selectionManager);p.currentTarget.contains(p.relatedTarget)||m.setFocused(!1)},f=p=>{i()===p.target&&p.preventDefault()},g=()=>{const p=S(o.autoFocus);if(!p)return;const m=S(o.selectionManager),b=S(o.keyboardDelegate);let w;p==="first"&&(w=b.getFirstKey?.()),p==="last"&&(w=b.getLastKey?.());const v=m.selectedKeys();v.size&&(w=v.values().next().value),m.setFocused(!0),m.setFocusedKey(w);const x=t();x&&w==null&&!S(o.shouldUseVirtualFocus)&&de(x)};return ht(()=>{o.deferAutoFocus?setTimeout(g,0):g()}),T(tt([i,()=>S(o.isVirtualized),()=>S(o.selectionManager).focusedKey()],p=>{const[m,b,w]=p;if(b)w&&o.scrollToKey?.(w);else if(w&&m){const v=m.querySelector(`[data-key="${w}"]`);v&&pr(m,v)}})),{tabIndex:C(()=>{if(!S(o.shouldUseVirtualFocus))return S(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:c,onMouseDown:f,onFocusIn:d,onFocusOut:u}}/*!
|
|
120
120
|
* Portions of this file are based on code from react-spectrum.
|
|
121
121
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
122
122
|
*
|
|
123
123
|
* Credits to the React Spectrum team:
|
|
124
124
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useSelectableItem.ts
|
|
125
|
-
*/function
|
|
125
|
+
*/function Au(e,t){const n=()=>S(e.selectionManager),r=()=>S(e.key),o=()=>S(e.shouldUseVirtualFocus),i=w=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):w?.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||wt(w)||"pointerType"in w&&w.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>S(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let c=null;const d=w=>{l()&&(c=w.pointerType,w.pointerType==="mouse"&&w.button===0&&!S(e.shouldSelectOnPressUp)&&i(w))},u=w=>{l()&&w.pointerType==="mouse"&&w.button===0&&S(e.shouldSelectOnPressUp)&&S(e.allowsDifferentPressOrigin)&&i(w)},f=w=>{l()&&(S(e.shouldSelectOnPressUp)&&!S(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(w)},g=w=>{!l()||!["Enter"," "].includes(w.key)||(Ii(w)?n().toggleSelection(r()):i(w))},h=w=>{a()&&w.preventDefault()},p=w=>{const v=t();o()||a()||!v||w.target===v&&n().setFocusedKey(r())},m=C(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),b=C(()=>S(e.virtualized)?void 0:r());return T(tt([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([w,v,x,_,E])=>{w&&v===_&&E&&!x&&document.activeElement!==w&&(e.focus?e.focus():de(w))})),{isSelected:s,isDisabled:a,allowsSelection:l,tabIndex:m,dataKey:b,onPointerDown:d,onPointerUp:u,onClick:f,onKeyDown:g,onMouseDown:h,onFocus:p}}/*!
|
|
126
126
|
* Portions of this file are based on code from react-spectrum.
|
|
127
127
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
128
128
|
*
|
|
129
129
|
* Credits to the React Spectrum team:
|
|
130
130
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/SelectionManager.ts
|
|
131
|
-
*/class
|
|
131
|
+
*/class Tu{collection;state;constructor(t,n){this.collection=t,this.state=n}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}isFocused(){return this.state.isFocused()}setFocused(t){this.state.setFocused(t)}focusedKey(){return this.state.focusedKey()}setFocusedKey(t){(t==null||this.collection().getItem(t))&&this.state.setFocusedKey(t)}selectedKeys(){return this.state.selectedKeys()}isSelected(t){if(this.state.selectionMode()==="none")return!1;const n=this.getKey(t);return n==null?!1:this.state.selectedKeys().has(n)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const t=this.state.selectedKeys();return this.getAllSelectableKeys().every(n=>t.has(n))}firstSelectedKey(){let t;for(const n of this.state.selectedKeys()){const r=this.collection().getItem(n),o=r?.index!=null&&t?.index!=null&&r.index<t.index;(!t||o)&&(t=r)}return t?.key}lastSelectedKey(){let t;for(const n of this.state.selectedKeys()){const r=this.collection().getItem(n),o=r?.index!=null&&t?.index!=null&&r.index>t.index;(!t||o)&&(t=r)}return t?.key}extendSelection(t){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(t);return}const n=this.getKey(t);if(n==null)return;const r=this.state.selectedKeys(),o=r.anchorKey||n,i=new Ce(r,o,n);for(const s of this.getKeyRange(o,r.currentKey||n))i.delete(s);for(const s of this.getKeyRange(n,o))this.canSelectItem(s)&&i.add(s);this.state.setSelectedKeys(i)}getKeyRange(t,n){const r=this.collection().getItem(t),o=this.collection().getItem(n);return r&&o?r.index!=null&&o.index!=null&&r.index<=o.index?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){const r=[];let o=t;for(;o!=null;){const i=this.collection().getItem(o);if(i&&i.type==="item"&&r.push(o),o===n)return r;o=this.collection().getKeyAfter(o)}return[]}getKey(t){const n=this.collection().getItem(t);return n?!n||n.type!=="item"?null:n.key:t}toggleSelection(t){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}const n=this.getKey(t);if(n==null)return;const r=new Ce(this.state.selectedKeys());r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection()&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode()==="none")return;const n=this.getKey(t);if(n==null)return;const r=this.canSelectItem(n)?new Ce([n],n,n):new Ce;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode()==="none")return;const n=new Ce;for(const r of t){const o=this.getKey(r);if(o!=null&&(n.add(o),this.selectionMode()==="single"))break}this.state.setSelectedKeys(n)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const t=this.state.selectedKeys();!this.disallowEmptySelection()&&t.size>0&&this.state.setSelectedKeys(new Ce)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(t)&&!this.disallowEmptySelection()?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior()==="toggle"||n&&n.pointerType==="touch"?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys())return!0;const n=this.selectedKeys();if(t.size!==n.size)return!1;for(const r of t)if(!n.has(r))return!1;for(const r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){if(this.state.selectionMode()==="none")return!1;const n=this.collection().getItem(t);return n!=null&&!n.disabled}isDisabled(t){const n=this.collection().getItem(t);return!n||n.disabled}getAllSelectableKeys(){const t=[];return(r=>{for(;r!=null;){if(this.canSelectItem(r)){const o=this.collection().getItem(r);if(!o)continue;o.type==="item"&&t.push(r)}r=this.collection().getKeyAfter(r)}})(this.collection().getFirstKey()),t}}/*!
|
|
132
132
|
* Portions of this file are based on code from react-spectrum.
|
|
133
133
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
134
134
|
*
|
|
@@ -140,31 +140,31 @@
|
|
|
140
140
|
*
|
|
141
141
|
* Credits to the React Spectrum team:
|
|
142
142
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/list/src/useListState.ts
|
|
143
|
-
*/function
|
|
143
|
+
*/function Lu(e){const t=Eu(e),r=Gc({dataSource:()=>S(e.dataSource),getKey:()=>S(e.getKey),getTextValue:()=>S(e.getTextValue),getDisabled:()=>S(e.getDisabled),getSectionChildren:()=>S(e.getSectionChildren),factory:i=>e.filter?new Fi(e.filter(i)):new Fi(i)},[()=>e.filter]),o=new Tu(r,t);return Do(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}/*!
|
|
144
144
|
* Portions of this file are based on code from react-spectrum.
|
|
145
145
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
146
146
|
*
|
|
147
147
|
* Credits to the React Spectrum team:
|
|
148
148
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/ListKeyboardDelegate.ts
|
|
149
|
-
*/class
|
|
149
|
+
*/class Mu{collection;ref;collator;constructor(t,n,r){this.collection=t,this.ref=n,this.collator=r}getKeyBelow(t){let n=this.collection().getKeyAfter(t);for(;n!=null;){const r=this.collection().getItem(n);if(r&&r.type==="item"&&!r.disabled)return n;n=this.collection().getKeyAfter(n)}}getKeyAbove(t){let n=this.collection().getKeyBefore(t);for(;n!=null;){const r=this.collection().getItem(n);if(r&&r.type==="item"&&!r.disabled)return n;n=this.collection().getKeyBefore(n)}}getFirstKey(){let t=this.collection().getFirstKey();for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getLastKey(){let t=this.collection().getLastKey();for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getItem(t){return this.ref?.()?.querySelector(`[data-key="${t}"]`)??null}getKeyPageAbove(t){const n=this.ref?.();let r=this.getItem(t);if(!n||!r)return;const o=Math.max(0,r.offsetTop+r.offsetHeight-n.offsetHeight);let i=t;for(;i&&r&&r.offsetTop>o;)i=this.getKeyAbove(i),r=i!=null?this.getItem(i):null;return i}getKeyPageBelow(t){const n=this.ref?.();let r=this.getItem(t);if(!n||!r)return;const o=Math.min(n.scrollHeight,r.offsetTop-r.offsetHeight+n.offsetHeight);let i=t;for(;i&&r&&r.offsetTop<o;)i=this.getKeyBelow(i),r=i!=null?this.getItem(i):null;return i}getKeyForSearch(t,n){const r=this.collator?.();if(!r)return;let o=n!=null?this.getKeyBelow(n):this.getFirstKey();for(;o!=null;){const i=this.collection().getItem(o);if(i){const s=i.textValue.slice(0,t.length);if(i.textValue&&r.compare(s,t)===0)return o}o=this.getKeyBelow(o)}}}/*!
|
|
150
150
|
* Portions of this file are based on code from react-spectrum.
|
|
151
151
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
152
152
|
*
|
|
153
153
|
* Credits to the React Spectrum team:
|
|
154
154
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useSelectableList.ts
|
|
155
|
-
*/function
|
|
155
|
+
*/function Du(e,t,n){const r=xu({usage:"search",sensitivity:"base"}),o=C(()=>{const i=S(e.keyboardDelegate);return i||new Mu(e.collection,t,r)});return Pu({selectionManager:()=>S(e.selectionManager),keyboardDelegate:o,autoFocus:()=>S(e.autoFocus),deferAutoFocus:()=>S(e.deferAutoFocus),shouldFocusWrap:()=>S(e.shouldFocusWrap),disallowEmptySelection:()=>S(e.disallowEmptySelection),selectOnFocus:()=>S(e.selectOnFocus),disallowTypeAhead:()=>S(e.disallowTypeAhead),shouldUseVirtualFocus:()=>S(e.shouldUseVirtualFocus),allowsTabNavigation:()=>S(e.allowsTabNavigation),isVirtualized:()=>S(e.isVirtualized),scrollToKey:i=>S(e.scrollToKey)?.(i)},t)}/*!
|
|
156
156
|
* Portions of this file are based on code from ariakit
|
|
157
157
|
* MIT Licensed, Copyright (c) Diego Haz.
|
|
158
158
|
*
|
|
159
159
|
* Credits to the ariakit team:
|
|
160
160
|
* https://github.com/hope-ui/hope-ui/blob/54125b130195f37161dbeeea0c21dc3b198bc3ac/packages/core/src/button/is-button.ts
|
|
161
|
-
*/const
|
|
161
|
+
*/const Iu=["button","color","file","image","reset","submit"];function Ru(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?Iu.indexOf(e.type)!==-1:!1}function Fu(e){let t;const n=Me({type:"button"},e),[r,o]=j(n,["ref","type","disabled"]),i=hu(()=>t,()=>"button"),s=C(()=>{const c=i();return c==null?!1:Ru({tagName:c,type:r.type})}),a=C(()=>i()==="input"),l=C(()=>i()==="a"&&t?.getAttribute("href")!=null);return y(bn,L({as:"button",ref(c){var d=st(u=>t=u,r.ref);typeof d=="function"&&d(c)},get type(){return s()||a()?r.type:void 0},get role(){return!s()&&!l()?"button":void 0},get tabIndex(){return!s()&&!l()&&!r.disabled?0:void 0},get disabled(){return s()||a()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}const $i=ce();function Ni(){return he($i)}function $u(){const e=Ni();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}/*!
|
|
162
162
|
* Portions of this file are based on code from ariakit.
|
|
163
163
|
* MIT Licensed, Copyright (c) Diego Haz.
|
|
164
164
|
*
|
|
165
165
|
* Credits to the Ariakit team:
|
|
166
166
|
* https://github.com/ariakit/ariakit/blob/da142672eddefa99365773ced72171facc06fdcb/packages/ariakit/src/collection/collection-state.ts
|
|
167
|
-
*/function Ki(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function
|
|
167
|
+
*/function Ki(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Nu(e,t){const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=e[r]?.ref();if(o&&Ki(o,n))return r+1}return 0}function Ku(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const a=o.ref(),l=s.ref();return a===l||!a||!l?0:Ki(a,l)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function zi(e,t){const n=Ku(e);e!==n&&t(n)}function zu(e){const t=e[0],n=e[e.length-1]?.ref();let r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return je(r).body}function Bu(e,t){T(()=>{const n=setTimeout(()=>{zi(e(),t)});K(()=>clearTimeout(n))})}function Vu(e,t){if(typeof IntersectionObserver!="function"){Bu(e,t);return}let n=[];T(()=>{const r=()=>{const s=!!n.length;n=e(),s&&zi(e(),t)},o=zu(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}K(()=>i.disconnect())})}/*!
|
|
168
168
|
* Portions of this file are based on code from ariakit.
|
|
169
169
|
* MIT Licensed, Copyright (c) Diego Haz.
|
|
170
170
|
*
|
|
@@ -172,14 +172,14 @@
|
|
|
172
172
|
* https://github.com/ariakit/ariakit/blob/da142672eddefa99365773ced72171facc06fdcb/packages/ariakit/src/collection/collection.tsx
|
|
173
173
|
* https://github.com/ariakit/ariakit/blob/da142672eddefa99365773ced72171facc06fdcb/packages/ariakit/src/collection/collection-state.ts
|
|
174
174
|
* https://github.com/ariakit/ariakit/blob/da142672eddefa99365773ced72171facc06fdcb/packages/ariakit/src/collection/collection-item.ts
|
|
175
|
-
*/function ju(e={}){const[t,n]=Jc({value:()=>S(e.items),onChange:i=>e.onItemsChange?.(i)});Uu(t,n);const r=i=>(n(s=>{const a=Ku(s,i);return Oc(s,i,a)}),()=>{n(s=>{const a=s.filter(l=>l.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>y($i.Provider,{value:{registerItem:r},get children(){return i.children}})}}function qu(e){const t=Nu(),n=Me({shouldRegisterItem:!0},e);T(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());K(r)})}var Z=e=>typeof e=="function"?e():e,Cr=e=>requestAnimationFrame(()=>requestAnimationFrame(e)),Or=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},wn=new Map,Hu=e=>{T(()=>{const t=Z(e.style)??{},n=Z(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=wn.get(e.key);o?o.activeCount++:wn.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);K(()=>{const i=wn.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}wn.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},Bi=Hu,Wu=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Gu=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Yu=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[l,c,d]=Wu(o,t),u=d-l-r*c;(c!==0||u!==0)&&Gu(o,t)&&(i+=u,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[Vi,Ui]=O([]),Xu=e=>Vi().indexOf(e)===Vi().length-1,Ju=e=>{const t=L({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Te();let r=[0,0],o=null,i=null;T(()=>{Z(t.enabled)&&(Ui(c=>[...c,n]),K(()=>{Ui(c=>c.filter(d=>d!==n))}))}),T(()=>{if(!Z(t.enabled)||!Z(t.hideScrollbar))return;const{body:c}=document,d=window.innerWidth-c.offsetWidth;if(Z(t.preventScrollbarShift)){const u={overflow:"hidden"},h=[];d>0&&(Z(t.preventScrollbarShiftMode)==="padding"?u.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${d}px)`:u.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${d}px)`,h.push({key:"--scrollbar-width",value:`${d}px`}));const m=window.scrollY,f=window.scrollX;Bi({key:"prevent-scroll",element:c,style:u,properties:h,cleanup:()=>{Z(t.restoreScrollPosition)&&d>0&&window.scrollTo(f,m)}})}else Bi({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),T(()=>{!Xu(n)||!Z(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),K(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",l)}))});const s=c=>{r=ji(c),o=null,i=null},a=c=>{const d=c.target,u=Z(t.element),h=Zu(c),m=Math.abs(h[0])>Math.abs(h[1])?"x":"y",f=m==="x"?h[0]:h[1],g=qi(d,m,f,u);let p;u&&Or(u,d)?p=!g:p=!0,p&&c.cancelable&&c.preventDefault()},l=c=>{const d=Z(t.element),u=c.target;let h;if(c.touches.length===2)h=!Z(t.allowPinchZoom);else{if(o==null||i===null){const m=ji(c).map((g,p)=>r[p]-g),f=Math.abs(m[0])>Math.abs(m[1])?"x":"y";o=f,i=f==="x"?m[0]:m[1]}if(u.type==="range")h=!1;else{const m=qi(u,o,i,d);d&&Or(d,u)?h=!m:h=!0}}h&&c.cancelable&&c.preventDefault()}},Zu=e=>[e.deltaX,e.deltaY],ji=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],qi=(e,t,n,r)=>{const o=r!==null&&Or(r,e),[i,s]=Yu(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},Qu=Ju,Hi=Qu;const Wi=ce();function ed(){return he(Wi)}function td(e){let t;const n=ed(),[r,o]=j(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=u=>{i.add(u);const h=n?.registerNestedLayer(u);return()=>{i.delete(u),h?.()}};du({shouldExcludeElement:u=>t?r.excludedElements?.some(h=>Le(h(),u))||[...i].some(h=>Le(h,u)):!1,onPointerDownOutside:u=>{!t||pe.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!pe.isTopMostLayer(t)||(r.onPointerDownOutside?.(u),r.onInteractOutside?.(u),u.defaultPrevented||r.onDismiss?.())},onFocusOutside:u=>{r.onFocusOutside?.(u),r.onInteractOutside?.(u),u.defaultPrevented||r.onDismiss?.()}},()=>t),Zc({ownerDocument:()=>qe(t),onEscapeKeyDown:u=>{!t||!pe.isTopMostLayer(t)||(r.onEscapeKeyDown?.(u),!u.defaultPrevented&&r.onDismiss&&(u.preventDefault(),r.onDismiss()))}}),rt(()=>{if(!t)return;pe.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const u=n?.registerNestedLayer(t);pe.assignPointerEventToLayers(),pe.disableBodyPointerEvents(t),K(()=>{t&&(pe.removeLayer(t),u?.(),pe.assignPointerEventToLayers(),pe.restoreBodyPointerEvents(t))})}),T(nt([()=>t,()=>r.disableOutsidePointerEvents],([u,h])=>{if(!u)return;const m=pe.find(u);m&&m.isPointerBlocking!==h&&(m.isPointerBlocking=h,pe.assignPointerEventToLayers()),h&&pe.disableBodyPointerEvents(u),K(()=>{pe.restoreBodyPointerEvents(u)})},{defer:!0}));const d={registerNestedLayer:s};return y(Wi.Provider,{value:d,get children(){return y(bn,L({as:"div",ref(u){var h=at(m=>t=m,r.ref);typeof h=="function"&&h(u)}},o))}})}const Gi=ce();function nd(){const e=he(Gi);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}function rd(e){const t=nd(),[n,r]=j(e,["ref","style"]);return y(bn,L({as:"div",ref(o){var i=at(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return{position:"absolute",top:0,left:0,"min-width":"max-content",...n.style}}},r))}const od=["top","right","bottom","left"],Xe=Math.min,me=Math.max,vn=Math.round,xn=Math.floor,De=e=>({x:e,y:e}),id={left:"right",right:"left",bottom:"top",top:"bottom"},sd={start:"end",end:"start"};function _r(e,t,n){return me(e,Xe(t,n))}function lt(e,t){return typeof e=="function"?e(t):e}function Je(e){return e.split("-")[0]}function vt(e){return e.split("-")[1]}function Yi(e){return e==="x"?"y":"x"}function Pr(e){return e==="y"?"height":"width"}function ct(e){return["top","bottom"].includes(Je(e))?"y":"x"}function Ar(e){return Yi(ct(e))}function ad(e,t,n){n===void 0&&(n=!1);const r=vt(e),o=Ar(e),i=Pr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Sn(s)),[s,Sn(s)]}function ld(e){const t=Sn(e);return[Tr(e),t,Tr(t)]}function Tr(e){return e.replace(/start|end/g,t=>sd[t])}function cd(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function ud(e,t,n,r){const o=vt(e);let i=cd(Je(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Tr)))),i}function Sn(e){return e.replace(/left|right|bottom|top/g,t=>id[t])}function dd(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xi(e){return typeof e!="number"?dd(e):{top:e,right:e,bottom:e,left:e}}function En(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ji(e,t,n){let{reference:r,floating:o}=e;const i=ct(t),s=Ar(t),a=Pr(s),l=Je(t),c=i==="y",d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(l){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-o.width,y:u};break;default:m={x:r.x,y:r.y}}switch(vt(t)){case"start":m[s]-=h*(n&&c?-1:1);break;case"end":m[s]+=h*(n&&c?-1:1);break}return m}const fd=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Ji(c,r,l),h=r,m={},f=0;for(let g=0;g<a.length;g++){const{name:p,fn:b}=a[g],{x:w,y:v,data:x,reset:C}=await b({x:d,y:u,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});d=w??d,u=v??u,m={...m,[p]:{...m[p],...x}},C&&f<=50&&(f++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:u}=Ji(c,h,l)),g=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:m}};async function jt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:m=0}=lt(t,e),f=Xi(m),p=a[h?u==="floating"?"reference":"floating":u],b=En(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(p)))==null||n?p:p.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},C=En(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(b.top-C.top+f.top)/x.y,bottom:(C.bottom-b.bottom+f.bottom)/x.y,left:(b.left-C.left+f.left)/x.x,right:(C.right-b.right+f.right)/x.x}}const hd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=lt(e,t)||{};if(c==null)return{};const u=Xi(d),h={x:n,y:r},m=Ar(o),f=Pr(m),g=await s.getDimensions(c),p=m==="y",b=p?"top":"left",w=p?"bottom":"right",v=p?"clientHeight":"clientWidth",x=i.reference[f]+i.reference[m]-h[m]-i.floating[f],C=h[m]-i.reference[m],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let k=E?E[v]:0;(!k||!await(s.isElement==null?void 0:s.isElement(E)))&&(k=a.floating[v]||i.floating[f]);const F=x/2-C/2,P=k/2-g[f]/2-1,R=Xe(u[b],P),M=Xe(u[w],P),I=R,oe=k-g[f]-M,Y=k/2-g[f]/2+F,fe=_r(I,Y,oe),$=!l.arrow&&vt(o)!=null&&Y!==fe&&i.reference[f]/2-(Y<I?R:M)-g[f]/2<0,V=$?Y<I?Y-I:Y-oe:0;return{[m]:h[m]+V,data:{[m]:fe,centerOffset:Y-fe-V,...$&&{alignmentOffset:V}},reset:$}}}),gd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...p}=lt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=Je(o),w=ct(a),v=Je(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=h||(v||!g?[Sn(a)]:ld(a)),E=f!=="none";!h&&E&&C.push(...ud(a,g,f,x));const k=[a,...C],F=await jt(t,p),P=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(F[b]),u){const Y=ad(o,s,x);P.push(F[Y[0]],F[Y[1]])}if(R=[...R,{placement:o,overflows:P}],!P.every(Y=>Y<=0)){var M,I;const Y=(((M=i.flip)==null?void 0:M.index)||0)+1,fe=k[Y];if(fe)return{data:{index:Y,overflows:R},reset:{placement:fe}};let $=(I=R.filter(V=>V.overflows[0]<=0).sort((V,Q)=>V.overflows[1]-Q.overflows[1])[0])==null?void 0:I.placement;if(!$)switch(m){case"bestFit":{var oe;const V=(oe=R.filter(Q=>{if(E){const se=ct(Q.placement);return se===w||se==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(se=>se>0).reduce((se,At)=>se+At,0)]).sort((Q,se)=>Q[1]-se[1])[0])==null?void 0:oe[0];V&&($=V);break}case"initialPlacement":$=a;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function Zi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qi(e){return od.some(t=>e[t]>=0)}const pd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=lt(e,t);switch(r){case"referenceHidden":{const i=await jt(t,{...o,elementContext:"reference"}),s=Zi(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Qi(s)}}}case"escaped":{const i=await jt(t,{...o,altBoundary:!0}),s=Zi(i,n.floating);return{data:{escapedOffsets:s,escaped:Qi(s)}}}default:return{}}}}};async function md(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Je(n),a=vt(n),l=ct(n)==="y",c=["left","top"].includes(s)?-1:1,d=i&&l?-1:1,u=lt(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:f}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof f=="number"&&(m=a==="end"?f*-1:f),l?{x:m*d,y:h*c}:{x:h*c,y:m*d}}const yd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await md(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},bd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:p=>{let{x:b,y:w}=p;return{x:b,y:w}}},...l}=lt(e,t),c={x:n,y:r},d=await jt(t,l),u=ct(Je(o)),h=Yi(u);let m=c[h],f=c[u];if(i){const p=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=m+d[p],v=m-d[b];m=_r(w,m,v)}if(s){const p=u==="y"?"top":"left",b=u==="y"?"bottom":"right",w=f+d[p],v=f-d[b];f=_r(w,f,v)}const g=a.fn({...t,[h]:m,[u]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:i,[u]:s}}}}}},wd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=lt(e,t),d=await jt(t,c),u=Je(o),h=vt(o),m=ct(o)==="y",{width:f,height:g}=i.floating;let p,b;u==="top"||u==="bottom"?(p=u,b=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=u,p=h==="end"?"top":"bottom");const w=g-d.top-d.bottom,v=f-d.left-d.right,x=Xe(g-d[p],w),C=Xe(f-d[b],v),E=!t.middlewareData.shift;let k=x,F=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(F=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=w),E&&!h){const R=me(d.left,0),M=me(d.right,0),I=me(d.top,0),oe=me(d.bottom,0);m?F=f-2*(R!==0||M!==0?R+M:me(d.left,d.right)):k=g-2*(I!==0||oe!==0?I+oe:me(d.top,d.bottom))}await l({...t,availableWidth:F,availableHeight:k});const P=await s.getDimensions(a.floating);return f!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function kn(){return typeof window<"u"}function xt(e){return es(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ie(e){var t;return(t=(es(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function es(e){return kn()?e instanceof Node||e instanceof ye(e).Node:!1}function Oe(e){return kn()?e instanceof Element||e instanceof ye(e).Element:!1}function Re(e){return kn()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function ts(e){return!kn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function qt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_e(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function vd(e){return["table","td","th"].includes(xt(e))}function Cn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Lr(e){const t=Mr(),n=Oe(e)?_e(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function xd(e){let t=Ze(e);for(;Re(t)&&!St(t);){if(Lr(t))return t;if(Cn(t))return null;t=Ze(t)}return null}function Mr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function St(e){return["html","body","#document"].includes(xt(e))}function _e(e){return ye(e).getComputedStyle(e)}function On(e){return Oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ze(e){if(xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ts(e)&&e.host||Ie(e);return ts(t)?t.host:t}function ns(e){const t=Ze(e);return St(t)?e.ownerDocument?e.ownerDocument.body:e.body:Re(t)&&qt(t)?t:ns(t)}function Ht(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ns(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ye(o);if(i){const a=Dr(s);return t.concat(s,s.visualViewport||[],qt(o)?o:[],a&&n?Ht(a):[])}return t.concat(o,Ht(o,[],n))}function Dr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rs(e){const t=_e(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Re(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=vn(n)!==i||vn(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ir(e){return Oe(e)?e:e.contextElement}function Et(e){const t=Ir(e);if(!Re(t))return De(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rs(t);let s=(i?vn(n.width):n.width)/r,a=(i?vn(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Sd=De(0);function os(e){const t=ye(e);return!Mr()||!t.visualViewport?Sd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ed(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ye(e)?!1:t}function ut(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ir(e);let s=De(1);t&&(r?Oe(r)&&(s=Et(r)):s=Et(e));const a=Ed(i,n,r)?os(i):De(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const h=ye(i),m=r&&Oe(r)?ye(r):r;let f=h,g=Dr(f);for(;g&&r&&m!==f;){const p=Et(g),b=g.getBoundingClientRect(),w=_e(g),v=b.left+(g.clientLeft+parseFloat(w.paddingLeft))*p.x,x=b.top+(g.clientTop+parseFloat(w.paddingTop))*p.y;l*=p.x,c*=p.y,d*=p.x,u*=p.y,l+=v,c+=x,f=ye(g),g=Dr(f)}}return En({width:d,height:u,x:l,y:c})}function Rr(e,t){const n=On(e).scrollLeft;return t?t.left+n:ut(Ie(e)).left+n}function is(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Rr(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function kd(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Ie(r),a=t?Cn(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=De(1);const d=De(0),u=Re(r);if((u||!u&&!i)&&((xt(r)!=="body"||qt(s))&&(l=On(r)),Re(r))){const m=ut(r);c=Et(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const h=s&&!u&&!i?is(s,l,!0):De(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}}function Cd(e){return Array.from(e.getClientRects())}function Od(e){const t=Ie(e),n=On(e),r=e.ownerDocument.body,o=me(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=me(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Rr(e);const a=-n.scrollTop;return _e(r).direction==="rtl"&&(s+=me(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function _d(e,t){const n=ye(e),r=Ie(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=Mr();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function Pd(e,t){const n=ut(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Re(e)?Et(e):De(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function ss(e,t,n){let r;if(t==="viewport")r=_d(e,n);else if(t==="document")r=Od(Ie(e));else if(Oe(t))r=Pd(t,n);else{const o=os(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return En(r)}function as(e,t){const n=Ze(e);return n===t||!Oe(n)||St(n)?!1:_e(n).position==="fixed"||as(n,t)}function Ad(e,t){const n=t.get(e);if(n)return n;let r=Ht(e,[],!1).filter(a=>Oe(a)&&xt(a)!=="body"),o=null;const i=_e(e).position==="fixed";let s=i?Ze(e):e;for(;Oe(s)&&!St(s);){const a=_e(s),l=Lr(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||qt(s)&&!l&&as(e,s))?r=r.filter(d=>d!==s):o=a,s=Ze(s)}return t.set(e,r),r}function Td(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Cn(t)?[]:Ad(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,d)=>{const u=ss(t,d,o);return c.top=me(u.top,c.top),c.right=Xe(u.right,c.right),c.bottom=Xe(u.bottom,c.bottom),c.left=me(u.left,c.left),c},ss(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ld(e){const{width:t,height:n}=rs(e);return{width:t,height:n}}function Md(e,t,n){const r=Re(t),o=Ie(t),i=n==="fixed",s=ut(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=De(0);if(r||!r&&!i)if((xt(t)!=="body"||qt(o))&&(a=On(t)),r){const h=ut(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=Rr(o));const c=o&&!r&&!i?is(o,a):De(0),d=s.left+a.scrollLeft-l.x-c.x,u=s.top+a.scrollTop-l.y-c.y;return{x:d,y:u,width:s.width,height:s.height}}function Fr(e){return _e(e).position==="static"}function ls(e,t){if(!Re(e)||_e(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ie(e)===n&&(n=n.ownerDocument.body),n}function cs(e,t){const n=ye(e);if(Cn(e))return n;if(!Re(e)){let o=Ze(e);for(;o&&!St(o);){if(Oe(o)&&!Fr(o))return o;o=Ze(o)}return n}let r=ls(e,t);for(;r&&vd(r)&&Fr(r);)r=ls(r,t);return r&&St(r)&&Fr(r)&&!Lr(r)?n:r||xd(e)||n}const Dd=async function(e){const t=this.getOffsetParent||cs,n=this.getDimensions,r=await n(e.floating);return{reference:Md(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Id(e){return _e(e).direction==="rtl"}const us={convertOffsetParentRelativeRectToViewportRelativeRect:kd,getDocumentElement:Ie,getClippingRect:Td,getOffsetParent:cs,getElementRects:Dd,getClientRects:Cd,getDimensions:Ld,getScale:Et,isElement:Oe,isRTL:Id};function ds(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rd(e,t){let n=null,r;const o=Ie(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:h,height:m}=c;if(a||t(),!h||!m)return;const f=xn(u),g=xn(o.clientWidth-(d+h)),p=xn(o.clientHeight-(u+m)),b=xn(d),v={rootMargin:-f+"px "+-g+"px "+-p+"px "+-b+"px",threshold:me(0,Xe(1,l))||1};let x=!0;function C(E){const k=E[0].intersectionRatio;if(k!==l){if(!x)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!ds(c,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return s(!0),i}function Fd(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ir(e),d=o||i?[...c?Ht(c):[],...Ht(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const u=c&&a?Rd(c,n):null;let h=-1,m=null;s&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let f,g=l?ut(e):null;l&&p();function p(){const b=ut(e);g&&!ds(g,b)&&n(),g=b,f=requestAnimationFrame(p)}return n(),()=>{var b;d.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),u?.(),(b=m)==null||b.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const $d=yd,Nd=bd,Kd=gd,zd=wd,Bd=pd,Vd=hd,Ud=(e,t,n)=>{const r=new Map,o={platform:us,...n},i={...o.platform,_c:r};return fd(e,t,{...o,platform:i})};function fs(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function jd(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?fs(r):e?e.getBoundingClientRect():fs()}}}function qd(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}const Hd={top:"bottom",right:"left",bottom:"top",left:"right"};function Wd(e,t){const[n,r]=e.split("-"),o=Hd[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function Gd(e){const t=Me({getAnchorRect:h=>h?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=O(),[o,i]=O(),[s,a]=O(t.placement),l=()=>jd(t.anchorRef(),t.getAnchorRect),{direction:c}=Er();async function d(){const h=l(),m=n(),f=o();if(!h||!m)return;const g=(f?.clientHeight||0)/2,p=typeof t.gutter=="number"?t.gutter+g:t.gutter??g;m.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),h.getBoundingClientRect();const b=[$d(({placement:E})=>{const k=!!E.split("-")[1];return{mainAxis:p,crossAxis:k?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const E=typeof t.flip=="string"?t.flip.split(" "):void 0;if(E!==void 0&&!E.every(qd))throw new Error("`flip` expects a spaced-delimited list of placements");b.push(Kd({padding:t.overflowPadding,fallbackPlacements:E}))}(t.slide||t.overlap)&&b.push(Nd({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),b.push(zd({padding:t.overflowPadding,apply({availableWidth:E,availableHeight:k,rects:F}){const P=Math.round(F.reference.width);E=Math.floor(E),k=Math.floor(k),m.style.setProperty("--kb-popper-anchor-width",`${P}px`),m.style.setProperty("--kb-popper-content-available-width",`${E}px`),m.style.setProperty("--kb-popper-content-available-height",`${k}px`),t.sameWidth&&(m.style.width=`${P}px`),t.fitViewport&&(m.style.maxWidth=`${E}px`,m.style.maxHeight=`${k}px`)}})),t.hideWhenDetached&&b.push(Bd({padding:t.detachedPadding})),f&&b.push(Vd({element:f,padding:t.arrowPadding}));const w=await Ud(h,m,{placement:t.placement,strategy:"absolute",middleware:b,platform:{...us,isRTL:()=>c()==="rtl"}});if(a(w.placement),t.onCurrentPlacementChange?.(w.placement),!m)return;m.style.setProperty("--kb-popper-content-transform-origin",Wd(w.placement,c()));const v=Math.round(w.x),x=Math.round(w.y);let C;if(t.hideWhenDetached&&(C=w.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(m.style,{top:"0",left:"0",transform:`translate3d(${v}px, ${x}px, 0)`,visibility:C}),f&&w.middlewareData.arrow){const{x:E,y:k}=w.middlewareData.arrow,F=w.placement.split("-")[0];Object.assign(f.style,{left:E!=null?`${E}px`:"",top:k!=null?`${k}px`:"",[F]:"100%"})}}T(()=>{const h=l(),m=n();if(!h||!m)return;const f=Fd(h,m,d,{elementResize:typeof ResizeObserver=="function"});K(f)}),T(()=>{const h=n(),m=t.contentRef();!h||!m||queueMicrotask(()=>{h.style.zIndex=getComputedStyle(m).zIndex})});const u={currentPlacement:s,contentRef:()=>t.contentRef(),setPositionerRef:r,setArrowRef:i};return y(Gi.Provider,{value:u,get children(){return t.children}})}const hs=ce();function gs(){return he(hs)}function kt(){const e=gs();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}const ps=ce();function Ct(){const e=he(ps);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}/*!
|
|
175
|
+
*/function Uu(e={}){const[t,n]=Xc({value:()=>S(e.items),onChange:i=>e.onItemsChange?.(i)});Vu(t,n);const r=i=>(n(s=>{const a=Nu(s,i);return Cc(s,i,a)}),()=>{n(s=>{const a=s.filter(l=>l.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>y($i.Provider,{value:{registerItem:r},get children(){return i.children}})}}function ju(e){const t=$u(),n=Me({shouldRegisterItem:!0},e);T(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());K(r)})}var J=e=>typeof e=="function"?e():e,Cr=e=>requestAnimationFrame(()=>requestAnimationFrame(e)),Or=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},wn=new Map,qu=e=>{T(()=>{const t=J(e.style)??{},n=J(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=wn.get(e.key);o?o.activeCount++:wn.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);K(()=>{const i=wn.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}wn.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},Bi=qu,Hu=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Wu=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Gu=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[l,c,d]=Hu(o,t),u=d-l-r*c;(c!==0||u!==0)&&Wu(o,t)&&(i+=u,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[Vi,Ui]=O([]),Yu=e=>Vi().indexOf(e)===Vi().length-1,Xu=e=>{const t=L({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Te();let r=[0,0],o=null,i=null;T(()=>{J(t.enabled)&&(Ui(c=>[...c,n]),K(()=>{Ui(c=>c.filter(d=>d!==n))}))}),T(()=>{if(!J(t.enabled)||!J(t.hideScrollbar))return;const{body:c}=document,d=window.innerWidth-c.offsetWidth;if(J(t.preventScrollbarShift)){const u={overflow:"hidden"},f=[];d>0&&(J(t.preventScrollbarShiftMode)==="padding"?u.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${d}px)`:u.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${d}px)`,f.push({key:"--scrollbar-width",value:`${d}px`}));const g=window.scrollY,h=window.scrollX;Bi({key:"prevent-scroll",element:c,style:u,properties:f,cleanup:()=>{J(t.restoreScrollPosition)&&d>0&&window.scrollTo(h,g)}})}else Bi({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),T(()=>{!Yu(n)||!J(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),K(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",l)}))});const s=c=>{r=ji(c),o=null,i=null},a=c=>{const d=c.target,u=J(t.element),f=Ju(c),g=Math.abs(f[0])>Math.abs(f[1])?"x":"y",h=g==="x"?f[0]:f[1],p=qi(d,g,h,u);let m;u&&Or(u,d)?m=!p:m=!0,m&&c.cancelable&&c.preventDefault()},l=c=>{const d=J(t.element),u=c.target;let f;if(c.touches.length===2)f=!J(t.allowPinchZoom);else{if(o==null||i===null){const g=ji(c).map((p,m)=>r[m]-p),h=Math.abs(g[0])>Math.abs(g[1])?"x":"y";o=h,i=h==="x"?g[0]:g[1]}if(u.type==="range")f=!1;else{const g=qi(u,o,i,d);d&&Or(d,u)?f=!g:f=!0}}f&&c.cancelable&&c.preventDefault()}},Ju=e=>[e.deltaX,e.deltaY],ji=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],qi=(e,t,n,r)=>{const o=r!==null&&Or(r,e),[i,s]=Gu(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},Zu=Xu,Hi=Zu;const Wi=ce();function Qu(){return he(Wi)}function ed(e){let t;const n=Qu(),[r,o]=j(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=u=>{i.add(u);const f=n?.registerNestedLayer(u);return()=>{i.delete(u),f?.()}};uu({shouldExcludeElement:u=>t?r.excludedElements?.some(f=>Le(f(),u))||[...i].some(f=>Le(f,u)):!1,onPointerDownOutside:u=>{!t||pe.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!pe.isTopMostLayer(t)||(r.onPointerDownOutside?.(u),r.onInteractOutside?.(u),u.defaultPrevented||r.onDismiss?.())},onFocusOutside:u=>{r.onFocusOutside?.(u),r.onInteractOutside?.(u),u.defaultPrevented||r.onDismiss?.()}},()=>t),Jc({ownerDocument:()=>je(t),onEscapeKeyDown:u=>{!t||!pe.isTopMostLayer(t)||(r.onEscapeKeyDown?.(u),!u.defaultPrevented&&r.onDismiss&&(u.preventDefault(),r.onDismiss()))}}),ht(()=>{if(!t)return;pe.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const u=n?.registerNestedLayer(t);pe.assignPointerEventToLayers(),pe.disableBodyPointerEvents(t),K(()=>{t&&(pe.removeLayer(t),u?.(),pe.assignPointerEventToLayers(),pe.restoreBodyPointerEvents(t))})}),T(tt([()=>t,()=>r.disableOutsidePointerEvents],([u,f])=>{if(!u)return;const g=pe.find(u);g&&g.isPointerBlocking!==f&&(g.isPointerBlocking=f,pe.assignPointerEventToLayers()),f&&pe.disableBodyPointerEvents(u),K(()=>{pe.restoreBodyPointerEvents(u)})},{defer:!0}));const d={registerNestedLayer:s};return y(Wi.Provider,{value:d,get children(){return y(bn,L({as:"div",ref(u){var f=st(g=>t=g,r.ref);typeof f=="function"&&f(u)}},o))}})}const Gi=ce();function td(){const e=he(Gi);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}function nd(e){const t=td(),[n,r]=j(e,["ref","style"]);return y(bn,L({as:"div",ref(o){var i=st(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return{position:"absolute",top:0,left:0,"min-width":"max-content",...n.style}}},r))}const rd=["top","right","bottom","left"],Ye=Math.min,me=Math.max,vn=Math.round,xn=Math.floor,De=e=>({x:e,y:e}),od={left:"right",right:"left",bottom:"top",top:"bottom"},id={start:"end",end:"start"};function _r(e,t,n){return me(e,Ye(t,n))}function at(e,t){return typeof e=="function"?e(t):e}function Xe(e){return e.split("-")[0]}function vt(e){return e.split("-")[1]}function Yi(e){return e==="x"?"y":"x"}function Pr(e){return e==="y"?"height":"width"}function lt(e){return["top","bottom"].includes(Xe(e))?"y":"x"}function Ar(e){return Yi(lt(e))}function sd(e,t,n){n===void 0&&(n=!1);const r=vt(e),o=Ar(e),i=Pr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Sn(s)),[s,Sn(s)]}function ad(e){const t=Sn(e);return[Tr(e),t,Tr(t)]}function Tr(e){return e.replace(/start|end/g,t=>id[t])}function ld(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function cd(e,t,n,r){const o=vt(e);let i=ld(Xe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Tr)))),i}function Sn(e){return e.replace(/left|right|bottom|top/g,t=>od[t])}function ud(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xi(e){return typeof e!="number"?ud(e):{top:e,right:e,bottom:e,left:e}}function kn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ji(e,t,n){let{reference:r,floating:o}=e;const i=lt(t),s=Ar(t),a=Pr(s),l=Xe(t),c=i==="y",d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let g;switch(l){case"top":g={x:d,y:r.y-o.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:u};break;case"left":g={x:r.x-o.width,y:u};break;default:g={x:r.x,y:r.y}}switch(vt(t)){case"start":g[s]-=f*(n&&c?-1:1);break;case"end":g[s]+=f*(n&&c?-1:1);break}return g}const dd=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Ji(c,r,l),f=r,g={},h=0;for(let p=0;p<a.length;p++){const{name:m,fn:b}=a[p],{x:w,y:v,data:x,reset:_}=await b({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:g,rects:c,platform:s,elements:{reference:e,floating:t}});d=w??d,u=v??u,g={...g,[m]:{...g[m],...x}},_&&h<=50&&(h++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:u}=Ji(c,f,l)),p=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:g}};async function jt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:g=0}=at(t,e),h=Xi(g),m=a[f?u==="floating"?"reference":"floating":u],b=kn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},_=kn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(b.top-_.top+h.top)/x.y,bottom:(_.bottom-b.bottom+h.bottom)/x.y,left:(b.left-_.left+h.left)/x.x,right:(_.right-b.right+h.right)/x.x}}const fd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=at(e,t)||{};if(c==null)return{};const u=Xi(d),f={x:n,y:r},g=Ar(o),h=Pr(g),p=await s.getDimensions(c),m=g==="y",b=m?"top":"left",w=m?"bottom":"right",v=m?"clientHeight":"clientWidth",x=i.reference[h]+i.reference[g]-f[g]-i.floating[h],_=f[g]-i.reference[g],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let k=E?E[v]:0;(!k||!await(s.isElement==null?void 0:s.isElement(E)))&&(k=a.floating[v]||i.floating[h]);const F=x/2-_/2,P=k/2-p[h]/2-1,R=Ye(u[b],P),M=Ye(u[w],P),I=R,re=k-p[h]-M,Y=k/2-p[h]/2+F,fe=_r(I,Y,re),$=!l.arrow&&vt(o)!=null&&Y!==fe&&i.reference[h]/2-(Y<I?R:M)-p[h]/2<0,V=$?Y<I?Y-I:Y-re:0;return{[g]:f[g]+V,data:{[g]:fe,centerOffset:Y-fe-V,...$&&{alignmentOffset:V}},reset:$}}}),hd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...m}=at(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=Xe(o),w=lt(a),v=Xe(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=f||(v||!p?[Sn(a)]:ad(a)),E=h!=="none";!f&&E&&_.push(...cd(a,p,h,x));const k=[a,..._],F=await jt(t,m),P=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(F[b]),u){const Y=sd(o,s,x);P.push(F[Y[0]],F[Y[1]])}if(R=[...R,{placement:o,overflows:P}],!P.every(Y=>Y<=0)){var M,I;const Y=(((M=i.flip)==null?void 0:M.index)||0)+1,fe=k[Y];if(fe)return{data:{index:Y,overflows:R},reset:{placement:fe}};let $=(I=R.filter(V=>V.overflows[0]<=0).sort((V,Q)=>V.overflows[1]-Q.overflows[1])[0])==null?void 0:I.placement;if(!$)switch(g){case"bestFit":{var re;const V=(re=R.filter(Q=>{if(E){const se=lt(Q.placement);return se===w||se==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(se=>se>0).reduce((se,At)=>se+At,0)]).sort((Q,se)=>Q[1]-se[1])[0])==null?void 0:re[0];V&&($=V);break}case"initialPlacement":$=a;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function Zi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qi(e){return rd.some(t=>e[t]>=0)}const gd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=at(e,t);switch(r){case"referenceHidden":{const i=await jt(t,{...o,elementContext:"reference"}),s=Zi(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Qi(s)}}}case"escaped":{const i=await jt(t,{...o,altBoundary:!0}),s=Zi(i,n.floating);return{data:{escapedOffsets:s,escaped:Qi(s)}}}default:return{}}}}};async function pd(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Xe(n),a=vt(n),l=lt(n)==="y",c=["left","top"].includes(s)?-1:1,d=i&&l?-1:1,u=at(t,e);let{mainAxis:f,crossAxis:g,alignmentAxis:h}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof h=="number"&&(g=a==="end"?h*-1:h),l?{x:g*d,y:f*c}:{x:f*c,y:g*d}}const md=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await pd(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},yd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:m=>{let{x:b,y:w}=m;return{x:b,y:w}}},...l}=at(e,t),c={x:n,y:r},d=await jt(t,l),u=lt(Xe(o)),f=Yi(u);let g=c[f],h=c[u];if(i){const m=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=g+d[m],v=g-d[b];g=_r(w,g,v)}if(s){const m=u==="y"?"top":"left",b=u==="y"?"bottom":"right",w=h+d[m],v=h-d[b];h=_r(w,h,v)}const p=a.fn({...t,[f]:g,[u]:h});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:i,[u]:s}}}}}},bd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=at(e,t),d=await jt(t,c),u=Xe(o),f=vt(o),g=lt(o)==="y",{width:h,height:p}=i.floating;let m,b;u==="top"||u==="bottom"?(m=u,b=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(b=u,m=f==="end"?"top":"bottom");const w=p-d.top-d.bottom,v=h-d.left-d.right,x=Ye(p-d[m],w),_=Ye(h-d[b],v),E=!t.middlewareData.shift;let k=x,F=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(F=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=w),E&&!f){const R=me(d.left,0),M=me(d.right,0),I=me(d.top,0),re=me(d.bottom,0);g?F=h-2*(R!==0||M!==0?R+M:me(d.left,d.right)):k=p-2*(I!==0||re!==0?I+re:me(d.top,d.bottom))}await l({...t,availableWidth:F,availableHeight:k});const P=await s.getDimensions(a.floating);return h!==P.width||p!==P.height?{reset:{rects:!0}}:{}}}};function En(){return typeof window<"u"}function xt(e){return es(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ie(e){var t;return(t=(es(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function es(e){return En()?e instanceof Node||e instanceof ye(e).Node:!1}function Oe(e){return En()?e instanceof Element||e instanceof ye(e).Element:!1}function Re(e){return En()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function ts(e){return!En()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function qt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_e(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function wd(e){return["table","td","th"].includes(xt(e))}function Cn(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Lr(e){const t=Mr(),n=Oe(e)?_e(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function vd(e){let t=Je(e);for(;Re(t)&&!St(t);){if(Lr(t))return t;if(Cn(t))return null;t=Je(t)}return null}function Mr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function St(e){return["html","body","#document"].includes(xt(e))}function _e(e){return ye(e).getComputedStyle(e)}function On(e){return Oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Je(e){if(xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ts(e)&&e.host||Ie(e);return ts(t)?t.host:t}function ns(e){const t=Je(e);return St(t)?e.ownerDocument?e.ownerDocument.body:e.body:Re(t)&&qt(t)?t:ns(t)}function Ht(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ns(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ye(o);if(i){const a=Dr(s);return t.concat(s,s.visualViewport||[],qt(o)?o:[],a&&n?Ht(a):[])}return t.concat(o,Ht(o,[],n))}function Dr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rs(e){const t=_e(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Re(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=vn(n)!==i||vn(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ir(e){return Oe(e)?e:e.contextElement}function kt(e){const t=Ir(e);if(!Re(t))return De(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rs(t);let s=(i?vn(n.width):n.width)/r,a=(i?vn(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const xd=De(0);function os(e){const t=ye(e);return!Mr()||!t.visualViewport?xd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ye(e)?!1:t}function ct(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ir(e);let s=De(1);t&&(r?Oe(r)&&(s=kt(r)):s=kt(e));const a=Sd(i,n,r)?os(i):De(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(i){const f=ye(i),g=r&&Oe(r)?ye(r):r;let h=f,p=Dr(h);for(;p&&r&&g!==h;){const m=kt(p),b=p.getBoundingClientRect(),w=_e(p),v=b.left+(p.clientLeft+parseFloat(w.paddingLeft))*m.x,x=b.top+(p.clientTop+parseFloat(w.paddingTop))*m.y;l*=m.x,c*=m.y,d*=m.x,u*=m.y,l+=v,c+=x,h=ye(p),p=Dr(h)}}return kn({width:d,height:u,x:l,y:c})}function Rr(e,t){const n=On(e).scrollLeft;return t?t.left+n:ct(Ie(e)).left+n}function is(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Rr(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function kd(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Ie(r),a=t?Cn(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=De(1);const d=De(0),u=Re(r);if((u||!u&&!i)&&((xt(r)!=="body"||qt(s))&&(l=On(r)),Re(r))){const g=ct(r);c=kt(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const f=s&&!u&&!i?is(s,l,!0):De(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-l.scrollTop*c.y+d.y+f.y}}function Ed(e){return Array.from(e.getClientRects())}function Cd(e){const t=Ie(e),n=On(e),r=e.ownerDocument.body,o=me(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=me(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Rr(e);const a=-n.scrollTop;return _e(r).direction==="rtl"&&(s+=me(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function Od(e,t){const n=ye(e),r=Ie(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=Mr();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function _d(e,t){const n=ct(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Re(e)?kt(e):De(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function ss(e,t,n){let r;if(t==="viewport")r=Od(e,n);else if(t==="document")r=Cd(Ie(e));else if(Oe(t))r=_d(t,n);else{const o=os(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return kn(r)}function as(e,t){const n=Je(e);return n===t||!Oe(n)||St(n)?!1:_e(n).position==="fixed"||as(n,t)}function Pd(e,t){const n=t.get(e);if(n)return n;let r=Ht(e,[],!1).filter(a=>Oe(a)&&xt(a)!=="body"),o=null;const i=_e(e).position==="fixed";let s=i?Je(e):e;for(;Oe(s)&&!St(s);){const a=_e(s),l=Lr(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||qt(s)&&!l&&as(e,s))?r=r.filter(d=>d!==s):o=a,s=Je(s)}return t.set(e,r),r}function Ad(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Cn(t)?[]:Pd(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,d)=>{const u=ss(t,d,o);return c.top=me(u.top,c.top),c.right=Ye(u.right,c.right),c.bottom=Ye(u.bottom,c.bottom),c.left=me(u.left,c.left),c},ss(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Td(e){const{width:t,height:n}=rs(e);return{width:t,height:n}}function Ld(e,t,n){const r=Re(t),o=Ie(t),i=n==="fixed",s=ct(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=De(0);if(r||!r&&!i)if((xt(t)!=="body"||qt(o))&&(a=On(t)),r){const f=ct(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Rr(o));const c=o&&!r&&!i?is(o,a):De(0),d=s.left+a.scrollLeft-l.x-c.x,u=s.top+a.scrollTop-l.y-c.y;return{x:d,y:u,width:s.width,height:s.height}}function Fr(e){return _e(e).position==="static"}function ls(e,t){if(!Re(e)||_e(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ie(e)===n&&(n=n.ownerDocument.body),n}function cs(e,t){const n=ye(e);if(Cn(e))return n;if(!Re(e)){let o=Je(e);for(;o&&!St(o);){if(Oe(o)&&!Fr(o))return o;o=Je(o)}return n}let r=ls(e,t);for(;r&&wd(r)&&Fr(r);)r=ls(r,t);return r&&St(r)&&Fr(r)&&!Lr(r)?n:r||vd(e)||n}const Md=async function(e){const t=this.getOffsetParent||cs,n=this.getDimensions,r=await n(e.floating);return{reference:Ld(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dd(e){return _e(e).direction==="rtl"}const us={convertOffsetParentRelativeRectToViewportRelativeRect:kd,getDocumentElement:Ie,getClippingRect:Ad,getOffsetParent:cs,getElementRects:Md,getClientRects:Ed,getDimensions:Td,getScale:kt,isElement:Oe,isRTL:Dd};function ds(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Id(e,t){let n=null,r;const o=Ie(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:g}=c;if(a||t(),!f||!g)return;const h=xn(u),p=xn(o.clientWidth-(d+f)),m=xn(o.clientHeight-(u+g)),b=xn(d),v={rootMargin:-h+"px "+-p+"px "+-m+"px "+-b+"px",threshold:me(0,Ye(1,l))||1};let x=!0;function _(E){const k=E[0].intersectionRatio;if(k!==l){if(!x)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!ds(c,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(_,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return s(!0),i}function Rd(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ir(e),d=o||i?[...c?Ht(c):[],...Ht(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const u=c&&a?Id(c,n):null;let f=-1,g=null;s&&(g=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=g)==null||v.observe(t)})),n()}),c&&!l&&g.observe(c),g.observe(t));let h,p=l?ct(e):null;l&&m();function m(){const b=ct(e);p&&!ds(p,b)&&n(),p=b,h=requestAnimationFrame(m)}return n(),()=>{var b;d.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),u?.(),(b=g)==null||b.disconnect(),g=null,l&&cancelAnimationFrame(h)}}const Fd=md,$d=yd,Nd=hd,Kd=bd,zd=gd,Bd=fd,Vd=(e,t,n)=>{const r=new Map,o={platform:us,...n},i={...o.platform,_c:r};return dd(e,t,{...o,platform:i})};function fs(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function Ud(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?fs(r):e?e.getBoundingClientRect():fs()}}}function jd(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}const qd={top:"bottom",right:"left",bottom:"top",left:"right"};function Hd(e,t){const[n,r]=e.split("-"),o=qd[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function Wd(e){const t=Me({getAnchorRect:f=>f?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=O(),[o,i]=O(),[s,a]=O(t.placement),l=()=>Ud(t.anchorRef(),t.getAnchorRect),{direction:c}=kr();async function d(){const f=l(),g=n(),h=o();if(!f||!g)return;const p=(h?.clientHeight||0)/2,m=typeof t.gutter=="number"?t.gutter+p:t.gutter??p;g.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const b=[Fd(({placement:E})=>{const k=!!E.split("-")[1];return{mainAxis:m,crossAxis:k?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const E=typeof t.flip=="string"?t.flip.split(" "):void 0;if(E!==void 0&&!E.every(jd))throw new Error("`flip` expects a spaced-delimited list of placements");b.push(Nd({padding:t.overflowPadding,fallbackPlacements:E}))}(t.slide||t.overlap)&&b.push($d({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),b.push(Kd({padding:t.overflowPadding,apply({availableWidth:E,availableHeight:k,rects:F}){const P=Math.round(F.reference.width);E=Math.floor(E),k=Math.floor(k),g.style.setProperty("--kb-popper-anchor-width",`${P}px`),g.style.setProperty("--kb-popper-content-available-width",`${E}px`),g.style.setProperty("--kb-popper-content-available-height",`${k}px`),t.sameWidth&&(g.style.width=`${P}px`),t.fitViewport&&(g.style.maxWidth=`${E}px`,g.style.maxHeight=`${k}px`)}})),t.hideWhenDetached&&b.push(zd({padding:t.detachedPadding})),h&&b.push(Bd({element:h,padding:t.arrowPadding}));const w=await Vd(f,g,{placement:t.placement,strategy:"absolute",middleware:b,platform:{...us,isRTL:()=>c()==="rtl"}});if(a(w.placement),t.onCurrentPlacementChange?.(w.placement),!g)return;g.style.setProperty("--kb-popper-content-transform-origin",Hd(w.placement,c()));const v=Math.round(w.x),x=Math.round(w.y);let _;if(t.hideWhenDetached&&(_=w.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(g.style,{top:"0",left:"0",transform:`translate3d(${v}px, ${x}px, 0)`,visibility:_}),h&&w.middlewareData.arrow){const{x:E,y:k}=w.middlewareData.arrow,F=w.placement.split("-")[0];Object.assign(h.style,{left:E!=null?`${E}px`:"",top:k!=null?`${k}px`:"",[F]:"100%"})}}T(()=>{const f=l(),g=n();if(!f||!g)return;const h=Rd(f,g,d,{elementResize:typeof ResizeObserver=="function"});K(h)}),T(()=>{const f=n(),g=t.contentRef();!f||!g||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(g).zIndex})});const u={currentPlacement:s,contentRef:()=>t.contentRef(),setPositionerRef:r,setArrowRef:i};return y(Gi.Provider,{value:u,get children(){return t.children}})}const hs=ce();function gs(){return he(hs)}function Et(){const e=gs();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}const ps=ce();function Ct(){const e=he(ps);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}/*!
|
|
176
176
|
* Portions of this file are based on code from radix-ui-primitives.
|
|
177
177
|
* MIT Licensed, Copyright (c) 2022 WorkOS.
|
|
178
178
|
*
|
|
179
179
|
* Credits to the Radix UI team:
|
|
180
180
|
* https://github.com/radix-ui/primitives/blob/81b25f4b40c54f72aeb106ca0e64e1e09655153e/packages/react/menu/src/Menu.tsx
|
|
181
|
-
*/function Yd(e,t){return t?Hc([e.clientX,e.clientY],t):!1}function Xd(e){const t=Ct(),n=Ni(),r=gs(),o=Me({placement:"bottom-start"},e),[i,s]=j(o,["open","defaultOpen","onOpenChange"]);let a=0,l=null,c="right";const[d,u]=O(),[h,m]=O(),[f,g]=O(),[p,b]=O(),[w,v]=O(!0),[x,C]=O(s.placement),[E,k]=O([]),[F,P]=O([]),{DomCollectionProvider:R}=ju({items:F,onItemsChange:P}),M=xi({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:U=>i.onOpenChange?.(U)}),I=fu(()=>t.forceMount()||M.isOpen()),oe=Mu({selectionMode:"none",dataSource:F}),Y=U=>{v(U),M.open()},fe=(U=!1)=>{M.close(),U&&r&&r.close(!0)},$=U=>{v(U),M.toggle()},V=()=>{const U=p();U&&(de(U),oe.selectionManager().setFocused(!0),oe.selectionManager().setFocusedKey(void 0))},Q=U=>{k(go=>[...go,U]);const Un=r?.registerNestedMenu(U);return()=>{k(go=>dr(go,U)),Un?.()}},se=U=>c===l?.side&&Yd(U,l?.area),At=U=>{se(U)&&U.preventDefault()},Ae=U=>{se(U)||V()},dm=U=>{se(U)&&U.preventDefault()};cu({isDisabled:()=>!(r==null&&M.isOpen()&&t.isModal()),targets:()=>[p(),...E()].filter(Boolean)}),T(()=>{const U=p();if(!U||!r)return;const Un=r.registerNestedMenu(U);K(()=>{Un()})});const fm={dataset:_(()=>({"data-expanded":M.isOpen()?"":void 0,"data-closed":M.isOpen()?void 0:""})),isOpen:M.isOpen,contentPresence:I,nestedMenus:E,currentPlacement:x,pointerGraceTimeoutId:()=>a,autoFocus:w,listState:()=>oe,parentMenuContext:()=>r,triggerRef:f,contentRef:p,triggerId:d,contentId:h,setTriggerRef:g,setContentRef:b,open:Y,close:fe,toggle:$,focusContent:V,onItemEnter:At,onItemLeave:Ae,onTriggerLeave:dm,setPointerDir:U=>c=U,setPointerGraceTimeoutId:U=>a=U,setPointerGraceIntent:U=>l=U,registerNestedMenu:Q,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:yn(u),registerContentId:yn(m)};return y(R,{get children(){return y(hs.Provider,{value:fm,get children(){return y(Gd,L({anchorRef:f,contentRef:p,onCurrentPlacementChange:C},s))}})}})}const Jd=ce();function Zd(e){let t;const n=Ct(),r=kt(),o=Me({id:n.generateId(`item-${Te()}`)},e),[i,s]=j(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=O(),[c,d]=O(),[u,h]=O(),m=()=>r.listState().selectionManager(),f=()=>s.id,g=()=>m().focusedKey()===f(),p=()=>{i.onSelect?.(),i.closeOnSelect&&r.close(!0)};qu({getItem:()=>({ref:()=>t,type:"item",key:f(),textValue:i.textValue??u()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const b=Tu({key:f,selectionManager:m,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),w=P=>{ge(P,i.onPointerMove),P.pointerType==="mouse"&&(i.disabled?r.onItemLeave(P):(r.onItemEnter(P),P.defaultPrevented||(de(P.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f()))))},v=P=>{ge(P,i.onPointerLeave),P.pointerType==="mouse"&&r.onItemLeave(P)},x=P=>{ge(P,i.onPointerUp),!i.disabled&&P.button===0&&p()},C=P=>{if(ge(P,i.onKeyDown),!P.repeat&&!i.disabled)switch(P.key){case"Enter":case" ":p();break}},E=_(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),k=_(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":g()?"":void 0})),F={isChecked:()=>i.checked,dataset:k,setLabelRef:h,generateId:ui(()=>s.id),registerLabel:yn(l),registerDescription:yn(d)};return y(Jd.Provider,{value:F,get children(){return y(bn,L({as:"div",ref(P){var R=at(M=>t=M,i.ref);typeof R=="function"&&R(P)},get tabIndex(){return b.tabIndex()},get"aria-checked"(){return E()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return b.dataKey()},get onPointerDown(){return ve([i.onPointerDown,b.onPointerDown])},get onPointerUp(){return ve([x,b.onPointerUp])},get onClick(){return ve([i.onClick,b.onClick])},get onKeyDown(){return ve([C,b.onKeyDown])},get onMouseDown(){return ve([i.onMouseDown,b.onMouseDown])},get onFocus(){return ve([i.onFocus,b.onFocus])},onPointerMove:w,onPointerLeave:v},k,s))}})}const Qd=ce();function ms(){return he(Qd)}function ef(e){let t;const n=Ct(),r=kt(),o=ms(),i=Me({id:n.generateId(`content-${Te()}`)},e),[s,a]=j(i,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let l=0;const c=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),d=Iu({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused()},()=>t);au({trapFocus:()=>c()&&r.isOpen(),onMountAutoFocus:p=>{o===void 0&&s.onOpenAutoFocus?.(p)},onUnmountAutoFocus:s.onCloseAutoFocus},()=>t);const u=p=>{if(Le(p.currentTarget,p.target)&&(p.key==="Tab"&&r.isOpen()&&p.preventDefault(),o!==void 0&&p.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(p.key){case"ArrowRight":p.stopPropagation(),p.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case"ArrowLeft":if(p.currentTarget.hasAttribute("data-closed"))break;p.stopPropagation(),p.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},h=p=>{s.onEscapeKeyDown?.(p),o?.setAutoFocusMenu(!1),r.close(!0)},m=p=>{s.onFocusOutside?.(p),n.isModal()&&p.preventDefault()},f=p=>{ge(p,s.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},g=p=>{if(ge(p,s.onPointerMove),p.pointerType!=="mouse")return;const b=p.target,w=l!==p.clientX;Le(p.currentTarget,b)&&w&&(r.setPointerDir(p.clientX>l?"right":"left"),l=p.clientX)};return T(()=>K(r.registerContentId(s.id))),y(J,{get when(){return r.contentPresence.isPresent()},get children(){return y(rd,{get children(){return y(td,L({ref(p){var b=at(w=>{r.setContentRef(w),r.contentPresence.setRef(w),t=w},s.ref);typeof b=="function"&&b(p)},role:"menu",get id(){return s.id},get tabIndex(){return d.tabIndex()},get disableOutsidePointerEvents(){return _(()=>!!c())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return{"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative",...s.style}},get"aria-labelledby"(){return r.triggerId()},onEscapeKeyDown:h,onFocusOutside:m,get onDismiss(){return r.close},get onKeyDown(){return ve([s.onKeyDown,d.onKeyDown,u])},get onMouseDown(){return ve([s.onMouseDown,d.onMouseDown])},get onFocusIn(){return ve([s.onFocusIn,d.onFocusIn])},get onFocusOut(){return ve([s.onFocusOut,d.onFocusOut])},onPointerEnter:f,onPointerMove:g},()=>r.dataset(),a))}})}})}function tf(e){let t;const n=Ct(),r=kt(),[o,i]=j(e,["ref"]);return Hi({element:()=>t??null,enabled:()=>r.isOpen()&&n.preventScroll()}),y(ef,L({ref(s){var a=at(l=>{t=l},o.ref);typeof a=="function"&&a(s)}},i))}function nf(e){return y(Zd,L({role:"menuitem",closeOnSelect:!0},e))}function rf(e){const t=kt();return y(J,{get when(){return t.contentPresence.isPresent()},get children(){return y(Wo,e)}})}function of(e){const t=`menu-${Te()}`,n=Me({id:t,modal:!0},e),[r,o]=j(n,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value"]),i=xi({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:a=>r.onOpenChange?.(a)}),s={isModal:()=>r.modal??!0,preventScroll:()=>r.preventScroll??s.isModal(),forceMount:()=>r.forceMount??!1,generateId:ui(()=>r.id),value:()=>r.value};return y(ps.Provider,{value:s,get children(){return y(Xd,L({get open(){return i.isOpen()},get onOpenChange(){return i.setIsOpen}},o))}})}function sf(e){const t=Ct(),n=kt(),r=ms(),o=Me({id:t.generateId("trigger")},e),[i,s]=j(o,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let a;r!==void 0&&(a=t.value()??i.id,T(()=>{r.registerMenu(a,[n.contentRef(),...n.nestedMenus()])}),T(()=>{r.value()===a?(n.triggerRef()?.focus(),r.autoFocusMenu()&&n.open(!0)):n.close(!0)}),T(()=>{n.isOpen()&&r.setValue(a)}),K(()=>{r.unregisterMenu(a)}),r.lastValue()===void 0&&r.setLastValue(a));const l=()=>{r?.setAutoFocusMenu(!0),r!==void 0?n.toggle(!1):n.toggle(!0),r!==void 0&&!n.isOpen()&&r.value()===a&&r.closeMenu()},c=f=>{ge(f,i.onPointerDown),f.currentTarget.dataset.pointerType=f.pointerType,!i.disabled&&f.pointerType!=="touch"&&f.button===0&&l()},d=f=>{ge(f,i.onClick),i.disabled||f.currentTarget.dataset.pointerType==="touch"&&l()},u=f=>{if(ge(f,i.onKeyDown),!i.disabled)switch(f.key){case"Enter":case" ":case"ArrowDown":f.stopPropagation(),f.preventDefault(),Wc(f.currentTarget),n.toggle("first");break;case"ArrowUp":f.stopPropagation(),f.preventDefault(),n.toggle("last");break;case"ArrowRight":if(r===void 0)break;f.stopPropagation(),f.preventDefault(),r.nextMenu();break;case"ArrowLeft":if(r===void 0)break;f.stopPropagation(),f.preventDefault(),r.previousMenu();break}},h=f=>{ge(f,i.onMouseOver),!i.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(a)},m=f=>{ge(f,i.onFocus),r!==void 0&&r.setValue(a)};return T(()=>K(n.registerTriggerId(i.id))),y($u,L({ref(f){var g=at(n.setTriggerRef,i.ref);typeof g=="function"&&g(f)},get id(){return i.id},get disabled(){return i.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return _(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return a!==void 0&&r?.value()===a?!0:void 0},get tabIndex(){return r!==void 0?r.value()===a||r.lastValue()===a?0:-1:void 0},onPointerDown:c,onMouseOver:h,onClick:d,onKeyDown:u,onFocus:m,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),s))}function af(e){const t=Ct(),n=kt(),[r,o]=j(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return y(tf,L({onCloseAutoFocus:l=>{r.onCloseAutoFocus?.(l),i||de(n.triggerRef()),i=!1,l.preventDefault()},onInteractOutside:l=>{r.onInteractOutside?.(l),(!t.isModal()||l.detail.isContextMenu)&&(i=!0)}},o))}function lf(e){const t=`dropdownmenu-${Te()}`,n=Me({id:t},e);return y(of,n)}function cf(e){return we({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-circle-check-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z" stroke-width="0" fill="currentColor"/>'},e)}function uf(e){return we({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/>'},e)}function df(e){return we({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-download",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4"/><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/><path d="M12 17v-6"/><path d="M9.5 14.5l2.5 2.5l2.5 -2.5"/>'},e)}const ff=e=>y(lf,L({gutter:4},e)),hf=sf,gf=e=>{const[,t]=j(e,["class"]);return y(rf,{get mount(){return Jt()},get children(){return y(af,L({get class(){return Ye("z-50 min-w-[128px] origin-[var(--kb-menu-content-transform-origin)] animate-content-hide overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[expanded]:animate-content-show",e.class)}},t))}})},pf=e=>{const[,t]=j(e,["class"]);return y(nf,L({get class(){return Ye("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e.class)}},t))};function mf(e){return e.type==="buttons"&&e.buttons.options.length>10?{list:{text:e.buttons.text,options:[{items:e.buttons.options}]},type:"list",origin:e.origin,createdAt:e.createdAt}:e}function yf(e){if(Array.isArray(e)){console.info("----------------------------------------------------------");for(const t of e)console.info("Executed:",t.type),console.info(t)}}async function bf(e,t,n){const r=`${Zt}/v1/messages`,o=lr(),i={"Content-Type":"application/json"};o&&(i["x-session-id"]=o);const s={credentials:"include",method:"POST",headers:i,body:JSON.stringify({channelId:n,postback:t,type:"text",text:e})};await fetch(r,s)}async function wf(e,t,n){if(!e||!t||!n)return;const r=`${Zt}/v1/widget/${e}/restart`,o={credentials:"include",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contactId:t,interactionId:n})};await fetch(r,o)}const Fe=Object.create(null);Fe.open="0",Fe.close="1",Fe.ping="2",Fe.pong="3",Fe.message="4",Fe.upgrade="5",Fe.noop="6";const _n=Object.create(null);Object.keys(Fe).forEach(e=>{_n[Fe[e]]=e});const $r={type:"error",data:"parser error"},ys=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",bs=typeof ArrayBuffer=="function",ws=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Nr=({type:e,data:t},n,r)=>ys&&t instanceof Blob?n?r(t):vs(t,r):bs&&(t instanceof ArrayBuffer||ws(t))?n?r(t):vs(new Blob([t]),r):r(Fe[e]+(t||"")),vs=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function xs(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Kr;function vf(e,t){if(ys&&e.data instanceof Blob)return e.data.arrayBuffer().then(xs).then(t);if(bs&&(e.data instanceof ArrayBuffer||ws(e.data)))return t(xs(e.data));Nr(e,!1,n=>{Kr||(Kr=new TextEncoder),t(Kr.encode(n))})}const Ss="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Ss.length;e++)Wt[Ss.charCodeAt(e)]=e;const xf=e=>{let t=e.length*.75,n=e.length,r,o=0,i,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)i=Wt[e.charCodeAt(r)],s=Wt[e.charCodeAt(r+1)],a=Wt[e.charCodeAt(r+2)],l=Wt[e.charCodeAt(r+3)],d[o++]=i<<2|s>>4,d[o++]=(s&15)<<4|a>>2,d[o++]=(a&3)<<6|l&63;return c},Sf=typeof ArrayBuffer=="function",zr=(e,t)=>{if(typeof e!="string")return{type:"message",data:Es(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Ef(e.substring(1),t)}:_n[n]?e.length>1?{type:_n[n],data:e.substring(1)}:{type:_n[n]}:$r},Ef=(e,t)=>{if(Sf){const n=xf(e);return Es(n,t)}else return{base64:!0,data:e}},Es=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},ks="",kf=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((i,s)=>{Nr(i,!1,a=>{r[s]=a,++o===n&&t(r.join(ks))})})},Cf=(e,t)=>{const n=e.split(ks),r=[];for(let o=0;o<n.length;o++){const i=zr(n[o],t);if(r.push(i),i.type==="error")break}return r};function Of(){return new TransformStream({transform(e,t){vf(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const i=new DataView(o.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{o=new Uint8Array(9);const i=new DataView(o.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Br;function Pn(e){return e.reduce((t,n)=>t+n.length,0)}function An(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function _f(e,t){Br||(Br=new TextDecoder);const n=[];let r=0,o=-1,i=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(Pn(n)<1)break;const l=An(n,1);i=(l[0]&128)===128,o=l[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(Pn(n)<2)break;const l=An(n,2);o=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Pn(n)<8)break;const l=An(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue($r);break}o=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Pn(n)<o)break;const l=An(n,o);a.enqueue(zr(i?l:Br.decode(l),t)),r=0}if(o===0||o>e){a.enqueue($r);break}}}})}const Cs=4;function ne(e){if(e)return Pf(e)}function Pf(e){for(var t in ne.prototype)e[t]=ne.prototype[t];return e}ne.prototype.on=ne.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},ne.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},ne.prototype.off=ne.prototype.removeListener=ne.prototype.removeAllListeners=ne.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},ne.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},ne.prototype.emitReserved=ne.prototype.emit,ne.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},ne.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Tn=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Se=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Af="arraybuffer";function mm(){}function Os(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Tf=Se.setTimeout,Lf=Se.clearTimeout;function Ln(e,t){t.useNativeTimers?(e.setTimeoutFn=Tf.bind(Se),e.clearTimeoutFn=Lf.bind(Se)):(e.setTimeoutFn=Se.setTimeout.bind(Se),e.clearTimeoutFn=Se.clearTimeout.bind(Se))}const Mf=1.33;function Df(e){return typeof e=="string"?If(e):Math.ceil((e.byteLength||e.size)*Mf)}function If(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function _s(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Rf(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Ff(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class $f extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Vr extends ne{constructor(t){super(),this.writable=!1,Ln(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new $f(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=zr(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Rf(t);return n.length?"?"+n:""}}class Nf extends Vr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Cf(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,kf(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=_s()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Ps=!1;try{Ps=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Kf=Ps;function zf(){}class Bf extends Nf{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class $e extends ne{constructor(t,n,r){super(),this.createRequest=t,Ln(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Os(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=$e.requestsCount++,$e.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=zf,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete $e.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if($e.requestsCount=0,$e.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",As);else if(typeof addEventListener=="function"){const e="onpagehide"in Se?"pagehide":"unload";addEventListener(e,As,!1)}}function As(){for(let e in $e.requests)$e.requests.hasOwnProperty(e)&&$e.requests[e].abort()}const Vf=function(){const e=Ts({xdomain:!1});return e&&e.responseType!==null}();class Uf extends Bf{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Vf&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new $e(Ts,this.uri(),t)}}function Ts(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Kf))return new XMLHttpRequest}catch{}if(!t)try{return new Se[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ls=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class jf extends Vr{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Ls?{}:Os(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Nr(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}o&&Tn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=_s()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ur=Se.WebSocket||Se.MozWebSocket;class qf extends jf{createSocket(t,n,r){return Ls?new Ur(t,n,r):n?new Ur(t,n):new Ur(t)}doWrite(t,n){this.ws.send(n)}}class Hf extends Vr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=_f(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Of();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Tn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Wf={websocket:qf,webtransport:Hf,polling:Uf},Gf=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Yf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function jr(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=Gf.exec(e||""),i={},s=14;for(;s--;)i[Yf[s]]=o[s]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Xf(i,i.path),i.queryKey=Jf(i,i.query),i}function Xf(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Jf(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(n[o]=i)}),n}const qr=typeof addEventListener=="function"&&typeof removeEventListener=="function",Mn=[];qr&&addEventListener("offline",()=>{Mn.forEach(e=>e())},!1);class Qe extends ne{constructor(t,n){if(super(),this.binaryType=Af,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=jr(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=jr(n.host).host);Ln(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ff(this.opts.query)),qr&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Mn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Cs,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Qe.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Qe.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=Df(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Tn(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Qe.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),qr&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Mn.indexOf(this._offlineEventListener);r!==-1&&Mn.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Qe.protocol=Cs;class Zf extends Qe{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Qe.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Qe.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function i(){r||(r=!0,d(),n.close(),n=null)}const s=u=>{const h=new Error("probe error: "+u);h.transport=n.name,i(),this.emitReserved("upgradeError",h)};function a(){s("transport closed")}function l(){s("socket closed")}function c(u){n&&u.name!==n.name&&i()}const d=()=>{n.removeListener("open",o),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",o),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Qf=class extends Zf{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>Wf[o]).filter(o=>!!o)),super(t,r)}};function eh(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=jr(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const th=typeof ArrayBuffer=="function",nh=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Ms=Object.prototype.toString,rh=typeof Blob=="function"||typeof Blob<"u"&&Ms.call(Blob)==="[object BlobConstructor]",oh=typeof File=="function"||typeof File<"u"&&Ms.call(File)==="[object FileConstructor]";function Hr(e){return th&&(e instanceof ArrayBuffer||nh(e))||rh&&e instanceof Blob||oh&&e instanceof File}function Dn(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Dn(e[n]))return!0;return!1}if(Hr(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dn(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Dn(e[n]))return!0;return!1}function ih(e){const t=[],n=e.data,r=e;return r.data=Wr(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Wr(e,t){if(!e)return e;if(Hr(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Wr(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Wr(e[r],t));return n}return e}function sh(e,t){return e.data=Gr(e.data,t),delete e.attachments,e}function Gr(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Gr(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Gr(e[n],t));return e}const ah=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],lh=5;var B;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(B||(B={}));class ch{constructor(t){this.replacer=t}encode(t){return(t.type===B.EVENT||t.type===B.ACK)&&Dn(t)?this.encodeAsBinary({type:t.type===B.EVENT?B.BINARY_EVENT:B.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===B.BINARY_EVENT||t.type===B.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=ih(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Ds(e){return Object.prototype.toString.call(e)==="[object Object]"}class Yr extends ne{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===B.BINARY_EVENT;r||n.type===B.BINARY_ACK?(n.type=r?B.EVENT:B.ACK,this.reconstructor=new uh(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Hr(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(B[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===B.BINARY_EVENT||r.type===B.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(i,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const i=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(Yr.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case B.CONNECT:return Ds(n);case B.DISCONNECT:return n===void 0;case B.CONNECT_ERROR:return typeof n=="string"||Ds(n);case B.EVENT:case B.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&ah.indexOf(n[0])===-1);case B.ACK:case B.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class uh{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=sh(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const dh=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Yr,Encoder:ch,get PacketType(){return B},protocol:lh},Symbol.toStringTag,{value:"Module"}));function Pe(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const fh=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Is extends ne{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Pe(t,"open",this.onopen.bind(this)),Pe(t,"packet",this.onpacket.bind(this)),Pe(t,"error",this.onerror.bind(this)),Pe(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,i;if(fh.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:B.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,u=n.pop();this._registerAckCallback(d,u),s.id=d}const a=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,l=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},o),s=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,o)=>{const i=(s,a)=>s?o(s):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:B.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case B.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case B.EVENT:case B.BINARY_EVENT:this.onevent(t);break;case B.ACK:case B.BINARY_ACK:this.onack(t);break;case B.DISCONNECT:this.ondisconnect();break;case B.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:B.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:B.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Ot(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ot.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},Ot.prototype.reset=function(){this.attempts=0},Ot.prototype.setMin=function(e){this.ms=e},Ot.prototype.setMax=function(e){this.max=e},Ot.prototype.setJitter=function(e){this.jitter=e};class Xr extends ne{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Ln(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ot({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||dh;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Qf(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Pe(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=Pe(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{o(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(o),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Pe(t,"ping",this.onping.bind(this)),Pe(t,"data",this.ondata.bind(this)),Pe(t,"error",this.onerror.bind(this)),Pe(t,"close",this.onclose.bind(this)),Pe(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Tn(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Is(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Gt={};function In(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=eh(e,t.path||"/socket.io"),r=n.source,o=n.id,i=n.path,s=Gt[o]&&i in Gt[o].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Xr(r,t):(Gt[o]||(Gt[o]=new Xr(r,t)),l=Gt[o]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(In,{Manager:Xr,Socket:Is,io:In,connect:In});class et{static instance;constructor(){}static init(t){if(!et.instance){const n=lr();et.instance=In(Ua,{path:"/ws",withCredentials:!0,extraHeaders:{"widget-id":t},auth:{sessionId:n,widgetId:t},query:{sessionId:n||""}}),et.instance.on("connect",()=>{console.info("SmartTalks.ai widget connected!",et.instance.id)})}return et.instance}static on(t,n,r){const o=et.instance||this.init(n);o.off(t),o.on(t,r)}}const Rs=1e3*60*60*24,[Rn,Fs]=ni("smarttalks-widget-messages",{},Rs),$s=()=>{const{widgetId:e}=ie();return Rn[e()]??[]},hh=e=>{const{widgetId:t}=ie();Fs({...Rn,[t()]:[...Rn[t()]??[],e]})},gh=()=>{const{widgetId:e}=ie();Fs({...Rn,[e()]:[]})},[Ns,ph]=ni("smarttalks-widget-conversationinfo",{},Rs),Ks=()=>{const{widgetId:e}=ie();return Ns[e()]??{}},zs=e=>{const{widgetId:t}=ie();ph({...Ns,[t()]:e})},[mh,Jr]=O(!1),[yh,Bs]=O(!1),Vs=[],Us=()=>{Vs.forEach(e=>e())},bh=e=>Vs.push(e),Zr=e=>{const t=mf(e);if(hh(t),t.type==="media"){setTimeout(Us,200);return}Us()},wh=(e,t)=>{const{chatWidget:n,widgetId:r}=ie(),o=Ks();e.trim()&&(Zr({text:e,type:"text",origin:"user",createdAt:new Date().toString()}),ee("onInput",e),et.on("message",r(),i=>{(i.contactId!==o.contactId||i.interactionId!==o.interactionId)&&zs({contactId:i.contactId,interactionId:i.interactionId});for(const s of i.messages)Zr(s),ee("onAnswer",s);Jr(!1),yf(i.debug)}),Jr(!0),bf(e,t,n()?._id).catch(i=>{console.error(i),Jr(!1)}))},vh=()=>{const{chatWidget:e}=ie(),t=Ks();Bs(!0),gh(),wf(e()?._id,t.contactId,t.interactionId).finally(()=>{zs({}),Bs(!1),xh()}),ee("onReset")},xh=()=>{const{chatWidget:e}=ie();if($s().length===0&&e()?.balloonMessage){const n=e()?.balloonMessage;n&&Zr({text:n,type:"text",origin:"bot",createdAt:new Date().toString()})}},tt=()=>({getMessages:$s,pushMessage:wh,clearMessages:vh,onMessage:bh,typing:mh,loading:yh});var Sh=D("<span>");const Eh=()=>{const{clearMessages:e}=tt();O(!1);const[t,n]=O(!1);return y(ff,{get open(){return t()},onOpenChange:n,get children(){return[y(hf,{get children(){return y(ke,{variant:"ghost",size:"icon",class:"hover:bg-accent/10 hover:text-primary-foreground",get children(){return y(gc,{size:20})}})}}),y(gf,{get children(){return y(pf,{class:"flex space-x-2 items-center cursor-pointer",onSelect:e,get children(){return[y(hc,{size:14}),(()=>{var r=Sh();return A(r,()=>ht("restart")),r})()]}})}})]}})};function kh(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path d="M5.5 0a.5.5 0 0 1 .5.5v4A1.5 1.5 0 0 1 4.5 6h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5zm5 0a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 10 4.5v-4a.5.5 0 0 1 .5-.5zM0 10.5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 6 11.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zm10 1a1.5 1.5 0 0 1 1.5-1.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4z"/>'},e)}function Ch(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path d="M1.5 1a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4A1.5 1.5 0 0 1 1.5 0h4a.5.5 0 0 1 0 1h-4zM10 .5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 16 1.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zM.5 10a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 0 14.5v-4a.5.5 0 0 1 .5-.5zm15 0a.5.5 0 0 1 .5.5v4a1.5 1.5 0 0 1-1.5 1.5h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5z"/>'},e)}function Oh(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path d="M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"/>'},e)}function _h(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>'},e)}var Ph=D('<header class="flex-none bg-primary text-primary-foreground p-3 flex items-center justify-between space-x-4"><div class="flex items-center gap-0.5">');const Qr=()=>{const{chatWidget:e}=ie(),[t,n]=O(!1),[r,o]=O(!1);let i=null;const s=()=>{typeof window<"u"&&o(window.innerWidth<768)};rt(()=>{s(),window.addEventListener("resize",s),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&h()}),K(()=>{window.removeEventListener("resize",s)});const a=g=>{const p=g;return!!(p.requestFullscreen||p.webkitRequestFullscreen||p.msRequestFullscreen)},l=async g=>{const p=g;try{if(p.requestFullscreen)return await p.requestFullscreen(),!0;if(p.webkitRequestFullscreen)return p.webkitRequestFullscreen(),!0;if(p.msRequestFullscreen)return p.msRequestFullscreen(),!0}catch{}return!1},c=async()=>{const g=document;try{if(document.exitFullscreen)return await document.exitFullscreen(),!0;if(g.webkitExitFullscreen)return g.webkitExitFullscreen(),!0;if(g.msExitFullscreen)return g.msExitFullscreen(),!0}catch{}return!1},d=g=>{i=document.body.style.overflow||null,document.body.style.overflow="hidden",g.classList.add("st-fullscreen"),n(!0)},u=g=>{g.classList.remove("st-fullscreen"),i!==null?(document.body.style.overflow=i,i=null):document.body.style.overflow="",n(!1)},h=async()=>{try{const g=Jt();if(!g)return;if(!t())a(g)&&await l(g)||d(g);else{const p=document;(document.fullscreenElement||p.webkitFullscreenElement||p.msFullscreenElement)&&await c()||u(g)}}catch{console.error("SmartTalks.ai Widget unable to toggle fullscreen in the current state.")}},m=()=>{const g=document,p=!!(document.fullscreenElement||g.webkitFullscreenElement||g.msFullscreenElement);if(n(p),!p)try{const b=Jt();b.classList.contains("st-fullscreen")&&u(b)}catch{}};document.addEventListener("fullscreenchange",m),document.addEventListener("webkitfullscreenchange",m);const f=()=>{ee("close")};return re("toggleFullscreen",()=>{h()}),(()=>{var g=Ph(),p=g.firstChild;return A(g,y(dc,{}),p),A(p,y(J,{get when(){return!r()},get children(){return y(ke,{size:"icon",variant:"ghost",class:"hover:bg-accent/10 hover:text-primary-foreground",onClick:h,get children(){return y(J,{get when(){return t()},get fallback(){return y(Ch,{size:16})},get children(){return y(kh,{size:16})}})}})}}),null),A(p,y(J,{get when(){return e()?.showSettings},get children(){return y(Eh,{})}}),null),A(p,y(J,{get when(){return e()?.mode==="popup"||r()},get children(){return y(ke,{size:"icon",variant:"ghost",class:"hover:bg-accent/10 hover:text-primary-foreground",onClick:f,get children(){return y(_h,{size:16})}})}}),null),g})()};var Ah=D("<span>");const js=({createdAt:e,anchor:t="end"})=>(()=>{var n=Ah();return Ue(n,`${t==="end"?"self-end":"self-start"} pt-1 text-[10px] italic font-light text-slate-600`),A(n,()=>new Date(e).toLocaleString([],{hour:"2-digit",minute:"2-digit"})),n})();var Th=D('<div class="place-self-start py-1 flex flex-col"><div class="bg-white shadow-md py-2 px-4 rounded-r-xl rounded-tl-xl">');const Lh=({children:e,createdAt:t})=>(()=>{var n=Th(),r=n.firstChild;return A(r,e),A(n,y(js,{createdAt:t,anchor:"start"}),null),n})();var Mh=D("<span>");const _t=e=>{const[,t]=j(e,["class","children"]);let n=e.children?.toString();return n&&(n=za(Ba(n))),(()=>{var r=Mh();return r.innerHTML=n,ot(r,L({get class(){return Ye("whitespace-pre-line",e.class)}},t),!1,!1),r})()};var Dh=D('<div class="flex flex-col space-y-2"><div><div class="flex p-1 flex-wrap items-center justify-center">');const Ih=({options:e,text:t})=>{let n;const{pushMessage:r}=tt(),[o,i]=O(!1),s=(a,l)=>{i(!0),r(a,l)};return(()=>{var a=Dh(),l=a.firstChild,c=l.firstChild;A(a,y(_t,{get children(){return t?.trim()}}),l);var d=n;return typeof d=="function"?or(d,c):n=c,A(c,y(pt,{each:e,children:u=>y(ke,{variant:"outline",get disabled(){return o()},class:"px-2 ml-1 mb-1 py-0 text-nowrap",onClick:()=>s(u.label,u.value),get children(){return u.label?.trim()}})})),te(()=>Ue(l,`flex items-center justify-center max-w-80 mx-[-16px] ${o()&&"opacity-50"}`)),a})()};var Rh=D('<div class="flex flex-col"><span>'),Fh=D("<a target=_blank><img><span></span><span>");const $h=({options:e,text:t})=>(()=>{var n=Rh(),r=n.firstChild;return A(r,()=>t?.trim()),A(n,y(pt,{each:e,children:o=>(()=>{var i=Fh(),s=i.firstChild,a=s.nextSibling,l=a.nextSibling;return A(a,()=>o.title?.trim()),A(l,()=>o.description?.trim()),te(c=>{var d=o.url,u=o.image;return d!==c.e&&ue(i,"href",c.e=d),u!==c.t&&ue(s,"src",c.t=u),c},{e:void 0,t:void 0}),i})()}),null),n})();var Nh=D("<a target=_blank>");const Kh=({url:e,text:t})=>(()=>{var n=Nh();return ue(n,"href",e),A(n,()=>t?.trim()),n})();var G=e=>typeof e=="function"?e():e,qs=e=>requestAnimationFrame(()=>requestAnimationFrame(e)),zh=e=>{const t=L({initialRegistered:!1},e),[n,r]=O(t.initialRegistered);return[_(()=>{if(n())return G(t.value)}),()=>{r(!0)},()=>{r(!1)}]},Hs=zh,Yt=e=>typeof e=="function",Bh=["button","color","file","image","reset","submit"],Vh=(e,t)=>e==="button"?!0:e==="input"&&t?Bh.indexOf(t)!==-1:!1;function Uh(e){const[t,n]=O(e.initialValue),r=()=>e.value?.()!==void 0,o=()=>r()?e.value?.():t();return[o,s=>H(()=>{let a;return Yt(s)?a=s(o()):a=s,Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})]}var eo=Uh,Fn=new Map,$n=(e,t)=>{if(Fn.has(e))return Fn.get(e);const n=ce(t);return Fn.set(e,n),n},to=e=>{const t=Fn.get(e);if(t)return he(t)},Nn=new Map,jh=e=>{T(()=>{const t=G(e.style)??{},n=G(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=Nn.get(e.key);o?o.activeCount++:Nn.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);K(()=>{const i=Nn.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}Nn.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},qh=jh,Hh=e=>{const t=L({enabled:!0},e);T(()=>{G(t.enabled)&&(document.addEventListener("keydown",n),K(()=>{document.removeEventListener("keydown",n)}))});const n=r=>{r.key==="Escape"&&t.onEscapeKeyDown(r)}},Wh=Hh,Gh=e=>{const t=L({enabled:!0},e);T(()=>{const{body:n}=document;G(t.enabled)&&qh({key:"no-pointer-events",element:n,style:{pointerEvents:"none"}})})},Yh=Gh,Xh=e=>{const t=L({enabled:!0,strategy:"pointerup"},e);T(()=>{if(!G(t.enabled))return;const r=G(t.strategy);document.addEventListener(r,n),K(()=>{document.removeEventListener(r,n)})});const n=r=>{const o=G(t.element),i=G(t.ignore);o&&!o.contains(r.target)&&!(i&&i.contains(r.target))&&t.onPointer(r)}},Jh=Xh,Zh=e=>{const t=L({dismissOnEscapeKeyDown:!0,dismissOnOutsidePointer:!0,closeOnOutsidePointerStrategy:"pointerup",noOutsidePointerEvents:!0},e);Wh({enabled:t.dismissOnEscapeKeyDown,onEscapeKeyDown:n=>{t.onEscapeKeyDown?.(n),n.defaultPrevented||t.onDismiss("escapeKey")}}),Jh({enabled:t.dismissOnOutsidePointer,strategy:t.closeOnOutsidePointerStrategy,ignore:t.dismissOnOutsidePointerIgnore,onPointer:n=>{if(t.onOutsidePointer?.(n),!n.defaultPrevented){const r=n.button===0&&n.ctrlKey===!0;if(n.button===2||r)return;t.onDismiss("pointerOutside")}},element:t.element}),Yh({enabled:t.noOutsidePointerEvents})},Qh=Zh,no=ce(),eg=e=>_(()=>{if(he(no))return y(Ws,e);const r=Te(),[o,i]=O([r]),s=l=>{i(c=>[...c,l])},a=l=>{i(c=>c.filter(d=>d!==l))};return y(no.Provider,{value:{layers:o,onLayerShow:s,onLayerDismiss:a},get children(){return y(Ws,e)}})}),Ws=e=>{const t=L({enabled:!0,dismissOnEscapeKeyDown:!0,dismissOnOutsidePointer:!0,dismissOnOutsidePointerStrategy:"pointerup",noOutsidePointerEvents:!0},e),[n,r]=j(t,["enabled","children","dismissOnEscapeKeyDown","dismissOnOutsidePointer","dismissOnOutsidePointerStrategy","dismissOnOutsidePointerIgnore","noOutsidePointerEvents","onDismiss"]),o=he(no),i=Te();T(()=>{n.enabled?o.onLayerShow(i):o.onLayerDismiss(i)});const s=()=>o.layers()[o.layers().length-1]===i;Qh({dismissOnEscapeKeyDown:()=>G(n.dismissOnEscapeKeyDown)&&s()&&n.enabled,dismissOnOutsidePointer:()=>G(n.dismissOnOutsidePointer)&&s()&&n.enabled,dismissOnOutsidePointerStrategy:n.dismissOnOutsidePointerStrategy,dismissOnOutsidePointerIgnore:n.dismissOnOutsidePointerIgnore,noOutsidePointerEvents:()=>G(n.noOutsidePointerEvents)&&n.enabled,onDismiss:c=>{n.onDismiss(c)},...r});const a=_(()=>n.children),l=()=>{const c=a();return Yt(c)?c({get isLastLayer(){return s()}}):c};return H(()=>l())},tg=eg,ng=()=>{const[e,t]=O(!1);return T(()=>t(!0)),e},rg=ng,og=(e,t)=>(e&&(Yt(e)?e(t):e[0](e[1],t)),t.defaultPrevented),ro=(...e)=>e.some(t=>!!t()),ig=e=>(...t)=>{for(const n of e)n&&n(...t)},Kn=(...e)=>ig(e),le=e=>e?"":void 0,sg="div",ag=e=>{const[t,n]=j(e,["as"]),r=_(()=>t.as??sg);return _(()=>{const i=r();switch(typeof i){case"function":return H(()=>i(n));case"string":return y(ln,L({component:i},n))}})},oo=ag,lg=e=>{let t,n=!1;return()=>n?t:(n=!0,t=_(e))},Gs=lg,cg=e=>_(()=>G(e.element)?.tagName.toLowerCase()||e.fallback),ug=cg,Ys="button",dg=e=>{const[t,n]=O(null),[r,o]=j(e,["as","ref","type"]),i=ug({element:t,fallback:Ys}),s=_(()=>Vh(i(),r.type));return y(oo,L({get as(){return r.as??Ys},ref(a){var l=Kn(n,r.ref);typeof l=="function"&&l(a)},get type(){return s()?"button":void 0},get role(){return s()?void 0:"button"}},o))},fg=dg,hg='a[href]:not([tabindex="-1"]), button:not([tabindex="-1"]), input:not([tabindex="-1"]), textarea:not([tabindex="-1"]), select:not([tabindex="-1"]), details:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])',io="focusTrap.initialFocus",so="focusTrap.finalFocus",Xs={bubbles:!1,cancelable:!0},gg=e=>{const t=L({enabled:!0,observeChanges:!0,restoreFocus:!0},e),[n,r]=O(null),o=_(()=>{const f=n();return f?f[0]??null:null}),i=_(()=>{const f=n();return f?f[f.length-1]??null:null});let s=null;const a=()=>{Cr(()=>{l(Z(t.element)),(document.activeElement===null||document.activeElement===document.body)&&c(Z(t.element))})};T(()=>{const f=Z(t.element);if(f&&Z(t.enabled)){s=document.activeElement,H(()=>{l(f),c(f)});const g=new MutationObserver(a);Z(t.observeChanges)&&g.observe(f,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabindex"]}),K(()=>{Z(t.observeChanges)&&g.disconnect(),r(null),m(f)})}}),T(()=>{const f=n();f===null||f.length!==0||(document.addEventListener("keydown",h),K(()=>{document.removeEventListener("keydown",h)}))}),T(()=>{const f=o();f&&(f.addEventListener("keydown",d),K(()=>{f.removeEventListener("keydown",d)}))}),T(()=>{const f=i();f&&(f.addEventListener("keydown",u),K(()=>{f.removeEventListener("keydown",u)}))});const l=f=>{const g=Array.from(f.querySelectorAll(hg)).map((p,b)=>({element:p,domIndex:b,tabIndex:p.tabIndex})).sort((p,b)=>p.tabIndex===b.tabIndex?p.domIndex-b.domIndex:p.tabIndex-b.tabIndex);r(g.map(({element:p})=>p))},c=f=>{Cr(()=>{const g=Z(t.initialFocusElement)??o()??f,p=t.onInitialFocus;let b;p&&(b=new CustomEvent(io,Xs),f.addEventListener(io,p),f.dispatchEvent(b),f.removeEventListener(io,p)),b?.defaultPrevented!==!0&&g.focus()})},d=f=>{f.key==="Tab"&&f.shiftKey&&(f.preventDefault(),i().focus())},u=f=>{f.key==="Tab"&&!f.shiftKey&&(f.preventDefault(),o().focus())},h=f=>{f.key==="Tab"&&f.preventDefault()},m=f=>{Cr(()=>{if(!Z(t.restoreFocus))return;const p=Z(t.finalFocusElement)??s;if(!p)return;let b;const w=t.onFinalFocus;w&&(b=new CustomEvent(so,Xs),f.addEventListener(so,w),f.dispatchEvent(b),f.removeEventListener(so,w)),b?.defaultPrevented!==!0&&p.focus()})}},pg=gg,mg=pg,yg=e=>{const t=_(()=>{const s=Z(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=O(Z(e.show)?"present":"hidden");let i="none";return T(s=>{const a=Z(e.show);return H(()=>{if(s===a)return a;const l=i,c=n();a?o("present"):c==="none"||t()?.display==="none"?o("hidden"):o(s===!0&&l!==c?"hiding":"hidden")}),a}),T(()=>{const s=Z(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},l=c=>{const u=n().includes(c.animationName);c.target===s&&u&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",l),s.addEventListener("animationend",l),K(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",l),s.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},bg=yg,Js=bg,wg=ce(),vg=e=>e?$n(`dialog-${e}`):wg,Zs=ce(),xg=e=>e?$n(`dialog-internal-${e}`):Zs,Pt=e=>{if(!e){const n=he(Zs);if(!n)throw new Error("[corvu]: Dialog context not found. Make sure to wrap Dialog components in <Dialog.Root>");return n}const t=to(`dialog-internal-${e}`);if(!t)throw new Error(`[corvu]: Dialog context with id "${e}" not found. Make sure to wrap Dialog components in <Dialog.Root contextId="${e}">`);return t},Sg="div",Eg=e=>{const[t,n]=j(e,["as","forceMount","contextId","children","ref","style","data-corvu-dialog-content"]),r=_(()=>Pt(t.contextId)),o=()=>ro(r().open,()=>t.forceMount,r().contentPresent),i=_(s=>s||o(),!1);return y(J,{get when(){return i()},get children(){return y(tg,{get element(){return r().contentRef},get enabled(){return r().open()||r().contentPresent()},onDismiss:()=>r().setOpen(!1),get dismissOnEscapeKeyDown(){return r().closeOnEscapeKeyDown},get dismissOnOutsidePointer(){return r().closeOnOutsidePointer},get dismissOnOutsidePointerStrategy(){return r().closeOnOutsidePointerStrategy},get dismissOnOutsidePointerIgnore(){return r().triggerRef},get noOutsidePointerEvents(){return r().noOutsidePointerEvents},get onEscapeKeyDown(){return r().onEscapeKeyDown},get onOutsidePointer(){return r().onOutsidePointer},children:s=>{const a=_(()=>t.children);return y(J,{get when(){return o()},get children(){return y(oo,L({ref(l){var c=Kn(r().setContentRef,t.ref);typeof c=="function"&&c(l)},get as(){return t.as??Sg},get role(){return r().role()},get id(){return r().dialogId()},get"aria-labelledby"(){return r().labelId()},get"aria-describedby"(){return r().descriptionId()},get"aria-modal"(){return r().modal()?"true":"false"},get"data-open"(){return le(r().open())},get"data-closed"(){return le(!r().open())},get"data-corvu-dialog-content"(){return t.hasOwnProperty("data-corvu-dialog-content")?t["data-corvu-dialog-content"]:""},tabIndex:"-1",get style(){return{"pointer-events":s.isLastLayer?"auto":void 0,...t.style}}},n,{get children(){return a()}}))}})}})}})},kg=Eg,Cg="div",Og=e=>{const[t,n]=j(e,["as","forceMount","contextId","children","ref","style","data-corvu-dialog-overlay"]),r=_(()=>Pt(t.contextId)),o=()=>ro(r().open,()=>t.forceMount,r().overlayPresent),i=_(s=>s||o(),!1);return y(J,{get when(){return i()},get children(){return(()=>{const s=_(()=>t.children);return y(J,{get when(){return o()},get children(){return y(oo,L({get as(){return t.as??Cg},ref(a){var l=Kn(r().setOverlayRef,t.ref);typeof l=="function"&&l(a)},"aria-hidden":"true",get"data-open"(){return le(r().open())},get"data-closed"(){return le(!r().open())},get"data-corvu-dialog-overlay"(){return t.hasOwnProperty("data-corvu-dialog-overlay")?t["data-corvu-dialog-overlay"]:""},tabIndex:"-1",get style(){return{"pointer-events":"auto",...t.style}}},n,{get children(){return s()}}))}})})()}})},_g=Og,Pg=e=>{const[t,n]=j(e,["forceMount","contextId","children"]),r=_(()=>Pt(t.contextId)),o=()=>ro(r().open,()=>t.forceMount,r().contentPresent,r().overlayPresent),i=rg(),s=_(a=>a||o()&&i(),!1);return y(J,{get when(){return s()},get children(){return(()=>{const a=_(()=>t.children);return y(J,{get when(){return o()},get children(){return y(Wo,L(n,{get children(){return a()}}))}})})()}})},Ag=Pg,ao=!0,Tg=e=>{const t=L({role:"dialog",initialOpen:!1,modal:!0,closeOnEscapeKeyDown:!0,closeOnOutsidePointer:()=>!!(e.modal??ao),closeOnOutsidePointerStrategy:"pointerup",noOutsidePointerEvents:()=>!!(e.modal??ao),preventScroll:()=>!!(e.modal??ao),hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",allowPinchZoom:!0,trapFocus:!0,restoreFocus:!0,dialogId:Te()},e),[n,r]=eo({value:()=>t.open,initialValue:t.initialOpen,onChange:t.onOpenChange}),[o,i,s]=Hs({value:()=>t.labelId??Te()}),[a,l,c]=Hs({value:()=>t.descriptionId??Te()}),[d,u]=O(null),[h,m]=O(null),[f,g]=O(null),{present:p}=Js({show:n,element:h}),{present:b}=Js({show:n,element:f});mg({element:h,enabled:()=>n()&&t.trapFocus,initialFocusElement:()=>t.initialFocusEl??null,restoreFocus:()=>t.restoreFocus,finalFocusElement:()=>t.finalFocusEl??null,onFinalFocus:t.onFinalFocus,onInitialFocus:t.onInitialFocus}),Hi({element:h,enabled:()=>p()&&G(t.preventScroll),hideScrollbar:()=>t.hideScrollbar,preventScrollbarShift:()=>t.preventScrollbarShift,preventScrollbarShiftMode:()=>t.preventScrollbarShiftMode,allowPinchZoom:()=>t.allowPinchZoom});const w={get role(){return t.role},get open(){return n()},setOpen:r,get modal(){return t.modal},get closeOnEscapeKeyDown(){return t.closeOnEscapeKeyDown},get closeOnOutsidePointer(){return G(t.closeOnOutsidePointer)},get closeOnOutsidePointerStrategy(){return t.closeOnOutsidePointerStrategy},get noOutsidePointerEvents(){return G(t.noOutsidePointerEvents)},get preventScroll(){return G(t.preventScroll)},get hideScrollbar(){return t.hideScrollbar},get preventScrollbarShift(){return G(t.preventScrollbarShift)},get preventScrollbarShiftMode(){return t.preventScrollbarShiftMode},get allowPinchZoom(){return t.allowPinchZoom},get trapFocus(){return t.trapFocus},get restoreFocus(){return t.restoreFocus},get initialFocusEl(){return t.initialFocusEl},get finalFocusEl(){return t.finalFocusEl},get contentPresent(){return p()},get contentRef(){return h()},get overlayPresent(){return b()},get overlayRef(){return f()},get dialogId(){return t.dialogId},get labelId(){return o()},get descriptionId(){return a()}},v=Gs(()=>t.children),x=()=>{const E=v()();return Yt(E)?E(w):E};return _(()=>{const E=vg(t.contextId),k=xg(t.contextId);return y(E.Provider,{value:{role:()=>t.role,open:n,setOpen:r,modal:()=>t.modal,closeOnEscapeKeyDown:()=>t.closeOnEscapeKeyDown,closeOnOutsidePointer:()=>G(t.closeOnOutsidePointer),closeOnOutsidePointerStrategy:()=>t.closeOnOutsidePointerStrategy,noOutsidePointerEvents:()=>G(t.noOutsidePointerEvents),preventScroll:()=>G(t.preventScroll),hideScrollbar:()=>t.hideScrollbar,preventScrollbarShift:()=>G(t.preventScrollbarShift),preventScrollbarShiftMode:()=>t.preventScrollbarShiftMode,allowPinchZoom:()=>t.allowPinchZoom,trapFocus:()=>t.trapFocus,restoreFocus:()=>t.restoreFocus,initialFocusEl:()=>t.initialFocusEl,finalFocusEl:()=>t.finalFocusEl,contentPresent:p,contentRef:h,overlayPresent:b,overlayRef:f,dialogId:()=>t.dialogId,labelId:o,descriptionId:a},get children(){return y(k.Provider,{get value(){return{role:()=>t.role,open:n,setOpen:r,modal:()=>t.modal,closeOnEscapeKeyDown:()=>t.closeOnEscapeKeyDown,onEscapeKeyDown:t.onEscapeKeyDown,closeOnOutsidePointer:()=>G(t.closeOnOutsidePointer),closeOnOutsidePointerStrategy:()=>t.closeOnOutsidePointerStrategy,onOutsidePointer:t.onOutsidePointer,noOutsidePointerEvents:()=>G(t.noOutsidePointerEvents),preventScroll:()=>G(t.preventScroll),hideScrollbar:()=>t.hideScrollbar,preventScrollbarShift:()=>G(t.preventScrollbarShift),preventScrollbarShiftMode:()=>t.preventScrollbarShiftMode,allowPinchZoom:()=>t.allowPinchZoom,trapFocus:()=>t.trapFocus,restoreFocus:()=>t.restoreFocus,initialFocusEl:()=>t.initialFocusEl,finalFocusEl:()=>t.finalFocusEl,contentPresent:p,contentRef:h,overlayPresent:b,overlayRef:f,dialogId:()=>t.dialogId,labelId:o,registerLabelId:i,unregisterLabelId:s,descriptionId:a,registerDescriptionId:l,unregisterDescriptionId:c,setContentRef:m,setOverlayRef:g,triggerRef:d,setTriggerRef:u}},get children(){return H(()=>x())}})}})})},Lg=Tg,Mg="button",Dg=e=>{const[t,n]=j(e,["as","contextId","ref","onClick","data-corvu-dialog-trigger"]),r=_(()=>Pt(t.contextId));return y(fg,L({ref(i){var s=Kn(r().setTriggerRef,t.ref);typeof s=="function"&&s(i)},get as(){return t.as??Mg},onClick:i=>{!og(t.onClick,i)&&r().setOpen(s=>!s)},"aria-haspopup":"dialog",get"aria-expanded"(){return r().open()?"true":"false"},get"aria-controls"(){return r().dialogId()},get"data-open"(){return le(r().open())},get"data-closed"(){return le(!r().open())},get"data-corvu-dialog-trigger"(){return t.hasOwnProperty("data-corvu-dialog-trigger")?t["data-corvu-dialog-trigger"]:""}},n))},Ig=Dg,zn=e=>typeof e=="function"?e():e,Qs=e=>requestAnimationFrame(()=>requestAnimationFrame(e));function Rg(e){const t=L({enabled:!0,dimension:"both"},e),[n,r]=O(!1),[o,i]=O(null);let s=null;T(()=>{const c=zn(t.element),d=zn(t.enabled);if(!c||!d)return;const u=new ResizeObserver(a);u.observe(c),c.addEventListener("transitionend",l),K(()=>{u.disconnect(),c.removeEventListener("transitionend",l),l()})});const a=([c])=>{if(n())return;const d=c.target,u=[d.offsetWidth,d.offsetHeight],h=zn(t.dimension);h==="both"?s?s[0]!==u[0]&&s[1]!==u[1]&&(Ee(()=>{i(s),r(!0)}),Qs(()=>{i(u),parseFloat(getComputedStyle(c.target).transitionDuration)===0&&l()})):s=u:s?Bn(h,s)!==Bn(h,u)&&(Ee(()=>{i(Bn(h,s)),r(!0)}),Qs(()=>{i(Bn(h,u)),parseFloat(getComputedStyle(c.target).transitionDuration)===0&&l()})):s=u},l=()=>{if(!n())return;const c=zn(t.element);c?s=[c.offsetWidth,c.offsetHeight]:s=null,Ee(()=>{r(!1),i(null)})};return{transitioning:n,transitionSize:o}}var Bn=(e,t)=>{switch(e){case"width":return t[0];case"height":return t[1]}},Fg=Rg,$g=Fg;const Ng=(e,t)=>e.length>0?()=>e(H(t)):e;function Kg(e,t){let n=0;const r=e.map((o,i)=>_(()=>(n=i,o()),void 0,cr));return _(()=>r.map(o=>o())[n],void 0,t)}function ea(e,t,n){let r=()=>t;const[o,i]=O(t,cr),s=_(Ng(e,()=>r()),t,cr);return[r=Kg([o,s],n),a=>i(()=>typeof a=="function"?a(H(r)):a)]}var zg=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Bg=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Vg=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[l,c,d]=zg(o,t),u=d-l-r*c;(c!==0||u!==0)&&Bg(o,t)&&(i+=u,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},Ug=e=>y(Ig,L({"data-corvu-dialog-trigger":void 0,"data-corvu-drawer-trigger":""},e)),ta=ce(),jg=e=>e?$n(`drawer-${e}`):ta,qg=e=>{if(!e){const n=he(ta);if(!n)throw new Error("[corvu]: Drawer context not found. Make sure to wrap Drawer components in <Drawer.Root>");return n}const t=to(`drawer-${e}`);if(!t)throw new Error(`[corvu]: Drawer context with id "${e}" not found. Make sure to wrap Drawer components in <Drawer.Root contextId="${e}">`);return t},na=ce(),Hg=e=>e?$n(`drawer-internal-${e}`):na,ra=e=>{if(!e){const n=he(na);if(!n)throw new Error("[corvu]: Drawer context not found. Make sure to wrap Drawer components in <Drawer.Root>");return n}const t=to(`drawer-internal-${e}`);if(!t)throw new Error(`[corvu]: Drawer context with id "${e}" not found. Make sure to wrap Drawer components in <Drawer.Root contextId="${e}">`);return t},oa=(e,t,n,r)=>{if(n===void 0||r===void 0)return{value:e,offset:Vn(e,t)};const o=r[n-1]?Vn(r[n-1],t):void 0,i=r[n]?Vn(r[n],t):void 0;return{value:e,offset:Vn(e,t),lowerBreakPoint:i,upperBreakPoint:o}},Vn=(e,t)=>{if(typeof e=="number")return t-e*t;if(!e.endsWith("px"))throw new Error(`[corvu] Snap and break points must be a number or a string ending with 'px'. Got ${e}`);return t-parseInt(e,10)},Wg=(e,t,n,r)=>{const o=ia("upper",e,r?n:t),i=ia("lower",e,r?n:t);return o?i?i.upperBreakPoint===void 0||o.lowerBreakPoint===void 0?Math.abs(i.offset-n)<Math.abs(o.offset-n)?i:o:n<o.lowerBreakPoint?i:o:o:i},ia=(e,t,n)=>t.reduce((r,o)=>e=="upper"&&o.offset>=n&&(!r||o.offset<r.offset)||e=="lower"&&o.offset<=n&&(!r||o.offset>r.offset)?o:r,void 0),Gg=(e,t)=>{let n=e,r=!1;do{if(n.hasAttribute("data-corvu-no-drag")||n.type==="range")return!1;n===(t??document.documentElement)?r=!0:n=n.parentElement}while(n&&!r);return!0},Yg=void 0,Xg=e=>{const t=L({initialOpen:!1,snapPoints:[0,1],breakPoints:[Yg],defaultSnapPoint:1,side:"bottom",dampFunction:$=>6*Math.log($+1),velocityFunction:($,V)=>{const Q=$/V;return Q<1&&Q>-1?1:Q},velocityCacheReset:200,allowSkippingSnapPoints:!0,handleScrollableElements:!0,transitionResize:!1,closeOnOutsidePointer:!0,allowPinchZoom:!1},e),[n,r]=j(t,["snapPoints","breakPoints","defaultSnapPoint","activeSnapPoint","onActiveSnapPointChange","side","dampFunction","velocityFunction","velocityCacheReset","allowSkippingSnapPoints","handleScrollableElements","transitionResize","open","initialOpen","onOpenChange","closeOnOutsidePointer","contextId","children"]),[o,i]=eo({value:()=>n.open,initialValue:n.initialOpen,onChange:n.onOpenChange}),[s,a]=eo({value:()=>n.activeSnapPoint,initialValue:0,onChange:n.onActiveSnapPointChange}),[l,c]=O(),{transitioning:d,transitionSize:u}=$g({element:()=>l()?.contentRef()??null,enabled:()=>o()&&n.transitionResize,dimension:()=>{switch(n.side){case"top":case"bottom":return"height";case"left":case"right":return"width"}}}),[h,m]=O(!1),[f,g]=ea(()=>d()?"resizing":null),p=_(()=>{const $=l()?.contentRef();if($)return getComputedStyle($)}),[b,w]=O(!1);T(()=>{const $=o();H(()=>{b()!==$&&($?(w(!0),qs(()=>{Ee(()=>{g("opening"),a(n.defaultSnapPoint)}),parseFloat(p().transitionDuration)===0&&g(null)})):(Ee(()=>{g("closing"),a(0)}),qs(()=>{parseFloat(p().transitionDuration)===0&&v()})))})});const v=()=>{Ee(()=>{w(!1),g(null)})},[x,C]=O(0);T(()=>{const $=l()?.contentRef();if(!$)return;k($);const V=new ResizeObserver(E);V.observe($),K(()=>{V.disconnect()})});const E=$=>{for(const V of $)V.target===l()?.contentRef()&&k(V.target)},k=$=>{const V=H(()=>x());switch(n.side){case"top":case"bottom":if(V===$.offsetHeight)return;C($.offsetHeight);break;case"left":case"right":if(V===$.offsetWidth)return;C($.offsetWidth);break}},F=_(()=>oa(s(),x())),[P,R]=ea(()=>F().offset),M=_(()=>x()?(x()-P())/x():0),I={get snapPoints(){return n.snapPoints},get breakPoints(){return n.breakPoints},get defaultSnapPoint(){return n.defaultSnapPoint},get activeSnapPoint(){return s()},setActiveSnapPoint:a,get side(){return n.side},get isDragging(){return h()},get isTransitioning(){return f()!==null},get transitionState(){return f()},get openPercentage(){return M()},get translate(){return P()},get velocityCacheReset(){return n.velocityCacheReset},get allowSkippingSnapPoints(){return n.allowSkippingSnapPoints},get handleScrollableElements(){return n.handleScrollableElements},get transitionResize(){return n.transitionResize}},oe=Gs(()=>n.children),Y=$=>{c(Pt(n.contextId));const V=oe()();if(Yt(V)){const Q=L($,I);return V(Q)}return V};return _(()=>{const $=jg(n.contextId),V=Hg(n.contextId);return H(()=>y($.Provider,{value:{snapPoints:()=>n.snapPoints,breakPoints:()=>n.breakPoints,defaultSnapPoint:()=>n.defaultSnapPoint,activeSnapPoint:s,setActiveSnapPoint:a,side:()=>n.side,isDragging:h,isTransitioning:()=>f()!==null,transitionState:f,openPercentage:M,translate:P,velocityCacheReset:()=>n.velocityCacheReset,allowSkippingSnapPoints:()=>n.allowSkippingSnapPoints,handleScrollableElements:()=>n.handleScrollableElements,transitionResize:()=>n.transitionResize},get children(){return y(V.Provider,{get value(){return{snapPoints:()=>n.snapPoints,breakPoints:()=>n.breakPoints,defaultSnapPoint:()=>n.defaultSnapPoint,activeSnapPoint:s,setActiveSnapPoint:a,side:()=>n.side,isDragging:h,isTransitioning:()=>f()!==null,transitionState:f,openPercentage:M,translate:P,velocityCacheReset:()=>n.velocityCacheReset,allowSkippingSnapPoints:()=>n.allowSkippingSnapPoints,handleScrollableElements:()=>n.handleScrollableElements,transitionResize:()=>n.transitionResize,dampFunction:n.dampFunction,velocityFunction:n.velocityFunction,setIsDragging:m,setTranslate:R,drawerSize:x,resolvedActiveSnapPoint:F,drawerStyles:p,setTransitionState:g,transitionSize:u,closeDrawer:v}},get children(){return y(Lg,L({get open(){return b()},onOpenChange:i,get contextId(){return n.contextId},get closeOnOutsidePointer(){return!h()&&n.closeOnOutsidePointer}},r,{children:Q=>Y(Q)}))}})}}))})},Jg=Xg,Zg=e=>{const[t,n]=j(e,["contextId","style"]);let r=!1,o=null,i=[0,0],s,a=0;const l=_(()=>ra(t.contextId)),c=_(()=>Pt(t.contextId)),d=_(()=>l().snapPoints().map((v,x)=>oa(v,l().drawerSize(),x,l().breakPoints()))),u=_(()=>{switch(l().side()){case"top":return`translate3d(0, ${-l().translate()}px, 0)`;case"bottom":return`translate3d(0, ${l().translate()}px, 0)`;case"right":return`translate3d(${l().translate()}px, 0, 0)`;case"left":return`translate3d(${-l().translate()}px, 0, 0)`}}),h=_(()=>{const v=l().transitionSize();if(v)switch(l().side()){case"top":case"bottom":return`${v}px`}}),m=_(()=>{const v=l().transitionSize();if(v)switch(l().side()){case"left":case"right":return`${v}px`}});T(()=>{c().open()&&(document.addEventListener("pointermove",g),document.addEventListener("touchmove",p),document.addEventListener("pointerup",w),document.addEventListener("touchend",w),K(()=>{document.removeEventListener("pointermove",g),document.removeEventListener("touchmove",p),document.removeEventListener("pointerup",w),document.removeEventListener("touchend",w)}))});const f=v=>{Gg(v.target,c().contentRef())&&l().transitionState()!=="closing"&&(r=!0,l().handleScrollableElements()&&(i=[v.clientX,v.clientY]))},g=v=>{b(v.target,v.clientX,v.clientY)},p=v=>{v.touches[0]&&b(v.target,v.touches[0].clientX,v.touches[0].clientY)},b=(v,x,C)=>{if(!r)return;if(!l().isDragging()||o===null){const F=window.getSelection();if(F&&F.toString().length>0){w();return}if(l().handleScrollableElements()){const P=[x,C].map((fe,$)=>i[$]-fe),R=Math.abs(P[0])>Math.abs(P[1])?"x":"y",M=R==="x"?P[0]:P[1];if(Math.abs(M)<.3)return;const I=c().contentRef(),[oe,Y]=Vg(v,R,I);if(M>0&&Math.abs(oe)>1||M<0&&Math.abs(Y)>0){w();return}}switch(l().side()){case"top":case"bottom":o=C;break;case"right":case"left":o=x}s=new Date,a=l().translate(),Ee(()=>{l().setIsDragging(!0),l().setTransitionState(null)})}let E;switch(l().side()){case"top":E=-(o-C);break;case"bottom":E=o-C;break;case"right":E=o-x;break;case"left":E=-(o-x);break}E-=l().resolvedActiveSnapPoint().offset,E>0&&(E=l().dampFunction(E));const k=new Date;k.getTime()-s.getTime()>l().velocityCacheReset()&&(s=k,a=l().translate()),l().setTranslate(-E)},w=()=>{if(r=!1,!l().isDragging())return;const v=new Date,x=l().velocityFunction(-(a-l().translate()),v.getTime()-s.getTime()||1),C=l().translate()*x,E=Wg(d(),l().translate(),C,l().allowSkippingSnapPoints());Ee(()=>{l().setTransitionState("snapping"),l().setIsDragging(!1)}),Ee(()=>{l().setActiveSnapPoint(E.value),E.offset===l().drawerSize()?c().setOpen(!1):(l().setTranslate(E.offset),parseFloat(l().drawerStyles().transitionDuration)===0&&l().setTransitionState(null))})};return y(kg,L({get contextId(){return t.contextId},get style(){return{transform:u(),"transition-duration":l().isDragging()?"0ms":void 0,height:h(),width:m(),...t.style}},onPointerDown:f,onTransitionEnd:()=>{Ee(()=>{l().transitionState()==="closing"&&l().closeDrawer(),l().transitionState()!=="resizing"&&l().setTransitionState(null)})},get"data-transitioning"(){return le(l().isTransitioning())},get"data-opening"(){return le(l().transitionState()==="opening")},get"data-closing"(){return le(l().transitionState()==="closing")},get"data-snapping"(){return le(l().transitionState()==="snapping")},get"data-resizing"(){return le(l().transitionState()==="resizing")},"data-corvu-dialog-content":void 0,"data-corvu-drawer-content":""},n))},Qg=Zg,ep=e=>{const[t,n]=j(e,["contextId"]),r=_(()=>ra(t.contextId));return y(_g,L({get contextId(){return t.contextId},get"data-transitioning"(){return le(r().isTransitioning())},get"data-opening"(){return le(r().transitionState()==="opening")},get"data-closing"(){return le(r().transitionState()==="closing")},get"data-snapping"(){return le(r().transitionState()==="snapping")},get"data-resizing"(){return le(r().transitionState()==="resizing")},"data-corvu-dialog-overlay":void 0,"data-corvu-drawer-overlay":""},n))},tp=ep,np=D('<div class="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted">');const rp=Jg,op=Ug,ip=Ag,sp=e=>{const[,t]=j(e,["class"]),n=qg();return y(tp,L({get class(){return Ye("absolute inset-0 z-50 data-[transitioning]:transition-colors data-[transitioning]:duration-300",e.class)},get style(){return{"background-color":`rgb(0 0 0 / ${.6*n.openPercentage()})`}}},t))},ap=e=>{const[,t]=j(e,["class","children"]);return y(ip,{get mount(){return Jt()},get children(){return[y(sp,{}),y(Qg,L({id:"smarttalks-list-content",get class(){return Ye("absolute inset-x-0 bottom-0 z-50 mt-24 flex h-auto max-h-[80%] flex-col rounded-t-[10px] border bg-background after:top-full after:h-[50%] after:bg-inherit md:select-none transition-transform duration-300",e.class)}},t,{get children(){return[np(),_(()=>e.children)]}}))]}})};var lp=D('<span class="font-semibold mt-2">'),cp=D('<div class="flex py-4 pl-3 pr-1 flex-col w-full space-y-4 overflow-y-auto">'),up=D('<div class="flex flex-col space-y-2"><div>'),dp=D('<div class="flex flex-col w-full space-y-1"><span class="font-semibold text-slate-700">'),fp=D('<div class="flex flex-col items-start"><span class=text-slate-500>');const hp=({options:e,text:t,title:n})=>{const{pushMessage:r}=tt(),[o,i]=O(!1),[s,a]=O(!1),[l,c]=O(),d=(h,m)=>{a(!1),i(!0),r(h,m)},u=h=>{const m=h.composedPath();for(const f of m)if(f.id==="smarttalks-list-content"){h.preventDefault();return}};return(()=>{var h=up(),m=h.firstChild;return A(h,y(_t,{get children(){return t?.trim()}}),m),A(m,y(rp,{get open(){return s()},onOpenChange:a,onOutsidePointer:u,get children(){return[y(op,{as:ke,variant:"outline",class:"w-full text-nowrap",get children(){return n?.trim()??ht("selectOption")}}),y(ap,{class:"pb-2 px-2 flex flex-col items-center justify-center",get children(){return[(()=>{var f=lp();return A(f,()=>n?.trim()??ht("selectOption")),f})(),(()=>{var f=cp();return A(f,y(pt,{each:e,children:g=>(()=>{var p=dp(),b=p.firstChild;return A(b,()=>g.label?.trim()??""),A(p,y(pt,{get each(){return g.items},children:w=>y(ke,{variant:"outline",get disabled(){return o()},get class(){return`py-6 flex justify-between hover:bg-slate-200 ${l()===w?"bg-slate-200":""}`},onClick:()=>c(w),get children(){return[(()=>{var v=fp(),x=v.firstChild;return A(v,()=>w.label?.trim(),x),A(x,()=>w.description?.trim()),v})(),y(J,{get when(){return l()===w},get fallback(){return y(uf,{class:"size-4 text-slate-500"})},get children(){return y(cf,{class:"size-4 text-slate-500"})}})]}})}),null),p})()})),f})(),y(ke,{get disabled(){return o()||!l()},onClick:()=>d(l().label,l().value),class:"w-11/12 mt-4 hover:bg-primary shadow-sm hover:shadow-primary transition-shadow",get children(){return ht("send")}})]}})]}})),te(()=>Ue(m,o()?"opacity-50":"")),h})()};var gp=D("<audio controls preload=auto class=h-8><source type=audio/mpeg><source type=audio/ogg>Your browser does not support the audio element.");const pp=e=>(()=>{var t=gp(),n=t.firstChild,r=n.nextSibling;return te(o=>{var i=e.link,s=e.link;return i!==o.e&&ue(n,"src",o.e=i),s!==o.t&&ue(r,"src",o.t=s),o},{e:void 0,t:void 0}),t})();var mp=D('<div class="flex flex-col space-y-2"><a class="self-center hover:brightness-75 transition-all duration-300 flex flex-col items-center justify-between bg-slate-200 rounded-md px-1 py-1 space-y-2 text-slate-700"target=_blank><span class="font-semibold text-sm">');const yp=e=>(()=>{var t=mp(),n=t.firstChild,r=n.firstChild;return A(n,y(df,{class:"size-10"}),r),A(r,()=>e.filename?.trim()),A(t,y(_t,{get children(){return e.text?.trim()}}),null),te(()=>ue(n,"href",e.link)),t})();var bp=D('<div class="flex flex-col space-y-2"><a class="object-contain hover:brightness-50 transition-all duration-300"target=_blank><img class="w-full h-auto rounded-md">');const wp=e=>(()=>{var t=bp(),n=t.firstChild,r=n.firstChild;return A(t,y(_t,{get children(){return e.text?.trim()}}),null),te(o=>{var i=e.link,s=e.link,a=e.text?.trim();return i!==o.e&&ue(n,"href",o.e=i),s!==o.t&&ue(r,"src",o.t=s),a!==o.a&&ue(r,"alt",o.a=a),o},{e:void 0,t:void 0,a:void 0}),t})();var vp=D('<div class="flex flex-col space-y-2"><video controls preload=auto class="size-full rounded-md"><source type=video/mp4><source type=video/ogg>Your browser does not support the video element.');const xp=e=>(()=>{var t=vp(),n=t.firstChild,r=n.firstChild,o=r.nextSibling;return A(t,y(_t,{get children(){return e.text?.trim()}}),null),te(i=>{var s=e.link,a=e.link;return s!==i.e&&ue(r,"src",i.e=s),a!==i.t&&ue(o,"src",i.t=a),i},{e:void 0,t:void 0}),t})();var Sp=D("<div>Media type not supported");const sa=e=>e.type==="image"?y(wp,e):e.type==="audio"?y(pp,e):e.type==="document"?y(yp,e):e.type==="video"?y(xp,e):Sp(),lo=({text:e})=>y(_t,{get children(){return e?.trim()}});var Ep=D("<div>Unknown bot message type");const kp=e=>y(Lh,{get createdAt(){return e.createdAt},get children(){return e.type==="text"?y(lo,{get text(){return e.text}}):e.type==="buttons"?y(Ih,L(()=>e.buttons)):e.type==="list"?y(hp,L(()=>e.list)):e.type==="media"?y(sa,L(()=>e.media)):e.type==="link"?y(Kh,L(()=>e.link)):e.type==="cards"?y($h,L(()=>e.cards)):e.type==="date"?y(lo,{get text(){return e.text}}):Ep()}});var Cp=D('<div class="place-self-center p-4"><span class="bg-slate-200/40 text-black font-semibold py-2 px-4 rounded-xl">');const Op=e=>(()=>{var t=Cp(),n=t.firstChild;return A(n,()=>e.text?.trim()),t})();var _p=D('<div class="place-self-end py-1 flex flex-col"><div class="bg-primary shadow-primary/40 shadow-md py-2 px-4 rounded-l-xl rounded-tr-xl text-primary-foreground">');const Pp=({children:e,createdAt:t})=>(()=>{var n=_p(),r=n.firstChild;return A(r,e),A(n,y(js,{createdAt:t,anchor:"end"}),null),n})();var Ap=D("<div>Unknown user message type");const Tp=e=>y(Pp,{get createdAt(){return e.createdAt},get children(){return e.type==="text"?y(lo,{get text(){return e.text}}):e.type==="media"?y(sa,L(()=>e.media)):Ap()}});var Lp=D("<div>Unknown message origin");const Mp=e=>e.origin==="bot"?y(kp,e):e.origin==="user"?y(Tp,e):e.origin==="service"?y(Op,e):Lp();function co(e){return we({a:{viewBox:"0 0 512 512"},c:'<path d="M256 464c-114.69 0-208-93.31-208-208S141.31 48 256 48s208 93.31 208 208-93.31 208-208 208Z"/>'},e)}var Dp=D('<main touch-action-pan-y class="flex-1 w-full p-4 overflow-y-auto flex flex-col items-center scroll-smooth relative min-h-0 overscroll-contain pb-2">'),Ip=D("<div>");const uo=()=>{let e;const{getMessages:t,onMessage:n,clearMessages:r}=tt(),{onOpen:o}=Jo(),i=(s=100)=>{setTimeout(()=>{e?.scrollTo(0,e.scrollHeight)},s)};return re("reset",()=>{r()}),rt(()=>{i(200)}),n(i),o(()=>i(200)),(()=>{var s=Dp(),a=e;return typeof a=="function"?or(a,s):e=s,A(s,y(pt,{get each(){return t()},get fallback(){return(()=>{var l=Ip();return A(l,()=>ht("emptyMessages")),l})()},children:l=>y(Mp,l)})),s})()};var Rp=D("<textarea>");const Fp=e=>{const[,t]=j(e,["class"]);return(()=>{var n=Rp();return ot(n,L({get class(){return Ye("flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-base md:text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e.class)}},t),!1,!1),n})()};var $p=D('<svg viewBox="0 0 72 72"fill=none xmlns=http://www.w3.org/2000/svg><path d="M50.3241 0H21.6759C9.69907 0 0 9.68892 0 21.6519V50.3481C0 62.3111 9.69907 72 21.6759 72H67.9815C70.2546 72 72 70.1845 72 67.9105V21.6519C72 9.68892 62.3009 0 50.3241 0Z"fill=#212431></path><path d="M28.9868 56.1046H24.7249C21.9596 56.1046 19.7217 53.8671 19.7217 51.1129V45.9126C19.7217 44.244 18.3676 42.8929 16.6952 42.8929H13.6924C11.8108 42.8929 10.2857 41.3712 10.2857 39.494V37.0622C10.2857 35.185 11.8108 33.6633 13.6924 33.6633H25.3758C27.3713 33.6633 28.9868 35.275 28.9868 37.2613V56.1046Z"fill=white></path><path d="M61.7142 26.3227C61.7142 28.1782 60.2059 29.6992 58.3661 29.6992H46.2955V56.1042H37.629C34.9627 56.1042 32.8054 53.9238 32.8054 51.2395V36.1839C32.8054 32.6002 29.9243 29.6992 26.3755 29.6992H20.1791C18.3393 29.6992 16.8311 28.1782 16.8311 26.3227V19.2729C16.8311 17.408 18.33 15.8964 20.1791 15.8964H58.3661C60.2153 15.8964 61.7142 17.408 61.7142 19.2729V26.3227Z"fill=white>');const Np=e=>(()=>{var t=$p();return ot(t,e,!0,!0),t})();var Kp=D('<div class="flex items-center justify-center pb-1"><span class="font-semibold text-xs text-gray-600 ml-1">SmartTalks.ai');const zp=()=>(()=>{var e=Kp(),t=e.firstChild;return A(e,y(Np,{height:15}),t),e})();var Bp=D('<footer class="relative flex-none bg-white border-t border-gray-100 z-20 w-full"><div class="flex flex-col p-3 gap-2 pb-[max(1rem,env(safe-area-inset-bottom))] w-full box-border"><div class="flex items-end gap-2 w-full"></div><div class="flex justify-center opacity-80 scale-95">');const fo=()=>{const{pushMessage:e}=tt(),[t,n]=O(""),r=()=>{t().trim()&&(e(t()),n(""))},o=i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),r())};return re("setInput",i=>{i&&n(i)}),(()=>{var i=Bp(),s=i.firstChild,a=s.firstChild,l=a.nextSibling;return A(a,y(Fp,{id:"chat-input",get placeholder(){return ht("inputPlaceholder")},get value(){return t()},onInput:c=>n(c.currentTarget.value),onKeyDown:o,class:"focus-visible:ring-primary min-h-[44px] max-h-[120px] py-2 leading-tight resize-none"}),null),A(a,y(ke,{variant:"outline",class:"h-[44px] w-[44px] p-0 shrink-0 flex items-center justify-center","aria-label":"Send",type:"button",onClick:r,get children(){return y(mc,{size:20})}}),null),A(l,y(zp,{})),i})()};var Vp=D("<div id=smarttalks-widget>"),Up=D("<span class=sr-only>Close"),aa=D("<div>"),jp=D("<span class=sr-only>Open"),qp=D("<span class=font-bold>"),Hp=D("<span>"),Wp=D('<div class="animate-pulse flex p-1">');const Gp=({children:e,openIcon:t})=>{const{bubble:n,toggle:r,show:o,hide:i}=Jo(),{chatWidget:s}=ie(),[a,l]=O(!0),[c,d]=O(""),[u,h]=O(!1),[m,f]=O("100%");setTimeout(()=>l(!1),2e3);const g=()=>{typeof window<"u"&&h(window.innerWidth<768)},p=()=>{u()&&window.visualViewport&&(f(`${window.visualViewport.height}px`),window.scrollTo(0,0))};T(()=>{typeof document>"u"||(n()&&u()?(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"):(document.body.style.overflow="",document.body.style.position="",document.body.style.width=""))}),rt(()=>{g(),window.addEventListener("resize",g),window.visualViewport&&(window.visualViewport.addEventListener("resize",p),window.visualViewport.addEventListener("scroll",p))}),K(()=>{window.removeEventListener("resize",g),window.visualViewport&&(window.visualViewport.removeEventListener("resize",p),window.visualViewport.removeEventListener("scroll",p)),document.body.style.overflow="",document.body.style.position=""}),s()?.openDelay&&setTimeout(()=>{o()},(s()?.openDelay||0)*1e3);const b=()=>(s()?.style.margin??5)/4,w=()=>u()?{height:m()}:s()?.style.position==="left"?{left:`${b()}rem`}:{right:`${b()}rem`};return re("open",()=>{o(),u()&&window.visualViewport&&f(`${window.visualViewport.height}px`)}),re("close",()=>{i()}),re("toggle",()=>{r()}),re("onAnswer",v=>{v.text&&d(v.text),o()}),(()=>{var v=aa();return A(v,y(J,{get when(){return n()},get children(){var x=Vp();return A(x,e),te(()=>Ue(x,"bg-background text-foreground flex flex-col relative overflow-hidden "+(u()?"w-full h-full rounded-none":"rounded-md shadow-xl h-[85vh] w-[90vw] md:h-[min(100vh,500px)] md:w-[min(100vw,425px)]"))),x}}),null),A(v,y(J,{get when(){return!u()||!n()},get children(){var x=aa();return A(x,y(J,{get when(){return s()?.whatsappBtn},get children(){return y(ke,{onclick:()=>window.open(s()?.whatsappBtn,"_blank"),"aria-label":"Open",class:"bg-green-500 rounded-full size-14 shadow-md hover:bg-green-400 animate-scale",type:"button",get children(){return y(Oh,{class:"size-9",color:"white"})}})}}),null),A(x,y(J,{get when(){return n()},get fallback(){return y(ke,{onclick:r,class:"rounded-full px-0 animate-scale","aria-label":"Open",type:"button",get children(){return[t,jp(),y(J,{get when(){return s()?.balloonMessage},get children(){var C=Hp();return A(C,y(J,{get when(){return c()},get fallback(){return y(J,{get when(){return!a()},get fallback(){return(()=>{var E=Wp();return A(E,y(co,{class:"size-2 animate-bounce"}),null),A(E,y(co,{class:"size-2 animate-bounce delay-150"}),null),A(E,y(co,{class:"size-2 animate-bounce delay-300"}),null),E})()},get children(){return s()?.balloonMessage}})},get children(){var E=qp();return A(E,(()=>{var k=_(()=>c().length>20);return()=>k()?c().substring(0,17)+"...":c()})()),E}})),te(()=>Ue(C,"absolute -top-12 bg-primary text-primary-foreground px-2.5 py-2 pointer-events-none rounded-full truncate"+(s()?.style.position==="left"?" left-0":" right-0"))),C}})]}})},get children(){return y(ke,{onclick:r,class:"rounded-full px-0 hover:bg-primary hover:shadow-primary shadow-md transition-shadow duration-300","aria-label":"Close",type:"button",get children(){return[t,Up()]}})}}),null),te(()=>Ue(x,"flex justify-center gap-3 items-center "+(u()?"absolute bottom-5 right-5":""))),x}}),null),te(x=>{var C="z-[9999] fixed flex flex-col space-y-2 "+(u()?"left-0 top-0 w-full justify-end":"bottom-5 max-h-full max-w-full md:max-h-[90%] md:max-w-[90%] "+(s()?.style.position==="left"?" items-start":" items-end")),E=w();return C!==x.e&&Ue(v,x.e=C),x.t=an(v,E,x.t),x},{e:void 0,t:void 0}),v})()};var Yp=D('<div id=smarttalks-widget class="h-screen w-full overflow-hidden bg-background text-foreground flex flex-col rounded-md">');const Xp=({children:e})=>{const{chatWidget:t}=ie(),n={};return t()?.style.width&&(n.width=`min(100vw, ${t()?.style.width}px)`),t()?.style.height&&(n.height=`min(100vh, ${t()?.style.height}px)`),(()=>{var r=Yp();return an(r,n),A(r,e),r})()};var Jp=D("<div id=smarttalks-widget>");const Zp=({children:e})=>{const{chatWidget:t}=ie(),[n,r]=O(!1),[o,i]=O(!1),[s,a]=O("100%"),l=()=>{typeof window<"u"&&i(window.innerWidth<768)},c=()=>{o()&&window.visualViewport&&(a(`${window.visualViewport.height}px`),window.scrollTo(0,0))};T(()=>{typeof document>"u"||(n()&&o()?(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"):(document.body.style.overflow="",document.body.style.position="",document.body.style.width=""))}),rt(()=>{l(),window.addEventListener("resize",l),window.visualViewport&&(window.visualViewport.addEventListener("resize",c),window.visualViewport.addEventListener("scroll",c))}),K(()=>{window.removeEventListener("resize",l),window.visualViewport&&(window.visualViewport.removeEventListener("resize",c),window.visualViewport.removeEventListener("scroll",c)),document.body.style.overflow="",document.body.style.position=""});const d=()=>(t()?.style.margin??5)/4,u=()=>{if(o())return{height:s(),top:"0px"};const h={};return t()?.fullscreen?(h.height="100%",h["max-height"]="100%",h.width="100%",h["max-width"]="100%",h.bottom=0,h.left=0):t()?.style.position&&(h[t()?.style.position||"right"]=`${d()}rem`),h};return re("open",()=>{r(!0),ee("onOpen"),o()&&window.visualViewport&&a(`${window.visualViewport.height}px`)}),re("close",()=>{r(!1),ee("onClose")}),re("toggle",()=>{r(!n()),ee("onToggle")}),re("onAnswer",()=>{r(!0),ee("onOpen")}),setTimeout(()=>{r(!0),ee("onOpen")},(t()?.openDelay||0)*1e3),y(J,{get when(){return n()},get children(){var h=Jp();return A(h,e),te(m=>{var f=`
|
|
181
|
+
*/function Gd(e,t){return t?qc([e.clientX,e.clientY],t):!1}function Yd(e){const t=Ct(),n=Ni(),r=gs(),o=Me({placement:"bottom-start"},e),[i,s]=j(o,["open","defaultOpen","onOpenChange"]);let a=0,l=null,c="right";const[d,u]=O(),[f,g]=O(),[h,p]=O(),[m,b]=O(),[w,v]=O(!0),[x,_]=O(s.placement),[E,k]=O([]),[F,P]=O([]),{DomCollectionProvider:R}=Uu({items:F,onItemsChange:P}),M=xi({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:U=>i.onOpenChange?.(U)}),I=du(()=>t.forceMount()||M.isOpen()),re=Lu({selectionMode:"none",dataSource:F}),Y=U=>{v(U),M.open()},fe=(U=!1)=>{M.close(),U&&r&&r.close(!0)},$=U=>{v(U),M.toggle()},V=()=>{const U=m();U&&(de(U),re.selectionManager().setFocused(!0),re.selectionManager().setFocusedKey(void 0))},Q=U=>{k(go=>[...go,U]);const Un=r?.registerNestedMenu(U);return()=>{k(go=>dr(go,U)),Un?.()}},se=U=>c===l?.side&&Gd(U,l?.area),At=U=>{se(U)&&U.preventDefault()},Ae=U=>{se(U)||V()},dm=U=>{se(U)&&U.preventDefault()};lu({isDisabled:()=>!(r==null&&M.isOpen()&&t.isModal()),targets:()=>[m(),...E()].filter(Boolean)}),T(()=>{const U=m();if(!U||!r)return;const Un=r.registerNestedMenu(U);K(()=>{Un()})});const fm={dataset:C(()=>({"data-expanded":M.isOpen()?"":void 0,"data-closed":M.isOpen()?void 0:""})),isOpen:M.isOpen,contentPresence:I,nestedMenus:E,currentPlacement:x,pointerGraceTimeoutId:()=>a,autoFocus:w,listState:()=>re,parentMenuContext:()=>r,triggerRef:h,contentRef:m,triggerId:d,contentId:f,setTriggerRef:p,setContentRef:b,open:Y,close:fe,toggle:$,focusContent:V,onItemEnter:At,onItemLeave:Ae,onTriggerLeave:dm,setPointerDir:U=>c=U,setPointerGraceTimeoutId:U=>a=U,setPointerGraceIntent:U=>l=U,registerNestedMenu:Q,registerItemToParentDomCollection:n?.registerItem,registerTriggerId:yn(u),registerContentId:yn(g)};return y(R,{get children(){return y(hs.Provider,{value:fm,get children(){return y(Wd,L({anchorRef:h,contentRef:m,onCurrentPlacementChange:_},s))}})}})}const Xd=ce();function Jd(e){let t;const n=Ct(),r=Et(),o=Me({id:n.generateId(`item-${Te()}`)},e),[i,s]=j(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=O(),[c,d]=O(),[u,f]=O(),g=()=>r.listState().selectionManager(),h=()=>s.id,p=()=>g().focusedKey()===h(),m=()=>{i.onSelect?.(),i.closeOnSelect&&r.close(!0)};ju({getItem:()=>({ref:()=>t,type:"item",key:h(),textValue:i.textValue??u()?.textContent??t?.textContent??"",disabled:i.disabled??!1})});const b=Au({key:h,selectionManager:g,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),w=P=>{ge(P,i.onPointerMove),P.pointerType==="mouse"&&(i.disabled?r.onItemLeave(P):(r.onItemEnter(P),P.defaultPrevented||(de(P.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(h()))))},v=P=>{ge(P,i.onPointerLeave),P.pointerType==="mouse"&&r.onItemLeave(P)},x=P=>{ge(P,i.onPointerUp),!i.disabled&&P.button===0&&m()},_=P=>{if(ge(P,i.onKeyDown),!P.repeat&&!i.disabled)switch(P.key){case"Enter":case" ":m();break}},E=C(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),k=C(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":p()?"":void 0})),F={isChecked:()=>i.checked,dataset:k,setLabelRef:f,generateId:ui(()=>s.id),registerLabel:yn(l),registerDescription:yn(d)};return y(Xd.Provider,{value:F,get children(){return y(bn,L({as:"div",ref(P){var R=st(M=>t=M,i.ref);typeof R=="function"&&R(P)},get tabIndex(){return b.tabIndex()},get"aria-checked"(){return E()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return b.dataKey()},get onPointerDown(){return ve([i.onPointerDown,b.onPointerDown])},get onPointerUp(){return ve([x,b.onPointerUp])},get onClick(){return ve([i.onClick,b.onClick])},get onKeyDown(){return ve([_,b.onKeyDown])},get onMouseDown(){return ve([i.onMouseDown,b.onMouseDown])},get onFocus(){return ve([i.onFocus,b.onFocus])},onPointerMove:w,onPointerLeave:v},k,s))}})}const Zd=ce();function ms(){return he(Zd)}function Qd(e){let t;const n=Ct(),r=Et(),o=ms(),i=Me({id:n.generateId(`content-${Te()}`)},e),[s,a]=j(i,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let l=0;const c=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),d=Du({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused()},()=>t);su({trapFocus:()=>c()&&r.isOpen(),onMountAutoFocus:m=>{o===void 0&&s.onOpenAutoFocus?.(m)},onUnmountAutoFocus:s.onCloseAutoFocus},()=>t);const u=m=>{if(Le(m.currentTarget,m.target)&&(m.key==="Tab"&&r.isOpen()&&m.preventDefault(),o!==void 0&&m.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(m.key){case"ArrowRight":m.stopPropagation(),m.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case"ArrowLeft":if(m.currentTarget.hasAttribute("data-closed"))break;m.stopPropagation(),m.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},f=m=>{s.onEscapeKeyDown?.(m),o?.setAutoFocusMenu(!1),r.close(!0)},g=m=>{s.onFocusOutside?.(m),n.isModal()&&m.preventDefault()},h=m=>{ge(m,s.onPointerEnter),r.isOpen()&&(r.parentMenuContext()?.listState().selectionManager().setFocused(!1),r.parentMenuContext()?.listState().selectionManager().setFocusedKey(void 0))},p=m=>{if(ge(m,s.onPointerMove),m.pointerType!=="mouse")return;const b=m.target,w=l!==m.clientX;Le(m.currentTarget,b)&&w&&(r.setPointerDir(m.clientX>l?"right":"left"),l=m.clientX)};return T(()=>K(r.registerContentId(s.id))),y(Z,{get when(){return r.contentPresence.isPresent()},get children(){return y(nd,{get children(){return y(ed,L({ref(m){var b=st(w=>{r.setContentRef(w),r.contentPresence.setRef(w),t=w},s.ref);typeof b=="function"&&b(m)},role:"menu",get id(){return s.id},get tabIndex(){return d.tabIndex()},get disableOutsidePointerEvents(){return C(()=>!!c())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return{"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative",...s.style}},get"aria-labelledby"(){return r.triggerId()},onEscapeKeyDown:f,onFocusOutside:g,get onDismiss(){return r.close},get onKeyDown(){return ve([s.onKeyDown,d.onKeyDown,u])},get onMouseDown(){return ve([s.onMouseDown,d.onMouseDown])},get onFocusIn(){return ve([s.onFocusIn,d.onFocusIn])},get onFocusOut(){return ve([s.onFocusOut,d.onFocusOut])},onPointerEnter:h,onPointerMove:p},()=>r.dataset(),a))}})}})}function ef(e){let t;const n=Ct(),r=Et(),[o,i]=j(e,["ref"]);return Hi({element:()=>t??null,enabled:()=>r.isOpen()&&n.preventScroll()}),y(Qd,L({ref(s){var a=st(l=>{t=l},o.ref);typeof a=="function"&&a(s)}},i))}function tf(e){return y(Jd,L({role:"menuitem",closeOnSelect:!0},e))}function nf(e){const t=Et();return y(Z,{get when(){return t.contentPresence.isPresent()},get children(){return y(Wo,e)}})}function rf(e){const t=`menu-${Te()}`,n=Me({id:t,modal:!0},e),[r,o]=j(n,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value"]),i=xi({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:a=>r.onOpenChange?.(a)}),s={isModal:()=>r.modal??!0,preventScroll:()=>r.preventScroll??s.isModal(),forceMount:()=>r.forceMount??!1,generateId:ui(()=>r.id),value:()=>r.value};return y(ps.Provider,{value:s,get children(){return y(Yd,L({get open(){return i.isOpen()},get onOpenChange(){return i.setIsOpen}},o))}})}function of(e){const t=Ct(),n=Et(),r=ms(),o=Me({id:t.generateId("trigger")},e),[i,s]=j(o,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let a;r!==void 0&&(a=t.value()??i.id,T(()=>{r.registerMenu(a,[n.contentRef(),...n.nestedMenus()])}),T(()=>{r.value()===a?(n.triggerRef()?.focus(),r.autoFocusMenu()&&n.open(!0)):n.close(!0)}),T(()=>{n.isOpen()&&r.setValue(a)}),K(()=>{r.unregisterMenu(a)}),r.lastValue()===void 0&&r.setLastValue(a));const l=()=>{r?.setAutoFocusMenu(!0),r!==void 0?n.toggle(!1):n.toggle(!0),r!==void 0&&!n.isOpen()&&r.value()===a&&r.closeMenu()},c=h=>{ge(h,i.onPointerDown),h.currentTarget.dataset.pointerType=h.pointerType,!i.disabled&&h.pointerType!=="touch"&&h.button===0&&l()},d=h=>{ge(h,i.onClick),i.disabled||h.currentTarget.dataset.pointerType==="touch"&&l()},u=h=>{if(ge(h,i.onKeyDown),!i.disabled)switch(h.key){case"Enter":case" ":case"ArrowDown":h.stopPropagation(),h.preventDefault(),Hc(h.currentTarget),n.toggle("first");break;case"ArrowUp":h.stopPropagation(),h.preventDefault(),n.toggle("last");break;case"ArrowRight":if(r===void 0)break;h.stopPropagation(),h.preventDefault(),r.nextMenu();break;case"ArrowLeft":if(r===void 0)break;h.stopPropagation(),h.preventDefault(),r.previousMenu();break}},f=h=>{ge(h,i.onMouseOver),!i.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(a)},g=h=>{ge(h,i.onFocus),r!==void 0&&r.setValue(a)};return T(()=>K(n.registerTriggerId(i.id))),y(Fu,L({ref(h){var p=st(n.setTriggerRef,i.ref);typeof p=="function"&&p(h)},get id(){return i.id},get disabled(){return i.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return C(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return a!==void 0&&r?.value()===a?!0:void 0},get tabIndex(){return r!==void 0?r.value()===a||r.lastValue()===a?0:-1:void 0},onPointerDown:c,onMouseOver:f,onClick:d,onKeyDown:u,onFocus:g,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),s))}function sf(e){const t=Ct(),n=Et(),[r,o]=j(e,["onCloseAutoFocus","onInteractOutside"]);let i=!1;return y(ef,L({onCloseAutoFocus:l=>{r.onCloseAutoFocus?.(l),i||de(n.triggerRef()),i=!1,l.preventDefault()},onInteractOutside:l=>{r.onInteractOutside?.(l),(!t.isModal()||l.detail.isContextMenu)&&(i=!0)}},o))}function af(e){const t=`dropdownmenu-${Te()}`,n=Me({id:t},e);return y(rf,n)}function lf(e){return we({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-circle-check-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z" stroke-width="0" fill="currentColor"/>'},e)}function cf(e){return we({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/>'},e)}function uf(e){return we({a:{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-download",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},c:'<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4"/><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/><path d="M12 17v-6"/><path d="M9.5 14.5l2.5 2.5l2.5 -2.5"/>'},e)}const df=e=>y(af,L({gutter:4},e)),ff=of,hf=e=>{const[,t]=j(e,["class"]);return y(nf,{get mount(){return Jt()},get children(){return y(sf,L({get class(){return Ge("z-50 min-w-[128px] origin-[var(--kb-menu-content-transform-origin)] animate-content-hide overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[expanded]:animate-content-show",e.class)}},t))}})},gf=e=>{const[,t]=j(e,["class"]);return y(tf,L({get class(){return Ge("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e.class)}},t))};function pf(e){return e.type==="buttons"&&e.buttons.options.length>10?{list:{text:e.buttons.text,options:[{items:e.buttons.options}]},type:"list",origin:e.origin,createdAt:e.createdAt}:e}function mf(e){if(Array.isArray(e)){console.info("----------------------------------------------------------");for(const t of e)console.info("Executed:",t.type),console.info(t)}}async function yf(e,t,n){const r=`${Zt}/v1/messages`,o=lr(),i={"Content-Type":"application/json"};o&&(i["x-session-id"]=o);const s={credentials:"include",method:"POST",headers:i,body:JSON.stringify({channelId:n,postback:t,type:"text",text:e})};await fetch(r,s)}async function bf(e,t,n){if(!e||!t||!n)return;const r=`${Zt}/v1/widget/${e}/restart`,o={credentials:"include",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contactId:t,interactionId:n})};await fetch(r,o)}const Fe=Object.create(null);Fe.open="0",Fe.close="1",Fe.ping="2",Fe.pong="3",Fe.message="4",Fe.upgrade="5",Fe.noop="6";const _n=Object.create(null);Object.keys(Fe).forEach(e=>{_n[Fe[e]]=e});const $r={type:"error",data:"parser error"},ys=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",bs=typeof ArrayBuffer=="function",ws=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Nr=({type:e,data:t},n,r)=>ys&&t instanceof Blob?n?r(t):vs(t,r):bs&&(t instanceof ArrayBuffer||ws(t))?n?r(t):vs(new Blob([t]),r):r(Fe[e]+(t||"")),vs=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function xs(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Kr;function wf(e,t){if(ys&&e.data instanceof Blob)return e.data.arrayBuffer().then(xs).then(t);if(bs&&(e.data instanceof ArrayBuffer||ws(e.data)))return t(xs(e.data));Nr(e,!1,n=>{Kr||(Kr=new TextEncoder),t(Kr.encode(n))})}const Ss="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Ss.length;e++)Wt[Ss.charCodeAt(e)]=e;const vf=e=>{let t=e.length*.75,n=e.length,r,o=0,i,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)i=Wt[e.charCodeAt(r)],s=Wt[e.charCodeAt(r+1)],a=Wt[e.charCodeAt(r+2)],l=Wt[e.charCodeAt(r+3)],d[o++]=i<<2|s>>4,d[o++]=(s&15)<<4|a>>2,d[o++]=(a&3)<<6|l&63;return c},xf=typeof ArrayBuffer=="function",zr=(e,t)=>{if(typeof e!="string")return{type:"message",data:ks(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Sf(e.substring(1),t)}:_n[n]?e.length>1?{type:_n[n],data:e.substring(1)}:{type:_n[n]}:$r},Sf=(e,t)=>{if(xf){const n=vf(e);return ks(n,t)}else return{base64:!0,data:e}},ks=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Es="",kf=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((i,s)=>{Nr(i,!1,a=>{r[s]=a,++o===n&&t(r.join(Es))})})},Ef=(e,t)=>{const n=e.split(Es),r=[];for(let o=0;o<n.length;o++){const i=zr(n[o],t);if(r.push(i),i.type==="error")break}return r};function Cf(){return new TransformStream({transform(e,t){wf(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const i=new DataView(o.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{o=new Uint8Array(9);const i=new DataView(o.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Br;function Pn(e){return e.reduce((t,n)=>t+n.length,0)}function An(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Of(e,t){Br||(Br=new TextDecoder);const n=[];let r=0,o=-1,i=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(Pn(n)<1)break;const l=An(n,1);i=(l[0]&128)===128,o=l[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(Pn(n)<2)break;const l=An(n,2);o=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Pn(n)<8)break;const l=An(n,8),c=new DataView(l.buffer,l.byteOffset,l.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){a.enqueue($r);break}o=d*Math.pow(2,32)+c.getUint32(4),r=3}else{if(Pn(n)<o)break;const l=An(n,o);a.enqueue(zr(i?l:Br.decode(l),t)),r=0}if(o===0||o>e){a.enqueue($r);break}}}})}const Cs=4;function te(e){if(e)return _f(e)}function _f(e){for(var t in te.prototype)e[t]=te.prototype[t];return e}te.prototype.on=te.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},te.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},te.prototype.off=te.prototype.removeListener=te.prototype.removeAllListeners=te.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},te.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},te.prototype.emitReserved=te.prototype.emit,te.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},te.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Tn=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Se=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Pf="arraybuffer";function mm(){}function Os(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Af=Se.setTimeout,Tf=Se.clearTimeout;function Ln(e,t){t.useNativeTimers?(e.setTimeoutFn=Af.bind(Se),e.clearTimeoutFn=Tf.bind(Se)):(e.setTimeoutFn=Se.setTimeout.bind(Se),e.clearTimeoutFn=Se.clearTimeout.bind(Se))}const Lf=1.33;function Mf(e){return typeof e=="string"?Df(e):Math.ceil((e.byteLength||e.size)*Lf)}function Df(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function _s(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function If(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Rf(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class Ff extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Vr extends te{constructor(t){super(),this.writable=!1,Ln(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Ff(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=zr(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=If(t);return n.length?"?"+n:""}}class $f extends Vr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Ef(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,kf(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=_s()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Ps=!1;try{Ps=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Nf=Ps;function Kf(){}class zf extends $f{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class $e extends te{constructor(t,n,r){super(),this.createRequest=t,Ln(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Os(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=$e.requestsCount++,$e.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Kf,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete $e.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if($e.requestsCount=0,$e.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",As);else if(typeof addEventListener=="function"){const e="onpagehide"in Se?"pagehide":"unload";addEventListener(e,As,!1)}}function As(){for(let e in $e.requests)$e.requests.hasOwnProperty(e)&&$e.requests[e].abort()}const Bf=function(){const e=Ts({xdomain:!1});return e&&e.responseType!==null}();class Vf extends zf{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Bf&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new $e(Ts,this.uri(),t)}}function Ts(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Nf))return new XMLHttpRequest}catch{}if(!t)try{return new Se[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ls=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Uf extends Vr{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Ls?{}:Os(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Nr(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}o&&Tn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=_s()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ur=Se.WebSocket||Se.MozWebSocket;class jf extends Uf{createSocket(t,n,r){return Ls?new Ur(t,n,r):n?new Ur(t,n):new Ur(t)}doWrite(t,n){this.ws.send(n)}}class qf extends Vr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Of(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=Cf();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Tn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Hf={websocket:jf,webtransport:qf,polling:Vf},Wf=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Gf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function jr(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=Wf.exec(e||""),i={},s=14;for(;s--;)i[Gf[s]]=o[s]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Yf(i,i.path),i.queryKey=Xf(i,i.query),i}function Yf(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Xf(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(n[o]=i)}),n}const qr=typeof addEventListener=="function"&&typeof removeEventListener=="function",Mn=[];qr&&addEventListener("offline",()=>{Mn.forEach(e=>e())},!1);class Ze extends te{constructor(t,n){if(super(),this.binaryType=Pf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=jr(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=jr(n.host).host);Ln(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Rf(this.opts.query)),qr&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Mn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Cs,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ze.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ze.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=Mf(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Tn(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Ze.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),qr&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Mn.indexOf(this._offlineEventListener);r!==-1&&Mn.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ze.protocol=Cs;class Jf extends Ze{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ze.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ze.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){r||(r=!0,d(),n.close(),n=null)}const s=u=>{const f=new Error("probe error: "+u);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function a(){s("transport closed")}function l(){s("socket closed")}function c(u){n&&u.name!==n.name&&i()}const d=()=>{n.removeListener("open",o),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",o),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Zf=class extends Jf{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>Hf[o]).filter(o=>!!o)),super(t,r)}};function Qf(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=jr(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const eh=typeof ArrayBuffer=="function",th=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Ms=Object.prototype.toString,nh=typeof Blob=="function"||typeof Blob<"u"&&Ms.call(Blob)==="[object BlobConstructor]",rh=typeof File=="function"||typeof File<"u"&&Ms.call(File)==="[object FileConstructor]";function Hr(e){return eh&&(e instanceof ArrayBuffer||th(e))||nh&&e instanceof Blob||rh&&e instanceof File}function Dn(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Dn(e[n]))return!0;return!1}if(Hr(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dn(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Dn(e[n]))return!0;return!1}function oh(e){const t=[],n=e.data,r=e;return r.data=Wr(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Wr(e,t){if(!e)return e;if(Hr(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Wr(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Wr(e[r],t));return n}return e}function ih(e,t){return e.data=Gr(e.data,t),delete e.attachments,e}function Gr(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Gr(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Gr(e[n],t));return e}const sh=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],ah=5;var B;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(B||(B={}));class lh{constructor(t){this.replacer=t}encode(t){return(t.type===B.EVENT||t.type===B.ACK)&&Dn(t)?this.encodeAsBinary({type:t.type===B.EVENT?B.BINARY_EVENT:B.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===B.BINARY_EVENT||t.type===B.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=oh(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function Ds(e){return Object.prototype.toString.call(e)==="[object Object]"}class Yr extends te{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===B.BINARY_EVENT;r||n.type===B.BINARY_ACK?(n.type=r?B.EVENT:B.ACK,this.reconstructor=new ch(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Hr(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(B[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===B.BINARY_EVENT||r.type===B.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(i,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const i=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(Yr.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case B.CONNECT:return Ds(n);case B.DISCONNECT:return n===void 0;case B.CONNECT_ERROR:return typeof n=="string"||Ds(n);case B.EVENT:case B.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&sh.indexOf(n[0])===-1);case B.ACK:case B.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ch{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=ih(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const uh=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Yr,Encoder:lh,get PacketType(){return B},protocol:ah},Symbol.toStringTag,{value:"Module"}));function Pe(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const dh=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Is extends te{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Pe(t,"open",this.onopen.bind(this)),Pe(t,"packet",this.onpacket.bind(this)),Pe(t,"error",this.onerror.bind(this)),Pe(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,i;if(dh.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:B.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,u=n.pop();this._registerAckCallback(d,u),s.id=d}const a=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,l=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},o),s=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,o)=>{const i=(s,a)=>s?o(s):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:B.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case B.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case B.EVENT:case B.BINARY_EVENT:this.onevent(t);break;case B.ACK:case B.BINARY_ACK:this.onack(t);break;case B.DISCONNECT:this.ondisconnect();break;case B.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:B.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:B.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Ot(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ot.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},Ot.prototype.reset=function(){this.attempts=0},Ot.prototype.setMin=function(e){this.ms=e},Ot.prototype.setMax=function(e){this.max=e},Ot.prototype.setJitter=function(e){this.jitter=e};class Xr extends te{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Ln(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ot({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||uh;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Zf(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Pe(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=Pe(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{o(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(o),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Pe(t,"ping",this.onping.bind(this)),Pe(t,"data",this.ondata.bind(this)),Pe(t,"error",this.onerror.bind(this)),Pe(t,"close",this.onclose.bind(this)),Pe(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Tn(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Is(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Gt={};function In(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Qf(e,t.path||"/socket.io"),r=n.source,o=n.id,i=n.path,s=Gt[o]&&i in Gt[o].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Xr(r,t):(Gt[o]||(Gt[o]=new Xr(r,t)),l=Gt[o]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(In,{Manager:Xr,Socket:Is,io:In,connect:In});class Qe{static instance;constructor(){}static init(t){if(!Qe.instance){const n=lr();Qe.instance=In(Va,{path:"/ws",withCredentials:!0,extraHeaders:{"widget-id":t},auth:{sessionId:n,widgetId:t},query:{sessionId:n||""}}),Qe.instance.on("connect",()=>{console.info("SmartTalks.ai widget connected!",Qe.instance.id)})}return Qe.instance}static on(t,n,r){const o=Qe.instance||this.init(n);o.off(t),o.on(t,r)}}const Rs=1e3*60*60*24,[Rn,Fs]=ni("smarttalks-widget-messages",{},Rs),$s=()=>{const{widgetId:e}=ie();return Rn[e()]??[]},fh=e=>{const{widgetId:t}=ie();Fs({...Rn,[t()]:[...Rn[t()]??[],e]})},hh=()=>{const{widgetId:e}=ie();Fs({...Rn,[e()]:[]})},[Ns,gh]=ni("smarttalks-widget-conversationinfo",{},Rs),Ks=()=>{const{widgetId:e}=ie();return Ns[e()]??{}},zs=e=>{const{widgetId:t}=ie();gh({...Ns,[t()]:e})},[ph,Jr]=O(!1),[mh,Bs]=O(!1),Vs=[],Us=()=>{Vs.forEach(e=>e())},yh=e=>Vs.push(e),Zr=e=>{const t=pf(e);if(fh(t),t.type==="media"){setTimeout(Us,200);return}Us()},bh=(e,t)=>{const{chatWidget:n,widgetId:r}=ie(),o=Ks();e.trim()&&(Zr({text:e,type:"text",origin:"user",createdAt:new Date().toString()}),ee("onInput",e),Qe.on("message",r(),i=>{(i.contactId!==o.contactId||i.interactionId!==o.interactionId)&&zs({contactId:i.contactId,interactionId:i.interactionId});for(const s of i.messages)Zr(s),ee("onAnswer",s);Jr(!1),mf(i.debug)}),Jr(!0),yf(e,t,n()?._id).catch(i=>{console.error(i),Jr(!1)}))},wh=()=>{const{chatWidget:e}=ie(),t=Ks();Bs(!0),hh(),bf(e()?._id,t.contactId,t.interactionId).finally(()=>{zs({}),Bs(!1),vh()}),ee("onReset")},vh=()=>{const{chatWidget:e}=ie();if($s().length===0&&e()?.balloonMessage){const n=e()?.balloonMessage;n&&Zr({text:n,type:"text",origin:"bot",createdAt:new Date().toString()})}},et=()=>({getMessages:$s,pushMessage:bh,clearMessages:wh,onMessage:yh,typing:ph,loading:mh});var xh=D("<span>");const Sh=()=>{const{clearMessages:e}=et();O(!1);const[t,n]=O(!1);return y(df,{get open(){return t()},onOpenChange:n,get children(){return[y(ff,{get children(){return y(Ee,{variant:"ghost",size:"icon",class:"hover:bg-accent/10 hover:text-primary-foreground",get children(){return y(hc,{size:20})}})}}),y(hf,{get children(){return y(gf,{class:"flex space-x-2 items-center cursor-pointer",onSelect:e,get children(){return[y(fc,{size:14}),(()=>{var r=xh();return A(r,()=>ft("restart")),r})()]}})}})]}})};function kh(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path d="M5.5 0a.5.5 0 0 1 .5.5v4A1.5 1.5 0 0 1 4.5 6h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5zm5 0a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 10 4.5v-4a.5.5 0 0 1 .5-.5zM0 10.5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 6 11.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zm10 1a1.5 1.5 0 0 1 1.5-1.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4z"/>'},e)}function Eh(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path d="M1.5 1a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4A1.5 1.5 0 0 1 1.5 0h4a.5.5 0 0 1 0 1h-4zM10 .5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 16 1.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zM.5 10a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 0 14.5v-4a.5.5 0 0 1 .5-.5zm15 0a.5.5 0 0 1 .5.5v4a1.5 1.5 0 0 1-1.5 1.5h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5z"/>'},e)}function Ch(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path d="M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"/>'},e)}function Oh(e){return we({a:{fill:"currentColor",viewBox:"0 0 16 16"},c:'<path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>'},e)}var _h=D('<header class="flex-none bg-primary text-primary-foreground p-3 flex items-center justify-between space-x-4"><div class="flex items-center gap-0.5">');const Qr=()=>{const{chatWidget:e}=ie(),[t,n]=O(!1);let r=null;ht(()=>{/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&c()});const o=f=>{const g=f;return!!(g.requestFullscreen||g.webkitRequestFullscreen||g.msRequestFullscreen)},i=async f=>{const g=f;try{if(g.requestFullscreen)return await g.requestFullscreen(),!0;if(g.webkitRequestFullscreen)return g.webkitRequestFullscreen(),!0;if(g.msRequestFullscreen)return g.msRequestFullscreen(),!0}catch{}return!1},s=async()=>{const f=document;try{if(document.exitFullscreen)return await document.exitFullscreen(),!0;if(f.webkitExitFullscreen)return f.webkitExitFullscreen(),!0;if(f.msExitFullscreen)return f.msExitFullscreen(),!0}catch{}return!1},a=f=>{r=document.body.style.overflow||null,document.body.style.overflow="hidden",f.classList.add("st-fullscreen"),n(!0)},l=f=>{f.classList.remove("st-fullscreen"),r!==null?(document.body.style.overflow=r,r=null):document.body.style.overflow="",n(!1)},c=async()=>{try{const f=Jt();if(!f)return;if(!t())o(f)&&await i(f)||a(f);else{const g=document;(document.fullscreenElement||g.webkitFullscreenElement||g.msFullscreenElement)&&await s()||l(f)}}catch{console.error("SmartTalks.ai Widget unable to toggle fullscreen in the current state.")}},d=()=>{const f=document,g=!!(document.fullscreenElement||f.webkitFullscreenElement||f.msFullscreenElement);if(n(g),!g)try{const h=Jt();h.classList.contains("st-fullscreen")&&l(h)}catch{}};document.addEventListener("fullscreenchange",d),document.addEventListener("webkitfullscreenchange",d);const u=()=>{e()?.mode==="popup"&&ee("close")};return ne("toggleFullscreen",()=>{c()}),(()=>{var f=_h(),g=f.firstChild;return A(f,y(uc,{}),g),A(g,y(Ee,{size:"icon",variant:"ghost",class:"hover:bg-accent/10 hover:text-primary-foreground",onClick:c,get children(){return y(Z,{get when(){return t()},get fallback(){return y(Eh,{size:16})},get children(){return y(kh,{size:16})}})}}),null),A(g,y(Z,{get when(){return e()?.showSettings},get children(){return y(Sh,{})}}),null),A(g,y(Z,{get when(){return e()?.mode==="popup"},get children(){return y(Ee,{size:"icon",variant:"ghost",class:"hover:bg-accent/10 hover:text-primary-foreground",onClick:u,get children(){return y(Oh,{size:16})}})}}),null),f})()};var Ph=D("<span>");const js=({createdAt:e,anchor:t="end"})=>(()=>{var n=Ph();return nt(n,`${t==="end"?"self-end":"self-start"} pt-1 text-[10px] italic font-light text-slate-600`),A(n,()=>new Date(e).toLocaleString([],{hour:"2-digit",minute:"2-digit"})),n})();var Ah=D('<div class="place-self-start py-1 flex flex-col"><div class="bg-white shadow-md py-2 px-4 rounded-r-xl rounded-tl-xl">');const Th=({children:e,createdAt:t})=>(()=>{var n=Ah(),r=n.firstChild;return A(r,e),A(n,y(js,{createdAt:t,anchor:"start"}),null),n})();var Lh=D("<span>");const _t=e=>{const[,t]=j(e,["class","children"]);let n=e.children?.toString();return n&&(n=Ka(za(n))),(()=>{var r=Lh();return r.innerHTML=n,rt(r,L({get class(){return Ge("whitespace-pre-line",e.class)}},t),!1,!1),r})()};var Mh=D('<div class="flex flex-col space-y-2"><div><div class="flex p-1 flex-wrap items-center justify-center">');const Dh=({options:e,text:t})=>{let n;const{pushMessage:r}=et(),[o,i]=O(!1),s=(a,l)=>{i(!0),r(a,l)};return(()=>{var a=Mh(),l=a.firstChild,c=l.firstChild;A(a,y(_t,{get children(){return t?.trim()}}),l);var d=n;return typeof d=="function"?or(d,c):n=c,A(c,y(pt,{each:e,children:u=>y(Ee,{variant:"outline",get disabled(){return o()},class:"px-2 ml-1 mb-1 py-0 text-nowrap",onClick:()=>s(u.label,u.value),get children(){return u.label?.trim()}})})),oe(()=>nt(l,`flex items-center justify-center max-w-80 mx-[-16px] ${o()&&"opacity-50"}`)),a})()};var Ih=D('<div class="flex flex-col"><span>'),Rh=D("<a target=_blank><img><span></span><span>");const Fh=({options:e,text:t})=>(()=>{var n=Ih(),r=n.firstChild;return A(r,()=>t?.trim()),A(n,y(pt,{each:e,children:o=>(()=>{var i=Rh(),s=i.firstChild,a=s.nextSibling,l=a.nextSibling;return A(a,()=>o.title?.trim()),A(l,()=>o.description?.trim()),oe(c=>{var d=o.url,u=o.image;return d!==c.e&&ue(i,"href",c.e=d),u!==c.t&&ue(s,"src",c.t=u),c},{e:void 0,t:void 0}),i})()}),null),n})();var $h=D("<a target=_blank>");const Nh=({url:e,text:t})=>(()=>{var n=$h();return ue(n,"href",e),A(n,()=>t?.trim()),n})();var G=e=>typeof e=="function"?e():e,qs=e=>requestAnimationFrame(()=>requestAnimationFrame(e)),Kh=e=>{const t=L({initialRegistered:!1},e),[n,r]=O(t.initialRegistered);return[C(()=>{if(n())return G(t.value)}),()=>{r(!0)},()=>{r(!1)}]},Hs=Kh,Yt=e=>typeof e=="function",zh=["button","color","file","image","reset","submit"],Bh=(e,t)=>e==="button"?!0:e==="input"&&t?zh.indexOf(t)!==-1:!1;function Vh(e){const[t,n]=O(e.initialValue),r=()=>e.value?.()!==void 0,o=()=>r()?e.value?.():t();return[o,s=>H(()=>{let a;return Yt(s)?a=s(o()):a=s,Object.is(a,o())||(r()||n(a),e.onChange?.(a)),a})]}var eo=Vh,Fn=new Map,$n=(e,t)=>{if(Fn.has(e))return Fn.get(e);const n=ce(t);return Fn.set(e,n),n},to=e=>{const t=Fn.get(e);if(t)return he(t)},Nn=new Map,Uh=e=>{T(()=>{const t=G(e.style)??{},n=G(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=Nn.get(e.key);o?o.activeCount++:Nn.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);K(()=>{const i=Nn.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}Nn.delete(e.key);for(const[s,a]of Object.entries(i.originalStyles))e.element.style[s]=a;for(const s of i.properties)e.element.style.removeProperty(s);e.element.style.length===0&&e.element.removeAttribute("style"),e.cleanup?.()}})})},jh=Uh,qh=e=>{const t=L({enabled:!0},e);T(()=>{G(t.enabled)&&(document.addEventListener("keydown",n),K(()=>{document.removeEventListener("keydown",n)}))});const n=r=>{r.key==="Escape"&&t.onEscapeKeyDown(r)}},Hh=qh,Wh=e=>{const t=L({enabled:!0},e);T(()=>{const{body:n}=document;G(t.enabled)&&jh({key:"no-pointer-events",element:n,style:{pointerEvents:"none"}})})},Gh=Wh,Yh=e=>{const t=L({enabled:!0,strategy:"pointerup"},e);T(()=>{if(!G(t.enabled))return;const r=G(t.strategy);document.addEventListener(r,n),K(()=>{document.removeEventListener(r,n)})});const n=r=>{const o=G(t.element),i=G(t.ignore);o&&!o.contains(r.target)&&!(i&&i.contains(r.target))&&t.onPointer(r)}},Xh=Yh,Jh=e=>{const t=L({dismissOnEscapeKeyDown:!0,dismissOnOutsidePointer:!0,closeOnOutsidePointerStrategy:"pointerup",noOutsidePointerEvents:!0},e);Hh({enabled:t.dismissOnEscapeKeyDown,onEscapeKeyDown:n=>{t.onEscapeKeyDown?.(n),n.defaultPrevented||t.onDismiss("escapeKey")}}),Xh({enabled:t.dismissOnOutsidePointer,strategy:t.closeOnOutsidePointerStrategy,ignore:t.dismissOnOutsidePointerIgnore,onPointer:n=>{if(t.onOutsidePointer?.(n),!n.defaultPrevented){const r=n.button===0&&n.ctrlKey===!0;if(n.button===2||r)return;t.onDismiss("pointerOutside")}},element:t.element}),Gh({enabled:t.noOutsidePointerEvents})},Zh=Jh,no=ce(),Qh=e=>C(()=>{if(he(no))return y(Ws,e);const r=Te(),[o,i]=O([r]),s=l=>{i(c=>[...c,l])},a=l=>{i(c=>c.filter(d=>d!==l))};return y(no.Provider,{value:{layers:o,onLayerShow:s,onLayerDismiss:a},get children(){return y(Ws,e)}})}),Ws=e=>{const t=L({enabled:!0,dismissOnEscapeKeyDown:!0,dismissOnOutsidePointer:!0,dismissOnOutsidePointerStrategy:"pointerup",noOutsidePointerEvents:!0},e),[n,r]=j(t,["enabled","children","dismissOnEscapeKeyDown","dismissOnOutsidePointer","dismissOnOutsidePointerStrategy","dismissOnOutsidePointerIgnore","noOutsidePointerEvents","onDismiss"]),o=he(no),i=Te();T(()=>{n.enabled?o.onLayerShow(i):o.onLayerDismiss(i)});const s=()=>o.layers()[o.layers().length-1]===i;Zh({dismissOnEscapeKeyDown:()=>G(n.dismissOnEscapeKeyDown)&&s()&&n.enabled,dismissOnOutsidePointer:()=>G(n.dismissOnOutsidePointer)&&s()&&n.enabled,dismissOnOutsidePointerStrategy:n.dismissOnOutsidePointerStrategy,dismissOnOutsidePointerIgnore:n.dismissOnOutsidePointerIgnore,noOutsidePointerEvents:()=>G(n.noOutsidePointerEvents)&&n.enabled,onDismiss:c=>{n.onDismiss(c)},...r});const a=C(()=>n.children),l=()=>{const c=a();return Yt(c)?c({get isLastLayer(){return s()}}):c};return H(()=>l())},eg=Qh,tg=()=>{const[e,t]=O(!1);return T(()=>t(!0)),e},ng=tg,rg=(e,t)=>(e&&(Yt(e)?e(t):e[0](e[1],t)),t.defaultPrevented),ro=(...e)=>e.some(t=>!!t()),og=e=>(...t)=>{for(const n of e)n&&n(...t)},Kn=(...e)=>og(e),le=e=>e?"":void 0,ig="div",sg=e=>{const[t,n]=j(e,["as"]),r=C(()=>t.as??ig);return C(()=>{const i=r();switch(typeof i){case"function":return H(()=>i(n));case"string":return y(ln,L({component:i},n))}})},oo=sg,ag=e=>{let t,n=!1;return()=>n?t:(n=!0,t=C(e))},Gs=ag,lg=e=>C(()=>G(e.element)?.tagName.toLowerCase()||e.fallback),cg=lg,Ys="button",ug=e=>{const[t,n]=O(null),[r,o]=j(e,["as","ref","type"]),i=cg({element:t,fallback:Ys}),s=C(()=>Bh(i(),r.type));return y(oo,L({get as(){return r.as??Ys},ref(a){var l=Kn(n,r.ref);typeof l=="function"&&l(a)},get type(){return s()?"button":void 0},get role(){return s()?void 0:"button"}},o))},dg=ug,fg='a[href]:not([tabindex="-1"]), button:not([tabindex="-1"]), input:not([tabindex="-1"]), textarea:not([tabindex="-1"]), select:not([tabindex="-1"]), details:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])',io="focusTrap.initialFocus",so="focusTrap.finalFocus",Xs={bubbles:!1,cancelable:!0},hg=e=>{const t=L({enabled:!0,observeChanges:!0,restoreFocus:!0},e),[n,r]=O(null),o=C(()=>{const h=n();return h?h[0]??null:null}),i=C(()=>{const h=n();return h?h[h.length-1]??null:null});let s=null;const a=()=>{Cr(()=>{l(J(t.element)),(document.activeElement===null||document.activeElement===document.body)&&c(J(t.element))})};T(()=>{const h=J(t.element);if(h&&J(t.enabled)){s=document.activeElement,H(()=>{l(h),c(h)});const p=new MutationObserver(a);J(t.observeChanges)&&p.observe(h,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabindex"]}),K(()=>{J(t.observeChanges)&&p.disconnect(),r(null),g(h)})}}),T(()=>{const h=n();h===null||h.length!==0||(document.addEventListener("keydown",f),K(()=>{document.removeEventListener("keydown",f)}))}),T(()=>{const h=o();h&&(h.addEventListener("keydown",d),K(()=>{h.removeEventListener("keydown",d)}))}),T(()=>{const h=i();h&&(h.addEventListener("keydown",u),K(()=>{h.removeEventListener("keydown",u)}))});const l=h=>{const p=Array.from(h.querySelectorAll(fg)).map((m,b)=>({element:m,domIndex:b,tabIndex:m.tabIndex})).sort((m,b)=>m.tabIndex===b.tabIndex?m.domIndex-b.domIndex:m.tabIndex-b.tabIndex);r(p.map(({element:m})=>m))},c=h=>{Cr(()=>{const p=J(t.initialFocusElement)??o()??h,m=t.onInitialFocus;let b;m&&(b=new CustomEvent(io,Xs),h.addEventListener(io,m),h.dispatchEvent(b),h.removeEventListener(io,m)),b?.defaultPrevented!==!0&&p.focus()})},d=h=>{h.key==="Tab"&&h.shiftKey&&(h.preventDefault(),i().focus())},u=h=>{h.key==="Tab"&&!h.shiftKey&&(h.preventDefault(),o().focus())},f=h=>{h.key==="Tab"&&h.preventDefault()},g=h=>{Cr(()=>{if(!J(t.restoreFocus))return;const m=J(t.finalFocusElement)??s;if(!m)return;let b;const w=t.onFinalFocus;w&&(b=new CustomEvent(so,Xs),h.addEventListener(so,w),h.dispatchEvent(b),h.removeEventListener(so,w)),b?.defaultPrevented!==!0&&m.focus()})}},gg=hg,pg=gg,mg=e=>{const t=C(()=>{const s=J(e.element);if(s)return getComputedStyle(s)}),n=()=>t()?.animationName??"none",[r,o]=O(J(e.show)?"present":"hidden");let i="none";return T(s=>{const a=J(e.show);return H(()=>{if(s===a)return a;const l=i,c=n();a?o("present"):c==="none"||t()?.display==="none"?o("hidden"):o(s===!0&&l!==c?"hiding":"hidden")}),a}),T(()=>{const s=J(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},l=c=>{const u=n().includes(c.animationName);c.target===s&&u&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",l),s.addEventListener("animationend",l),K(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",l),s.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},yg=mg,Js=yg,bg=ce(),wg=e=>e?$n(`dialog-${e}`):bg,Zs=ce(),vg=e=>e?$n(`dialog-internal-${e}`):Zs,Pt=e=>{if(!e){const n=he(Zs);if(!n)throw new Error("[corvu]: Dialog context not found. Make sure to wrap Dialog components in <Dialog.Root>");return n}const t=to(`dialog-internal-${e}`);if(!t)throw new Error(`[corvu]: Dialog context with id "${e}" not found. Make sure to wrap Dialog components in <Dialog.Root contextId="${e}">`);return t},xg="div",Sg=e=>{const[t,n]=j(e,["as","forceMount","contextId","children","ref","style","data-corvu-dialog-content"]),r=C(()=>Pt(t.contextId)),o=()=>ro(r().open,()=>t.forceMount,r().contentPresent),i=C(s=>s||o(),!1);return y(Z,{get when(){return i()},get children(){return y(eg,{get element(){return r().contentRef},get enabled(){return r().open()||r().contentPresent()},onDismiss:()=>r().setOpen(!1),get dismissOnEscapeKeyDown(){return r().closeOnEscapeKeyDown},get dismissOnOutsidePointer(){return r().closeOnOutsidePointer},get dismissOnOutsidePointerStrategy(){return r().closeOnOutsidePointerStrategy},get dismissOnOutsidePointerIgnore(){return r().triggerRef},get noOutsidePointerEvents(){return r().noOutsidePointerEvents},get onEscapeKeyDown(){return r().onEscapeKeyDown},get onOutsidePointer(){return r().onOutsidePointer},children:s=>{const a=C(()=>t.children);return y(Z,{get when(){return o()},get children(){return y(oo,L({ref(l){var c=Kn(r().setContentRef,t.ref);typeof c=="function"&&c(l)},get as(){return t.as??xg},get role(){return r().role()},get id(){return r().dialogId()},get"aria-labelledby"(){return r().labelId()},get"aria-describedby"(){return r().descriptionId()},get"aria-modal"(){return r().modal()?"true":"false"},get"data-open"(){return le(r().open())},get"data-closed"(){return le(!r().open())},get"data-corvu-dialog-content"(){return t.hasOwnProperty("data-corvu-dialog-content")?t["data-corvu-dialog-content"]:""},tabIndex:"-1",get style(){return{"pointer-events":s.isLastLayer?"auto":void 0,...t.style}}},n,{get children(){return a()}}))}})}})}})},kg=Sg,Eg="div",Cg=e=>{const[t,n]=j(e,["as","forceMount","contextId","children","ref","style","data-corvu-dialog-overlay"]),r=C(()=>Pt(t.contextId)),o=()=>ro(r().open,()=>t.forceMount,r().overlayPresent),i=C(s=>s||o(),!1);return y(Z,{get when(){return i()},get children(){return(()=>{const s=C(()=>t.children);return y(Z,{get when(){return o()},get children(){return y(oo,L({get as(){return t.as??Eg},ref(a){var l=Kn(r().setOverlayRef,t.ref);typeof l=="function"&&l(a)},"aria-hidden":"true",get"data-open"(){return le(r().open())},get"data-closed"(){return le(!r().open())},get"data-corvu-dialog-overlay"(){return t.hasOwnProperty("data-corvu-dialog-overlay")?t["data-corvu-dialog-overlay"]:""},tabIndex:"-1",get style(){return{"pointer-events":"auto",...t.style}}},n,{get children(){return s()}}))}})})()}})},Og=Cg,_g=e=>{const[t,n]=j(e,["forceMount","contextId","children"]),r=C(()=>Pt(t.contextId)),o=()=>ro(r().open,()=>t.forceMount,r().contentPresent,r().overlayPresent),i=ng(),s=C(a=>a||o()&&i(),!1);return y(Z,{get when(){return s()},get children(){return(()=>{const a=C(()=>t.children);return y(Z,{get when(){return o()},get children(){return y(Wo,L(n,{get children(){return a()}}))}})})()}})},Pg=_g,ao=!0,Ag=e=>{const t=L({role:"dialog",initialOpen:!1,modal:!0,closeOnEscapeKeyDown:!0,closeOnOutsidePointer:()=>!!(e.modal??ao),closeOnOutsidePointerStrategy:"pointerup",noOutsidePointerEvents:()=>!!(e.modal??ao),preventScroll:()=>!!(e.modal??ao),hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",allowPinchZoom:!0,trapFocus:!0,restoreFocus:!0,dialogId:Te()},e),[n,r]=eo({value:()=>t.open,initialValue:t.initialOpen,onChange:t.onOpenChange}),[o,i,s]=Hs({value:()=>t.labelId??Te()}),[a,l,c]=Hs({value:()=>t.descriptionId??Te()}),[d,u]=O(null),[f,g]=O(null),[h,p]=O(null),{present:m}=Js({show:n,element:f}),{present:b}=Js({show:n,element:h});pg({element:f,enabled:()=>n()&&t.trapFocus,initialFocusElement:()=>t.initialFocusEl??null,restoreFocus:()=>t.restoreFocus,finalFocusElement:()=>t.finalFocusEl??null,onFinalFocus:t.onFinalFocus,onInitialFocus:t.onInitialFocus}),Hi({element:f,enabled:()=>m()&&G(t.preventScroll),hideScrollbar:()=>t.hideScrollbar,preventScrollbarShift:()=>t.preventScrollbarShift,preventScrollbarShiftMode:()=>t.preventScrollbarShiftMode,allowPinchZoom:()=>t.allowPinchZoom});const w={get role(){return t.role},get open(){return n()},setOpen:r,get modal(){return t.modal},get closeOnEscapeKeyDown(){return t.closeOnEscapeKeyDown},get closeOnOutsidePointer(){return G(t.closeOnOutsidePointer)},get closeOnOutsidePointerStrategy(){return t.closeOnOutsidePointerStrategy},get noOutsidePointerEvents(){return G(t.noOutsidePointerEvents)},get preventScroll(){return G(t.preventScroll)},get hideScrollbar(){return t.hideScrollbar},get preventScrollbarShift(){return G(t.preventScrollbarShift)},get preventScrollbarShiftMode(){return t.preventScrollbarShiftMode},get allowPinchZoom(){return t.allowPinchZoom},get trapFocus(){return t.trapFocus},get restoreFocus(){return t.restoreFocus},get initialFocusEl(){return t.initialFocusEl},get finalFocusEl(){return t.finalFocusEl},get contentPresent(){return m()},get contentRef(){return f()},get overlayPresent(){return b()},get overlayRef(){return h()},get dialogId(){return t.dialogId},get labelId(){return o()},get descriptionId(){return a()}},v=Gs(()=>t.children),x=()=>{const E=v()();return Yt(E)?E(w):E};return C(()=>{const E=wg(t.contextId),k=vg(t.contextId);return y(E.Provider,{value:{role:()=>t.role,open:n,setOpen:r,modal:()=>t.modal,closeOnEscapeKeyDown:()=>t.closeOnEscapeKeyDown,closeOnOutsidePointer:()=>G(t.closeOnOutsidePointer),closeOnOutsidePointerStrategy:()=>t.closeOnOutsidePointerStrategy,noOutsidePointerEvents:()=>G(t.noOutsidePointerEvents),preventScroll:()=>G(t.preventScroll),hideScrollbar:()=>t.hideScrollbar,preventScrollbarShift:()=>G(t.preventScrollbarShift),preventScrollbarShiftMode:()=>t.preventScrollbarShiftMode,allowPinchZoom:()=>t.allowPinchZoom,trapFocus:()=>t.trapFocus,restoreFocus:()=>t.restoreFocus,initialFocusEl:()=>t.initialFocusEl,finalFocusEl:()=>t.finalFocusEl,contentPresent:m,contentRef:f,overlayPresent:b,overlayRef:h,dialogId:()=>t.dialogId,labelId:o,descriptionId:a},get children(){return y(k.Provider,{get value(){return{role:()=>t.role,open:n,setOpen:r,modal:()=>t.modal,closeOnEscapeKeyDown:()=>t.closeOnEscapeKeyDown,onEscapeKeyDown:t.onEscapeKeyDown,closeOnOutsidePointer:()=>G(t.closeOnOutsidePointer),closeOnOutsidePointerStrategy:()=>t.closeOnOutsidePointerStrategy,onOutsidePointer:t.onOutsidePointer,noOutsidePointerEvents:()=>G(t.noOutsidePointerEvents),preventScroll:()=>G(t.preventScroll),hideScrollbar:()=>t.hideScrollbar,preventScrollbarShift:()=>G(t.preventScrollbarShift),preventScrollbarShiftMode:()=>t.preventScrollbarShiftMode,allowPinchZoom:()=>t.allowPinchZoom,trapFocus:()=>t.trapFocus,restoreFocus:()=>t.restoreFocus,initialFocusEl:()=>t.initialFocusEl,finalFocusEl:()=>t.finalFocusEl,contentPresent:m,contentRef:f,overlayPresent:b,overlayRef:h,dialogId:()=>t.dialogId,labelId:o,registerLabelId:i,unregisterLabelId:s,descriptionId:a,registerDescriptionId:l,unregisterDescriptionId:c,setContentRef:g,setOverlayRef:p,triggerRef:d,setTriggerRef:u}},get children(){return H(()=>x())}})}})})},Tg=Ag,Lg="button",Mg=e=>{const[t,n]=j(e,["as","contextId","ref","onClick","data-corvu-dialog-trigger"]),r=C(()=>Pt(t.contextId));return y(dg,L({ref(i){var s=Kn(r().setTriggerRef,t.ref);typeof s=="function"&&s(i)},get as(){return t.as??Lg},onClick:i=>{!rg(t.onClick,i)&&r().setOpen(s=>!s)},"aria-haspopup":"dialog",get"aria-expanded"(){return r().open()?"true":"false"},get"aria-controls"(){return r().dialogId()},get"data-open"(){return le(r().open())},get"data-closed"(){return le(!r().open())},get"data-corvu-dialog-trigger"(){return t.hasOwnProperty("data-corvu-dialog-trigger")?t["data-corvu-dialog-trigger"]:""}},n))},Dg=Mg,zn=e=>typeof e=="function"?e():e,Qs=e=>requestAnimationFrame(()=>requestAnimationFrame(e));function Ig(e){const t=L({enabled:!0,dimension:"both"},e),[n,r]=O(!1),[o,i]=O(null);let s=null;T(()=>{const c=zn(t.element),d=zn(t.enabled);if(!c||!d)return;const u=new ResizeObserver(a);u.observe(c),c.addEventListener("transitionend",l),K(()=>{u.disconnect(),c.removeEventListener("transitionend",l),l()})});const a=([c])=>{if(n())return;const d=c.target,u=[d.offsetWidth,d.offsetHeight],f=zn(t.dimension);f==="both"?s?s[0]!==u[0]&&s[1]!==u[1]&&(ke(()=>{i(s),r(!0)}),Qs(()=>{i(u),parseFloat(getComputedStyle(c.target).transitionDuration)===0&&l()})):s=u:s?Bn(f,s)!==Bn(f,u)&&(ke(()=>{i(Bn(f,s)),r(!0)}),Qs(()=>{i(Bn(f,u)),parseFloat(getComputedStyle(c.target).transitionDuration)===0&&l()})):s=u},l=()=>{if(!n())return;const c=zn(t.element);c?s=[c.offsetWidth,c.offsetHeight]:s=null,ke(()=>{r(!1),i(null)})};return{transitioning:n,transitionSize:o}}var Bn=(e,t)=>{switch(e){case"width":return t[0];case"height":return t[1]}},Rg=Ig,Fg=Rg;const $g=(e,t)=>e.length>0?()=>e(H(t)):e;function Ng(e,t){let n=0;const r=e.map((o,i)=>C(()=>(n=i,o()),void 0,cr));return C(()=>r.map(o=>o())[n],void 0,t)}function ea(e,t,n){let r=()=>t;const[o,i]=O(t,cr),s=C($g(e,()=>r()),t,cr);return[r=Ng([o,s],n),a=>i(()=>typeof a=="function"?a(H(r)):a)]}var Kg=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},zg=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Bg=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[l,c,d]=Kg(o,t),u=d-l-r*c;(c!==0||u!==0)&&zg(o,t)&&(i+=u,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},Vg=e=>y(Dg,L({"data-corvu-dialog-trigger":void 0,"data-corvu-drawer-trigger":""},e)),ta=ce(),Ug=e=>e?$n(`drawer-${e}`):ta,jg=e=>{if(!e){const n=he(ta);if(!n)throw new Error("[corvu]: Drawer context not found. Make sure to wrap Drawer components in <Drawer.Root>");return n}const t=to(`drawer-${e}`);if(!t)throw new Error(`[corvu]: Drawer context with id "${e}" not found. Make sure to wrap Drawer components in <Drawer.Root contextId="${e}">`);return t},na=ce(),qg=e=>e?$n(`drawer-internal-${e}`):na,ra=e=>{if(!e){const n=he(na);if(!n)throw new Error("[corvu]: Drawer context not found. Make sure to wrap Drawer components in <Drawer.Root>");return n}const t=to(`drawer-internal-${e}`);if(!t)throw new Error(`[corvu]: Drawer context with id "${e}" not found. Make sure to wrap Drawer components in <Drawer.Root contextId="${e}">`);return t},oa=(e,t,n,r)=>{if(n===void 0||r===void 0)return{value:e,offset:Vn(e,t)};const o=r[n-1]?Vn(r[n-1],t):void 0,i=r[n]?Vn(r[n],t):void 0;return{value:e,offset:Vn(e,t),lowerBreakPoint:i,upperBreakPoint:o}},Vn=(e,t)=>{if(typeof e=="number")return t-e*t;if(!e.endsWith("px"))throw new Error(`[corvu] Snap and break points must be a number or a string ending with 'px'. Got ${e}`);return t-parseInt(e,10)},Hg=(e,t,n,r)=>{const o=ia("upper",e,r?n:t),i=ia("lower",e,r?n:t);return o?i?i.upperBreakPoint===void 0||o.lowerBreakPoint===void 0?Math.abs(i.offset-n)<Math.abs(o.offset-n)?i:o:n<o.lowerBreakPoint?i:o:o:i},ia=(e,t,n)=>t.reduce((r,o)=>e=="upper"&&o.offset>=n&&(!r||o.offset<r.offset)||e=="lower"&&o.offset<=n&&(!r||o.offset>r.offset)?o:r,void 0),Wg=(e,t)=>{let n=e,r=!1;do{if(n.hasAttribute("data-corvu-no-drag")||n.type==="range")return!1;n===(t??document.documentElement)?r=!0:n=n.parentElement}while(n&&!r);return!0},Gg=void 0,Yg=e=>{const t=L({initialOpen:!1,snapPoints:[0,1],breakPoints:[Gg],defaultSnapPoint:1,side:"bottom",dampFunction:$=>6*Math.log($+1),velocityFunction:($,V)=>{const Q=$/V;return Q<1&&Q>-1?1:Q},velocityCacheReset:200,allowSkippingSnapPoints:!0,handleScrollableElements:!0,transitionResize:!1,closeOnOutsidePointer:!0,allowPinchZoom:!1},e),[n,r]=j(t,["snapPoints","breakPoints","defaultSnapPoint","activeSnapPoint","onActiveSnapPointChange","side","dampFunction","velocityFunction","velocityCacheReset","allowSkippingSnapPoints","handleScrollableElements","transitionResize","open","initialOpen","onOpenChange","closeOnOutsidePointer","contextId","children"]),[o,i]=eo({value:()=>n.open,initialValue:n.initialOpen,onChange:n.onOpenChange}),[s,a]=eo({value:()=>n.activeSnapPoint,initialValue:0,onChange:n.onActiveSnapPointChange}),[l,c]=O(),{transitioning:d,transitionSize:u}=Fg({element:()=>l()?.contentRef()??null,enabled:()=>o()&&n.transitionResize,dimension:()=>{switch(n.side){case"top":case"bottom":return"height";case"left":case"right":return"width"}}}),[f,g]=O(!1),[h,p]=ea(()=>d()?"resizing":null),m=C(()=>{const $=l()?.contentRef();if($)return getComputedStyle($)}),[b,w]=O(!1);T(()=>{const $=o();H(()=>{b()!==$&&($?(w(!0),qs(()=>{ke(()=>{p("opening"),a(n.defaultSnapPoint)}),parseFloat(m().transitionDuration)===0&&p(null)})):(ke(()=>{p("closing"),a(0)}),qs(()=>{parseFloat(m().transitionDuration)===0&&v()})))})});const v=()=>{ke(()=>{w(!1),p(null)})},[x,_]=O(0);T(()=>{const $=l()?.contentRef();if(!$)return;k($);const V=new ResizeObserver(E);V.observe($),K(()=>{V.disconnect()})});const E=$=>{for(const V of $)V.target===l()?.contentRef()&&k(V.target)},k=$=>{const V=H(()=>x());switch(n.side){case"top":case"bottom":if(V===$.offsetHeight)return;_($.offsetHeight);break;case"left":case"right":if(V===$.offsetWidth)return;_($.offsetWidth);break}},F=C(()=>oa(s(),x())),[P,R]=ea(()=>F().offset),M=C(()=>x()?(x()-P())/x():0),I={get snapPoints(){return n.snapPoints},get breakPoints(){return n.breakPoints},get defaultSnapPoint(){return n.defaultSnapPoint},get activeSnapPoint(){return s()},setActiveSnapPoint:a,get side(){return n.side},get isDragging(){return f()},get isTransitioning(){return h()!==null},get transitionState(){return h()},get openPercentage(){return M()},get translate(){return P()},get velocityCacheReset(){return n.velocityCacheReset},get allowSkippingSnapPoints(){return n.allowSkippingSnapPoints},get handleScrollableElements(){return n.handleScrollableElements},get transitionResize(){return n.transitionResize}},re=Gs(()=>n.children),Y=$=>{c(Pt(n.contextId));const V=re()();if(Yt(V)){const Q=L($,I);return V(Q)}return V};return C(()=>{const $=Ug(n.contextId),V=qg(n.contextId);return H(()=>y($.Provider,{value:{snapPoints:()=>n.snapPoints,breakPoints:()=>n.breakPoints,defaultSnapPoint:()=>n.defaultSnapPoint,activeSnapPoint:s,setActiveSnapPoint:a,side:()=>n.side,isDragging:f,isTransitioning:()=>h()!==null,transitionState:h,openPercentage:M,translate:P,velocityCacheReset:()=>n.velocityCacheReset,allowSkippingSnapPoints:()=>n.allowSkippingSnapPoints,handleScrollableElements:()=>n.handleScrollableElements,transitionResize:()=>n.transitionResize},get children(){return y(V.Provider,{get value(){return{snapPoints:()=>n.snapPoints,breakPoints:()=>n.breakPoints,defaultSnapPoint:()=>n.defaultSnapPoint,activeSnapPoint:s,setActiveSnapPoint:a,side:()=>n.side,isDragging:f,isTransitioning:()=>h()!==null,transitionState:h,openPercentage:M,translate:P,velocityCacheReset:()=>n.velocityCacheReset,allowSkippingSnapPoints:()=>n.allowSkippingSnapPoints,handleScrollableElements:()=>n.handleScrollableElements,transitionResize:()=>n.transitionResize,dampFunction:n.dampFunction,velocityFunction:n.velocityFunction,setIsDragging:g,setTranslate:R,drawerSize:x,resolvedActiveSnapPoint:F,drawerStyles:m,setTransitionState:p,transitionSize:u,closeDrawer:v}},get children(){return y(Tg,L({get open(){return b()},onOpenChange:i,get contextId(){return n.contextId},get closeOnOutsidePointer(){return!f()&&n.closeOnOutsidePointer}},r,{children:Q=>Y(Q)}))}})}}))})},Xg=Yg,Jg=e=>{const[t,n]=j(e,["contextId","style"]);let r=!1,o=null,i=[0,0],s,a=0;const l=C(()=>ra(t.contextId)),c=C(()=>Pt(t.contextId)),d=C(()=>l().snapPoints().map((v,x)=>oa(v,l().drawerSize(),x,l().breakPoints()))),u=C(()=>{switch(l().side()){case"top":return`translate3d(0, ${-l().translate()}px, 0)`;case"bottom":return`translate3d(0, ${l().translate()}px, 0)`;case"right":return`translate3d(${l().translate()}px, 0, 0)`;case"left":return`translate3d(${-l().translate()}px, 0, 0)`}}),f=C(()=>{const v=l().transitionSize();if(v)switch(l().side()){case"top":case"bottom":return`${v}px`}}),g=C(()=>{const v=l().transitionSize();if(v)switch(l().side()){case"left":case"right":return`${v}px`}});T(()=>{c().open()&&(document.addEventListener("pointermove",p),document.addEventListener("touchmove",m),document.addEventListener("pointerup",w),document.addEventListener("touchend",w),K(()=>{document.removeEventListener("pointermove",p),document.removeEventListener("touchmove",m),document.removeEventListener("pointerup",w),document.removeEventListener("touchend",w)}))});const h=v=>{Wg(v.target,c().contentRef())&&l().transitionState()!=="closing"&&(r=!0,l().handleScrollableElements()&&(i=[v.clientX,v.clientY]))},p=v=>{b(v.target,v.clientX,v.clientY)},m=v=>{v.touches[0]&&b(v.target,v.touches[0].clientX,v.touches[0].clientY)},b=(v,x,_)=>{if(!r)return;if(!l().isDragging()||o===null){const F=window.getSelection();if(F&&F.toString().length>0){w();return}if(l().handleScrollableElements()){const P=[x,_].map((fe,$)=>i[$]-fe),R=Math.abs(P[0])>Math.abs(P[1])?"x":"y",M=R==="x"?P[0]:P[1];if(Math.abs(M)<.3)return;const I=c().contentRef(),[re,Y]=Bg(v,R,I);if(M>0&&Math.abs(re)>1||M<0&&Math.abs(Y)>0){w();return}}switch(l().side()){case"top":case"bottom":o=_;break;case"right":case"left":o=x}s=new Date,a=l().translate(),ke(()=>{l().setIsDragging(!0),l().setTransitionState(null)})}let E;switch(l().side()){case"top":E=-(o-_);break;case"bottom":E=o-_;break;case"right":E=o-x;break;case"left":E=-(o-x);break}E-=l().resolvedActiveSnapPoint().offset,E>0&&(E=l().dampFunction(E));const k=new Date;k.getTime()-s.getTime()>l().velocityCacheReset()&&(s=k,a=l().translate()),l().setTranslate(-E)},w=()=>{if(r=!1,!l().isDragging())return;const v=new Date,x=l().velocityFunction(-(a-l().translate()),v.getTime()-s.getTime()||1),_=l().translate()*x,E=Hg(d(),l().translate(),_,l().allowSkippingSnapPoints());ke(()=>{l().setTransitionState("snapping"),l().setIsDragging(!1)}),ke(()=>{l().setActiveSnapPoint(E.value),E.offset===l().drawerSize()?c().setOpen(!1):(l().setTranslate(E.offset),parseFloat(l().drawerStyles().transitionDuration)===0&&l().setTransitionState(null))})};return y(kg,L({get contextId(){return t.contextId},get style(){return{transform:u(),"transition-duration":l().isDragging()?"0ms":void 0,height:f(),width:g(),...t.style}},onPointerDown:h,onTransitionEnd:()=>{ke(()=>{l().transitionState()==="closing"&&l().closeDrawer(),l().transitionState()!=="resizing"&&l().setTransitionState(null)})},get"data-transitioning"(){return le(l().isTransitioning())},get"data-opening"(){return le(l().transitionState()==="opening")},get"data-closing"(){return le(l().transitionState()==="closing")},get"data-snapping"(){return le(l().transitionState()==="snapping")},get"data-resizing"(){return le(l().transitionState()==="resizing")},"data-corvu-dialog-content":void 0,"data-corvu-drawer-content":""},n))},Zg=Jg,Qg=e=>{const[t,n]=j(e,["contextId"]),r=C(()=>ra(t.contextId));return y(Og,L({get contextId(){return t.contextId},get"data-transitioning"(){return le(r().isTransitioning())},get"data-opening"(){return le(r().transitionState()==="opening")},get"data-closing"(){return le(r().transitionState()==="closing")},get"data-snapping"(){return le(r().transitionState()==="snapping")},get"data-resizing"(){return le(r().transitionState()==="resizing")},"data-corvu-dialog-overlay":void 0,"data-corvu-drawer-overlay":""},n))},ep=Qg,tp=D('<div class="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted">');const np=Xg,rp=Vg,op=Pg,ip=e=>{const[,t]=j(e,["class"]),n=jg();return y(ep,L({get class(){return Ge("absolute inset-0 z-50 data-[transitioning]:transition-colors data-[transitioning]:duration-300",e.class)},get style(){return{"background-color":`rgb(0 0 0 / ${.6*n.openPercentage()})`}}},t))},sp=e=>{const[,t]=j(e,["class","children"]);return y(op,{get mount(){return Jt()},get children(){return[y(ip,{}),y(Zg,L({id:"smarttalks-list-content",get class(){return Ge("absolute inset-x-0 bottom-0 z-50 mt-24 flex h-auto max-h-[80%] flex-col rounded-t-[10px] border bg-background after:top-full after:h-[50%] after:bg-inherit md:select-none transition-transform duration-300",e.class)}},t,{get children(){return[tp(),C(()=>e.children)]}}))]}})};var ap=D('<span class="font-semibold mt-2">'),lp=D('<div class="flex py-4 pl-3 pr-1 flex-col w-full space-y-4 overflow-y-auto">'),cp=D('<div class="flex flex-col space-y-2"><div>'),up=D('<div class="flex flex-col w-full space-y-1"><span class="font-semibold text-slate-700">'),dp=D('<div class="flex flex-col items-start"><span class=text-slate-500>');const fp=({options:e,text:t,title:n})=>{const{pushMessage:r}=et(),[o,i]=O(!1),[s,a]=O(!1),[l,c]=O(),d=(f,g)=>{a(!1),i(!0),r(f,g)},u=f=>{const g=f.composedPath();for(const h of g)if(h.id==="smarttalks-list-content"){f.preventDefault();return}};return(()=>{var f=cp(),g=f.firstChild;return A(f,y(_t,{get children(){return t?.trim()}}),g),A(g,y(np,{get open(){return s()},onOpenChange:a,onOutsidePointer:u,get children(){return[y(rp,{as:Ee,variant:"outline",class:"w-full text-nowrap",get children(){return n?.trim()??ft("selectOption")}}),y(sp,{class:"pb-2 px-2 flex flex-col items-center justify-center",get children(){return[(()=>{var h=ap();return A(h,()=>n?.trim()??ft("selectOption")),h})(),(()=>{var h=lp();return A(h,y(pt,{each:e,children:p=>(()=>{var m=up(),b=m.firstChild;return A(b,()=>p.label?.trim()??""),A(m,y(pt,{get each(){return p.items},children:w=>y(Ee,{variant:"outline",get disabled(){return o()},get class(){return`py-6 flex justify-between hover:bg-slate-200 ${l()===w?"bg-slate-200":""}`},onClick:()=>c(w),get children(){return[(()=>{var v=dp(),x=v.firstChild;return A(v,()=>w.label?.trim(),x),A(x,()=>w.description?.trim()),v})(),y(Z,{get when(){return l()===w},get fallback(){return y(cf,{class:"size-4 text-slate-500"})},get children(){return y(lf,{class:"size-4 text-slate-500"})}})]}})}),null),m})()})),h})(),y(Ee,{get disabled(){return o()||!l()},onClick:()=>d(l().label,l().value),class:"w-11/12 mt-4 hover:bg-primary shadow-sm hover:shadow-primary transition-shadow",get children(){return ft("send")}})]}})]}})),oe(()=>nt(g,o()?"opacity-50":"")),f})()};var hp=D("<audio controls preload=auto class=h-8><source type=audio/mpeg><source type=audio/ogg>Your browser does not support the audio element.");const gp=e=>(()=>{var t=hp(),n=t.firstChild,r=n.nextSibling;return oe(o=>{var i=e.link,s=e.link;return i!==o.e&&ue(n,"src",o.e=i),s!==o.t&&ue(r,"src",o.t=s),o},{e:void 0,t:void 0}),t})();var pp=D('<div class="flex flex-col space-y-2"><a class="self-center hover:brightness-75 transition-all duration-300 flex flex-col items-center justify-between bg-slate-200 rounded-md px-1 py-1 space-y-2 text-slate-700"target=_blank><span class="font-semibold text-sm">');const mp=e=>(()=>{var t=pp(),n=t.firstChild,r=n.firstChild;return A(n,y(uf,{class:"size-10"}),r),A(r,()=>e.filename?.trim()),A(t,y(_t,{get children(){return e.text?.trim()}}),null),oe(()=>ue(n,"href",e.link)),t})();var yp=D('<div class="flex flex-col space-y-2"><a class="object-contain hover:brightness-50 transition-all duration-300"target=_blank><img class="w-full h-auto rounded-md">');const bp=e=>(()=>{var t=yp(),n=t.firstChild,r=n.firstChild;return A(t,y(_t,{get children(){return e.text?.trim()}}),null),oe(o=>{var i=e.link,s=e.link,a=e.text?.trim();return i!==o.e&&ue(n,"href",o.e=i),s!==o.t&&ue(r,"src",o.t=s),a!==o.a&&ue(r,"alt",o.a=a),o},{e:void 0,t:void 0,a:void 0}),t})();var wp=D('<div class="flex flex-col space-y-2"><video controls preload=auto class="size-full rounded-md"><source type=video/mp4><source type=video/ogg>Your browser does not support the video element.');const vp=e=>(()=>{var t=wp(),n=t.firstChild,r=n.firstChild,o=r.nextSibling;return A(t,y(_t,{get children(){return e.text?.trim()}}),null),oe(i=>{var s=e.link,a=e.link;return s!==i.e&&ue(r,"src",i.e=s),a!==i.t&&ue(o,"src",i.t=a),i},{e:void 0,t:void 0}),t})();var xp=D("<div>Media type not supported");const sa=e=>e.type==="image"?y(bp,e):e.type==="audio"?y(gp,e):e.type==="document"?y(mp,e):e.type==="video"?y(vp,e):xp(),lo=({text:e})=>y(_t,{get children(){return e?.trim()}});var Sp=D("<div>Unknown bot message type");const kp=e=>y(Th,{get createdAt(){return e.createdAt},get children(){return e.type==="text"?y(lo,{get text(){return e.text}}):e.type==="buttons"?y(Dh,L(()=>e.buttons)):e.type==="list"?y(fp,L(()=>e.list)):e.type==="media"?y(sa,L(()=>e.media)):e.type==="link"?y(Nh,L(()=>e.link)):e.type==="cards"?y(Fh,L(()=>e.cards)):e.type==="date"?y(lo,{get text(){return e.text}}):Sp()}});var Ep=D('<div class="place-self-center p-4"><span class="bg-slate-200/40 text-black font-semibold py-2 px-4 rounded-xl">');const Cp=e=>(()=>{var t=Ep(),n=t.firstChild;return A(n,()=>e.text?.trim()),t})();var Op=D('<div class="place-self-end py-1 flex flex-col"><div class="bg-primary shadow-primary/40 shadow-md py-2 px-4 rounded-l-xl rounded-tr-xl text-primary-foreground">');const _p=({children:e,createdAt:t})=>(()=>{var n=Op(),r=n.firstChild;return A(r,e),A(n,y(js,{createdAt:t,anchor:"end"}),null),n})();var Pp=D("<div>Unknown user message type");const Ap=e=>y(_p,{get createdAt(){return e.createdAt},get children(){return e.type==="text"?y(lo,{get text(){return e.text}}):e.type==="media"?y(sa,L(()=>e.media)):Pp()}});var Tp=D("<div>Unknown message origin");const Lp=e=>e.origin==="bot"?y(kp,e):e.origin==="user"?y(Ap,e):e.origin==="service"?y(Cp,e):Tp();function co(e){return we({a:{viewBox:"0 0 512 512"},c:'<path d="M256 464c-114.69 0-208-93.31-208-208S141.31 48 256 48s208 93.31 208 208-93.31 208-208 208Z"/>'},e)}var Mp=D('<main touch-action-pan-y class="flex-1 w-full p-4 overflow-y-auto flex flex-col items-center scroll-smooth relative min-h-0 overscroll-contain pb-2">'),Dp=D("<div>");const uo=()=>{let e;const{getMessages:t,onMessage:n,clearMessages:r}=et(),{onOpen:o}=Jo(),i=(s=100)=>{setTimeout(()=>{e?.scrollTo(0,e.scrollHeight)},s)};return ne("reset",()=>{r()}),ht(()=>{i(200)}),n(i),o(()=>i(200)),(()=>{var s=Mp(),a=e;return typeof a=="function"?or(a,s):e=s,A(s,y(pt,{get each(){return t()},get fallback(){return(()=>{var l=Dp();return A(l,()=>ft("emptyMessages")),l})()},children:l=>y(Lp,l)})),s})()};var Ip=D("<textarea>");const Rp=e=>{const[,t]=j(e,["class"]);return(()=>{var n=Ip();return rt(n,L({get class(){return Ge("flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-base md:text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e.class)}},t),!1,!1),n})()};var Fp=D('<svg viewBox="0 0 72 72"fill=none xmlns=http://www.w3.org/2000/svg><path d="M50.3241 0H21.6759C9.69907 0 0 9.68892 0 21.6519V50.3481C0 62.3111 9.69907 72 21.6759 72H67.9815C70.2546 72 72 70.1845 72 67.9105V21.6519C72 9.68892 62.3009 0 50.3241 0Z"fill=#212431></path><path d="M28.9868 56.1046H24.7249C21.9596 56.1046 19.7217 53.8671 19.7217 51.1129V45.9126C19.7217 44.244 18.3676 42.8929 16.6952 42.8929H13.6924C11.8108 42.8929 10.2857 41.3712 10.2857 39.494V37.0622C10.2857 35.185 11.8108 33.6633 13.6924 33.6633H25.3758C27.3713 33.6633 28.9868 35.275 28.9868 37.2613V56.1046Z"fill=white></path><path d="M61.7142 26.3227C61.7142 28.1782 60.2059 29.6992 58.3661 29.6992H46.2955V56.1042H37.629C34.9627 56.1042 32.8054 53.9238 32.8054 51.2395V36.1839C32.8054 32.6002 29.9243 29.6992 26.3755 29.6992H20.1791C18.3393 29.6992 16.8311 28.1782 16.8311 26.3227V19.2729C16.8311 17.408 18.33 15.8964 20.1791 15.8964H58.3661C60.2153 15.8964 61.7142 17.408 61.7142 19.2729V26.3227Z"fill=white>');const $p=e=>(()=>{var t=Fp();return rt(t,e,!0,!0),t})();var Np=D('<div class="absolute flex items-center justify-center left-1/2 transform -translate-x-1/2 bottom-0 pb-1"><span class="font-semibold text-xs text-gray-600 ml-1">SmartTalks.ai');const Kp=()=>(()=>{var e=Np(),t=e.firstChild;return A(e,y($p,{height:15}),t),e})();var zp=D('<footer class="relative flex-none bg-white border-t border-gray-100 z-20 w-full"><div class="flex flex-col p-3 gap-2 pb-[max(1rem,env(safe-area-inset-bottom))] w-full box-border"><div class="flex items-end gap-2 w-full"></div><div class="flex justify-center opacity-80 scale-95">');const fo=()=>{const{pushMessage:e}=et(),[t,n]=O(""),r=()=>{t().trim()&&(e(t()),n(""))},o=i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),r())};return ne("setInput",i=>{i&&n(i)}),(()=>{var i=zp(),s=i.firstChild,a=s.firstChild,l=a.nextSibling;return A(a,y(Rp,{id:"chat-input",get placeholder(){return ft("inputPlaceholder")},get value(){return t()},onInput:c=>n(c.currentTarget.value),onKeyDown:o,class:"focus-visible:ring-primary min-h-[44px] max-h-[120px] py-3 leading-tight resize-none"}),null),A(a,y(Ee,{variant:"outline",class:"h-[44px] w-[44px] p-0 shrink-0 flex items-center justify-center","aria-label":"Send",type:"button",onClick:r,get children(){return y(pc,{size:20})}}),null),A(l,y(Kp,{})),i})()};var Bp=D('<div id=smarttalks-widget class="rounded-md shadow-xl h-[85vh] w-[90vw] md:h-[min(100vh,500px)] md:w-[min(100vw,425px)] overflow-hidden bg-background text-foreground flex flex-col relative">'),Vp=D("<span class=sr-only>Close"),Up=D('<div><div class="flex justify-center gap-3 items-center">'),jp=D("<span class=sr-only>Open"),qp=D("<span class=font-bold>"),Hp=D("<span>"),Wp=D('<div class="animate-pulse flex p-1">');const Gp=({children:e,openIcon:t})=>{const{bubble:n,toggle:r,show:o,hide:i}=Jo(),{chatWidget:s}=ie(),[a,l]=O(!0),[c,d]=O("");setTimeout(()=>l(!1),2e3),s()?.openDelay&&setTimeout(()=>{o()},(s()?.openDelay||0)*1e3);const u=()=>(s()?.style.margin??5)/4,f=()=>s()?.style.position==="left"?{left:`${u()}rem`}:{right:`${u()}rem`};return ne("open",()=>{o()}),ne("close",()=>{i()}),ne("toggle",()=>{r()}),ne("onAnswer",g=>{g.text&&d(g.text),o()}),(()=>{var g=Up(),h=g.firstChild;return A(g,y(Z,{get when(){return n()},get children(){var p=Bp();return A(p,e),p}}),h),A(h,y(Z,{get when(){return s()?.whatsappBtn},get children(){return y(Ee,{onclick:()=>window.open(s()?.whatsappBtn,"_blank"),"aria-label":"Open",class:"bg-green-500 rounded-full size-14 shadow-md hover:bg-green-400 animate-scale",type:"button",get children(){return y(Ch,{class:"size-9",color:"white"})}})}}),null),A(h,y(Z,{get when(){return n()},get fallback(){return y(Ee,{onclick:r,class:"rounded-full px-0 animate-scale","aria-label":"Open",type:"button",get children(){return[t,jp(),y(Z,{get when(){return s()?.balloonMessage},get children(){var p=Hp();return A(p,y(Z,{get when(){return c()},get fallback(){return y(Z,{get when(){return!a()},get fallback(){return(()=>{var m=Wp();return A(m,y(co,{class:"size-2 animate-bounce"}),null),A(m,y(co,{class:"size-2 animate-bounce delay-150"}),null),A(m,y(co,{class:"size-2 animate-bounce delay-300"}),null),m})()},get children(){return s()?.balloonMessage}})},get children(){var m=qp();return A(m,(()=>{var b=C(()=>c().length>20);return()=>b()?c().substring(0,17)+"...":c()})()),m}})),oe(()=>nt(p,"absolute -top-12 bg-primary text-primary-foreground px-2.5 py-2 pointer-events-none rounded-full truncate"+(s()?.style.position==="left"?" left-0":" right-0"))),p}})]}})},get children(){return y(Ee,{onclick:r,class:"rounded-full px-0 hover:bg-primary hover:shadow-primary shadow-md transition-shadow duration-300","aria-label":"Close",type:"button",get children(){return[t,Vp()]}})}}),null),oe(p=>{var m="z-[9999] max-h-full max-w-full md:max-h-[90%] md:max-w-[90%] fixed bottom-5 flex flex-col space-y-2 "+(s()?.style.position==="left"?" items-start":" items-end"),b=f();return m!==p.e&&nt(g,p.e=m),p.t=an(g,b,p.t),p},{e:void 0,t:void 0}),g})()};var Yp=D('<div id=smarttalks-widget class="h-screen w-full overflow-hidden bg-background text-foreground flex flex-col rounded-md">');const Xp=({children:e})=>{const{chatWidget:t}=ie(),n={};return t()?.style.width&&(n.width=`min(100vw, ${t()?.style.width}px)`),t()?.style.height&&(n.height=`min(100vh, ${t()?.style.height}px)`),(()=>{var r=Yp();return an(r,n),A(r,e),r})()};var Jp=D("<div id=smarttalks-widget>");const Zp=({children:e})=>{const{chatWidget:t}=ie(),[n,r]=O(!1),[o,i]=O(!1),[s,a]=O("100%"),l=()=>{typeof window<"u"&&i(window.innerWidth<768)},c=()=>{o()&&window.visualViewport&&(a(`${window.visualViewport.height}px`),window.scrollTo(0,0))};T(()=>{typeof document>"u"||(n()&&o()?(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"):(document.body.style.overflow="",document.body.style.position="",document.body.style.width=""))}),ht(()=>{l(),window.addEventListener("resize",l),window.visualViewport&&(window.visualViewport.addEventListener("resize",c),window.visualViewport.addEventListener("scroll",c))}),K(()=>{window.removeEventListener("resize",l),window.visualViewport&&(window.visualViewport.removeEventListener("resize",c),window.visualViewport.removeEventListener("scroll",c)),document.body.style.overflow="",document.body.style.position=""});const d=()=>(t()?.style.margin??5)/4,u=()=>{if(o())return{height:s(),top:"0px"};const f={};return t()?.fullscreen?(f.height="100%",f["max-height"]="100%",f.width="100%",f["max-width"]="100%",f.bottom=0,f.left=0):t()?.style.position&&(f[t()?.style.position||"right"]=`${d()}rem`),f};return ne("open",()=>{r(!0),ee("onOpen"),o()&&window.visualViewport&&a(`${window.visualViewport.height}px`)}),ne("close",()=>{r(!1),ee("onClose")}),ne("toggle",()=>{r(!n()),ee("onToggle")}),ne("onAnswer",()=>{r(!0),ee("onOpen")}),setTimeout(()=>{r(!0),ee("onOpen")},(t()?.openDelay||0)*1e3),y(Z,{get when(){return n()},get children(){var f=Jp();return A(f,e),oe(g=>{var h=`
|
|
182
182
|
fixed flex flex-col bg-background text-foreground shadow-xl overflow-hidden z-[99999]
|
|
183
183
|
|
|
184
184
|
${o()?"inset-x-0 top-0 w-full rounded-none m-0":"transition-all duration-300 ease-in-out w-[400px] h-[min(85vh,700px)] md:w-[400px] md:max-h-[90%] md:rounded-xl md:bottom-5"}
|
|
185
|
-
`,
|
|
185
|
+
`,p=u();return h!==g.e&&nt(f,g.e=h),g.t=an(f,p,g.t),g},{e:void 0,t:void 0}),f}})};var Qp=D('<div class="absolute bg-black/50 text-white font-bold h-full w-full grid place-content-center z-50">');const ho=()=>(()=>{var e=Qp();return A(e,y(gc,{size:45,class:"animate-spin"})),e})(),em=()=>{const{chatWidget:e}=ie(),{loading:t}=et();return y(Gp,{get openIcon(){return y(si,{get src(){return e()?.avatar}})},get children(){return[y(Z,{get when(){return t()},get children(){return y(ho,{})}}),y(Qr,{}),y(uo,{}),y(fo,{})]}})},tm=()=>{const{loading:e}=et();return y(Zp,{get children(){return[y(Z,{get when(){return e()},get children(){return y(ho,{})}}),y(Qr,{}),y(uo,{}),y(fo,{})]}})},nm=()=>{const{loading:e}=et();return y(Xp,{get children(){return[y(Z,{get when(){return e()},get children(){return y(ho,{})}}),y(Qr,{}),y(uo,{}),y(fo,{})]}})},rm=()=>{const{chatWidget:e}=ie();return y(Bo,{get children(){return[y(It,{get when(){return e()?.mode==="standard"},get children(){return y(em,{})}}),y(It,{get when(){return e()?.mode==="popup"},get children(){return y(tm,{})}}),y(It,{get when(){return e()?.mode==="static"},get children(){return y(nm,{})}})]}})};var om=D("<div><div>Form");const im=()=>{const{formWidget:e}=ie();return(()=>{var t=om();return t.firstChild,A(t,()=>e()?._id,null),t})()};function sm(){const{widget:e}=ie();return y(Bo,{get children(){return[y(It,{get when(){return e()?.type==="chat"},get children(){return y(rm,{})}}),y(It,{get when(){return e()?.type==="form"},get children(){return y(im,{})}})]}})}var am=D("<style>"),lm=D("<div>");const cm=({id:e,settings:t,side:n,margin:r,mode:o})=>{const{setWidgetId:i}=ie(),s=(e||"default")+"?"+(t?"&showSettings":"")+(n?`&${n}`:"")+(r?`&margin=${r}`:"")+(o?`&mode=${o}`:"");return i(s),[(()=>{var a=am();return A(a,Vl),a})(),(()=>{var a=lm();return A(a,y(sm,{})),a})()]},um={id:"",settings:!1,side:void 0,margin:void 0,mode:void 0};(()=>{typeof window>"u"||Bl("smarttalks-widget",um,cm)})(),Ua()});
|