@release0/js 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.d.ts +4 -0
- package/dist/web.js +77 -87
- package/package.json +12 -15
package/dist/web.js
CHANGED
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
// Release0 v1.1.
|
|
2
|
-
var Ox=Object.create;var xi=Object.defineProperty;var Lx=Object.getOwnPropertyDescriptor;var Dx=Object.getOwnPropertyNames;var Bx=Object.getPrototypeOf,Ux=Object.prototype.hasOwnProperty;var Fx=(e,t)=>()=>(e&&(t=e(e=0)),t);var Oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$x=(e,t)=>{for(var n in t)xi(e,n,{get:t[n],enumerable:!0})},Pd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Dx(t))!Ux.call(e,o)&&o!==n&&xi(e,o,{get:()=>t[o],enumerable:!(r=Lx(t,o))||r.enumerable});return e};var br=(e,t,n)=>(n=e!=null?Ox(Bx(e)):{},Pd(t||!e||!e.__esModule?xi(n,"default",{value:e,enumerable:!0}):n,e)),Si=e=>Pd(xi({},"__esModule",{value:!0}),e);var zl=Oe(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.anumber=Wl;xr.abytes=cf;xr.ahash=NS;xr.aexists=OS;xr.aoutput=LS;function Wl(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function RS(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function cf(e,...t){if(!RS(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function NS(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Wl(e.outputLen),Wl(e.blockLen)}function OS(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function LS(e,t){cf(e);let n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}});var Mf=Oe(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.add5L=fe.add5H=fe.add4H=fe.add4L=fe.add3H=fe.add3L=fe.rotlBL=fe.rotlBH=fe.rotlSL=fe.rotlSH=fe.rotr32L=fe.rotr32H=fe.rotrBL=fe.rotrBH=fe.rotrSL=fe.rotrSH=fe.shrSL=fe.shrSH=fe.toBig=void 0;fe.fromBig=Yl;fe.split=uf;fe.add=Cf;var Ni=BigInt(2**32-1),Zl=BigInt(32);function Yl(e,t=!1){return t?{h:Number(e&Ni),l:Number(e>>Zl&Ni)}:{h:Number(e>>Zl&Ni)|0,l:Number(e&Ni)|0}}function uf(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){let{h:a,l:i}=Yl(e[o],t);[n[o],r[o]]=[a,i]}return[n,r]}var df=(e,t)=>BigInt(e>>>0)<<Zl|BigInt(t>>>0);fe.toBig=df;var ff=(e,t,n)=>e>>>n;fe.shrSH=ff;var pf=(e,t,n)=>e<<32-n|t>>>n;fe.shrSL=pf;var mf=(e,t,n)=>e>>>n|t<<32-n;fe.rotrSH=mf;var gf=(e,t,n)=>e<<32-n|t>>>n;fe.rotrSL=gf;var hf=(e,t,n)=>e<<64-n|t>>>n-32;fe.rotrBH=hf;var bf=(e,t,n)=>e>>>n-32|t<<64-n;fe.rotrBL=bf;var yf=(e,t)=>t;fe.rotr32H=yf;var vf=(e,t)=>e;fe.rotr32L=vf;var xf=(e,t,n)=>e<<n|t>>>32-n;fe.rotlSH=xf;var Sf=(e,t,n)=>t<<n|e>>>32-n;fe.rotlSL=Sf;var wf=(e,t,n)=>t<<n-32|e>>>64-n;fe.rotlBH=wf;var Tf=(e,t,n)=>e<<n-32|t>>>64-n;fe.rotlBL=Tf;function Cf(e,t,n,r){let o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}var Ef=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);fe.add3L=Ef;var kf=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;fe.add3H=kf;var Af=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);fe.add4L=Af;var Pf=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0;fe.add4H=Pf;var If=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0);fe.add5L=If;var _f=(e,t,n,r,o,a)=>t+n+r+o+a+(e/2**32|0)|0;fe.add5H=_f;var DS={fromBig:Yl,split:uf,toBig:df,shrSH:ff,shrSL:pf,rotrSH:mf,rotrSL:gf,rotrBH:hf,rotrBL:bf,rotr32H:yf,rotr32L:vf,rotlSH:xf,rotlSL:Sf,rotlBH:wf,rotlBL:Tf,add:Cf,add3L:Ef,add3H:kf,add4L:Af,add4H:Pf,add5H:_f,add5L:If};fe.default=DS});var Rf=Oe(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.crypto=void 0;Oi.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var Df=Oe(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.Hash=Pe.nextTick=Pe.byteSwapIfBE=Pe.isLE=void 0;Pe.isBytes=BS;Pe.u8=US;Pe.u32=FS;Pe.createView=$S;Pe.rotr=GS;Pe.rotl=HS;Pe.byteSwap=Xl;Pe.byteSwap32=KS;Pe.bytesToHex=jS;Pe.hexToBytes=WS;Pe.asyncLoop=ZS;Pe.utf8ToBytes=Lf;Pe.toBytes=Li;Pe.concatBytes=YS;Pe.checkOpts=qS;Pe.wrapConstructor=JS;Pe.wrapConstructorWithOpts=XS;Pe.wrapXOFConstructorWithOpts=QS;Pe.randomBytes=ew;var lo=Rf(),Jl=zl();function BS(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function US(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function FS(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function $S(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function GS(e,t){return e<<32-t|e>>>t}function HS(e,t){return e<<t|e>>>32-t>>>0}Pe.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Xl(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}Pe.byteSwapIfBE=Pe.isLE?e=>e:e=>Xl(e);function KS(e){for(let t=0;t<e.length;t++)e[t]=Xl(e[t])}var Of=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",VS=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function jS(e){if((0,Jl.abytes)(e),Of)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=VS[e[n]];return t}var kn={_0:48,_9:57,A:65,F:70,a:97,f:102};function Nf(e){if(e>=kn._0&&e<=kn._9)return e-kn._0;if(e>=kn.A&&e<=kn.F)return e-(kn.A-10);if(e>=kn.a&&e<=kn.f)return e-(kn.a-10)}function WS(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Of)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let o=0,a=0;o<n;o++,a+=2){let i=Nf(e.charCodeAt(a)),s=Nf(e.charCodeAt(a+1));if(i===void 0||s===void 0){let c=e[a]+e[a+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+a)}r[o]=i*16+s}return r}var zS=async()=>{};Pe.nextTick=zS;async function ZS(e,t,n){let r=Date.now();for(let o=0;o<e;o++){n(o);let a=Date.now()-r;a>=0&&a<t||(await(0,Pe.nextTick)(),r+=a)}}function Lf(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function Li(e){return typeof e=="string"&&(e=Lf(e)),(0,Jl.abytes)(e),e}function YS(...e){let t=0;for(let r=0;r<e.length;r++){let o=e[r];(0,Jl.abytes)(o),t+=o.length}let n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){let a=e[r];n.set(a,o),o+=a.length}return n}var ql=class{clone(){return this._cloneInto()}};Pe.Hash=ql;function qS(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(e,t)}function JS(e){let t=r=>e().update(Li(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function XS(e){let t=(r,o)=>e(o).update(Li(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}function QS(e){let t=(r,o)=>e(o).update(Li(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}function ew(e=32){if(lo.crypto&&typeof lo.crypto.getRandomValues=="function")return lo.crypto.getRandomValues(new Uint8Array(e));if(lo.crypto&&typeof lo.crypto.randomBytes=="function")return Uint8Array.from(lo.crypto.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}});var Vf=Oe(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.shake256=Ge.shake128=Ge.keccak_512=Ge.keccak_384=Ge.keccak_256=Ge.keccak_224=Ge.sha3_512=Ge.sha3_384=Ge.sha3_256=Ge.sha3_224=Ge.Keccak=void 0;Ge.keccakP=Hf;var co=zl(),ia=Mf(),An=Df(),Ff=[],$f=[],Gf=[],tw=BigInt(0),aa=BigInt(1),nw=BigInt(2),rw=BigInt(7),ow=BigInt(256),aw=BigInt(113);for(let e=0,t=aa,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Ff.push(2*(5*r+n)),$f.push((e+1)*(e+2)/2%64);let o=tw;for(let a=0;a<7;a++)t=(t<<aa^(t>>rw)*aw)%ow,t&nw&&(o^=aa<<(aa<<BigInt(a))-aa);Gf.push(o)}var[iw,sw]=(0,ia.split)(Gf,!0),Bf=(e,t,n)=>n>32?(0,ia.rotlBH)(e,t,n):(0,ia.rotlSH)(e,t,n),Uf=(e,t,n)=>n>32?(0,ia.rotlBL)(e,t,n):(0,ia.rotlSL)(e,t,n);function Hf(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){let s=(i+8)%10,c=(i+2)%10,l=n[c],u=n[c+1],f=Bf(l,u,1)^n[s],d=Uf(l,u,1)^n[s+1];for(let p=0;p<50;p+=10)e[i+p]^=f,e[i+p+1]^=d}let o=e[2],a=e[3];for(let i=0;i<24;i++){let s=$f[i],c=Bf(o,a,s),l=Uf(o,a,s),u=Ff[i];o=e[u],a=e[u+1],e[u]=c,e[u+1]=l}for(let i=0;i<50;i+=10){for(let s=0;s<10;s++)n[s]=e[i+s];for(let s=0;s<10;s++)e[i+s]^=~n[(s+2)%10]&n[(s+4)%10]}e[0]^=iw[r],e[1]^=sw[r]}n.fill(0)}var sa=class e extends An.Hash{constructor(t,n,r,o=!1,a=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=a,(0,co.anumber)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,An.u32)(this.state)}keccak(){An.isLE||(0,An.byteSwap32)(this.state32),Hf(this.state32,this.rounds),An.isLE||(0,An.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,co.aexists)(this);let{blockLen:n,state:r}=this;t=(0,An.toBytes)(t);let o=t.length;for(let a=0;a<o;){let i=Math.min(n-this.pos,o-a);for(let s=0;s<i;s++)r[this.pos++]^=t[a++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,n&128&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){(0,co.aexists)(this,!1),(0,co.abytes)(t),this.finish();let n=this.state,{blockLen:r}=this;for(let o=0,a=t.length;o<a;){this.posOut>=r&&this.keccak();let i=Math.min(r-this.posOut,a-o);t.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,co.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,co.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:o,rounds:a,enableXOF:i}=this;return t||(t=new e(n,r,o,i,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=r,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}};Ge.Keccak=sa;var jn=(e,t,n)=>(0,An.wrapConstructor)(()=>new sa(t,e,n));Ge.sha3_224=jn(6,144,224/8);Ge.sha3_256=jn(6,136,256/8);Ge.sha3_384=jn(6,104,384/8);Ge.sha3_512=jn(6,72,512/8);Ge.keccak_224=jn(1,144,224/8);Ge.keccak_256=jn(1,136,256/8);Ge.keccak_384=jn(1,104,384/8);Ge.keccak_512=jn(1,72,512/8);var Kf=(e,t,n)=>(0,An.wrapXOFConstructorWithOpts)((r={})=>new sa(t,e,r.dkLen===void 0?n:r.dkLen,!0));Ge.shake128=Kf(31,168,128/8);Ge.shake256=Kf(31,136,256/8)});var Xf=Oe((BM,Wn)=>{"use strict";var{sha3_512:lw}=Vf(),Wf=24,la=32,Ql=(e=4,t=Math.random)=>{let n="";for(;n.length<e;)n=n+Math.floor(t()*36).toString(36);return n};function zf(e){let t=8n,n=0n;for(let r of e.values()){let o=BigInt(r);n=(n<<t)+o}return n}var Zf=(e="")=>zf(lw(e)).toString(36).slice(1),jf=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),cw=e=>jf[Math.floor(e()*jf.length)],Yf=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let n=Object.keys(e).toString(),r=n.length?n+Ql(la,t):Ql(la,t);return Zf(r).substring(0,la)},qf=e=>()=>e++,uw=476782367,Jf=({random:e=Math.random,counter:t=qf(Math.floor(e()*uw)),length:n=Wf,fingerprint:r=Yf({random:e})}={})=>function(){let a=cw(e),i=Date.now().toString(36),s=t().toString(36),c=Ql(n,e),l=`${i+c+s+r}`;return`${a+Zf(l).substring(1,n)}`},dw=Jf(),fw=(e,{minLength:t=2,maxLength:n=la}={})=>{let r=e.length,o=/^[0-9a-z]+$/;try{if(typeof e=="string"&&r>=t&&r<=n&&o.test(e))return!0}finally{}return!1};Wn.exports.getConstants=()=>({defaultLength:Wf,bigLength:la});Wn.exports.init=Jf;Wn.exports.createId=dw;Wn.exports.bufToBigInt=zf;Wn.exports.createCounter=qf;Wn.exports.createFingerprint=Yf;Wn.exports.isCuid=fw});var Qf=Oe((UM,ca)=>{"use strict";var{createId:pw,init:mw,getConstants:gw,isCuid:hw}=Xf();ca.exports.createId=pw;ca.exports.init=mw;ca.exports.getConstants=gw;ca.exports.isCuid=hw});var tp=Oe((FM,ep)=>{"use strict";var uo=1e3,fo=uo*60,po=fo*60,Sr=po*24,bw=Sr*7,yw=Sr*365.25;ep.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return vw(e);if(n==="number"&&isFinite(e))return t.long?Sw(e):xw(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function vw(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*yw;case"weeks":case"week":case"w":return n*bw;case"days":case"day":case"d":return n*Sr;case"hours":case"hour":case"hrs":case"hr":case"h":return n*po;case"minutes":case"minute":case"mins":case"min":case"m":return n*fo;case"seconds":case"second":case"secs":case"sec":case"s":return n*uo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function xw(e){var t=Math.abs(e);return t>=Sr?Math.round(e/Sr)+"d":t>=po?Math.round(e/po)+"h":t>=fo?Math.round(e/fo)+"m":t>=uo?Math.round(e/uo)+"s":e+"ms"}function Sw(e){var t=Math.abs(e);return t>=Sr?Di(e,t,Sr,"day"):t>=po?Di(e,t,po,"hour"):t>=fo?Di(e,t,fo,"minute"):t>=uo?Di(e,t,uo,"second"):e+" ms"}function Di(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var xp=Oe((QM,vp)=>{"use strict";var cc=Object.defineProperty,Cw=Object.getOwnPropertyDescriptor,Ew=Object.getOwnPropertyNames,kw=Object.prototype.hasOwnProperty,ap=(e,t)=>{for(var n in t)cc(e,n,{get:t[n],enumerable:!0})},Aw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ew(t))!kw.call(e,o)&&o!==n&&cc(e,o,{get:()=>t[o],enumerable:!(r=Cw(t,o))||r.enumerable});return e},Pw=e=>Aw(cc({},"__esModule",{value:!0}),e),ip={};ap(ip,{Decimal:()=>RT,Public:()=>sp,getRuntime:()=>Uw,makeStrictEnum:()=>Nw,objectEnumValues:()=>Mw});vp.exports=Pw(ip);var sp={};ap(sp,{validator:()=>Iw});function Iw(...e){return t=>t}var Bi=Symbol(),ec=new WeakMap,_w=class{constructor(e){e===Bi?ec.set(this,"Prisma.".concat(this._getName())):ec.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return ec.get(this)}},uc=class extends _w{_getNamespace(){return"NullTypes"}},tc=class extends uc{};dc(tc,"DbNull");var nc=class extends uc{};dc(nc,"JsonNull");var rc=class extends uc{};dc(rc,"AnyNull");var Mw={classes:{DbNull:tc,JsonNull:nc,AnyNull:rc},instances:{DbNull:new tc(Bi),JsonNull:new nc(Bi),AnyNull:new rc(Bi)}};function dc(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}var Rw=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Nw(e){return new Proxy(e,{get(t,n){if(n in t)return t[n];if(!Rw.has(n))throw new TypeError("Invalid enum value: ".concat(String(n)))}})}var Ow="Cloudflare-Workers",Lw="node";function Dw(){var e,t,n;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Ow?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((n=(t=globalThis.process)==null?void 0:t.release)==null?void 0:n.name)===Lw?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Bw={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Uw(){let e=Dw();return{id:e,prettyName:Bw[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var mo=9e15,qn=1e9,oc="0123456789abcdef",Fi="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",$i="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",ac={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-mo,maxE:mo,crypto:!1},lp,Pn,de=!0,Hi="[DecimalError] ",Yn=Hi+"Invalid argument: ",cp=Hi+"Precision limit exceeded",up=Hi+"crypto unavailable",dp="[object Decimal]",mt=Math.floor,et=Math.pow,Fw=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,$w=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Gw=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,fp=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,zt=1e7,le=7,Hw=9007199254740991,Kw=Fi.length-1,ic=$i.length-1,N={toStringTag:dp};N.absoluteValue=N.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),ee(e)};N.ceil=function(){return ee(new this.constructor(this),this.e+1,2)};N.clampedTo=N.clamp=function(e,t){var n,r=this,o=r.constructor;if(e=new o(e),t=new o(t),!e.s||!t.s)return new o(NaN);if(e.gt(t))throw Error(Yn+t);return n=r.cmp(e),n<0?e:r.cmp(t)>0?t:new o(r)};N.comparedTo=N.cmp=function(e){var t,n,r,o,a=this,i=a.d,s=(e=new a.constructor(e)).d,c=a.s,l=e.s;if(!i||!s)return!c||!l?NaN:c!==l?c:i===s?0:!i^c<0?1:-1;if(!i[0]||!s[0])return i[0]?c:s[0]?-l:0;if(c!==l)return c;if(a.e!==e.e)return a.e>e.e^c<0?1:-1;for(r=i.length,o=s.length,t=0,n=r<o?r:o;t<n;++t)if(i[t]!==s[t])return i[t]>s[t]^c<0?1:-1;return r===o?0:r>o^c<0?1:-1};N.cosine=N.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+le,r.rounding=1,n=Vw(r,bp(r,n)),r.precision=e,r.rounding=t,ee(Pn==2||Pn==3?n.neg():n,e,t,!0)):new r(1):new r(NaN)};N.cubeRoot=N.cbrt=function(){var e,t,n,r,o,a,i,s,c,l,u=this,f=u.constructor;if(!u.isFinite()||u.isZero())return new f(u);for(de=!1,a=u.s*et(u.s*u,1/3),!a||Math.abs(a)==1/0?(n=st(u.d),e=u.e,(a=(e-n.length+1)%3)&&(n+=a==1||a==-2?"0":"00"),a=et(n,1/3),e=mt((e+1)/3)-(e%3==(e<0?-1:2)),a==1/0?n="5e"+e:(n=a.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),r=new f(n),r.s=u.s):r=new f(a.toString()),i=(e=f.precision)+3;;)if(s=r,c=s.times(s).times(s),l=c.plus(u),r=Le(l.plus(u).times(s),l.plus(c),i+2,1),st(s.d).slice(0,i)===(n=st(r.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!o&&n=="4999"){if(!o&&(ee(s,e+1,0),s.times(s).times(s).eq(u))){r=s;break}i+=4,o=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(ee(r,e+1,1),t=!r.times(r).times(r).eq(u));break}return de=!0,ee(r,e,f.rounding,t)};N.decimalPlaces=N.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-mt(this.e/le))*le,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n};N.dividedBy=N.div=function(e){return Le(this,new this.constructor(e))};N.dividedToIntegerBy=N.divToInt=function(e){var t=this,n=t.constructor;return ee(Le(t,new n(e),0,1,1),n.precision,n.rounding)};N.equals=N.eq=function(e){return this.cmp(e)===0};N.floor=function(){return ee(new this.constructor(this),this.e+1,3)};N.greaterThan=N.gt=function(e){return this.cmp(e)>0};N.greaterThanOrEqualTo=N.gte=function(e){var t=this.cmp(e);return t==1||t===0};N.hyperbolicCosine=N.cosh=function(){var e,t,n,r,o,a=this,i=a.constructor,s=new i(1);if(!a.isFinite())return new i(a.s?1/0:NaN);if(a.isZero())return s;n=i.precision,r=i.rounding,i.precision=n+Math.max(a.e,a.sd())+4,i.rounding=1,o=a.d.length,o<32?(e=Math.ceil(o/3),t=(1/Vi(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),a=go(i,1,a.times(t),new i(1),!0);for(var c,l=e,u=new i(8);l--;)c=a.times(a),a=s.minus(c.times(u.minus(c.times(u))));return ee(a,i.precision=n,i.rounding=r,!0)};N.hyperbolicSine=N.sinh=function(){var e,t,n,r,o=this,a=o.constructor;if(!o.isFinite()||o.isZero())return new a(o);if(t=a.precision,n=a.rounding,a.precision=t+Math.max(o.e,o.sd())+4,a.rounding=1,r=o.d.length,r<3)o=go(a,2,o,o,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,o=o.times(1/Vi(5,e)),o=go(a,2,o,o,!0);for(var i,s=new a(5),c=new a(16),l=new a(20);e--;)i=o.times(o),o=o.times(s.plus(i.times(c.times(i).plus(l))))}return a.precision=t,a.rounding=n,ee(o,t,n,!0)};N.hyperbolicTangent=N.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,Le(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)};N.inverseCosine=N.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),o=n.precision,a=n.rounding;return r!==-1?r===0?t.isNeg()?Wt(n,o,a):new n(0):new n(NaN):t.isZero()?Wt(n,o+4,a).times(.5):(n.precision=o+6,n.rounding=1,t=t.asin(),e=Wt(n,o+4,a).times(.5),n.precision=o,n.rounding=a,e.minus(t))};N.inverseHyperbolicCosine=N.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,de=!1,n=n.times(n).minus(1).sqrt().plus(n),de=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)};N.inverseHyperbolicSine=N.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,de=!1,n=n.times(n).plus(1).sqrt().plus(n),de=!0,r.precision=e,r.rounding=t,n.ln())};N.inverseHyperbolicTangent=N.atanh=function(){var e,t,n,r,o=this,a=o.constructor;return o.isFinite()?o.e>=0?new a(o.abs().eq(1)?o.s/0:o.isZero()?o:NaN):(e=a.precision,t=a.rounding,r=o.sd(),Math.max(r,e)<2*-o.e-1?ee(new a(o),e,t,!0):(a.precision=n=r-o.e,o=Le(o.plus(1),new a(1).minus(o),n+e,1),a.precision=e+4,a.rounding=1,o=o.ln(),a.precision=e,a.rounding=t,o.times(.5))):new a(NaN)};N.inverseSine=N.asin=function(){var e,t,n,r,o=this,a=o.constructor;return o.isZero()?new a(o):(t=o.abs().cmp(1),n=a.precision,r=a.rounding,t!==-1?t===0?(e=Wt(a,n+4,r).times(.5),e.s=o.s,e):new a(NaN):(a.precision=n+6,a.rounding=1,o=o.div(new a(1).minus(o.times(o)).sqrt().plus(1)).atan(),a.precision=n,a.rounding=r,o.times(2)))};N.inverseTangent=N.atan=function(){var e,t,n,r,o,a,i,s,c,l=this,u=l.constructor,f=u.precision,d=u.rounding;if(l.isFinite()){if(l.isZero())return new u(l);if(l.abs().eq(1)&&f+4<=ic)return i=Wt(u,f+4,d).times(.25),i.s=l.s,i}else{if(!l.s)return new u(NaN);if(f+4<=ic)return i=Wt(u,f+4,d).times(.5),i.s=l.s,i}for(u.precision=s=f+10,u.rounding=1,n=Math.min(28,s/le+2|0),e=n;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(de=!1,t=Math.ceil(s/le),r=1,c=l.times(l),i=new u(l),o=l;e!==-1;)if(o=o.times(c),a=i.minus(o.div(r+=2)),o=o.times(c),i=a.plus(o.div(r+=2)),i.d[t]!==void 0)for(e=t;i.d[e]===a.d[e]&&e--;);return n&&(i=i.times(2<<n-1)),de=!0,ee(i,u.precision=f,u.rounding=d,!0)};N.isFinite=function(){return!!this.d};N.isInteger=N.isInt=function(){return!!this.d&&mt(this.e/le)>this.d.length-2};N.isNaN=function(){return!this.s};N.isNegative=N.isNeg=function(){return this.s<0};N.isPositive=N.isPos=function(){return this.s>0};N.isZero=function(){return!!this.d&&this.d[0]===0};N.lessThan=N.lt=function(e){return this.cmp(e)<0};N.lessThanOrEqualTo=N.lte=function(e){return this.cmp(e)<1};N.logarithm=N.log=function(e){var t,n,r,o,a,i,s,c,l=this,u=l.constructor,f=u.precision,d=u.rounding,p=5;if(e==null)e=new u(10),t=!0;else{if(e=new u(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=l.d,l.s<0||!n||!n[0]||l.eq(1))return new u(n&&!n[0]?-1/0:l.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)a=!0;else{for(o=n[0];o%10===0;)o/=10;a=o!==1}if(de=!1,s=f+p,i=Zn(l,s),r=t?Gi(u,s+10):Zn(e,s),c=Le(i,r,s,1),ua(c.d,o=f,d))do if(s+=10,i=Zn(l,s),r=t?Gi(u,s+10):Zn(e,s),c=Le(i,r,s,1),!a){+st(c.d).slice(o+1,o+15)+1==1e14&&(c=ee(c,f+1,0));break}while(ua(c.d,o+=10,d));return de=!0,ee(c,f,d)};N.minus=N.sub=function(e){var t,n,r,o,a,i,s,c,l,u,f,d,p=this,h=p.constructor;if(e=new h(e),!p.d||!e.d)return!p.s||!e.s?e=new h(NaN):p.d?e.s=-e.s:e=new h(e.d||p.s!==e.s?p:NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(l=p.d,d=e.d,s=h.precision,c=h.rounding,!l[0]||!d[0]){if(d[0])e.s=-e.s;else if(l[0])e=new h(p);else return new h(c===3?-0:0);return de?ee(e,s,c):e}if(n=mt(e.e/le),u=mt(p.e/le),l=l.slice(),a=u-n,a){for(f=a<0,f?(t=l,a=-a,i=d.length):(t=d,n=u,i=l.length),r=Math.max(Math.ceil(s/le),i)+2,a>r&&(a=r,t.length=1),t.reverse(),r=a;r--;)t.push(0);t.reverse()}else{for(r=l.length,i=d.length,f=r<i,f&&(i=r),r=0;r<i;r++)if(l[r]!=d[r]){f=l[r]<d[r];break}a=0}for(f&&(t=l,l=d,d=t,e.s=-e.s),i=l.length,r=d.length-i;r>0;--r)l[i++]=0;for(r=d.length;r>a;){if(l[--r]<d[r]){for(o=r;o&&l[--o]===0;)l[o]=zt-1;--l[o],l[r]+=zt}l[r]-=d[r]}for(;l[--i]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(e.d=l,e.e=Ki(l,n),de?ee(e,s,c):e):new h(c===3?-0:0)};N.modulo=N.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?ee(new r(n),r.precision,r.rounding):(de=!1,r.modulo==9?(t=Le(n,e.abs(),0,3,1),t.s*=e.s):t=Le(n,e,0,r.modulo,1),t=t.times(e),de=!0,n.minus(t))};N.naturalExponential=N.exp=function(){return sc(this)};N.naturalLogarithm=N.ln=function(){return Zn(this)};N.negated=N.neg=function(){var e=new this.constructor(this);return e.s=-e.s,ee(e)};N.plus=N.add=function(e){var t,n,r,o,a,i,s,c,l,u,f=this,d=f.constructor;if(e=new d(e),!f.d||!e.d)return!f.s||!e.s?e=new d(NaN):f.d||(e=new d(e.d||f.s===e.s?f:NaN)),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(l=f.d,u=e.d,s=d.precision,c=d.rounding,!l[0]||!u[0])return u[0]||(e=new d(f)),de?ee(e,s,c):e;if(a=mt(f.e/le),r=mt(e.e/le),l=l.slice(),o=a-r,o){for(o<0?(n=l,o=-o,i=u.length):(n=u,r=a,i=l.length),a=Math.ceil(s/le),i=a>i?a+1:i+1,o>i&&(o=i,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(i=l.length,o=u.length,i-o<0&&(o=i,n=u,u=l,l=n),t=0;o;)t=(l[--o]=l[o]+u[o]+t)/zt|0,l[o]%=zt;for(t&&(l.unshift(t),++r),i=l.length;l[--i]==0;)l.pop();return e.d=l,e.e=Ki(l,r),de?ee(e,s,c):e};N.precision=N.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Yn+e);return n.d?(t=pp(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t};N.round=function(){var e=this,t=e.constructor;return ee(new t(e),e.e+1,t.rounding)};N.sine=N.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+le,r.rounding=1,n=Ww(r,bp(r,n)),r.precision=e,r.rounding=t,ee(Pn>2?n.neg():n,e,t,!0)):new r(NaN)};N.squareRoot=N.sqrt=function(){var e,t,n,r,o,a,i=this,s=i.d,c=i.e,l=i.s,u=i.constructor;if(l!==1||!s||!s[0])return new u(!l||l<0&&(!s||s[0])?NaN:s?i:1/0);for(de=!1,l=Math.sqrt(+i),l==0||l==1/0?(t=st(s),(t.length+c)%2==0&&(t+="0"),l=Math.sqrt(t),c=mt((c+1)/2)-(c<0||c%2),l==1/0?t="5e"+c:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+c),r=new u(t)):r=new u(l.toString()),n=(c=u.precision)+3;;)if(a=r,r=a.plus(Le(i,a,n+2,1)).times(.5),st(a.d).slice(0,n)===(t=st(r.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!o&&t=="4999"){if(!o&&(ee(a,c+1,0),a.times(a).eq(i))){r=a;break}n+=4,o=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(ee(r,c+1,1),e=!r.times(r).eq(i));break}return de=!0,ee(r,c,u.rounding,e)};N.tangent=N.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,n=n.sin(),n.s=1,n=Le(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,ee(Pn==2||Pn==4?n.neg():n,e,t,!0)):new r(NaN)};N.times=N.mul=function(e){var t,n,r,o,a,i,s,c,l,u=this,f=u.constructor,d=u.d,p=(e=new f(e)).d;if(e.s*=u.s,!d||!d[0]||!p||!p[0])return new f(!e.s||d&&!d[0]&&!p||p&&!p[0]&&!d?NaN:!d||!p?e.s/0:e.s*0);for(n=mt(u.e/le)+mt(e.e/le),c=d.length,l=p.length,c<l&&(a=d,d=p,p=a,i=c,c=l,l=i),a=[],i=c+l,r=i;r--;)a.push(0);for(r=l;--r>=0;){for(t=0,o=c+r;o>r;)s=a[o]+p[r]*d[o-r-1]+t,a[o--]=s%zt|0,t=s/zt|0;a[o]=(a[o]+t)%zt|0}for(;!a[--i];)a.pop();return t?++n:a.shift(),e.d=a,e.e=Ki(a,n),de?ee(e,f.precision,f.rounding):e};N.toBinary=function(e,t){return fc(this,2,e,t)};N.toDecimalPlaces=N.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Et(e,0,qn),t===void 0?t=r.rounding:Et(t,0,8),ee(n,e+n.e+1,t))};N.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=un(r,!0):(Et(e,0,qn),t===void 0?t=o.rounding:Et(t,0,8),r=ee(new o(r),e+1,t),n=un(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n};N.toFixed=function(e,t){var n,r,o=this,a=o.constructor;return e===void 0?n=un(o):(Et(e,0,qn),t===void 0?t=a.rounding:Et(t,0,8),r=ee(new a(o),e+o.e+1,t),n=un(r,!1,e+r.e+1)),o.isNeg()&&!o.isZero()?"-"+n:n};N.toFraction=function(e){var t,n,r,o,a,i,s,c,l,u,f,d,p=this,h=p.d,g=p.constructor;if(!h)return new g(p);if(l=n=new g(1),r=c=new g(0),t=new g(r),a=t.e=pp(h)-p.e-1,i=a%le,t.d[0]=et(10,i<0?le+i:i),e==null)e=a>0?t:l;else{if(s=new g(e),!s.isInt()||s.lt(l))throw Error(Yn+s);e=s.gt(t)?a>0?t:l:s}for(de=!1,s=new g(st(h)),u=g.precision,g.precision=a=h.length*le*2;f=Le(s,t,0,1,1),o=n.plus(f.times(r)),o.cmp(e)!=1;)n=r,r=o,o=l,l=c.plus(f.times(o)),c=o,o=t,t=s.minus(f.times(o)),s=o;return o=Le(e.minus(n),r,0,1,1),c=c.plus(o.times(l)),n=n.plus(o.times(r)),c.s=l.s=p.s,d=Le(l,r,a,1).minus(p).abs().cmp(Le(c,n,a,1).minus(p).abs())<1?[l,r]:[c,n],g.precision=u,de=!0,d};N.toHexadecimal=N.toHex=function(e,t){return fc(this,16,e,t)};N.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),e==null){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),t===void 0?t=r.rounding:Et(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(de=!1,n=Le(n,e,0,t,1).times(e),de=!0,ee(n)):(e.s=n.s,n=e),n};N.toNumber=function(){return+this};N.toOctal=function(e,t){return fc(this,8,e,t)};N.toPower=N.pow=function(e){var t,n,r,o,a,i,s=this,c=s.constructor,l=+(e=new c(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new c(et(+s,l));if(s=new c(s),s.eq(1))return s;if(r=c.precision,a=c.rounding,e.eq(1))return ee(s,r,a);if(t=mt(e.e/le),t>=e.d.length-1&&(n=l<0?-l:l)<=Hw)return o=mp(c,s,n,r),e.s<0?new c(1).div(o):ee(o,r,a);if(i=s.s,i<0){if(t<e.d.length-1)return new c(NaN);if(e.d[t]&1||(i=1),s.e==0&&s.d[0]==1&&s.d.length==1)return s.s=i,s}return n=et(+s,l),t=n==0||!isFinite(n)?mt(l*(Math.log("0."+st(s.d))/Math.LN10+s.e+1)):new c(n+"").e,t>c.maxE+1||t<c.minE-1?new c(t>0?i/0:0):(de=!1,c.rounding=s.s=1,n=Math.min(12,(t+"").length),o=sc(e.times(Zn(s,r+n)),r),o.d&&(o=ee(o,r+5,1),ua(o.d,r,a)&&(t=r+10,o=ee(sc(e.times(Zn(s,t+n)),t),t+5,1),+st(o.d).slice(r+1,r+15)+1==1e14&&(o=ee(o,r+1,0)))),o.s=i,de=!0,c.rounding=a,ee(o,r,a))};N.toPrecision=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=un(r,r.e<=o.toExpNeg||r.e>=o.toExpPos):(Et(e,1,qn),t===void 0?t=o.rounding:Et(t,0,8),r=ee(new o(r),e,t),n=un(r,e<=r.e||r.e<=o.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n};N.toSignificantDigits=N.toSD=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Et(e,1,qn),t===void 0?t=r.rounding:Et(t,0,8)),ee(new r(n),e,t)};N.toString=function(){var e=this,t=e.constructor,n=un(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n};N.truncated=N.trunc=function(){return ee(new this.constructor(this),this.e+1,1)};N.valueOf=N.toJSON=function(){var e=this,t=e.constructor,n=un(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function st(e){var t,n,r,o=e.length-1,a="",i=e[0];if(o>0){for(a+=i,t=1;t<o;t++)r=e[t]+"",n=le-r.length,n&&(a+=zn(n)),a+=r;i=e[t],r=i+"",n=le-r.length,n&&(a+=zn(n))}else if(i===0)return"0";for(;i%10===0;)i/=10;return a+i}function Et(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Yn+e)}function ua(e,t,n,r){var o,a,i,s;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=le,o=0):(o=Math.ceil((t+1)/le),t%=le),a=et(10,le-t),s=e[o]%a|0,r==null?t<3?(t==0?s=s/100|0:t==1&&(s=s/10|0),i=n<4&&s==99999||n>3&&s==49999||s==5e4||s==0):i=(n<4&&s+1==a||n>3&&s+1==a/2)&&(e[o+1]/a/100|0)==et(10,t-2)-1||(s==a/2||s==0)&&(e[o+1]/a/100|0)==0:t<4?(t==0?s=s/1e3|0:t==1?s=s/100|0:t==2&&(s=s/10|0),i=(r||n<4)&&s==9999||!r&&n>3&&s==4999):i=((r||n<4)&&s+1==a||!r&&n>3&&s+1==a/2)&&(e[o+1]/a/1e3|0)==et(10,t-3)-1,i}function Ui(e,t,n){for(var r,o=[0],a,i=0,s=e.length;i<s;){for(a=o.length;a--;)o[a]*=t;for(o[0]+=oc.indexOf(e.charAt(i++)),r=0;r<o.length;r++)o[r]>n-1&&(o[r+1]===void 0&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function Vw(e,t){var n,r,o;if(t.isZero())return t;r=t.d.length,r<32?(n=Math.ceil(r/3),o=(1/Vi(4,n)).toString()):(n=16,o="2.3283064365386962890625e-10"),e.precision+=n,t=go(e,1,t.times(o),new e(1));for(var a=n;a--;){var i=t.times(t);t=i.times(i).minus(i).times(8).plus(1)}return e.precision-=n,t}var Le=function(){function e(r,o,a){var i,s=0,c=r.length;for(r=r.slice();c--;)i=r[c]*o+s,r[c]=i%a|0,s=i/a|0;return s&&r.unshift(s),r}function t(r,o,a,i){var s,c;if(a!=i)c=a>i?1:-1;else for(s=c=0;s<a;s++)if(r[s]!=o[s]){c=r[s]>o[s]?1:-1;break}return c}function n(r,o,a,i){for(var s=0;a--;)r[a]-=s,s=r[a]<o[a]?1:0,r[a]=s*i+r[a]-o[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,o,a,i,s,c){var l,u,f,d,p,h,g,x,b,E,S,k,I,G,D,ie,V,W,L,P,T=r.constructor,C=r.s==o.s?1:-1,R=r.d,O=o.d;if(!R||!R[0]||!O||!O[0])return new T(!r.s||!o.s||(R?O&&R[0]==O[0]:!O)?NaN:R&&R[0]==0||!O?C*0:C/0);for(c?(p=1,u=r.e-o.e):(c=zt,p=le,u=mt(r.e/p)-mt(o.e/p)),L=O.length,V=R.length,b=new T(C),E=b.d=[],f=0;O[f]==(R[f]||0);f++);if(O[f]>(R[f]||0)&&u--,a==null?(G=a=T.precision,i=T.rounding):s?G=a+(r.e-o.e)+1:G=a,G<0)E.push(1),h=!0;else{if(G=G/p+2|0,f=0,L==1){for(d=0,O=O[0],G++;(f<V||d)&&G--;f++)D=d*c+(R[f]||0),E[f]=D/O|0,d=D%O|0;h=d||f<V}else{for(d=c/(O[0]+1)|0,d>1&&(O=e(O,d,c),R=e(R,d,c),L=O.length,V=R.length),ie=L,S=R.slice(0,L),k=S.length;k<L;)S[k++]=0;P=O.slice(),P.unshift(0),W=O[0],O[1]>=c/2&&++W;do d=0,l=t(O,S,L,k),l<0?(I=S[0],L!=k&&(I=I*c+(S[1]||0)),d=I/W|0,d>1?(d>=c&&(d=c-1),g=e(O,d,c),x=g.length,k=S.length,l=t(g,S,x,k),l==1&&(d--,n(g,L<x?P:O,x,c))):(d==0&&(l=d=1),g=O.slice()),x=g.length,x<k&&g.unshift(0),n(S,g,k,c),l==-1&&(k=S.length,l=t(O,S,L,k),l<1&&(d++,n(S,L<k?P:O,k,c))),k=S.length):l===0&&(d++,S=[0]),E[f++]=d,l&&S[0]?S[k++]=R[ie]||0:(S=[R[ie]],k=1);while((ie++<V||S[0]!==void 0)&&G--);h=S[0]!==void 0}E[0]||E.shift()}if(p==1)b.e=u,lp=h;else{for(f=1,d=E[0];d>=10;d/=10)f++;b.e=f+u*p-1,ee(b,s?a+b.e+1:a,i,h)}return b}}();function ee(e,t,n,r){var o,a,i,s,c,l,u,f,d,p=e.constructor;e:if(t!=null){if(f=e.d,!f)return e;for(o=1,s=f[0];s>=10;s/=10)o++;if(a=t-o,a<0)a+=le,i=t,u=f[d=0],c=u/et(10,o-i-1)%10|0;else if(d=Math.ceil((a+1)/le),s=f.length,d>=s)if(r){for(;s++<=d;)f.push(0);u=c=0,o=1,a%=le,i=a-le+1}else break e;else{for(u=s=f[d],o=1;s>=10;s/=10)o++;a%=le,i=a-le+o,c=i<0?0:u/et(10,o-i-1)%10|0}if(r=r||t<0||f[d+1]!==void 0||(i<0?u:u%et(10,o-i-1)),l=n<4?(c||r)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||r||n==6&&(a>0?i>0?u/et(10,o-i):0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,l?(t-=e.e+1,f[0]=et(10,(le-t%le)%le),e.e=-t||0):f[0]=e.e=0,e;if(a==0?(f.length=d,s=1,d--):(f.length=d+1,s=et(10,le-a),f[d]=i>0?(u/et(10,o-i)%et(10,i)|0)*s:0),l)for(;;)if(d==0){for(a=1,i=f[0];i>=10;i/=10)a++;for(i=f[0]+=s,s=1;i>=10;i/=10)s++;a!=s&&(e.e++,f[0]==zt&&(f[0]=1));break}else{if(f[d]+=s,f[d]!=zt)break;f[d--]=0,s=1}for(a=f.length;f[--a]===0;)f.pop()}return de&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function un(e,t,n){if(!e.isFinite())return hp(e);var r,o=e.e,a=st(e.d),i=a.length;return t?(n&&(r=n-i)>0?a=a.charAt(0)+"."+a.slice(1)+zn(r):i>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):o<0?(a="0."+zn(-o-1)+a,n&&(r=n-i)>0&&(a+=zn(r))):o>=i?(a+=zn(o+1-i),n&&(r=n-o-1)>0&&(a=a+"."+zn(r))):((r=o+1)<i&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-i)>0&&(o+1===i&&(a+="."),a+=zn(r))),a}function Ki(e,t){var n=e[0];for(t*=le;n>=10;n/=10)t++;return t}function Gi(e,t,n){if(t>Kw)throw de=!0,n&&(e.precision=n),Error(cp);return ee(new e(Fi),t,1,!0)}function Wt(e,t,n){if(t>ic)throw Error(cp);return ee(new e($i),t,n,!0)}function pp(e){var t=e.length-1,n=t*le+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function zn(e){for(var t="";e--;)t+="0";return t}function mp(e,t,n,r){var o,a=new e(1),i=Math.ceil(r/le+4);for(de=!1;;){if(n%2&&(a=a.times(t),rp(a.d,i)&&(o=!0)),n=mt(n/2),n===0){n=a.d.length-1,o&&a.d[n]===0&&++a.d[n];break}t=t.times(t),rp(t.d,i)}return de=!0,a}function np(e){return e.d[e.d.length-1]&1}function gp(e,t,n){for(var r,o=new e(t[0]),a=0;++a<t.length;)if(r=new e(t[a]),r.s)o[n](r)&&(o=r);else{o=r;break}return o}function sc(e,t){var n,r,o,a,i,s,c,l=0,u=0,f=0,d=e.constructor,p=d.rounding,h=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(de=!1,c=h):c=t,s=new d(.03125);e.e>-2;)e=e.times(s),f+=5;for(r=Math.log(et(2,f))/Math.LN10*2+5|0,c+=r,n=a=i=new d(1),d.precision=c;;){if(a=ee(a.times(e),c,1),n=n.times(++u),s=i.plus(Le(a,n,c,1)),st(s.d).slice(0,c)===st(i.d).slice(0,c)){for(o=f;o--;)i=ee(i.times(i),c,1);if(t==null)if(l<3&&ua(i.d,c-r,p,l))d.precision=c+=10,n=a=s=new d(1),u=0,l++;else return ee(i,d.precision=h,p,de=!0);else return d.precision=h,i}i=s}}function Zn(e,t){var n,r,o,a,i,s,c,l,u,f,d,p=1,h=10,g=e,x=g.d,b=g.constructor,E=b.rounding,S=b.precision;if(g.s<0||!x||!x[0]||!g.e&&x[0]==1&&x.length==1)return new b(x&&!x[0]?-1/0:g.s!=1?NaN:x?0:g);if(t==null?(de=!1,u=S):u=t,b.precision=u+=h,n=st(x),r=n.charAt(0),Math.abs(a=g.e)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=st(g.d),r=n.charAt(0),p++;a=g.e,r>1?(g=new b("0."+n),a++):g=new b(r+"."+n.slice(1))}else return l=Gi(b,u+2,S).times(a+""),g=Zn(new b(r+"."+n.slice(1)),u-h).plus(l),b.precision=S,t==null?ee(g,S,E,de=!0):g;for(f=g,c=i=g=Le(g.minus(1),g.plus(1),u,1),d=ee(g.times(g),u,1),o=3;;){if(i=ee(i.times(d),u,1),l=c.plus(Le(i,new b(o),u,1)),st(l.d).slice(0,u)===st(c.d).slice(0,u))if(c=c.times(2),a!==0&&(c=c.plus(Gi(b,u+2,S).times(a+""))),c=Le(c,new b(p),u,1),t==null)if(ua(c.d,u-h,E,s))b.precision=u+=h,l=i=g=Le(f.minus(1),f.plus(1),u,1),d=ee(g.times(g),u,1),o=s=1;else return ee(c,b.precision=S,E,de=!0);else return b.precision=S,c;c=l,o+=2}}function hp(e){return String(e.s*e.s/0)}function lc(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;r++);for(o=t.length;t.charCodeAt(o-1)===48;--o);if(t=t.slice(r,o),t){if(o-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%le,n<0&&(r+=le),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=le;r<o;)e.d.push(+t.slice(r,r+=le));t=t.slice(r),r=le-t.length}else r-=o;for(;r--;)t+="0";e.d.push(+t),de&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function jw(e,t){var n,r,o,a,i,s,c,l,u;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),fp.test(t))return lc(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if($w.test(t))n=16,t=t.toLowerCase();else if(Fw.test(t))n=2;else if(Gw.test(t))n=8;else throw Error(Yn+t);for(a=t.search(/p/i),a>0?(c=+t.slice(a+1),t=t.substring(2,a)):t=t.slice(2),a=t.indexOf("."),i=a>=0,r=e.constructor,i&&(t=t.replace(".",""),s=t.length,a=s-a,o=mp(r,new r(n),a,a*2)),l=Ui(t,n,zt),u=l.length-1,a=u;l[a]===0;--a)l.pop();return a<0?new r(e.s*0):(e.e=Ki(l,u),e.d=l,de=!1,i&&(e=Le(e,o,s*4)),c&&(e=e.times(Math.abs(c)<54?et(2,c):da.pow(2,c))),de=!0,e)}function Ww(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:go(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:n|0,t=t.times(1/Vi(5,n)),t=go(e,2,t,t);for(var o,a=new e(5),i=new e(16),s=new e(20);n--;)o=t.times(t),t=t.times(a.plus(o.times(i.times(o).minus(s))));return t}function go(e,t,n,r,o){var a,i,s,c,l=1,u=e.precision,f=Math.ceil(u/le);for(de=!1,c=n.times(n),s=new e(r);;){if(i=Le(s.times(c),new e(t++*t++),u,1),s=o?r.plus(i):r.minus(i),r=Le(i.times(c),new e(t++*t++),u,1),i=s.plus(r),i.d[f]!==void 0){for(a=f;i.d[a]===s.d[a]&&a--;);if(a==-1)break}a=s,s=r,r=i,i=a,l++}return de=!0,i.d.length=f+1,i}function Vi(e,t){for(var n=e;--t;)n*=e;return n}function bp(e,t){var n,r=t.s<0,o=Wt(e,e.precision,1),a=o.times(.5);if(t=t.abs(),t.lte(a))return Pn=r?4:1,t;if(n=t.divToInt(o),n.isZero())Pn=r?3:2;else{if(t=t.minus(n.times(o)),t.lte(a))return Pn=np(n)?r?2:3:r?4:1,t;Pn=np(n)?r?1:4:r?3:2}return t.minus(o).abs()}function fc(e,t,n,r){var o,a,i,s,c,l,u,f,d,p=e.constructor,h=n!==void 0;if(h?(Et(n,1,qn),r===void 0?r=p.rounding:Et(r,0,8)):(n=p.precision,r=p.rounding),!e.isFinite())u=hp(e);else{for(u=un(e),i=u.indexOf("."),h?(o=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):o=t,i>=0&&(u=u.replace(".",""),d=new p(1),d.e=u.length-i,d.d=Ui(un(d),10,o),d.e=d.d.length),f=Ui(u,10,o),a=c=f.length;f[--c]==0;)f.pop();if(!f[0])u=h?"0p+0":"0";else{if(i<0?a--:(e=new p(e),e.d=f,e.e=a,e=Le(e,d,n,r,0,o),f=e.d,a=e.e,l=lp),i=f[n],s=o/2,l=l||f[n+1]!==void 0,l=r<4?(i!==void 0||l)&&(r===0||r===(e.s<0?3:2)):i>s||i===s&&(r===4||l||r===6&&f[n-1]&1||r===(e.s<0?8:7)),f.length=n,l)for(;++f[--n]>o-1;)f[n]=0,n||(++a,f.unshift(1));for(c=f.length;!f[c-1];--c);for(i=0,u="";i<c;i++)u+=oc.charAt(f[i]);if(h){if(c>1)if(t==16||t==8){for(i=t==16?4:3,--c;c%i;c++)u+="0";for(f=Ui(u,o,t),c=f.length;!f[c-1];--c);for(i=1,u="1.";i<c;i++)u+=oc.charAt(f[i])}else u=u.charAt(0)+"."+u.slice(1);u=u+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)u="0"+u;u="0."+u}else if(++a>c)for(a-=c;a--;)u+="0";else a<c&&(u=u.slice(0,a)+"."+u.slice(a))}u=(t==16?"0x":t==2?"0b":t==8?"0o":"")+u}return e.s<0?"-"+u:u}function rp(e,t){if(e.length>t)return e.length=t,!0}function zw(e){return new this(e).abs()}function Zw(e){return new this(e).acos()}function Yw(e){return new this(e).acosh()}function qw(e,t){return new this(e).plus(t)}function Jw(e){return new this(e).asin()}function Xw(e){return new this(e).asinh()}function Qw(e){return new this(e).atan()}function eT(e){return new this(e).atanh()}function tT(e,t){e=new this(e),t=new this(t);var n,r=this.precision,o=this.rounding,a=r+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=Wt(this,a,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?Wt(this,r,o):new this(0),n.s=e.s):!e.d||t.isZero()?(n=Wt(this,a,1).times(.5),n.s=e.s):t.s<0?(this.precision=a,this.rounding=1,n=this.atan(Le(e,t,a,1)),t=Wt(this,a,1),this.precision=r,this.rounding=o,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(Le(e,t,a,1)),n}function nT(e){return new this(e).cbrt()}function rT(e){return ee(e=new this(e),e.e+1,2)}function oT(e,t,n){return new this(e).clamp(t,n)}function aT(e){if(!e||typeof e!="object")throw Error(Hi+"Object expected");var t,n,r,o=e.defaults===!0,a=["precision",1,qn,"rounding",0,8,"toExpNeg",-mo,0,"toExpPos",0,mo,"maxE",0,mo,"minE",-mo,0,"modulo",0,9];for(t=0;t<a.length;t+=3)if(n=a[t],o&&(this[n]=ac[n]),(r=e[n])!==void 0)if(mt(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(Yn+n+": "+r);if(n="crypto",o&&(this[n]=ac[n]),(r=e[n])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(up);else this[n]=!1;else throw Error(Yn+n+": "+r);return this}function iT(e){return new this(e).cos()}function sT(e){return new this(e).cosh()}function yp(e){var t,n,r;function o(a){var i,s,c,l=this;if(!(l instanceof o))return new o(a);if(l.constructor=o,op(a)){l.s=a.s,de?!a.d||a.e>o.maxE?(l.e=NaN,l.d=null):a.e<o.minE?(l.e=0,l.d=[0]):(l.e=a.e,l.d=a.d.slice()):(l.e=a.e,l.d=a.d?a.d.slice():a.d);return}if(c=typeof a,c==="number"){if(a===0){l.s=1/a<0?-1:1,l.e=0,l.d=[0];return}if(a<0?(a=-a,l.s=-1):l.s=1,a===~~a&&a<1e7){for(i=0,s=a;s>=10;s/=10)i++;de?i>o.maxE?(l.e=NaN,l.d=null):i<o.minE?(l.e=0,l.d=[0]):(l.e=i,l.d=[a]):(l.e=i,l.d=[a]);return}else if(a*0!==0){a||(l.s=NaN),l.e=NaN,l.d=null;return}return lc(l,a.toString())}else if(c!=="string")throw Error(Yn+a);return(s=a.charCodeAt(0))===45?(a=a.slice(1),l.s=-1):(s===43&&(a=a.slice(1)),l.s=1),fp.test(a)?lc(l,a):jw(l,a)}if(o.prototype=N,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=aT,o.clone=yp,o.isDecimal=op,o.abs=zw,o.acos=Zw,o.acosh=Yw,o.add=qw,o.asin=Jw,o.asinh=Xw,o.atan=Qw,o.atanh=eT,o.atan2=tT,o.cbrt=nT,o.ceil=rT,o.clamp=oT,o.cos=iT,o.cosh=sT,o.div=lT,o.exp=cT,o.floor=uT,o.hypot=dT,o.ln=fT,o.log=pT,o.log10=gT,o.log2=mT,o.max=hT,o.min=bT,o.mod=yT,o.mul=vT,o.pow=xT,o.random=ST,o.round=wT,o.sign=TT,o.sin=CT,o.sinh=ET,o.sqrt=kT,o.sub=AT,o.sum=PT,o.tan=IT,o.tanh=_T,o.trunc=MT,e===void 0&&(e={}),e&&e.defaults!==!0)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return o.config(e),o}function lT(e,t){return new this(e).div(t)}function cT(e){return new this(e).exp()}function uT(e){return ee(e=new this(e),e.e+1,3)}function dT(){var e,t,n=new this(0);for(de=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return de=!0,new this(1/0);n=t}return de=!0,n.sqrt()}function op(e){return e instanceof da||e&&e.toStringTag===dp||!1}function fT(e){return new this(e).ln()}function pT(e,t){return new this(e).log(t)}function mT(e){return new this(e).log(2)}function gT(e){return new this(e).log(10)}function hT(){return gp(this,arguments,"lt")}function bT(){return gp(this,arguments,"gt")}function yT(e,t){return new this(e).mod(t)}function vT(e,t){return new this(e).mul(t)}function xT(e,t){return new this(e).pow(t)}function ST(e){var t,n,r,o,a=0,i=new this(1),s=[];if(e===void 0?e=this.precision:Et(e,1,qn),r=Math.ceil(e/le),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));a<r;)o=t[a],o>=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:s[a++]=o%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);a<r;)o=t[a]+(t[a+1]<<8)+(t[a+2]<<16)+((t[a+3]&127)<<24),o>=214e7?crypto.randomBytes(4).copy(t,a):(s.push(o%1e7),a+=4);a=r/4}else throw Error(up);else for(;a<r;)s[a++]=Math.random()*1e7|0;for(r=s[--a],e%=le,r&&e&&(o=et(10,le-e),s[a]=(r/o|0)*o);s[a]===0;a--)s.pop();if(a<0)n=0,s=[0];else{for(n=-1;s[0]===0;n-=le)s.shift();for(r=1,o=s[0];o>=10;o/=10)r++;r<le&&(n-=le-r)}return i.e=n,i.d=s,i}function wT(e){return ee(e=new this(e),e.e+1,this.rounding)}function TT(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function CT(e){return new this(e).sin()}function ET(e){return new this(e).sinh()}function kT(e){return new this(e).sqrt()}function AT(e,t){return new this(e).sub(t)}function PT(){var e=0,t=arguments,n=new this(t[e]);for(de=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return de=!0,ee(n,this.precision,this.rounding)}function IT(e){return new this(e).tan()}function _T(e){return new this(e).tanh()}function MT(e){return ee(e=new this(e),e.e+1,1)}N[Symbol.for("nodejs.util.inspect.custom")]=N.toString;N[Symbol.toStringTag]="Decimal";var da=N.constructor=yp(ac);Fi=new da(Fi);$i=new da($i);var RT=da;});var Sp=Oe(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});var{Decimal:NT,objectEnumValues:ho,makeStrictEnum:OT,Public:LT,getRuntime:Mt}=xp(),De={};se.Prisma=De;se.$Enums={};De.prismaVersion={client:"5.12.1",engine:"473ed3124229e22d881cb7addf559799debae1ab"};De.PrismaClientKnownRequestError=()=>{let e=Mt().prettyName;throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
3
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.PrismaClientUnknownRequestError=()=>{let e=Mt().prettyName;throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
4
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.PrismaClientRustPanicError=()=>{let e=Mt().prettyName;throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
5
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.PrismaClientInitializationError=()=>{let e=Mt().prettyName;throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
6
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.PrismaClientValidationError=()=>{let e=Mt().prettyName;throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
7
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.NotFoundError=()=>{let e=Mt().prettyName;throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
8
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.Decimal=NT;De.sql=()=>{let e=Mt().prettyName;throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
9
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.empty=()=>{let e=Mt().prettyName;throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
10
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.join=()=>{let e=Mt().prettyName;throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
11
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.raw=()=>{let e=Mt().prettyName;throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
12
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.validator=LT.validator;De.getExtensionContext=()=>{let e=Mt().prettyName;throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
13
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.defineExtension=()=>{let e=Mt().prettyName;throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${e}).
|
|
14
|
-
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`)};De.DbNull=ho.instances.DbNull;De.JsonNull=ho.instances.JsonNull;De.AnyNull=ho.instances.AnyNull;De.NullTypes={DbNull:ho.classes.DbNull,JsonNull:ho.classes.JsonNull,AnyNull:ho.classes.AnyNull};se.Prisma.TransactionIsolationLevel=OT({ReadUncommitted:"ReadUncommitted",ReadCommitted:"ReadCommitted",RepeatableRead:"RepeatableRead",Serializable:"Serializable"});se.Prisma.AccountScalarFieldEnum={id:"id",userId:"userId",type:"type",provider:"provider",providerAccountId:"providerAccountId",refresh_token:"refresh_token",access_token:"access_token",expires_at:"expires_at",token_type:"token_type",scope:"scope",id_token:"id_token",session_state:"session_state",oauth_token_secret:"oauth_token_secret",oauth_token:"oauth_token",refresh_token_expires_in:"refresh_token_expires_in"};se.Prisma.SessionScalarFieldEnum={id:"id",sessionToken:"sessionToken",userId:"userId",expires:"expires"};se.Prisma.UserScalarFieldEnum={id:"id",createdAt:"createdAt",updatedAt:"updatedAt",lastActivityAt:"lastActivityAt",name:"name",email:"email",emailVerified:"emailVerified",defaultWorkspace:"defaultWorkspace",image:"image",company:"company",onboardingCategories:"onboardingCategories",referral:"referral",graphNavigation:"graphNavigation",preferredAppAppearance:"preferredAppAppearance",displayedInAppNotifications:"displayedInAppNotifications",notificationAgentUsageSummary:"notificationAgentUsageSummary",notificationDomainConfigurationUpdates:"notificationDomainConfigurationUpdates",notificationAgentUsageLimit:"notificationAgentUsageLimit",notificationSubscribed:"notificationSubscribed"};se.Prisma.ApiTokenScalarFieldEnum={id:"id",createdAt:"createdAt",token:"token",name:"name",ownerId:"ownerId"};se.Prisma.WorkspaceScalarFieldEnum={id:"id",createdAt:"createdAt",updatedAt:"updatedAt",name:"name",icon:"icon",slug:"slug",plan:"plan",stripeId:"stripeId",chatsLimitFirstEmailSentAt:"chatsLimitFirstEmailSentAt",storageLimitFirstEmailSentAt:"storageLimitFirstEmailSentAt",chatsLimitSecondEmailSentAt:"chatsLimitSecondEmailSentAt",storageLimitSecondEmailSentAt:"storageLimitSecondEmailSentAt",isQuarantined:"isQuarantined",isSuspended:"isSuspended",isPastDue:"isPastDue",isVerified:"isVerified",chatUsage:"chatUsage",billingCycleStart:"billingCycleStart",paymentFailedAt:"paymentFailedAt",stripeConnectId:"stripeConnectId",redeemedCoupons:"redeemedCoupons"};se.Prisma.MemberInWorkspaceScalarFieldEnum={createdAt:"createdAt",updatedAt:"updatedAt",userId:"userId",workspaceId:"workspaceId",role:"role"};se.Prisma.WorkspaceInvitationScalarFieldEnum={id:"id",createdAt:"createdAt",updatedAt:"updatedAt",email:"email",workspaceId:"workspaceId",type:"type"};se.Prisma.CustomDomainScalarFieldEnum={name:"name",createdAt:"createdAt",workspaceId:"workspaceId"};se.Prisma.CredentialsScalarFieldEnum={id:"id",createdAt:"createdAt",workspaceId:"workspaceId",data:"data",name:"name",type:"type",iv:"iv"};se.Prisma.VerificationTokenScalarFieldEnum={identifier:"identifier",token:"token",expires:"expires"};se.Prisma.AgentScalarFieldEnum={id:"id",version:"version",createdAt:"createdAt",updatedAt:"updatedAt",icon:"icon",name:"name",groups:"groups",events:"events",variables:"variables",edges:"edges",theme:"theme",selectedThemeTemplateId:"selectedThemeTemplateId",settings:"settings",publicId:"publicId",customDomain:"customDomain",workspaceId:"workspaceId",resultsTablePreferences:"resultsTablePreferences",isPublished:"isPublished",isArchived:"isArchived",isClosed:"isClosed",whatsAppCredentialsId:"whatsAppCredentialsId",riskLevel:"riskLevel",domainId:"domainId",url:"url",description:"description"};se.Prisma.PublicAgentScalarFieldEnum={id:"id",version:"version",name:"name",createdAt:"createdAt",updatedAt:"updatedAt",agentId:"agentId",domainId:"domainId",publicId:"publicId",workspaceId:"workspaceId",domain:"domain",url:"url",groups:"groups",events:"events",variables:"variables",edges:"edges",theme:"theme",settings:"settings"};se.Prisma.TagScalarFieldEnum={id:"id",createdAt:"createdAt",updatedAt:"updatedAt",name:"name",color:"color",workspaceId:"workspaceId"};se.Prisma.AgentTagScalarFieldEnum={agentId:"agentId",tagId:"tagId"};se.Prisma.InvitationScalarFieldEnum={createdAt:"createdAt",updatedAt:"updatedAt",email:"email",agentId:"agentId",type:"type"};se.Prisma.CollaboratorsOnAgentsScalarFieldEnum={createdAt:"createdAt",updatedAt:"updatedAt",userId:"userId",agentId:"agentId",type:"type"};se.Prisma.ResultScalarFieldEnum={id:"id",createdAt:"createdAt",agentId:"agentId",variables:"variables",isCompleted:"isCompleted",hasStarted:"hasStarted",isArchived:"isArchived",lastChatSessionId:"lastChatSessionId"};se.Prisma.SetVariableHistoryItemScalarFieldEnum={resultId:"resultId",index:"index",variableId:"variableId",blockId:"blockId",value:"value"};se.Prisma.VisitedEdgeScalarFieldEnum={resultId:"resultId",edgeId:"edgeId",index:"index"};se.Prisma.LogScalarFieldEnum={id:"id",createdAt:"createdAt",resultId:"resultId",status:"status",description:"description",details:"details"};se.Prisma.AnswerScalarFieldEnum={createdAt:"createdAt",resultId:"resultId",blockId:"blockId",groupId:"groupId",variableId:"variableId",content:"content"};se.Prisma.AnswerV2ScalarFieldEnum={id:"id",createdAt:"createdAt",resultId:"resultId",blockId:"blockId",content:"content",attachedFileUrls:"attachedFileUrls"};se.Prisma.CouponScalarFieldEnum={userPropertiesToUpdate:"userPropertiesToUpdate",code:"code",dateRedeemed:"dateRedeemed"};se.Prisma.WebhookScalarFieldEnum={id:"id",createdAt:"createdAt",updatedAt:"updatedAt",url:"url",method:"method",queryParams:"queryParams",headers:"headers",body:"body",agentId:"agentId"};se.Prisma.ClaimableCustomPlanScalarFieldEnum={id:"id",createdAt:"createdAt",claimedAt:"claimedAt",name:"name",description:"description",price:"price",currency:"currency",workspaceId:"workspaceId",chatsLimit:"chatsLimit",storageLimit:"storageLimit",seatsLimit:"seatsLimit",isYearly:"isYearly",companyName:"companyName",vatType:"vatType",vatValue:"vatValue"};se.Prisma.ChatSessionScalarFieldEnum={id:"id",createdAt:"createdAt",updatedAt:"updatedAt",state:"state",isReplying:"isReplying"};se.Prisma.ThemeTemplateScalarFieldEnum={id:"id",createdAt:"createdAt",updatedAt:"updatedAt",name:"name",theme:"theme",workspaceId:"workspaceId"};se.Prisma.BannedIpScalarFieldEnum={id:"id",createdAt:"createdAt",ip:"ip",responsibleAgentId:"responsibleAgentId",userId:"userId"};se.Prisma.DomainScalarFieldEnum={id:"id",slug:"slug",verified:"verified",placeholder:"placeholder",expiredUrl:"expiredUrl",notFoundUrl:"notFoundUrl",primary:"primary",archived:"archived",lastChecked:"lastChecked",logo:"logo",workspaceId:"workspaceId",createdAt:"createdAt",updatedAt:"updatedAt"};se.Prisma.RegisteredDomainScalarFieldEnum={id:"id",slug:"slug",createdAt:"createdAt",updatedAt:"updatedAt",expiresAt:"expiresAt",workspaceId:"workspaceId",domainId:"domainId"};se.Prisma.SortOrder={asc:"asc",desc:"desc"};se.Prisma.JsonNullValueInput={JsonNull:De.JsonNull};se.Prisma.NullableJsonNullValueInput={DbNull:De.DbNull,JsonNull:De.JsonNull};se.Prisma.QueryMode={default:"default",insensitive:"insensitive"};se.Prisma.NullsOrder={first:"first",last:"last"};se.Prisma.JsonNullValueFilter={DbNull:De.DbNull,JsonNull:De.JsonNull,AnyNull:De.AnyNull};se.GraphNavigation=se.$Enums.GraphNavigation={MOUSE:"MOUSE",TRACKPAD:"TRACKPAD"};se.Plan=se.$Enums.Plan={HOBBY:"HOBBY",PRO:"PRO",BUSINESS:"BUSINESS",ADVANCED:"ADVANCED",ENTERPRISE:"ENTERPRISE",CUSTOM_APPSUMO_TIER1:"CUSTOM_APPSUMO_TIER1",CUSTOM_APPSUMO_TIER2:"CUSTOM_APPSUMO_TIER2",CUSTOM_APPSUMO_TIER3:"CUSTOM_APPSUMO_TIER3",CUSTOM_APPSUMO_TIER4:"CUSTOM_APPSUMO_TIER4",CUSTOM_APPSUMO_TIER5:"CUSTOM_APPSUMO_TIER5"};se.WorkspaceRole=se.$Enums.WorkspaceRole={ADMIN:"ADMIN",MEMBER:"MEMBER",GUEST:"GUEST"};se.CollaborationType=se.$Enums.CollaborationType={READ:"READ",WRITE:"WRITE",FULL_ACCESS:"FULL_ACCESS"};se.Prisma.ModelName={Account:"Account",Session:"Session",User:"User",ApiToken:"ApiToken",Workspace:"Workspace",MemberInWorkspace:"MemberInWorkspace",WorkspaceInvitation:"WorkspaceInvitation",CustomDomain:"CustomDomain",Credentials:"Credentials",VerificationToken:"VerificationToken",Agent:"Agent",PublicAgent:"PublicAgent",Tag:"Tag",AgentTag:"AgentTag",Invitation:"Invitation",CollaboratorsOnAgents:"CollaboratorsOnAgents",Result:"Result",SetVariableHistoryItem:"SetVariableHistoryItem",VisitedEdge:"VisitedEdge",Log:"Log",Answer:"Answer",AnswerV2:"AnswerV2",Coupon:"Coupon",Webhook:"Webhook",ClaimableCustomPlan:"ClaimableCustomPlan",ChatSession:"ChatSession",ThemeTemplate:"ThemeTemplate",BannedIp:"BannedIp",Domain:"Domain",RegisteredDomain:"RegisteredDomain"};var pc=class{constructor(){return new Proxy(this,{get(t,n){let r,o=Mt();throw o.isEdge?r=`PrismaClient is not configured to run in ${o.prettyName}. In order to run Prisma Client on edge runtime, either:
|
|
15
|
-
- Use Prisma Accelerate: https://pris.ly/d/accelerate
|
|
16
|
-
- Use Driver Adapters: https://pris.ly/d/driver-adapters
|
|
17
|
-
`:r="PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `"+o.prettyName+"`).",r+=`
|
|
18
|
-
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`,new Error(r)}})}};se.PrismaClient=pc;Object.assign(se,De)});var Tp=Oe((iR,wp)=>{"use strict";var DT=Sp();wp.exports=DT});var gy=Oe((WD,Fo)=>{"use strict";var jk=typeof Buffer<"u",dy=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,fy=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function py(e,t,n){n==null&&t!==null&&typeof t=="object"&&(n=t,t=void 0),jk&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let r=JSON.parse(e,t);if(r===null||typeof r!="object")return r;let o=n&&n.protoAction||"error",a=n&&n.constructorAction||"error";if(o==="ignore"&&a==="ignore")return r;if(o!=="ignore"&&a!=="ignore"){if(dy.test(e)===!1&&fy.test(e)===!1)return r}else if(o!=="ignore"&&a==="ignore"){if(dy.test(e)===!1)return r}else if(fy.test(e)===!1)return r;return my(r,{protoAction:o,constructorAction:a,safe:n&&n.safe})}function my(e,{protoAction:t="error",constructorAction:n="error",safe:r}={}){let o=[e];for(;o.length;){let a=o;o=[];for(let i of a){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(i,"__proto__")){if(r===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete i.__proto__}if(n!=="ignore"&&Object.prototype.hasOwnProperty.call(i,"constructor")&&Object.prototype.hasOwnProperty.call(i.constructor,"prototype")){if(r===!0)return null;if(n==="error")throw new SyntaxError("Object contains forbidden prototype property");delete i.constructor}for(let s in i){let c=i[s];c&&typeof c=="object"&&o.push(c)}}}return e}function iu(e,t,n){let r=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return py(e,t,n)}finally{Error.stackTraceLimit=r}}function Wk(e,t){let n=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return py(e,t,{safe:!0})}catch{return null}finally{Error.stackTraceLimit=n}}Fo.exports=iu;Fo.exports.default=iu;Fo.exports.parse=iu;Fo.exports.safeParse=Wk;Fo.exports.scan=my});var qy=Oe(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});function zs(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zs=function(t){return typeof t}:zs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zs(e)}var Zy="https://js.stripe.com/v3",XA=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Wy="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",QA=function(){for(var t=document.querySelectorAll('script[src^="'.concat(Zy,'"]')),n=0;n<t.length;n++){var r=t[n];if(XA.test(r.src))return r}return null},eP=function(t){var n=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(Zy).concat(n);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r},tP=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"1.54.1",startTime:n})},Ws=null,nP=function(t){return Ws!==null||(Ws=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&t&&console.warn(Wy),window.Stripe){n(window.Stripe);return}try{var o=QA();o&&t?console.warn(Wy):o||(o=eP(t)),o.addEventListener("load",function(){window.Stripe?n(window.Stripe):r(new Error("Stripe.js not available"))}),o.addEventListener("error",function(){r(new Error("Failed to load Stripe.js"))})}catch(a){r(a);return}})),Ws},rP=function(t,n,r){if(t===null)return null;var o=t.apply(void 0,n);return tP(o,r),o},zy=function(t){var n=`invalid load parameters; expected object of shape
|
|
1
|
+
// Release0 v1.1.4
|
|
2
|
+
var Fv=Object.create;var na=Object.defineProperty;var Uv=Object.getOwnPropertyDescriptor;var jv=Object.getOwnPropertyNames;var Vv=Object.getPrototypeOf,Hv=Object.prototype.hasOwnProperty;var zv=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gv=(e,t)=>{for(var n in t)na(e,n,{get:t[n],enumerable:!0})},Gu=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of jv(t))!Hv.call(e,o)&&o!==n&&na(e,o,{get:()=>t[o],enumerable:!(r=Uv(t,o))||r.enumerable});return e};var Fr=(e,t,n)=>(n=e!=null?Fv(Vv(e)):{},Gu(t||!e||!e.__esModule?na(n,"default",{value:e,enumerable:!0}):n,e)),ra=e=>Gu(na({},"__esModule",{value:!0}),e);var ef=Ne(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.toBig=ce.shrSL=ce.shrSH=ce.rotrSL=ce.rotrSH=ce.rotrBL=ce.rotrBH=ce.rotr32L=ce.rotr32H=ce.rotlSL=ce.rotlSH=ce.rotlBL=ce.rotlBH=ce.add5L=ce.add5H=ce.add4L=ce.add4H=ce.add3L=ce.add3H=void 0;ce.add=qd;ce.fromBig=_l;ce.split=Md;var ga=BigInt(2**32-1),Cl=BigInt(32);function _l(e,t=!1){return t?{h:Number(e&ga),l:Number(e>>Cl&ga)}:{h:Number(e>>Cl&ga)|0,l:Number(e&ga)|0}}function Md(e,t=!1){let n=e.length,r=new Uint32Array(n),o=new Uint32Array(n);for(let i=0;i<n;i++){let{h:a,l:s}=_l(e[i],t);[r[i],o[i]]=[a,s]}return[r,o]}var Dd=(e,t)=>BigInt(e>>>0)<<Cl|BigInt(t>>>0);ce.toBig=Dd;var Ld=(e,t,n)=>e>>>n;ce.shrSH=Ld;var Nd=(e,t,n)=>e<<32-n|t>>>n;ce.shrSL=Nd;var $d=(e,t,n)=>e>>>n|t<<32-n;ce.rotrSH=$d;var Bd=(e,t,n)=>e<<32-n|t>>>n;ce.rotrSL=Bd;var Fd=(e,t,n)=>e<<64-n|t>>>n-32;ce.rotrBH=Fd;var Ud=(e,t,n)=>e>>>n-32|t<<64-n;ce.rotrBL=Ud;var jd=(e,t)=>t;ce.rotr32H=jd;var Vd=(e,t)=>e;ce.rotr32L=Vd;var Hd=(e,t,n)=>e<<n|t>>>32-n;ce.rotlSH=Hd;var zd=(e,t,n)=>t<<n|e>>>32-n;ce.rotlSL=zd;var Gd=(e,t,n)=>t<<n-32|e>>>64-n;ce.rotlBH=Gd;var Wd=(e,t,n)=>e<<n-32|t>>>64-n;ce.rotlBL=Wd;function qd(e,t,n,r){let o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}var Kd=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);ce.add3L=Kd;var Yd=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;ce.add3H=Yd;var Xd=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);ce.add4L=Xd;var Zd=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0;ce.add4H=Zd;var Jd=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0);ce.add5L=Jd;var Qd=(e,t,n,r,o,i)=>t+n+r+o+i+(e/2**32|0)|0;ce.add5H=Qd;var p0={fromBig:_l,split:Md,toBig:Dd,shrSH:Ld,shrSL:Nd,rotrSH:$d,rotrSL:Bd,rotrBH:Fd,rotrBL:Ud,rotr32H:jd,rotr32L:Vd,rotlSH:Hd,rotlSL:zd,rotlBH:Gd,rotlBL:Wd,add:qd,add3L:Kd,add3H:Yd,add4L:Xd,add4H:Zd,add5H:Qd,add5L:Jd};ce.default=p0});var tf=Ne(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.crypto=void 0;ha.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var uf=Ne(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.wrapXOFConstructorWithOpts=ie.wrapConstructorWithOpts=ie.wrapConstructor=ie.Hash=ie.nextTick=ie.swap32IfBE=ie.byteSwapIfBE=ie.swap8IfBE=ie.isLE=void 0;ie.isBytes=rf;ie.anumber=kl;ie.abytes=Yr;ie.ahash=m0;ie.aexists=g0;ie.aoutput=h0;ie.u8=b0;ie.u32=y0;ie.clean=x0;ie.createView=v0;ie.rotr=w0;ie.rotl=S0;ie.byteSwap=Pl;ie.byteSwap32=of;ie.bytesToHex=C0;ie.hexToBytes=_0;ie.asyncLoop=E0;ie.utf8ToBytes=Il;ie.bytesToUtf8=P0;ie.toBytes=ba;ie.kdfInputToBytes=I0;ie.concatBytes=A0;ie.checkOpts=O0;ie.createHasher=sf;ie.createOptHasher=lf;ie.createXOFer=cf;ie.randomBytes=R0;var Kr=tf();function rf(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function kl(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Yr(e,...t){if(!rf(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function m0(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");kl(e.outputLen),kl(e.blockLen)}function g0(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function h0(e,t){Yr(e);let n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function b0(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function y0(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function x0(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function v0(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function w0(e,t){return e<<32-t|e>>>t}function S0(e,t){return e<<t|e>>>32-t>>>0}ie.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Pl(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}ie.swap8IfBE=ie.isLE?e=>e:e=>Pl(e);ie.byteSwapIfBE=ie.swap8IfBE;function of(e){for(let t=0;t<e.length;t++)e[t]=Pl(e[t]);return e}ie.swap32IfBE=ie.isLE?e=>e:of;var af=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",T0=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function C0(e){if(Yr(e),af)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=T0[e[n]];return t}var bn={_0:48,_9:57,A:65,F:70,a:97,f:102};function nf(e){if(e>=bn._0&&e<=bn._9)return e-bn._0;if(e>=bn.A&&e<=bn.F)return e-(bn.A-10);if(e>=bn.a&&e<=bn.f)return e-(bn.a-10)}function _0(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(af)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let o=0,i=0;o<n;o++,i+=2){let a=nf(e.charCodeAt(i)),s=nf(e.charCodeAt(i+1));if(a===void 0||s===void 0){let c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}r[o]=a*16+s}return r}var k0=async()=>{};ie.nextTick=k0;async function E0(e,t,n){let r=Date.now();for(let o=0;o<e;o++){n(o);let i=Date.now()-r;i>=0&&i<t||(await(0,ie.nextTick)(),r+=i)}}function Il(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function P0(e){return new TextDecoder().decode(e)}function ba(e){return typeof e=="string"&&(e=Il(e)),Yr(e),e}function I0(e){return typeof e=="string"&&(e=Il(e)),Yr(e),e}function A0(...e){let t=0;for(let r=0;r<e.length;r++){let o=e[r];Yr(o),t+=o.length}let n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){let i=e[r];n.set(i,o),o+=i.length}return n}function O0(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}var El=class{};ie.Hash=El;function sf(e){let t=r=>e().update(ba(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function lf(e){let t=(r,o)=>e(o).update(ba(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}function cf(e){let t=(r,o)=>e(o).update(ba(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}ie.wrapConstructor=sf;ie.wrapConstructorWithOpts=lf;ie.wrapXOFConstructorWithOpts=cf;function R0(e=32){if(Kr.crypto&&typeof Kr.crypto.getRandomValues=="function")return Kr.crypto.getRandomValues(new Uint8Array(e));if(Kr.crypto&&typeof Kr.crypto.randomBytes=="function")return Uint8Array.from(Kr.crypto.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}});var xf=Ne(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.shake256=Le.shake128=Le.keccak_512=Le.keccak_384=Le.keccak_256=Le.keccak_224=Le.sha3_512=Le.sha3_384=Le.sha3_256=Le.sha3_224=Le.Keccak=void 0;Le.keccakP=bf;var zo=ef(),at=uf(),M0=BigInt(0),Ho=BigInt(1),D0=BigInt(2),L0=BigInt(7),N0=BigInt(256),$0=BigInt(113),pf=[],mf=[],gf=[];for(let e=0,t=Ho,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],pf.push(2*(5*r+n)),mf.push((e+1)*(e+2)/2%64);let o=M0;for(let i=0;i<7;i++)t=(t<<Ho^(t>>L0)*$0)%N0,t&D0&&(o^=Ho<<(Ho<<BigInt(i))-Ho);gf.push(o)}var hf=(0,zo.split)(gf,!0),B0=hf[0],F0=hf[1],df=(e,t,n)=>n>32?(0,zo.rotlBH)(e,t,n):(0,zo.rotlSH)(e,t,n),ff=(e,t,n)=>n>32?(0,zo.rotlBL)(e,t,n):(0,zo.rotlSL)(e,t,n);function bf(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let a=0;a<10;a++)n[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){let s=(a+8)%10,c=(a+2)%10,l=n[c],u=n[c+1],f=df(l,u,1)^n[s],d=ff(l,u,1)^n[s+1];for(let p=0;p<50;p+=10)e[a+p]^=f,e[a+p+1]^=d}let o=e[2],i=e[3];for(let a=0;a<24;a++){let s=mf[a],c=df(o,i,s),l=ff(o,i,s),u=pf[a];o=e[u],i=e[u+1],e[u]=c,e[u+1]=l}for(let a=0;a<50;a+=10){for(let s=0;s<10;s++)n[s]=e[a+s];for(let s=0;s<10;s++)e[a+s]^=~n[(s+2)%10]&n[(s+4)%10]}e[0]^=B0[r],e[1]^=F0[r]}(0,at.clean)(n)}var Go=class e extends at.Hash{constructor(t,n,r,o=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=i,(0,at.anumber)(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,at.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,at.swap32IfBE)(this.state32),bf(this.state32,this.rounds),(0,at.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(t){(0,at.aexists)(this),t=(0,at.toBytes)(t),(0,at.abytes)(t);let{blockLen:n,state:r}=this,o=t.length;for(let i=0;i<o;){let a=Math.min(n-this.pos,o-i);for(let s=0;s<a;s++)r[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,n&128&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){(0,at.aexists)(this,!1),(0,at.abytes)(t),this.finish();let n=this.state,{blockLen:r}=this;for(let o=0,i=t.length;o<i;){this.posOut>=r&&this.keccak();let a=Math.min(r-this.posOut,i-o);t.set(n.subarray(this.posOut,this.posOut+a),o),this.posOut+=a,o+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,at.anumber)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,at.aoutput)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,at.clean)(this.state)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:o,rounds:i,enableXOF:a}=this;return t||(t=new e(n,r,o,a,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=o,t.enableXOF=a,t.destroyed=this.destroyed,t}};Le.Keccak=Go;var Ln=(e,t,n)=>(0,at.createHasher)(()=>new Go(t,e,n));Le.sha3_224=Ln(6,144,224/8);Le.sha3_256=Ln(6,136,256/8);Le.sha3_384=Ln(6,104,384/8);Le.sha3_512=Ln(6,72,512/8);Le.keccak_224=Ln(1,144,224/8);Le.keccak_256=Ln(1,136,256/8);Le.keccak_384=Ln(1,104,384/8);Le.keccak_512=Ln(1,72,512/8);var yf=(e,t,n)=>(0,at.createXOFer)((r={})=>new Go(t,e,r.dkLen===void 0?n:r.dkLen,!0));Le.shake128=yf(31,168,128/8);Le.shake256=yf(31,136,256/8)});var Ef=Ne((J1,Nn)=>{"use strict";var{sha3_512:U0}=xf(),wf=24,Wo=32,Al=(e=4,t=Math.random)=>{let n="";for(;n.length<e;)n=n+Math.floor(t()*36).toString(36);return n};function Sf(e){let t=8n,n=0n;for(let r of e.values()){let o=BigInt(r);n=(n<<t)+o}return n}var Tf=(e="")=>Sf(U0(e)).toString(36).slice(1),vf=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),j0=e=>vf[Math.floor(e()*vf.length)],Cf=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let n=Object.keys(e).toString(),r=n.length?n+Al(Wo,t):Al(Wo,t);return Tf(r).substring(0,Wo)},_f=e=>()=>e++,V0=476782367,kf=({random:e=Math.random,counter:t=_f(Math.floor(e()*V0)),length:n=wf,fingerprint:r=Cf({random:e})}={})=>function(){let i=j0(e),a=Date.now().toString(36),s=t().toString(36),c=Al(n,e),l=`${a+c+s+r}`;return`${i+Tf(l).substring(1,n)}`},H0=kf(),z0=(e,{minLength:t=2,maxLength:n=Wo}={})=>{let r=e.length,o=/^[0-9a-z]+$/;try{if(typeof e=="string"&&r>=t&&r<=n&&o.test(e))return!0}finally{}return!1};Nn.exports.getConstants=()=>({defaultLength:wf,bigLength:Wo});Nn.exports.init=kf;Nn.exports.createId=H0;Nn.exports.bufToBigInt=Sf;Nn.exports.createCounter=_f;Nn.exports.createFingerprint=Cf;Nn.exports.isCuid=z0});var Pf=Ne((Q1,qo)=>{"use strict";var{createId:G0,init:W0,getConstants:q0,isCuid:K0}=Ef();qo.exports.createId=G0;qo.exports.init=W0;qo.exports.getConstants=q0;qo.exports.isCuid=K0});var Af=Ne((eA,If)=>{"use strict";var Xr=1e3,Zr=Xr*60,Jr=Zr*60,rr=Jr*24,Y0=rr*7,X0=rr*365.25;If.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Z0(e);if(n==="number"&&isFinite(e))return t.long?Q0(e):J0(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Z0(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*X0;case"weeks":case"week":case"w":return n*Y0;case"days":case"day":case"d":return n*rr;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Jr;case"minutes":case"minute":case"mins":case"min":case"m":return n*Zr;case"seconds":case"second":case"secs":case"sec":case"s":return n*Xr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function J0(e){var t=Math.abs(e);return t>=rr?Math.round(e/rr)+"d":t>=Jr?Math.round(e/Jr)+"h":t>=Zr?Math.round(e/Zr)+"m":t>=Xr?Math.round(e/Xr)+"s":e+"ms"}function Q0(e){var t=Math.abs(e);return t>=rr?ya(e,t,rr,"day"):t>=Jr?ya(e,t,Jr,"hour"):t>=Zr?ya(e,t,Zr,"minute"):t>=Xr?ya(e,t,Xr,"second"):e+" ms"}function ya(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var vb=Ne((rD,wo)=>{"use strict";var ik=typeof Buffer<"u",hb=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,bb=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function yb(e,t,n){n==null&&t!==null&&typeof t=="object"&&(n=t,t=void 0),ik&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let r=JSON.parse(e,t);if(r===null||typeof r!="object")return r;let o=n&&n.protoAction||"error",i=n&&n.constructorAction||"error";if(o==="ignore"&&i==="ignore")return r;if(o!=="ignore"&&i!=="ignore"){if(hb.test(e)===!1&&bb.test(e)===!1)return r}else if(o!=="ignore"&&i==="ignore"){if(hb.test(e)===!1)return r}else if(bb.test(e)===!1)return r;return xb(r,{protoAction:o,constructorAction:i,safe:n&&n.safe})}function xb(e,{protoAction:t="error",constructorAction:n="error",safe:r}={}){let o=[e];for(;o.length;){let i=o;o=[];for(let a of i){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(a,"__proto__")){if(r===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete a.__proto__}if(n!=="ignore"&&Object.prototype.hasOwnProperty.call(a,"constructor")&&Object.prototype.hasOwnProperty.call(a.constructor,"prototype")){if(r===!0)return null;if(n==="error")throw new SyntaxError("Object contains forbidden prototype property");delete a.constructor}for(let s in a){let c=a[s];c&&typeof c=="object"&&o.push(c)}}}return e}function Tc(e,t,n){let r=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return yb(e,t,n)}finally{Error.stackTraceLimit=r}}function ak(e,t){let n=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return yb(e,t,{safe:!0})}catch{return null}finally{Error.stackTraceLimit=n}}wo.exports=Tc;wo.exports.default=Tc;wo.exports.parse=Tc;wo.exports.safeParse=ak;wo.exports.scan=xb});var ty=Ne(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});function ws(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ws=function(t){return typeof t}:ws=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ws(e)}var Qb="https://js.stripe.com/v3",fE=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Zb="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",pE=function(){for(var t=document.querySelectorAll('script[src^="'.concat(Qb,'"]')),n=0;n<t.length;n++){var r=t[n];if(fE.test(r.src))return r}return null},mE=function(t){var n=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(Qb).concat(n);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r},gE=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"1.54.1",startTime:n})},vs=null,hE=function(t){return vs!==null||(vs=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&t&&console.warn(Zb),window.Stripe){n(window.Stripe);return}try{var o=pE();o&&t?console.warn(Zb):o||(o=mE(t)),o.addEventListener("load",function(){window.Stripe?n(window.Stripe):r(new Error("Stripe.js not available"))}),o.addEventListener("error",function(){r(new Error("Failed to load Stripe.js"))})}catch(i){r(i);return}})),vs},bE=function(t,n,r){if(t===null)return null;var o=t.apply(void 0,n);return gE(o,r),o},Jb=function(t){var n=`invalid load parameters; expected object of shape
|
|
19
3
|
|
|
20
4
|
{advancedFraudSignals: boolean}
|
|
21
5
|
|
|
22
6
|
but received
|
|
23
7
|
|
|
24
8
|
`.concat(JSON.stringify(t),`
|
|
25
|
-
`);if(t===null||zs(t)!=="object")throw new Error(n);if(Object.keys(t).length===1&&typeof t.advancedFraudSignals=="boolean")return t;throw new Error(n)},Zs,hu=!1,Yy=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];hu=!0;var o=Date.now();return nP(Zs).then(function(a){return rP(a,n,o)})};Yy.setLoadParameters=function(e){if(hu&&Zs){var t=zy(e),n=Object.keys(t),r=n.reduce(function(o,a){var i;return o&&e[a]===((i=Zs)===null||i===void 0?void 0:i[a])},!0);if(r)return}if(hu)throw new Error("You cannot change load parameters after calling loadStripe");Zs=zy(e)};bu.loadStripe=Yy});var Xy=Oe((p6,Jy)=>{"use strict";Jy.exports=qy()});var ci={};$x(ci,{__addDisposableResource:()=>F0,__assign:()=>Js,__asyncDelegator:()=>M0,__asyncGenerator:()=>_0,__asyncValues:()=>R0,__await:()=>Ho,__awaiter:()=>C0,__classPrivateFieldGet:()=>D0,__classPrivateFieldIn:()=>U0,__classPrivateFieldSet:()=>B0,__createBinding:()=>Qs,__decorate:()=>b0,__disposeResources:()=>$0,__esDecorate:()=>v0,__exportStar:()=>k0,__extends:()=>g0,__generator:()=>E0,__importDefault:()=>L0,__importStar:()=>O0,__makeTemplateObject:()=>N0,__metadata:()=>T0,__param:()=>y0,__propKey:()=>S0,__read:()=>Tu,__rest:()=>h0,__rewriteRelativeImportExtension:()=>G0,__runInitializers:()=>x0,__setFunctionName:()=>w0,__spread:()=>A0,__spreadArray:()=>I0,__spreadArrays:()=>P0,__values:()=>Xs,default:()=>DP});function g0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Su(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function h0(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function b0(e,t,n,r){var o=arguments.length,a=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function y0(e,t){return function(n,r){t(n,r,e)}}function v0(e,t,n,r,o,a){function i(b){if(b!==void 0&&typeof b!="function")throw new TypeError("Function expected");return b}for(var s=r.kind,c=s==="getter"?"get":s==="setter"?"set":"value",l=!t&&e?r.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f,d=!1,p=n.length-1;p>=0;p--){var h={};for(var g in r)h[g]=g==="access"?{}:r[g];for(var g in r.access)h.access[g]=r.access[g];h.addInitializer=function(b){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(b||null))};var x=(0,n[p])(s==="accessor"?{get:u.get,set:u.set}:u[c],h);if(s==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(f=i(x.get))&&(u.get=f),(f=i(x.set))&&(u.set=f),(f=i(x.init))&&o.unshift(f)}else(f=i(x))&&(s==="field"?o.unshift(f):u[c]=f)}l&&Object.defineProperty(l,r.name,u),d=!0}function x0(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function S0(e){return typeof e=="symbol"?e:"".concat(e)}function w0(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function T0(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function C0(e,t,n,r){function o(a){return a instanceof n?a:new n(function(i){i(a)})}return new(n||(n=Promise))(function(a,i){function s(u){try{l(r.next(u))}catch(f){i(f)}}function c(u){try{l(r.throw(u))}catch(f){i(f)}}function l(u){u.done?a(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})}function E0(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,i=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(a=l[0]&2?o.return:l[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,l[1])).done)return a;switch(o=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],o=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function k0(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Qs(t,e,n)}function Xs(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Tu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,a=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function A0(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Tu(arguments[t]));return e}function P0(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}function I0(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function Ho(e){return this instanceof Ho?(this.v=e,this):new Ho(e)}function _0(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,a=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",i),o[Symbol.asyncIterator]=function(){return this},o;function i(p){return function(h){return Promise.resolve(h).then(p,f)}}function s(p,h){r[p]&&(o[p]=function(g){return new Promise(function(x,b){a.push([p,g,x,b])>1||c(p,g)})},h&&(o[p]=h(o[p])))}function c(p,h){try{l(r[p](h))}catch(g){d(a[0][3],g)}}function l(p){p.value instanceof Ho?Promise.resolve(p.value.v).then(u,f):d(a[0][2],p)}function u(p){c("next",p)}function f(p){c("throw",p)}function d(p,h){p(h),a.shift(),a.length&&c(a[0][0],a[0][1])}}function M0(e){var t,n;return t={},r("next"),r("throw",function(o){throw o}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(o,a){t[o]=e[o]?function(i){return(n=!n)?{value:Ho(e[o](i)),done:!1}:a?a(i):i}:a}}function R0(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Xs=="function"?Xs(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=e[a]&&function(i){return new Promise(function(s,c){i=e[a](i),o(s,c,i.done,i.value)})}}function o(a,i,s,c){Promise.resolve(c).then(function(l){a({value:l,done:s})},i)}}function N0(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function O0(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=wu(e),r=0;r<n.length;r++)n[r]!=="default"&&Qs(t,e,n[r]);return OP(t,e),t}function L0(e){return e&&e.__esModule?e:{default:e}}function D0(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function B0(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n}function U0(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function F0(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(a){return Promise.reject(a)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}function $0(e){function t(a){e.error=e.hasError?new LP(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var n,r=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(o,function(i){return t(i),o()})}else r|=1}catch(i){t(i)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}function G0(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,o,a,i){return r?t?".jsx":".js":o&&(!a||!i)?n:o+a+"."+i.toLowerCase()+"js"}):e}var Su,Js,Qs,OP,wu,LP,DP,ui=Fx(()=>{"use strict";Su=function(e,t){return Su=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Su(e,t)};Js=function(){return Js=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Js.apply(this,arguments)};Qs=Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};OP=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},wu=function(e){return wu=Object.getOwnPropertyNames||function(t){var n=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[n.length]=r);return n},wu(e)};LP=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};DP={__extends:g0,__assign:Js,__rest:h0,__decorate:b0,__param:y0,__esDecorate:v0,__runInitializers:x0,__propKey:S0,__setFunctionName:w0,__metadata:T0,__awaiter:C0,__generator:E0,__createBinding:Qs,__exportStar:k0,__values:Xs,__read:Tu,__spread:A0,__spreadArrays:P0,__spreadArray:I0,__await:Ho,__asyncGenerator:_0,__asyncDelegator:M0,__asyncValues:R0,__makeTemplateObject:N0,__importStar:O0,__importDefault:L0,__classPrivateFieldGet:D0,__classPrivateFieldSet:B0,__classPrivateFieldIn:U0,__addDisposableResource:F0,__disposeResources:$0,__rewriteRelativeImportExtension:G0}});var Ko=Oe(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.WebmBase=void 0;var Cu=class{constructor(t="Unknown",n=0){this.name=t,this.start=n}getType(){return"Unknown"}updateBySource(){}setSource(t){this.source=t,this.updateBySource()}updateByData(){}setData(t){this.data=t,this.updateByData()}getValue(){return this.data}setValue(t){this.setData(t)}};el.WebmBase=Cu});var nl=Oe(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.SectionType=void 0;var H0;(function(e){e.Container="Container",e.Uint="Uint",e.Int="Int",e.Float="Float",e.String="String",e.Date="Date",e.Binary="Binary"})(H0||(tl.SectionType=H0={}))});var Eu=Oe(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.sections=void 0;var y=nl();rl.sections={172351395:{name:"EBML",type:y.SectionType.Container},646:{name:"EBMLVersion",type:y.SectionType.Uint},759:{name:"EBMLReadVersion",type:y.SectionType.Uint},754:{name:"EBMLMaxIDLength",type:y.SectionType.Uint},755:{name:"EBMLMaxSizeLength",type:y.SectionType.Uint},642:{name:"DocType",type:y.SectionType.String},647:{name:"DocTypeVersion",type:y.SectionType.Uint},645:{name:"DocTypeReadVersion",type:y.SectionType.Uint},108:{name:"Void",type:y.SectionType.Binary},63:{name:"CRC-32",type:y.SectionType.Binary},190023271:{name:"SignatureSlot",type:y.SectionType.Container},16010:{name:"SignatureAlgo",type:y.SectionType.Uint},16026:{name:"SignatureHash",type:y.SectionType.Uint},16037:{name:"SignaturePublicKey",type:y.SectionType.Binary},16053:{name:"Signature",type:y.SectionType.Binary},15963:{name:"SignatureElements",type:y.SectionType.Container},15995:{name:"SignatureElementList",type:y.SectionType.Container},9522:{name:"SignedElement",type:y.SectionType.Binary},139690087:{name:"Segment",type:y.SectionType.Container},21863284:{name:"SeekHead",type:y.SectionType.Container},3515:{name:"Seek",type:y.SectionType.Container},5035:{name:"SeekID",type:y.SectionType.Binary},5036:{name:"SeekPosition",type:y.SectionType.Uint},88713574:{name:"Info",type:y.SectionType.Container},13220:{name:"SegmentUID",type:y.SectionType.Binary},13188:{name:"SegmentFilename",type:y.SectionType.String},1882403:{name:"PrevUID",type:y.SectionType.Binary},1868715:{name:"PrevFilename",type:y.SectionType.String},2013475:{name:"NextUID",type:y.SectionType.Binary},1999803:{name:"NextFilename",type:y.SectionType.String},1092:{name:"SegmentFamily",type:y.SectionType.Binary},10532:{name:"ChapterTranslate",type:y.SectionType.Container},10748:{name:"ChapterTranslateEditionUID",type:y.SectionType.Uint},10687:{name:"ChapterTranslateCodec",type:y.SectionType.Uint},10661:{name:"ChapterTranslateID",type:y.SectionType.Binary},710577:{name:"TimecodeScale",type:y.SectionType.Uint},1161:{name:"Duration",type:y.SectionType.Float},1121:{name:"DateUTC",type:y.SectionType.Date},15273:{name:"Title",type:y.SectionType.String},3456:{name:"MuxingApp",type:y.SectionType.String},5953:{name:"WritingApp",type:y.SectionType.String},103:{name:"Timecode",type:y.SectionType.Uint},6228:{name:"SilentTracks",type:y.SectionType.Container},6359:{name:"SilentTrackNumber",type:y.SectionType.Uint},39:{name:"Position",type:y.SectionType.Uint},43:{name:"PrevSize",type:y.SectionType.Uint},35:{name:"SimpleBlock",type:y.SectionType.Binary},32:{name:"BlockGroup",type:y.SectionType.Container},33:{name:"Block",type:y.SectionType.Binary},34:{name:"BlockVirtual",type:y.SectionType.Binary},13729:{name:"BlockAdditions",type:y.SectionType.Container},38:{name:"BlockMore",type:y.SectionType.Container},110:{name:"BlockAddID",type:y.SectionType.Uint},37:{name:"BlockAdditional",type:y.SectionType.Binary},27:{name:"BlockDuration",type:y.SectionType.Uint},122:{name:"ReferencePriority",type:y.SectionType.Uint},123:{name:"ReferenceBlock",type:y.SectionType.Int},125:{name:"ReferenceVirtual",type:y.SectionType.Int},36:{name:"CodecState",type:y.SectionType.Binary},13730:{name:"DiscardPadding",type:y.SectionType.Int},14:{name:"Slices",type:y.SectionType.Container},104:{name:"TimeSlice",type:y.SectionType.Container},76:{name:"LaceNumber",type:y.SectionType.Uint},77:{name:"FrameNumber",type:y.SectionType.Uint},75:{name:"BlockAdditionID",type:y.SectionType.Uint},78:{name:"Delay",type:y.SectionType.Uint},79:{name:"SliceDuration",type:y.SectionType.Uint},72:{name:"ReferenceFrame",type:y.SectionType.Container},73:{name:"ReferenceOffset",type:y.SectionType.Uint},74:{name:"ReferenceTimeCode",type:y.SectionType.Uint},47:{name:"EncryptedBlock",type:y.SectionType.Binary},106212971:{name:"Tracks",type:y.SectionType.Container},46:{name:"TrackEntry",type:y.SectionType.Container},87:{name:"TrackNumber",type:y.SectionType.Uint},13253:{name:"TrackUID",type:y.SectionType.Uint},3:{name:"TrackType",type:y.SectionType.Uint},57:{name:"FlagEnabled",type:y.SectionType.Uint},8:{name:"FlagDefault",type:y.SectionType.Uint},5546:{name:"FlagForced",type:y.SectionType.Uint},28:{name:"FlagLacing",type:y.SectionType.Uint},11751:{name:"MinCache",type:y.SectionType.Uint},11768:{name:"MaxCache",type:y.SectionType.Uint},254851:{name:"DefaultDuration",type:y.SectionType.Uint},216698:{name:"DefaultDecodedFieldDuration",type:y.SectionType.Uint},209231:{name:"TrackTimecodeScale",type:y.SectionType.Float},4991:{name:"TrackOffset",type:y.SectionType.Int},5614:{name:"MaxBlockAdditionID",type:y.SectionType.Uint},4974:{name:"Name",type:y.SectionType.String},177564:{name:"Language",type:y.SectionType.String},6:{name:"CodecID",type:y.SectionType.String},9122:{name:"CodecPrivate",type:y.SectionType.Binary},362120:{name:"CodecName",type:y.SectionType.String},13382:{name:"AttachmentLink",type:y.SectionType.Uint},1742487:{name:"CodecSettings",type:y.SectionType.String},1785920:{name:"CodecInfoURL",type:y.SectionType.String},438848:{name:"CodecDownloadURL",type:y.SectionType.String},42:{name:"CodecDecodeAll",type:y.SectionType.Uint},12203:{name:"TrackOverlay",type:y.SectionType.Uint},5802:{name:"CodecDelay",type:y.SectionType.Uint},5819:{name:"SeekPreRoll",type:y.SectionType.Uint},9764:{name:"TrackTranslate",type:y.SectionType.Container},9980:{name:"TrackTranslateEditionUID",type:y.SectionType.Uint},9919:{name:"TrackTranslateCodec",type:y.SectionType.Uint},9893:{name:"TrackTranslateTrackID",type:y.SectionType.Binary},96:{name:"Video",type:y.SectionType.Container},26:{name:"FlagInterlaced",type:y.SectionType.Uint},5048:{name:"StereoMode",type:y.SectionType.Uint},5056:{name:"AlphaMode",type:y.SectionType.Uint},5049:{name:"OldStereoMode",type:y.SectionType.Uint},48:{name:"PixelWidth",type:y.SectionType.Uint},58:{name:"PixelHeight",type:y.SectionType.Uint},5290:{name:"PixelCropBottom",type:y.SectionType.Uint},5307:{name:"PixelCropTop",type:y.SectionType.Uint},5324:{name:"PixelCropLeft",type:y.SectionType.Uint},5341:{name:"PixelCropRight",type:y.SectionType.Uint},5296:{name:"DisplayWidth",type:y.SectionType.Uint},5306:{name:"DisplayHeight",type:y.SectionType.Uint},5298:{name:"DisplayUnit",type:y.SectionType.Uint},5299:{name:"AspectRatioType",type:y.SectionType.Uint},963876:{name:"ColourSpace",type:y.SectionType.Binary},1029411:{name:"GammaValue",type:y.SectionType.Float},230371:{name:"FrameRate",type:y.SectionType.Float},97:{name:"Audio",type:y.SectionType.Container},53:{name:"SamplingFrequency",type:y.SectionType.Float},14517:{name:"OutputSamplingFrequency",type:y.SectionType.Float},31:{name:"Channels",type:y.SectionType.Uint},15739:{name:"ChannelPositions",type:y.SectionType.Binary},8804:{name:"BitDepth",type:y.SectionType.Uint},98:{name:"TrackOperation",type:y.SectionType.Container},99:{name:"TrackCombinePlanes",type:y.SectionType.Container},100:{name:"TrackPlane",type:y.SectionType.Container},101:{name:"TrackPlaneUID",type:y.SectionType.Uint},102:{name:"TrackPlaneType",type:y.SectionType.Uint},105:{name:"TrackJoinBlocks",type:y.SectionType.Container},109:{name:"TrackJoinUID",type:y.SectionType.Uint},64:{name:"TrickTrackUID",type:y.SectionType.Uint},65:{name:"TrickTrackSegmentUID",type:y.SectionType.Binary},70:{name:"TrickTrackFlag",type:y.SectionType.Uint},71:{name:"TrickMasterTrackUID",type:y.SectionType.Uint},68:{name:"TrickMasterTrackSegmentUID",type:y.SectionType.Binary},11648:{name:"ContentEncodings",type:y.SectionType.Container},8768:{name:"ContentEncoding",type:y.SectionType.Container},4145:{name:"ContentEncodingOrder",type:y.SectionType.Uint},4146:{name:"ContentEncodingScope",type:y.SectionType.Uint},4147:{name:"ContentEncodingType",type:y.SectionType.Uint},4148:{name:"ContentCompression",type:y.SectionType.Container},596:{name:"ContentCompAlgo",type:y.SectionType.Uint},597:{name:"ContentCompSettings",type:y.SectionType.Binary},4149:{name:"ContentEncryption",type:y.SectionType.Container},2017:{name:"ContentEncAlgo",type:y.SectionType.Uint},2018:{name:"ContentEncKeyID",type:y.SectionType.Binary},2019:{name:"ContentSignature",type:y.SectionType.Binary},2020:{name:"ContentSigKeyID",type:y.SectionType.Binary},2021:{name:"ContentSigAlgo",type:y.SectionType.Uint},2022:{name:"ContentSigHashAlgo",type:y.SectionType.Uint},206814059:{name:"Cues",type:y.SectionType.Container},59:{name:"CuePoint",type:y.SectionType.Container},51:{name:"CueTime",type:y.SectionType.Uint},55:{name:"CueTrackPositions",type:y.SectionType.Container},119:{name:"CueTrack",type:y.SectionType.Uint},113:{name:"CueClusterPosition",type:y.SectionType.Uint},112:{name:"CueRelativePosition",type:y.SectionType.Uint},50:{name:"CueDuration",type:y.SectionType.Uint},4984:{name:"CueBlockNumber",type:y.SectionType.Uint},106:{name:"CueCodecState",type:y.SectionType.Uint},91:{name:"CueReference",type:y.SectionType.Container},22:{name:"CueRefTime",type:y.SectionType.Uint},23:{name:"CueRefCluster",type:y.SectionType.Uint},4959:{name:"CueRefNumber",type:y.SectionType.Uint},107:{name:"CueRefCodecState",type:y.SectionType.Uint},155296873:{name:"Attachments",type:y.SectionType.Container},8615:{name:"AttachedFile",type:y.SectionType.Container},1662:{name:"FileDescription",type:y.SectionType.String},1646:{name:"FileName",type:y.SectionType.String},1632:{name:"FileMimeType",type:y.SectionType.String},1628:{name:"FileData",type:y.SectionType.Binary},1710:{name:"FileUID",type:y.SectionType.Uint},1653:{name:"FileReferral",type:y.SectionType.Binary},1633:{name:"FileUsedStartTime",type:y.SectionType.Uint},1634:{name:"FileUsedEndTime",type:y.SectionType.Uint},4433776:{name:"Chapters",type:y.SectionType.Container},1465:{name:"EditionEntry",type:y.SectionType.Container},1468:{name:"EditionUID",type:y.SectionType.Uint},1469:{name:"EditionFlagHidden",type:y.SectionType.Uint},1499:{name:"EditionFlagDefault",type:y.SectionType.Uint},1501:{name:"EditionFlagOrdered",type:y.SectionType.Uint},54:{name:"ChapterAtom",type:y.SectionType.Container},13252:{name:"ChapterUID",type:y.SectionType.Uint},5716:{name:"ChapterStringUID",type:y.SectionType.String},17:{name:"ChapterTimeStart",type:y.SectionType.Uint},18:{name:"ChapterTimeEnd",type:y.SectionType.Uint},24:{name:"ChapterFlagHidden",type:y.SectionType.Uint},1432:{name:"ChapterFlagEnabled",type:y.SectionType.Uint},11879:{name:"ChapterSegmentUID",type:y.SectionType.Binary},11964:{name:"ChapterSegmentEditionUID",type:y.SectionType.Uint},9155:{name:"ChapterPhysicalEquiv",type:y.SectionType.Uint},15:{name:"ChapterTrack",type:y.SectionType.Container},9:{name:"ChapterTrackNumber",type:y.SectionType.Uint},0:{name:"ChapterDisplay",type:y.SectionType.Container},5:{name:"ChapString",type:y.SectionType.String},892:{name:"ChapLanguage",type:y.SectionType.String},894:{name:"ChapCountry",type:y.SectionType.String},10564:{name:"ChapProcess",type:y.SectionType.Container},10581:{name:"ChapProcessCodecID",type:y.SectionType.Uint},1293:{name:"ChapProcessPrivate",type:y.SectionType.Binary},10513:{name:"ChapProcessCommand",type:y.SectionType.Container},10530:{name:"ChapProcessTime",type:y.SectionType.Uint},10547:{name:"ChapProcessData",type:y.SectionType.Binary},39109479:{name:"Tags",type:y.SectionType.Container},13171:{name:"Tag",type:y.SectionType.Container},9152:{name:"Targets",type:y.SectionType.Container},10442:{name:"TargetTypeValue",type:y.SectionType.Uint},9162:{name:"TargetType",type:y.SectionType.String},9157:{name:"TagTrackUID",type:y.SectionType.Uint},9161:{name:"TagEditionUID",type:y.SectionType.Uint},9156:{name:"TagChapterUID",type:y.SectionType.Uint},9158:{name:"TagAttachmentUID",type:y.SectionType.Uint},10184:{name:"SimpleTag",type:y.SectionType.Container},1443:{name:"TagName",type:y.SectionType.String},1146:{name:"TagLanguage",type:y.SectionType.String},1156:{name:"TagDefault",type:y.SectionType.Uint},1159:{name:"TagString",type:y.SectionType.String},1157:{name:"TagBinary",type:y.SectionType.Binary},5552:{name:"Colour",type:y.SectionType.Container},5553:{name:"MatrixCoefficients",type:y.SectionType.Uint},5554:{name:"BitsPerChannel",type:y.SectionType.Uint},5555:{name:"ChromaSubsamplingHorz",type:y.SectionType.Uint},5556:{name:"ChromaSubsamplingVert",type:y.SectionType.Uint},5557:{name:"CbSubsamplingHorz",type:y.SectionType.Uint},5558:{name:"CbSubsamplingVert",type:y.SectionType.Uint},5559:{name:"ChromaSitingHorz",type:y.SectionType.Uint},5560:{name:"ChromaSitingVert",type:y.SectionType.Uint},5561:{name:"Range",type:y.SectionType.Uint},5562:{name:"TransferCharacteristics",type:y.SectionType.Uint},5563:{name:"Primaries",type:y.SectionType.Uint},5564:{name:"MaxCLL",type:y.SectionType.Uint},5565:{name:"MaxFALL",type:y.SectionType.Uint}}});var Au=Oe(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.WebmUint=void 0;var BP=Ko();function K0(e){return e.length%2===1?"0"+e:e}var ku=class extends BP.WebmBase{constructor(t,n=0){super(t,n)}getType(){return"Uint"}updateBySource(){this.data="";for(let t=0;t<this.source.length;t++){let n=this.source[t].toString(16);this.data+=K0(n)}}updateByData(){let t=this.data.length/2;this.source=new Uint8Array(t);for(let n=0;n<t;n++){let r=this.data.substring(n*2,n*2+2);this.source[n]=parseInt(r,16)}}getValue(){return parseInt(this.data,16)}setValue(t){this.setData(K0(t.toString(16)))}};ol.WebmUint=ku});var Iu=Oe(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.WebmFloat=void 0;var UP=Ko(),Pu=class extends UP.WebmBase{constructor(t,n=0){super(t,n)}getType(){return"Float"}getFloatArrayType(){return this.source&&this.source.length===4?Float32Array:Float64Array}updateBySource(){let t=this.source.reverse(),n=this.getFloatArrayType(),r=new n(t.buffer);this.data=r[0]}updateByData(){let t=this.getFloatArrayType(),n=new t([this.data]),r=new Uint8Array(n.buffer);this.source=r.reverse()}};al.WebmFloat=Pu});var Mu=Oe(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.WebmString=void 0;var FP=Ko(),_u=class extends FP.WebmBase{constructor(t,n=0){super(t,n)}getType(){return"String"}updateBySource(){this.data=this.source}updateByData(){this.source=this.data}getValue(){let t="";return this.source.forEach(n=>{t+=String.fromCharCode(n)}),t}};il.WebmString=_u});var Nu=Oe(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.WebmContainer=void 0;var V0=Ko(),$P=Eu(),sl=nl(),GP=Au(),HP=Iu(),KP=Mu(),Ru=class e extends V0.WebmBase{constructor(t,n=!1,r=0){super(t,r),this.isInfinite=n,this.offset=0}getType(){return"Container"}readByte(){return this.source[this.offset++]}readUint(){let t=this.readByte(),n=8-t.toString(2).length,r=t-(1<<7-n);for(let o=0;o<n;o++)r<<=8,r|=this.readByte();return r}updateBySource(){var t;this.data=[];let n;for(this.offset=0;this.offset<this.source.length;this.offset=n){let r=this.offset,o=this.readUint(),{name:a,type:i}=(t=$P.sections[o])!==null&&t!==void 0?t:{},s=this.readUint();n=this.source.length,s>=0&&(n=Math.min(this.offset+s,n));let c=this.source.slice(this.offset,n),l;switch(i){case sl.SectionType.Container:l=new e(a,s<0,r);break;case sl.SectionType.Uint:l=new GP.WebmUint(a,r);break;case sl.SectionType.Float:l=new HP.WebmFloat(a,r);break;case sl.SectionType.String:l=new KP.WebmString(a,r);break;default:l=new V0.WebmBase(a,r);break}l.setSource(c),this.data.push({id:o,idHex:o.toString(16),data:l})}}writeUint(t,n=!1){let r;for(r=1;(t<0||t>=1<<7*r)&&r<8;r++);if(!n){for(let o=0;o<r;o++)this.source[this.offset+o]=t>>8*(r-1-o)&255;this.source[this.offset]&=(1<<8-r)-1,this.source[this.offset]|=1<<8-r}this.offset+=r}writeSections(t=!1){this.offset=0;for(let n=0;n<this.data.length;n++){let r=this.data[n],o=r.data.source,a=o.length;this.writeUint(r.id,t),this.writeUint(r.data instanceof e&&r.data.isInfinite?-1:a,t),t||this.source.set(o,this.offset),this.offset+=a}return this.offset}updateByData(){let t=this.writeSections(!0);this.source=new Uint8Array(t),this.writeSections()}getSectionById(t){for(let n=0;n<this.data.length;n++){let r=this.data[n];if(r.id===t)return r.data}return null}};ll.WebmContainer=Ru});var j0=Oe(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.WebmFile=void 0;var VP=(ui(),Si(ci)),jP=Nu(),Ou=class e extends jP.WebmContainer{constructor(t){super("File"),this.setSource(t)}getType(){return"File"}toBlob(t="video/webm"){return new Blob([this.source.buffer],{type:t})}static blobToArray(t){return new Promise((n,r)=>{try{let o=new FileReader;o.onloadend=()=>{try{n(new Uint8Array(o.result))}catch(a){r(a)}},o.readAsArrayBuffer(t)}catch(o){r(o)}})}static fromBlob(t){return VP.__awaiter(this,void 0,void 0,function*(){let n=yield e.blobToArray(t);return new e(n)})}};cl.WebmFile=Ou});var z0=Oe(W0=>{"use strict";Object.defineProperty(W0,"__esModule",{value:!0})});var Lu=Oe(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});var Gn=(ui(),Si(ci));Gn.__exportStar(Ko(),on);Gn.__exportStar(Nu(),on);Gn.__exportStar(j0(),on);Gn.__exportStar(Iu(),on);Gn.__exportStar(Mu(),on);Gn.__exportStar(Au(),on);Gn.__exportStar(nl(),on);Gn.__exportStar(z0(),on);Gn.__exportStar(Eu(),on)});var Du=Oe(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.fixParsedWebmDuration=void 0;var WP=Lu(),zP=(e,t,n={})=>{let r=n.logger;r===void 0?r=c=>console.debug(c):r||(r=()=>{});let o=e.getSectionById(139690087);if(!o)return r("[fix-webm-duration] Segment section is missing"),!1;let a=o.getSectionById(88713574);if(!a)return r("[fix-webm-duration] Info section is missing"),!1;let i=a.getSectionById(710577);if(!i)return r("[fix-webm-duration] TimecodeScale section is missing"),!1;let s=a.getSectionById(1161);if(s)if(s.getValue()<=0)r(`[fix-webm-duration] Duration section is present, but the value is ${s.getValue()}`),s.setValue(t);else return r(`[fix-webm-duration] Duration section is present, and the value is ${s.getValue()}`),!1;else r("[fix-webm-duration] Duration section is missing"),s=new WP.WebmFloat("Duration"),s.setValue(t),a.data.push({id:1161,data:s});return i.setValue(1e6),a.updateByData(),o.updateByData(),e.updateByData(),!0};ul.fixParsedWebmDuration=zP});var Z0=Oe(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.fixWebmDuration=void 0;var ZP=(ui(),Si(ci)),YP=Lu(),qP=Du(),JP=(e,t,n)=>ZP.__awaiter(void 0,void 0,void 0,function*(){try{let r=yield YP.WebmFile.fromBlob(e);if((0,qP.fixParsedWebmDuration)(r,t,n))return r.toBlob(e.type)}catch{}return e});dl.fixWebmDuration=JP});var q0=Oe(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});var Y0=(ui(),Si(ci));Y0.__exportStar(Z0(),fl);Y0.__exportStar(Du(),fl)});var wv=Oe((Vu,ju)=>{"use strict";(function(e,t){typeof Vu=="object"&&typeof ju<"u"?ju.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.DOMPurify=t())})(Vu,function(){"use strict";let{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object,{freeze:a,seal:i,create:s}=Object,{apply:c,construct:l}=typeof Reflect<"u"&&Reflect;a||(a=function(ce){return ce}),i||(i=function(ce){return ce}),c||(c=function(ce,Re,Ae){return ce.apply(Re,Ae)}),l||(l=function(ce,Re){return new ce(...Re)});let u=I(Array.prototype.forEach),f=I(Array.prototype.pop),d=I(Array.prototype.push),p=I(String.prototype.toLowerCase),h=I(String.prototype.toString),g=I(String.prototype.match),x=I(String.prototype.replace),b=I(String.prototype.indexOf),E=I(String.prototype.trim),S=I(RegExp.prototype.test),k=G(TypeError);function I(Me){return function(ce){for(var Re=arguments.length,Ae=new Array(Re>1?Re-1:0),bt=1;bt<Re;bt++)Ae[bt-1]=arguments[bt];return c(Me,ce,Ae)}}function G(Me){return function(){for(var ce=arguments.length,Re=new Array(ce),Ae=0;Ae<ce;Ae++)Re[Ae]=arguments[Ae];return l(Me,Re)}}function D(Me,ce){let Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p;t&&t(Me,null);let Ae=ce.length;for(;Ae--;){let bt=ce[Ae];if(typeof bt=="string"){let Tn=Re(bt);Tn!==bt&&(n(ce)||(ce[Ae]=Tn),bt=Tn)}Me[bt]=!0}return Me}function ie(Me){let ce=s(null);for(let[Re,Ae]of e(Me))o(Me,Re)!==void 0&&(ce[Re]=Ae);return ce}function V(Me,ce){for(;Me!==null;){let Ae=o(Me,ce);if(Ae){if(Ae.get)return I(Ae.get);if(typeof Ae.value=="function")return I(Ae.value)}Me=r(Me)}function Re(Ae){return console.warn("fallback value for",Ae),null}return Re}let W=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),T=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),C=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),R=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=a(["#text"]),re=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),ge=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ve=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ue=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),We=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),wn=i(/<%[\w\W]*|[\w\W]*%>/gm),dr=i(/\${[\w\W]*}/gm),an=i(/^data-[\-\w.\u00B7-\uFFFF]/),fr=i(/^aria-[\-\w]+$/),Zo=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yo=i(/^(?:\w+script|data):/i),qo=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qu=i(/^html$/i);var ed=Object.freeze({__proto__:null,MUSTACHE_EXPR:We,ERB_EXPR:wn,TMPLIT_EXPR:dr,DATA_ATTR:an,ARIA_ATTR:fr,IS_ALLOWED_URI:Zo,IS_SCRIPT_OR_DATA:Yo,ATTR_WHITESPACE:qo,DOCTYPE_NAME:Qu});let cx=function(){return typeof window>"u"?null:window},ux=function(ce,Re){if(typeof ce!="object"||typeof ce.createPolicy!="function")return null;let Ae=null,bt="data-tt-policy-suffix";Re&&Re.hasAttribute(bt)&&(Ae=Re.getAttribute(bt));let Tn="dompurify"+(Ae?"#"+Ae:"");try{return ce.createPolicy(Tn,{createHTML(Yr){return Yr},createScriptURL(Yr){return Yr}})}catch{return console.warn("TrustedTypes policy "+Tn+" could not be created."),null}};function td(){let Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cx(),ce=Q=>td(Q);if(ce.version="3.0.6",ce.removed=[],!Me||!Me.document||Me.document.nodeType!==9)return ce.isSupported=!1,ce;let{document:Re}=Me,Ae=Re,bt=Ae.currentScript,{DocumentFragment:Tn,HTMLTemplateElement:Yr,Node:vl,Element:nd,NodeFilter:xl,NamedNodeMap:fx=Me.NamedNodeMap||Me.MozNamedAttrMap,HTMLFormElement:px,DOMParser:mx,trustedTypes:pi}=Me,mi=nd.prototype,gx=V(mi,"cloneNode"),hx=V(mi,"nextSibling"),bx=V(mi,"childNodes"),Sl=V(mi,"parentNode");if(typeof Yr=="function"){let Q=Re.createElement("template");Q.content&&Q.content.ownerDocument&&(Re=Q.content.ownerDocument)}let yt,Jo="",{implementation:wl,createNodeIterator:yx,createDocumentFragment:vx,getElementsByTagName:xx}=Re,{importNode:Sx}=Ae,sn={};ce.isSupported=typeof e=="function"&&typeof Sl=="function"&&wl&&wl.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Tl,ERB_EXPR:Cl,TMPLIT_EXPR:El,DATA_ATTR:wx,ARIA_ATTR:Tx,IS_SCRIPT_OR_DATA:Cx,ATTR_WHITESPACE:rd}=ed,{IS_ALLOWED_URI:od}=ed,nt=null,ad=D({},[...W,...L,...P,...C,...O]),rt=null,id=D({},[...re,...ge,...ve,...Ue]),ze=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Xo=null,kl=null,sd=!0,Al=!0,ld=!1,cd=!0,qr=!1,pr=!1,Pl=!1,Il=!1,Jr=!1,gi=!1,hi=!1,ud=!0,dd=!1,Ex="user-content-",_l=!0,Qo=!1,Xr={},Qr=null,fd=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),pd=null,md=D({},["audio","video","img","source","image","track"]),Ml=null,gd=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bi="http://www.w3.org/1998/Math/MathML",yi="http://www.w3.org/2000/svg",Cn="http://www.w3.org/1999/xhtml",eo=Cn,Rl=!1,Nl=null,kx=D({},[bi,yi,Cn],h),mr=null,Ax=["application/xhtml+xml","text/html"],Px="text/html",ot=null,to=null,Ix=Re.createElement("form"),hd=function(A){return A instanceof RegExp||A instanceof Function},Ol=function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(to&&to===A)){if((!A||typeof A!="object")&&(A={}),A=ie(A),mr=Ax.indexOf(A.PARSER_MEDIA_TYPE)===-1?mr=Px:mr=A.PARSER_MEDIA_TYPE,ot=mr==="application/xhtml+xml"?h:p,nt="ALLOWED_TAGS"in A?D({},A.ALLOWED_TAGS,ot):ad,rt="ALLOWED_ATTR"in A?D({},A.ALLOWED_ATTR,ot):id,Nl="ALLOWED_NAMESPACES"in A?D({},A.ALLOWED_NAMESPACES,h):kx,Ml="ADD_URI_SAFE_ATTR"in A?D(ie(gd),A.ADD_URI_SAFE_ATTR,ot):gd,pd="ADD_DATA_URI_TAGS"in A?D(ie(md),A.ADD_DATA_URI_TAGS,ot):md,Qr="FORBID_CONTENTS"in A?D({},A.FORBID_CONTENTS,ot):fd,Xo="FORBID_TAGS"in A?D({},A.FORBID_TAGS,ot):{},kl="FORBID_ATTR"in A?D({},A.FORBID_ATTR,ot):{},Xr="USE_PROFILES"in A?A.USE_PROFILES:!1,sd=A.ALLOW_ARIA_ATTR!==!1,Al=A.ALLOW_DATA_ATTR!==!1,ld=A.ALLOW_UNKNOWN_PROTOCOLS||!1,cd=A.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qr=A.SAFE_FOR_TEMPLATES||!1,pr=A.WHOLE_DOCUMENT||!1,Jr=A.RETURN_DOM||!1,gi=A.RETURN_DOM_FRAGMENT||!1,hi=A.RETURN_TRUSTED_TYPE||!1,Il=A.FORCE_BODY||!1,ud=A.SANITIZE_DOM!==!1,dd=A.SANITIZE_NAMED_PROPS||!1,_l=A.KEEP_CONTENT!==!1,Qo=A.IN_PLACE||!1,od=A.ALLOWED_URI_REGEXP||Zo,eo=A.NAMESPACE||Cn,ze=A.CUSTOM_ELEMENT_HANDLING||{},A.CUSTOM_ELEMENT_HANDLING&&hd(A.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ze.tagNameCheck=A.CUSTOM_ELEMENT_HANDLING.tagNameCheck),A.CUSTOM_ELEMENT_HANDLING&&hd(A.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ze.attributeNameCheck=A.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),A.CUSTOM_ELEMENT_HANDLING&&typeof A.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ze.allowCustomizedBuiltInElements=A.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qr&&(Al=!1),gi&&(Jr=!0),Xr&&(nt=D({},[...O]),rt=[],Xr.html===!0&&(D(nt,W),D(rt,re)),Xr.svg===!0&&(D(nt,L),D(rt,ge),D(rt,Ue)),Xr.svgFilters===!0&&(D(nt,P),D(rt,ge),D(rt,Ue)),Xr.mathMl===!0&&(D(nt,C),D(rt,ve),D(rt,Ue))),A.ADD_TAGS&&(nt===ad&&(nt=ie(nt)),D(nt,A.ADD_TAGS,ot)),A.ADD_ATTR&&(rt===id&&(rt=ie(rt)),D(rt,A.ADD_ATTR,ot)),A.ADD_URI_SAFE_ATTR&&D(Ml,A.ADD_URI_SAFE_ATTR,ot),A.FORBID_CONTENTS&&(Qr===fd&&(Qr=ie(Qr)),D(Qr,A.FORBID_CONTENTS,ot)),_l&&(nt["#text"]=!0),pr&&D(nt,["html","head","body"]),nt.table&&(D(nt,["tbody"]),delete Xo.tbody),A.TRUSTED_TYPES_POLICY){if(typeof A.TRUSTED_TYPES_POLICY.createHTML!="function")throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof A.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');yt=A.TRUSTED_TYPES_POLICY,Jo=yt.createHTML("")}else yt===void 0&&(yt=ux(pi,bt)),yt!==null&&typeof Jo=="string"&&(Jo=yt.createHTML(""));a&&a(A),to=A}},bd=D({},["mi","mo","mn","ms","mtext"]),yd=D({},["foreignobject","desc","title","annotation-xml"]),_x=D({},["title","style","font","a","script"]),vi=D({},L);D(vi,P),D(vi,T);let Ll=D({},C);D(Ll,R);let Mx=function(A){let $=Sl(A);(!$||!$.tagName)&&($={namespaceURI:eo,tagName:"template"});let q=p(A.tagName),Fe=p($.tagName);return Nl[A.namespaceURI]?A.namespaceURI===yi?$.namespaceURI===Cn?q==="svg":$.namespaceURI===bi?q==="svg"&&(Fe==="annotation-xml"||bd[Fe]):!!vi[q]:A.namespaceURI===bi?$.namespaceURI===Cn?q==="math":$.namespaceURI===yi?q==="math"&&yd[Fe]:!!Ll[q]:A.namespaceURI===Cn?$.namespaceURI===yi&&!yd[Fe]||$.namespaceURI===bi&&!bd[Fe]?!1:!Ll[q]&&(_x[q]||!vi[q]):!!(mr==="application/xhtml+xml"&&Nl[A.namespaceURI]):!1},gr=function(A){d(ce.removed,{element:A});try{A.parentNode.removeChild(A)}catch{A.remove()}},Dl=function(A,$){try{d(ce.removed,{attribute:$.getAttributeNode(A),from:$})}catch{d(ce.removed,{attribute:null,from:$})}if($.removeAttribute(A),A==="is"&&!rt[A])if(Jr||gi)try{gr($)}catch{}else try{$.setAttribute(A,"")}catch{}},vd=function(A){let $=null,q=null;if(Il)A="<remove></remove>"+A;else{let ft=g(A,/^[\r\n\t ]+/);q=ft&&ft[0]}mr==="application/xhtml+xml"&&eo===Cn&&(A='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+A+"</body></html>");let Fe=yt?yt.createHTML(A):A;if(eo===Cn)try{$=new mx().parseFromString(Fe,mr)}catch{}if(!$||!$.documentElement){$=wl.createDocument(eo,"template",null);try{$.documentElement.innerHTML=Rl?Jo:Fe}catch{}}let dt=$.body||$.documentElement;return A&&q&&dt.insertBefore(Re.createTextNode(q),dt.childNodes[0]||null),eo===Cn?xx.call($,pr?"html":"body")[0]:pr?$.documentElement:dt},xd=function(A){return yx.call(A.ownerDocument||A,A,xl.SHOW_ELEMENT|xl.SHOW_COMMENT|xl.SHOW_TEXT,null)},Rx=function(A){return A instanceof px&&(typeof A.nodeName!="string"||typeof A.textContent!="string"||typeof A.removeChild!="function"||!(A.attributes instanceof fx)||typeof A.removeAttribute!="function"||typeof A.setAttribute!="function"||typeof A.namespaceURI!="string"||typeof A.insertBefore!="function"||typeof A.hasChildNodes!="function")},Sd=function(A){return typeof vl=="function"&&A instanceof vl},En=function(A,$,q){sn[A]&&u(sn[A],Fe=>{Fe.call(ce,$,q,to)})},wd=function(A){let $=null;if(En("beforeSanitizeElements",A,null),Rx(A))return gr(A),!0;let q=ot(A.nodeName);if(En("uponSanitizeElement",A,{tagName:q,allowedTags:nt}),A.hasChildNodes()&&!Sd(A.firstElementChild)&&S(/<[/\w]/g,A.innerHTML)&&S(/<[/\w]/g,A.textContent))return gr(A),!0;if(!nt[q]||Xo[q]){if(!Xo[q]&&Cd(q)&&(ze.tagNameCheck instanceof RegExp&&S(ze.tagNameCheck,q)||ze.tagNameCheck instanceof Function&&ze.tagNameCheck(q)))return!1;if(_l&&!Qr[q]){let Fe=Sl(A)||A.parentNode,dt=bx(A)||A.childNodes;if(dt&&Fe){let ft=dt.length;for(let wt=ft-1;wt>=0;--wt)Fe.insertBefore(gx(dt[wt],!0),hx(A))}}return gr(A),!0}return A instanceof nd&&!Mx(A)||(q==="noscript"||q==="noembed"||q==="noframes")&&S(/<\/no(script|embed|frames)/i,A.innerHTML)?(gr(A),!0):(qr&&A.nodeType===3&&($=A.textContent,u([Tl,Cl,El],Fe=>{$=x($,Fe," ")}),A.textContent!==$&&(d(ce.removed,{element:A.cloneNode()}),A.textContent=$)),En("afterSanitizeElements",A,null),!1)},Td=function(A,$,q){if(ud&&($==="id"||$==="name")&&(q in Re||q in Ix))return!1;if(!(Al&&!kl[$]&&S(wx,$))){if(!(sd&&S(Tx,$))){if(!rt[$]||kl[$]){if(!(Cd(A)&&(ze.tagNameCheck instanceof RegExp&&S(ze.tagNameCheck,A)||ze.tagNameCheck instanceof Function&&ze.tagNameCheck(A))&&(ze.attributeNameCheck instanceof RegExp&&S(ze.attributeNameCheck,$)||ze.attributeNameCheck instanceof Function&&ze.attributeNameCheck($))||$==="is"&&ze.allowCustomizedBuiltInElements&&(ze.tagNameCheck instanceof RegExp&&S(ze.tagNameCheck,q)||ze.tagNameCheck instanceof Function&&ze.tagNameCheck(q))))return!1}else if(!Ml[$]){if(!S(od,x(q,rd,""))){if(!(($==="src"||$==="xlink:href"||$==="href")&&A!=="script"&&b(q,"data:")===0&&pd[A])){if(!(ld&&!S(Cx,x(q,rd,"")))){if(q)return!1}}}}}}return!0},Cd=function(A){return A.indexOf("-")>0},Ed=function(A){En("beforeSanitizeAttributes",A,null);let{attributes:$}=A;if(!$)return;let q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:rt},Fe=$.length;for(;Fe--;){let dt=$[Fe],{name:ft,namespaceURI:wt,value:hr}=dt,ea=ot(ft),Tt=ft==="value"?hr:E(hr);if(q.attrName=ea,q.attrValue=Tt,q.keepAttr=!0,q.forceKeepAttr=void 0,En("uponSanitizeAttribute",A,q),Tt=q.attrValue,q.forceKeepAttr||(Dl(ft,A),!q.keepAttr))continue;if(!cd&&S(/\/>/i,Tt)){Dl(ft,A);continue}qr&&u([Tl,Cl,El],Ad=>{Tt=x(Tt,Ad," ")});let kd=ot(A.nodeName);if(Td(kd,ea,Tt)){if(dd&&(ea==="id"||ea==="name")&&(Dl(ft,A),Tt=Ex+Tt),yt&&typeof pi=="object"&&typeof pi.getAttributeType=="function"&&!wt)switch(pi.getAttributeType(kd,ea)){case"TrustedHTML":{Tt=yt.createHTML(Tt);break}case"TrustedScriptURL":{Tt=yt.createScriptURL(Tt);break}}try{wt?A.setAttributeNS(wt,ft,Tt):A.setAttribute(ft,Tt),f(ce.removed)}catch{}}}En("afterSanitizeAttributes",A,null)},Nx=function Q(A){let $=null,q=xd(A);for(En("beforeSanitizeShadowDOM",A,null);$=q.nextNode();)En("uponSanitizeShadowNode",$,null),!wd($)&&($.content instanceof Tn&&Q($.content),Ed($));En("afterSanitizeShadowDOM",A,null)};return ce.sanitize=function(Q){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=null,q=null,Fe=null,dt=null;if(Rl=!Q,Rl&&(Q="<!-->"),typeof Q!="string"&&!Sd(Q))if(typeof Q.toString=="function"){if(Q=Q.toString(),typeof Q!="string")throw k("dirty is not a string, aborting")}else throw k("toString is not a function");if(!ce.isSupported)return Q;if(Pl||Ol(A),ce.removed=[],typeof Q=="string"&&(Qo=!1),Qo){if(Q.nodeName){let hr=ot(Q.nodeName);if(!nt[hr]||Xo[hr])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(Q instanceof vl)$=vd("<!---->"),q=$.ownerDocument.importNode(Q,!0),q.nodeType===1&&q.nodeName==="BODY"||q.nodeName==="HTML"?$=q:$.appendChild(q);else{if(!Jr&&!qr&&!pr&&Q.indexOf("<")===-1)return yt&&hi?yt.createHTML(Q):Q;if($=vd(Q),!$)return Jr?null:hi?Jo:""}$&&Il&&gr($.firstChild);let ft=xd(Qo?Q:$);for(;Fe=ft.nextNode();)wd(Fe)||(Fe.content instanceof Tn&&Nx(Fe.content),Ed(Fe));if(Qo)return Q;if(Jr){if(gi)for(dt=vx.call($.ownerDocument);$.firstChild;)dt.appendChild($.firstChild);else dt=$;return(rt.shadowroot||rt.shadowrootmode)&&(dt=Sx.call(Ae,dt,!0)),dt}let wt=pr?$.outerHTML:$.innerHTML;return pr&&nt["!doctype"]&&$.ownerDocument&&$.ownerDocument.doctype&&$.ownerDocument.doctype.name&&S(Qu,$.ownerDocument.doctype.name)&&(wt="<!DOCTYPE "+$.ownerDocument.doctype.name+`>
|
|
26
|
-
`+wt),qr&&u([Tl,Cl,El],hr=>{wt=x(wt,hr," ")}),yt&&hi?yt.createHTML(wt):wt},ce.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ol(Q),Pl=!0},ce.clearConfig=function(){to=null,Pl=!1},ce.isValidAttribute=function(Q,A,$){to||Ol({});let q=ot(Q),Fe=ot(A);return Td(q,Fe,$)},ce.addHook=function(Q,A){typeof A=="function"&&(sn[Q]=sn[Q]||[],d(sn[Q],A))},ce.removeHook=function(Q){if(sn[Q])return f(sn[Q])},ce.removeHooks=function(Q){sn[Q]&&(sn[Q]=[])},ce.removeAllHooks=function(){sn={}},ce}var dx=td();return dx})});function Gx(e){return Object.keys(e).reduce((n,r)=>{let o=e[r];return n[r]=Object.assign({},o),Md(o.value)&&!Wx(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 Hx(e){return e?Object.keys(e).reduce((n,r)=>{let o=e[r];return n[r]=Md(o)&&"value"in o?o:{value:o},n[r].attribute||(n[r].attribute=jx(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function Kx(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function Vx(e,t){let n=Gx(t);return Object.keys(t).forEach(o=>{let a=n[o],i=e.getAttribute(a.attribute),s=e[o];i!=null&&(a.value=a.parse?_d(i):i),s!=null&&(a.value=Array.isArray(s)?s.slice(0):s),a.reflect&&Id(e,a.attribute,a.value,!!a.parse),Object.defineProperty(e,o,{get(){return a.value},set(c){let l=a.value;a.value=c,a.reflect&&Id(this,a.attribute,a.value,!!a.parse);for(let u=0,f=this.__propertyChangedCallbacks.length;u<f;u++)this.__propertyChangedCallbacks[u](o,c,l)},enumerable:!0,configurable:!0})}),n}function _d(e){if(e)try{return JSON.parse(e)}catch{return e}}function Id(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 jx(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function Md(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function Wx(e){return Object.prototype.toString.call(e)==="[object Function]"}function zx(e){return typeof e=="function"&&e.toString().indexOf("class")===0}var Bl;function Zx(e,t){let 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=Vx(this,t);let o=Kx(this.props),a=this.Component,i=Bl;try{Bl=this,this.__initialized=!0,zx(a)?new a(o,{element:this}):a(o,{element:this})}finally{Bl=i}}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,a,i){if(this.__initialized&&!this.__updating[o]&&(o=this.lookupProp(o),o in t)){if(i==null&&!this[o])return;this[o]=t[o].parse?_d(i):i}}lookupProp(o){if(t)return n.find(a=>o===a||o===t[a].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(o){this.__releaseCallbacks.push(o)}addPropertyChangedCallback(o){this.__propertyChangedCallbacks.push(o)}}}var sM=Symbol("element-context");function Rd(e,t={},n={}){let{BaseElement:r=HTMLElement,extension:o,customElements:a=window.customElements}=n;return i=>{if(!e)throw new Error("tag is required to register a Component");let s=a.get(e);return s?(s.prototype.Component=i,s):(s=Zx(r,Hx(t)),s.prototype.Component=i,s.prototype.registeredTag=e,a.define(e,s,o),s)}}var we={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Nd(this.context.count)},getNextContextId(){return Nd(this.context.count++)}};function Nd(e){let t=String(e),n=t.length-1;return we.context.id+(n?String.fromCharCode(96+n):"")+t}function Fl(e){we.context=e}function Yx(){return{...we.context,id:we.getNextContextId(),count:0}}var qx=(e,t)=>e===t,Lt=Symbol("solid-proxy"),Fd=typeof Proxy=="function",Ei=Symbol("solid-track"),cM=Symbol("solid-dev-component"),Ti={equals:qx},Od=null,$d=zd,Dt=1,ta=2,Gd={owned:null,cleanups:null,context:null,owner:null};var xe=null,K=null,ra=null,no=null,Ne=null,Qe=null,pt=null,ki=0;function yr(e,t){let n=Ne,r=xe,o=e.length===0,a=t===void 0?r:t,i=o?Gd:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=o?e:()=>e(()=>qe(()=>Vn(i)));xe=i,Ne=null;try{return jt(s,!0)}finally{Ne=n,xe=r}}function M(e,t){t=t?Object.assign({},Ti,t):Ti;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(K&&K.running&&K.sources.has(n)?o=o(n.tValue):o=o(n.value)),Wd(n,o));return[jd.bind(n),r]}function _(e,t,n){let r=Vl(e,t,!1,Dt);ra&&K&&K.running?Qe.push(r):oa(r)}function be(e,t,n){$d=eS;let r=Vl(e,t,!1,Dt),o=$l&&Kl($l);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),pt?pt.push(r):oa(r)}function F(e,t,n){n=n?Object.assign({},Ti,n):Ti;let r=Vl(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,ra&&K&&K.running?(r.tState=Dt,Qe.push(r)):oa(r),jd.bind(r)}function Hd(e){return jt(e,!1)}function qe(e){if(!no&&Ne===null)return e();let t=Ne;Ne=null;try{return no?no.untrack(e):e()}finally{Ne=t}}function ae(e){be(()=>qe(e))}function ue(e){return xe===null||(xe.cleanups===null?xe.cleanups=[e]:xe.cleanups.push(e)),e}function Ai(){return Ne}function ro(){return xe}function Kd(e,t){let n=xe,r=Ne;xe=e,Ne=null;try{return jt(t,!0)}catch(o){Ii(o)}finally{xe=n,Ne=r}}function Jx(e){if(K&&K.running)return e(),K.done;let t=Ne,n=xe;return Promise.resolve().then(()=>{Ne=t,xe=n;let r;return(ra||$l)&&(r=K||(K={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),jt(e,!1),Ne=xe=null,r?r.done:void 0})}var[uM,Ld]=M(!1);function Vd(e,t){let n=Symbol("context");return{id:n,Provider:nS(n),defaultValue:e}}function Kl(e){let t;return xe&&xe.context&&(t=xe.context[e.id])!==void 0?t:e.defaultValue}function Pi(e){let t=F(e),n=F(()=>Gl(t()));return n.toArray=()=>{let r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}var $l;function jd(){let e=K&&K.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Dt)oa(this);else{let t=Qe;Qe=null,jt(()=>Ci(this),!1),Qe=t}if(Ne){let t=this.observers?this.observers.length:0;Ne.sources?(Ne.sources.push(this),Ne.sourceSlots.push(t)):(Ne.sources=[this],Ne.sourceSlots=[t]),this.observers?(this.observers.push(Ne),this.observerSlots.push(Ne.sources.length-1)):(this.observers=[Ne],this.observerSlots=[Ne.sources.length-1])}return e&&K.sources.has(this)?this.tValue:this.value}function Wd(e,t,n){let r=K&&K.running&&K.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(K){let o=K.running;(o||!n&&K.sources.has(e))&&(K.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&jt(()=>{for(let o=0;o<e.observers.length;o+=1){let a=e.observers[o],i=K&&K.running;i&&K.disposed.has(a)||((i?!a.tState:!a.state)&&(a.pure?Qe.push(a):pt.push(a),a.observers&&Zd(a)),i?a.tState=Dt:a.state=Dt)}if(Qe.length>1e6)throw Qe=[],new Error},!1)}return t}function oa(e){if(!e.fn)return;Vn(e);let t=ki;Dd(e,K&&K.running&&K.sources.has(e)?e.tValue:e.value,t),K&&!K.running&&K.sources.has(e)&&queueMicrotask(()=>{jt(()=>{K&&(K.running=!0),Ne=xe=e,Dd(e,e.tValue,t),Ne=xe=null},!1)})}function Dd(e,t,n){let r,o=xe,a=Ne;Ne=xe=e;try{r=e.fn(t)}catch(i){return e.pure&&(K&&K.running?(e.tState=Dt,e.tOwned&&e.tOwned.forEach(Vn),e.tOwned=void 0):(e.state=Dt,e.owned&&e.owned.forEach(Vn),e.owned=null)),e.updatedAt=n+1,Ii(i)}finally{Ne=a,xe=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Wd(e,r,!0):K&&K.running&&e.pure?(K.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function Vl(e,t,n,r=Dt,o){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:xe,context:xe?xe.context:null,pure:n};if(K&&K.running&&(a.state=0,a.tState=r),xe===null||xe!==Gd&&(K&&K.running&&xe.pure?xe.tOwned?xe.tOwned.push(a):xe.tOwned=[a]:xe.owned?xe.owned.push(a):xe.owned=[a]),no&&a.fn){let[i,s]=M(void 0,{equals:!1}),c=no.factory(a.fn,s);ue(()=>c.dispose());let l=()=>Jx(s).then(()=>u.dispose()),u=no.factory(a.fn,l);a.fn=f=>(i(),K&&K.running?u.track(f):c.track(f))}return a}function na(e){let t=K&&K.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===ta)return Ci(e);if(e.suspense&&qe(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<ki);){if(t&&K.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,a=n[r+1];for(;(o=o.owner)&&o!==a;)if(K.disposed.has(o))return}if((t?e.tState:e.state)===Dt)oa(e);else if((t?e.tState:e.state)===ta){let o=Qe;Qe=null,jt(()=>Ci(e,n[0]),!1),Qe=o}}}function jt(e,t){if(Qe)return e();let n=!1;t||(Qe=[]),pt?n=!0:pt=[],ki++;try{let r=e();return Xx(n),r}catch(r){n||(pt=null),Qe=null,Ii(r)}}function Xx(e){if(Qe&&(ra&&K&&K.running?Qx(Qe):zd(Qe),Qe=null),e)return;let t;if(K){if(!K.promises.size&&!K.queue.size){let r=K.sources,o=K.disposed;pt.push.apply(pt,K.effects),t=K.resolve;for(let a of pt)"tState"in a&&(a.state=a.tState),delete a.tState;K=null,jt(()=>{for(let a of o)Vn(a);for(let a of r){if(a.value=a.tValue,a.owned)for(let i=0,s=a.owned.length;i<s;i++)Vn(a.owned[i]);a.tOwned&&(a.owned=a.tOwned),delete a.tValue,delete a.tOwned,a.tState=0}Ld(!1)},!1)}else if(K.running){K.running=!1,K.effects.push.apply(K.effects,pt),pt=null,Ld(!0);return}}let n=pt;pt=null,n.length&&jt(()=>$d(n),!1),t&&t()}function zd(e){for(let t=0;t<e.length;t++)na(e[t])}function Qx(e){for(let t=0;t<e.length;t++){let n=e[t],r=K.queue;r.has(n)||(r.add(n),ra(()=>{r.delete(n),jt(()=>{K.running=!0,na(n)},!1),K&&(K.running=!1)}))}}function eS(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:na(r)}if(we.context){if(we.count){we.effects||(we.effects=[]),we.effects.push(...e.slice(0,n));return}Fl()}for(we.effects&&(we.done||!we.count)&&(e=[...we.effects,...e],n+=we.effects.length,delete we.effects),t=0;t<n;t++)na(e[t])}function Ci(e,t){let n=K&&K.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let o=e.sources[r];if(o.sources){let a=n?o.tState:o.state;a===Dt?o!==t&&(!o.updatedAt||o.updatedAt<ki)&&na(o):a===ta&&Ci(o,t)}}}function Zd(e){let t=K&&K.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=ta:r.state=ta,r.pure?Qe.push(r):pt.push(r),r.observers&&Zd(r))}}function Vn(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){let a=o.pop(),i=n.observerSlots.pop();r<o.length&&(a.sourceSlots[i]=r,o[r]=a,n.observerSlots[r]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Vn(e.tOwned[t]);delete e.tOwned}if(K&&K.running&&e.pure)Yd(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Vn(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}K&&K.running?e.tState=0:e.state=0}function Yd(e,t){if(t||(e.tState=0,K.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)Yd(e.owned[n])}function tS(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Bd(e,t,n){try{for(let r of t)r(e)}catch(r){Ii(r,n&&n.owner||null)}}function Ii(e,t=xe){let n=Od&&t&&t.context&&t.context[Od],r=tS(e);if(!n)throw r;pt?pt.push({fn(){Bd(r,n,t)},state:Dt}):Bd(r,n,t)}function Gl(e){if(typeof e=="function"&&!e.length)return Gl(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Gl(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function nS(e,t){return function(r){let o;return _(()=>o=qe(()=>(xe.context={...xe.context,[e]:r.value},Pi(()=>r.children))),void 0),o}}var rS=Symbol("fallback");function Ud(e){for(let t=0;t<e.length;t++)e[t]()}function oS(e,t,n={}){let r=[],o=[],a=[],i=0,s=t.length>1?[]:null;return ue(()=>Ud(a)),()=>{let c=e()||[],l=c.length,u,f;return c[Ei],qe(()=>{let p,h,g,x,b,E,S,k,I;if(l===0)i!==0&&(Ud(a),a=[],r=[],o=[],i=0,s&&(s=[])),n.fallback&&(r=[rS],o[0]=yr(G=>(a[0]=G,n.fallback())),i=1);else if(i===0){for(o=new Array(l),f=0;f<l;f++)r[f]=c[f],o[f]=yr(d);i=l}else{for(g=new Array(l),x=new Array(l),s&&(b=new Array(l)),E=0,S=Math.min(i,l);E<S&&r[E]===c[E];E++);for(S=i-1,k=l-1;S>=E&&k>=E&&r[S]===c[k];S--,k--)g[k]=o[S],x[k]=a[S],s&&(b[k]=s[S]);for(p=new Map,h=new Array(k+1),f=k;f>=E;f--)I=c[f],u=p.get(I),h[f]=u===void 0?-1:u,p.set(I,f);for(u=E;u<=S;u++)I=r[u],f=p.get(I),f!==void 0&&f!==-1?(g[f]=o[u],x[f]=a[u],s&&(b[f]=s[u]),f=h[f],p.set(I,f)):a[u]();for(f=E;f<l;f++)f in g?(o[f]=g[f],a[f]=x[f],s&&(s[f]=b[f],s[f](f))):o[f]=yr(d);o=o.slice(0,i=l),r=c.slice(0)}return o});function d(p){if(a[f]=p,s){let[h,g]=M(f);return s[f]=g,t(c[f],h)}return t(c[f])}}}var aS=!1;function m(e,t){if(aS&&we.context){let n=we.context;Fl(Yx());let r=qe(()=>e(t||{}));return Fl(n),r}return qe(()=>e(t||{}))}function wi(){return!0}var Hl={get(e,t,n){return t===Lt?n:e.get(t)},has(e,t){return t===Lt?!0:e.has(t)},set:wi,deleteProperty:wi,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:wi,deleteProperty:wi}},ownKeys(e){return e.keys()}};function Ul(e){return(e=typeof e=="function"?e():e)?e:{}}function iS(){for(let e=0,t=this.length;e<t;++e){let n=this[e]();if(n!==void 0)return n}}function Te(...e){let t=!1;for(let i=0;i<e.length;i++){let s=e[i];t=t||!!s&&Lt in s,e[i]=typeof s=="function"?(t=!0,F(s)):s}if(Fd&&t)return new Proxy({get(i){for(let s=e.length-1;s>=0;s--){let c=Ul(e[s])[i];if(c!==void 0)return c}},has(i){for(let s=e.length-1;s>=0;s--)if(i in Ul(e[s]))return!0;return!1},keys(){let i=[];for(let s=0;s<e.length;s++)i.push(...Object.keys(Ul(e[s])));return[...new Set(i)]}},Hl);let n={},r=Object.create(null);for(let i=e.length-1;i>=0;i--){let s=e[i];if(!s)continue;let c=Object.getOwnPropertyNames(s);for(let l=c.length-1;l>=0;l--){let u=c[l];if(u==="__proto__"||u==="constructor")continue;let f=Object.getOwnPropertyDescriptor(s,u);if(!r[u])r[u]=f.get?{enumerable:!0,configurable:!0,get:iS.bind(n[u]=[f.get.bind(s)])}:f.value!==void 0?f:void 0;else{let d=n[u];d&&(f.get?d.push(f.get.bind(s)):f.value!==void 0&&d.push(()=>f.value))}}}let o={},a=Object.keys(r);for(let i=a.length-1;i>=0;i--){let s=a[i],c=r[s];c&&c.get?Object.defineProperty(o,s,c):o[s]=c?c.value:void 0}return o}function Ke(e,...t){if(Fd&&Lt in e){let o=new Set(t.length>1?t.flat():t[0]),a=t.map(i=>new Proxy({get(s){return i.includes(s)?e[s]:void 0},has(s){return i.includes(s)&&s in e},keys(){return i.filter(s=>s in e)}},Hl));return a.push(new Proxy({get(i){return o.has(i)?void 0:e[i]},has(i){return o.has(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!o.has(i))}},Hl)),a}let n={},r=t.map(()=>({}));for(let o of Object.getOwnPropertyNames(e)){let a=Object.getOwnPropertyDescriptor(e,o),i=!a.get&&!a.set&&a.enumerable&&a.writable&&a.configurable,s=!1,c=0;for(let l of t)l.includes(o)&&(s=!0,i?r[c][o]=a.value:Object.defineProperty(r[c],o,a)),++c;s||(i?n[o]=a.value:Object.defineProperty(n,o,a))}return[...r,n]}var sS=0;function ln(){return we.context?we.getNextContextId():`cl-${sS++}`}var qd=e=>`Stale read from <${e}>.`;function ye(e){let t="fallback"in e&&{fallback:()=>e.fallback};return F(oS(()=>e.each,e.children,t||void 0))}function B(e){let t=e.keyed,n=F(()=>e.when,void 0,{equals:(r,o)=>t?r===o:!r==!o});return F(()=>{let r=n();if(r){let o=e.children;return typeof o=="function"&&o.length>0?qe(()=>o(t?r:()=>{if(!qe(n))throw qd("Show");return e.when})):o}return e.fallback},void 0,void 0)}function Ie(e){let t=!1,n=(a,i)=>(t?a[1]===i[1]:!a[1]==!i[1])&&a[2]===i[2],r=Pi(()=>e.children),o=F(()=>{let a=r();Array.isArray(a)||(a=[a]);for(let i=0;i<a.length;i++){let s=a[i].when;if(s)return t=!!a[i].keyed,[i,s,a[i]]}return[-1]},void 0,{equals:n});return F(()=>{let[a,i,s]=o();if(a<0)return e.fallback;let c=s.children;return typeof c=="function"&&c.length>0?qe(()=>c(t?i:()=>{if(qe(o)[0]!==a)throw qd("Match");return s.when})):c},void 0,void 0)}function Z(e){return e}var lS=["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"],cS=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...lS]),uS=new Set(["innerHTML","textContent","innerText","children"]),dS=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),fS=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 pS(e,t){let n=fS[e];return typeof n=="object"?n[t]?n.$:void 0:n}var mS=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),gS=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"]),hS={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function bS(e,t,n){let r=n.length,o=t.length,a=r,i=0,s=0,c=t[o-1].nextSibling,l=null;for(;i<o||s<a;){if(t[i]===n[s]){i++,s++;continue}for(;t[o-1]===n[a-1];)o--,a--;if(o===i){let u=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],u)}else if(a===s)for(;i<o;)(!l||!l.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[a-1]&&n[s]===t[o-1]){let u=t[--o].nextSibling;e.insertBefore(n[s++],t[i++].nextSibling),e.insertBefore(n[--a],u),t[o]=n[a]}else{if(!l){l=new Map;let f=s;for(;f<a;)l.set(n[f],f++)}let u=l.get(t[i]);if(u!=null)if(s<u&&u<a){let f=i,d=1,p;for(;++f<o&&f<a&&!((p=l.get(t[f]))==null||p!==u+d);)d++;if(d>u-s){let h=t[i];for(;s<u;)e.insertBefore(n[s++],h)}else e.replaceChild(n[s++],t[i++])}else i++;else t[i++].remove()}}}var Jd="_$DX_DELEGATE";function w(e,t,n){let r,o=()=>{let i=document.createElement("template");return i.innerHTML=e,n?i.content.firstChild.firstChild:i.content.firstChild},a=t?()=>qe(()=>document.importNode(r||(r=o()),!0)):()=>(r||(r=o())).cloneNode(!0);return a.cloneNode=a,a}function $e(e,t=window.document){let n=t[Jd]||(t[Jd]=new Set);for(let r=0,o=e.length;r<o;r++){let a=e[r];n.has(a)||(n.add(a),t.addEventListener(a,ES))}}function H(e,t,n){vr(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function yS(e,t,n,r){vr(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function vS(e,t,n){vr(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function U(e,t){vr(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Ve(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)){let o=n[0];e.addEventListener(t,n[0]=a=>o.call(e,n[1],a))}else e.addEventListener(t,n,typeof n!="function"&&n)}function xS(e,t,n={}){let r=Object.keys(t||{}),o=Object.keys(n),a,i;for(a=0,i=o.length;a<i;a++){let s=o[a];!s||s==="undefined"||t[s]||(Xd(e,s,!1),delete n[s])}for(a=0,i=r.length;a<i;a++){let s=r[a],c=!!t[s];!s||s==="undefined"||n[s]===c||!c||(Xd(e,s,!0),n[s]=c)}return n}function SS(e,t,n){if(!t)return n?H(e,"style"):t;let 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,a;for(a in n)t[a]==null&&r.removeProperty(a),delete n[a];for(a in t)o=t[a],o!==n[a]&&(r.setProperty(a,o),n[a]=o);return n}function Ce(e,t={},n,r){let o={};return r||_(()=>o.children=ao(e,t.children,o.children)),_(()=>typeof t.ref=="function"&&pe(t.ref,e)),_(()=>wS(e,t,n,!0,o,!0)),o}function pe(e,t,n){return qe(()=>e(t,n))}function v(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return ao(e,t,r,n);_(o=>ao(e,t(),o,n),r)}function wS(e,t,n,r,o={},a=!1){t||(t={});for(let i in o)if(!(i in t)){if(i==="children")continue;o[i]=Qd(e,i,null,o[i],n,a,t)}for(let i in t){if(i==="children"){r||ao(e,t.children);continue}let s=t[i];o[i]=Qd(e,i,s,o[i],n,a,t)}}function TS(e){let t,n;return!vr()||!(t=we.registry.get(n=kS()))?e():(we.completed&&we.completed.add(t),we.registry.delete(n),t)}function vr(e){return!!we.context&&!we.done&&(!e||e.isConnected)}function CS(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Xd(e,t,n){let r=t.trim().split(/\s+/);for(let o=0,a=r.length;o<a;o++)e.classList.toggle(r[o],n)}function Qd(e,t,n,r,o,a,i){let s,c,l,u,f;if(t==="style")return SS(e,n,r);if(t==="classList")return xS(e,n,r);if(n===r)return r;if(t==="ref")a||n(e);else if(t.slice(0,3)==="on:"){let d=t.slice(3);r&&e.removeEventListener(d,r,typeof r!="function"&&r),n&&e.addEventListener(d,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){let d=t.slice(10);r&&e.removeEventListener(d,r,!0),n&&e.addEventListener(d,n,!0)}else if(t.slice(0,2)==="on"){let d=t.slice(2).toLowerCase(),p=mS.has(d);if(!p&&r){let h=Array.isArray(r)?r[0]:r;e.removeEventListener(d,h)}(p||n)&&(Ve(e,d,n,p),p&&$e([d]))}else if(t.slice(0,5)==="attr:")H(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")vS(e,t.slice(5),n);else if((f=t.slice(0,5)==="prop:")||(l=uS.has(t))||!o&&((u=pS(t,e.tagName))||(c=cS.has(t)))||(s=e.nodeName.includes("-")||"is"in i)){if(f)t=t.slice(5),c=!0;else if(vr(e))return n;t==="class"||t==="className"?U(e,n):s&&!c&&!l?e[CS(t)]=n:e[u||t]=n}else{let d=o&&t.indexOf(":")>-1&&hS[t.split(":")[0]];d?yS(e,d,t,n):H(e,dS[t]||t,n)}return n}function ES(e){if(we.registry&&we.events&&we.events.find(([c,l])=>l===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,o=e.currentTarget,a=c=>Object.defineProperty(e,"target",{configurable:!0,value:c}),i=()=>{let c=t[n];if(c&&!t.disabled){let l=t[`${n}Data`];if(l!==void 0?c.call(t,l,e):c.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),we.registry&&!we.done&&(we.done=_$HY.done=!0),e.composedPath){let c=e.composedPath();a(c[0]);for(let l=0;l<c.length-2&&(t=c[l],!!i());l++){if(t._$host){t=t._$host,s();break}if(t.parentNode===o)break}}else s();a(r)}function ao(e,t,n,r,o){let a=vr(e);if(a){!n&&(n=[...e.childNodes]);let c=[];for(let l=0;l<n.length;l++){let u=n[l];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():c.push(u)}n=c}for(;typeof n=="function";)n=n();if(t===n)return n;let i=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(a||i==="number"&&(t=t.toString(),t===n))return n;if(s){let c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=oo(e,n,r,c)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean"){if(a)return n;n=oo(e,n,r)}else{if(i==="function")return _(()=>{let c=t();for(;typeof c=="function";)c=c();n=ao(e,c,n,r)}),()=>n;if(Array.isArray(t)){let c=[],l=n&&Array.isArray(n);if(jl(c,t,n,o))return _(()=>n=ao(e,c,n,r,!0)),()=>n;if(a){if(!c.length)return n;if(r===void 0)return n=[...e.childNodes];let u=c[0];if(u.parentNode!==e)return n;let f=[u];for(;(u=u.nextSibling)!==r;)f.push(u);return n=f}if(c.length===0){if(n=oo(e,n,r),s)return n}else l?n.length===0?ef(e,c,r):bS(e,n,c):(n&&oo(e),ef(e,c));n=c}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=oo(e,n,r,t);oo(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function jl(e,t,n,r){let o=!1;for(let a=0,i=t.length;a<i;a++){let s=t[a],c=n&&n[e.length],l;if(!(s==null||s===!0||s===!1))if((l=typeof s)=="object"&&s.nodeType)e.push(s);else if(Array.isArray(s))o=jl(e,s,c)||o;else if(l==="function")if(r){for(;typeof s=="function";)s=s();o=jl(e,Array.isArray(s)?s:[s],Array.isArray(c)?c:[c])||o}else e.push(s),o=!0;else{let u=String(s);c&&c.nodeType===3&&c.data===u?e.push(c):e.push(document.createTextNode(u))}}return o}function ef(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function oo(e,t,n,r){if(n===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let a=!1;for(let i=t.length-1;i>=0;i--){let s=t[i];if(o!==s){let c=s.parentNode===e;!a&&!i?c?e.replaceChild(o,s):e.insertBefore(o,n):c&&s.remove()}else a=!0}}else e.insertBefore(o,n);return[o]}function kS(){return we.getNextContextId()}var yM=Symbol();var AS="http://www.w3.org/2000/svg";function tf(e,t=!1){return t?document.createElementNS(AS,e):document.createElement(e)}function nf(e){let{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=ro(),a,i=!!we.context;return be(()=>{i&&(ro().user=i=!1),a||(a=Kd(o,()=>F(()=>e.children)));let s=r();if(s instanceof HTMLHeadElement){let[c,l]=M(!1),u=()=>l(!0);yr(f=>v(s,()=>c()?f():a(),null)),ue(u)}else{let c=tf(e.isSVG?"g":"div",e.isSVG),l=t&&c.attachShadow?c.attachShadow({mode:"open"}):c;Object.defineProperty(c,"_$host",{get(){return n.parentNode},configurable:!0}),v(l,a),s.appendChild(c),e.ref&&e.ref(c),ue(()=>s.removeChild(c))}},void 0,{render:!i}),n}function rf(e){let[t,n]=Ke(e,["component"]),r=F(()=>t.component);return F(()=>{let o=r();switch(typeof o){case"function":return qe(()=>o(n));case"string":let a=gS.has(o),i=we.context?TS():tf(o,a);return Ce(i,n,a),i}})}function PS(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let[o,a]=M(e[t[r]]);Object.defineProperty(n,t[r],{get:o,set(i){a(()=>i)}})}return n}function IS(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 _S(e){return(t,n)=>{let{element:r}=n;return yr(o=>{let a=PS(t);r.addPropertyChangedCallback((s,c)=>a[s]=c),r.addReleaseCallback(()=>{r.renderRoot.textContent="",o()});let i=e(a,n);return v(r.renderRoot,i)},IS(r))}}function _i(e,t,n){return arguments.length===2&&(n=t,t={}),Rd(e,t)(_S(n))}var Mi={id:void 0,agent:void 0,onNewInputBlock:void 0,onAnswer:void 0,onEnd:void 0,onInit:void 0,onNewLogs:void 0,onChatStatePersisted:void 0,onScriptExecutionSuccess:void 0,font:void 0,progressBarRef:void 0,isPreview:void 0,startFrom:void 0,prefilledVariables:void 0,apiHost:void 0,resultId:void 0,sessionId:void 0},of={...Mi,onClose:void 0,onOpen:void 0,theme:void 0,autoShowDelay:void 0,isOpen:void 0,defaultOpen:void 0},af={...Mi,onClose:void 0,onOpen:void 0,theme:void 0,previewMessage:void 0,onPreviewMessageClick:void 0,onPreviewMessageDismissed:void 0,autoShowDelay:void 0};var sf=e=>{sessionStorage.setItem("agentPaymentInProgress",JSON.stringify(e))},io=()=>sessionStorage.getItem("agentPaymentInProgress"),Ri=()=>{sessionStorage.removeItem("agentPaymentInProgress")};var so=class extends Error{constructor(t){super("This agent can only be executed on "+t)}};var cn=(e,t)=>{if(typeof window<"u")return window.__ENV?window.__ENV[e]??t:void 0;if(!(typeof process>"u"))return process.env[e]??t};var MS="https://r0.ar",Ct=({ignoreChatApiUrl:e}={ignoreChatApiUrl:!1})=>{let t=cn("NEXT_PUBLIC_CHAT_API_URL"),n=cn("NEXT_PUBLIC_USE_EXPERIMENTAL_CHAT_API_ON")?.split(",");if(!e&&t&&(!n||n.some(a=>a===window.location.href)))return t;let r=cn("NEXT_PUBLIC_VIEWER_URL")?.split(",");return r?.find(a=>window.location.href.startsWith(a))??r?.[0]??MS};function lf(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=lf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function _t(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=lf(e))&&(r&&(r+=" "),r+=t);return r}var he=_t;var $T=br(Qf(),1),GT=br(tp(),1);var $M=String.fromCharCode;var ww={AF:"Africa",AN:"Antarctica",AS:"Asia",EU:"Europe",NA:"North America",OC:"Oceania",SA:"South America"},zM=Object.keys(ww);var Tw={AF:"Afghanistan",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo (Republic)",CD:"Congo (Democratic Republic)",CK:"Cook Islands",CR:"Costa Rica",CI:"Ivory Coast",HR:"Croatia",CU:"Cuba",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",VA:"Vatican City",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran",IQ:"Iraq",IE:"Ireland",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Laos",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia",MD:"Moldova",MC:"Monaco",MN:"Mongolia",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MK:"Macedonia",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Reunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SH:"Saint Helena",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Eswatini",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan",TJ:"Tajikistan",TZ:"Tanzania",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela",VN:"Vietnam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe",AX:"\xC5land Islands",BQ:"Bonaire, Sint Eustatius and Saba",CW:"Cura\xE7ao",GG:"Guernsey",IM:"Isle of Man",JE:"Jersey",ME:"Montenegro",BL:"Saint Barth\xE9lemy",MF:"Saint Martin (French part)",RS:"Serbia",SX:"Sint Maarten (Dutch part)",SS:"South Sudan",XK:"Kosovo"},YM=Object.keys(Tw);var Be=br(Tp()),sR=Be.Prisma.JsonNull,lR=Be.Prisma.DbNull;var dR=process.env.NEXT_PUBLIC_APP_NAME||"Release0.com",Cp={id:"release0_workspace",createdAt:new Date,updatedAt:new Date,name:"release0",slug:"release0",plan:Be.Plan.ENTERPRISE,isQuarantined:!1,isSuspended:!1,isPastDue:!1};var fR=`https://${process.env.NEXT_PUBLIC_APP_DOMAIN}`,pR=process.env.NEXT_PUBLIC_VERCEL_ENV==="production"?`https://app.${process.env.NEXT_PUBLIC_APP_DOMAIN}`:process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"?`https://preview.${process.env.NEXT_PUBLIC_APP_DOMAIN}`:"http://localhost:7777";var mR=`${process.env.NEXT_PUBLIC_APP_URL}/images/logo512.png`;var BT=process.env.NEXT_PUBLIC_SHORT_DOMAINS||"r0.ar",UT=BT.split(";").map(e=>e.trim()).filter(Boolean),bR=UT.map((e,t)=>({id:`release0_${e.replace(/\./g,"_")}`,slug:e,verified:!0,primary:t===0,archived:!1,workspaceId:Cp.id}));var TR=60*60*24*14;var Ep=1e9,bo=[{type:Be.Plan.HOBBY,name:"Hobby",tagline:"For hobby & side projects",price:{monthly:0,yearly:0},limits:{agents:20,chats:250,seats:2,tags:2,domains:0,analyticsRetentionMonths:3,agentVersioning:1,publishedAgentVersioning:1},feature:{agentPassword:!1,agentExpiration:!1,removeBrand:!1,customizeBrand:!1,restrictedBlocks:["payment input"],support:"Online support"}},{type:Be.Plan.PRO,name:"Pro",tagline:"For startups & small businesses",price:{monthly:39,yearly:31},limits:{agents:100,chats:2500,seats:5,tags:10,domains:1,analyticsRetentionMonths:12,agentVersioning:10,publishedAgentVersioning:10},feature:{agentPassword:!1,agentExpiration:!1,removeBrand:!0,customizeBrand:!1,restrictedBlocks:[],support:"Online support"}},{type:Be.Plan.BUSINESS,name:"Business",tagline:"For growing teams & established companies",price:{monthly:89,yearly:69},limits:{agents:500,chats:1e4,seats:20,tags:50,domains:10,analyticsRetentionMonths:24,agentVersioning:20,publishedAgentVersioning:20},feature:{agentPassword:!1,agentExpiration:!1,removeBrand:!0,customizeBrand:!0,restrictedBlocks:[],support:"Priority support"}},{type:Be.Plan.ADVANCED,name:"Advanced",tagline:"For high-scale operations & enterprise needs",price:{monthly:149,yearly:110},limits:{agents:Ep,chats:25e3,seats:50,tags:500,domains:50,analyticsRetentionMonths:60,agentVersioning:40,publishedAgentVersioning:40},feature:{agentPassword:!0,agentExpiration:!0,removeBrand:!0,customizeBrand:!0,restrictedBlocks:[],support:"Priority support"}},{type:Be.Plan.ENTERPRISE,name:"Enterprise",tagline:"Custom solutions for scale. Whether you're launching AI agents across enterprise workflows or running high-volume campaigns with millions of interactions, Release0 is built to handle it\u2014securely, reliably, and at scale.",price:{monthly:null,yearly:null},feature:{support:"Dedicated success manager"}},{type:Be.Plan.CUSTOM_APPSUMO_TIER1,name:"Appsumo - Tier 1",shortName:"Tier 1",tagline:"For hobby & side projects",price:{monthly:0,yearly:0},limits:{agents:50,chats:1500,seats:2,tags:10,domains:1,analyticsRetentionMonths:12,agentVersioning:10,publishedAgentVersioning:10},feature:{agentPassword:!1,agentExpiration:!1,removeBrand:!1,customizeBrand:!1,restrictedBlocks:[]}},{type:Be.Plan.CUSTOM_APPSUMO_TIER2,name:"Appsumo - Tier 2",shortName:"Tier 2",tagline:"For growing teams & established companies",price:{monthly:0,yearly:0},limits:{agents:100,chats:3e3,seats:4,tags:20,domains:2,analyticsRetentionMonths:24,agentVersioning:20,publishedAgentVersioning:20},feature:{agentPassword:!1,agentExpiration:!1,removeBrand:!0,customizeBrand:!1,restrictedBlocks:[]}},{type:Be.Plan.CUSTOM_APPSUMO_TIER3,name:"Appsumo - Tier 3",shortName:"Tier 3",tagline:"For growing teams & established companies",price:{monthly:0,yearly:0},limits:{agents:150,chats:4500,seats:6,tags:30,domains:3,analyticsRetentionMonths:36,agentVersioning:30,publishedAgentVersioning:30},feature:{agentPassword:!1,agentExpiration:!1,removeBrand:!0,customizeBrand:!1,restrictedBlocks:[]}},{type:Be.Plan.CUSTOM_APPSUMO_TIER4,name:"Appsumo - Tier 4",shortName:"Tier 4",tagline:"For growing teams & established companies",price:{monthly:0,yearly:0},limits:{agents:200,chats:6e3,seats:8,tags:40,domains:4,analyticsRetentionMonths:48,agentVersioning:20,publishedAgentVersioning:20},feature:{agentPassword:!1,agentExpiration:!1,removeBrand:!1,customizeBrand:!1,restrictedBlocks:[]}},{type:Be.Plan.CUSTOM_APPSUMO_TIER5,name:"Appsumo - Tier 5",shortName:"Tier 3",tagline:"For growing teams & established companies",price:{monthly:0,yearly:0},limits:{agents:250,chats:7500,seats:10,tags:50,domains:5,analyticsRetentionMonths:60,agentVersioning:20,publishedAgentVersioning:20},feature:{agentPassword:!0,agentExpiration:!0,removeBrand:!0,customizeBrand:!0,restrictedBlocks:[]}}],kR=bo.find(e=>e.type===Be.Plan.HOBBY),AR=bo.find(e=>e.type===Be.Plan.PRO),PR=bo.find(e=>e.type===Be.Plan.BUSINESS),IR=bo.find(e=>e.type===Be.Plan.ADVANCED),_R=bo.find(e=>e.type===Be.Plan.ADVANCED);var MR=bo.filter(e=>e.type!==Be.Plan.HOBBY&&e.type!==Be.Plan.ENTERPRISE&&!e.type.startsWith("CUSTOM"));var FT={"AF-BDS":"Badakhsh\u0101n","AF-BDG":"B\u0101dgh\u012Bs","AF-BGL":"Baghl\u0101n","AF-BAL":"Balkh","AF-BAM":"B\u0101my\u0101n","AF-DAY":"D\u0101ykund\u012B","AF-FRA":"Far\u0101h","AF-FYB":"F\u0101ry\u0101b","AF-GHA":"Ghazn\u012B","AF-GHO":"Gh\u014Dr","AF-HEL":"Helmand","AF-HER":"Her\u0101t","AF-JOW":"Jowzj\u0101n","AF-KAB":"K\u0101bul","AF-KAN":"Kandah\u0101r","AF-KAP":"K\u0101p\u012Bs\u0101","AF-KHO":"Kh\u014Dst","AF-KNR":"Kuna\u1E5F","AF-KDZ":"Kunduz","AF-LAG":"Laghm\u0101n","AF-LOG":"L\u014Dgar","AF-NAN":"Nangarh\u0101r","AF-NIM":"N\u012Bmr\u014Dz","AF-NUR":"N\u016Brist\u0101n","AF-PKA":"Pakt\u012Bk\u0101","AF-PIA":"Paktiy\u0101","AF-PAN":"Panjshayr","AF-PAR":"Parw\u0101n","AF-SAM":"Samang\u0101n","AF-SAR":"Sar-e Pul","AF-TAK":"Takh\u0101r","AF-URU":"Uruzg\u0101n","AF-WAR":"Wardak","AF-ZAB":"Z\u0101bul","AL-01":"Berat","AL-09":"Dib\xEBr","AL-02":"Durr\xEBs","AL-03":"Elbasan","AL-04":"Fier","AL-05":"Gjirokast\xEBr","AL-06":"Kor\xE7\xEB","AL-07":"Kuk\xEBs","AL-08":"Lezh\xEB","AL-10":"Shkod\xEBr","AL-11":"Tiran\xEB","AL-12":"Vlor\xEB","DZ-01":"Adrar","DZ-44":"A\xEFn Defla","DZ-46":"A\xEFn T\xE9mouchent","DZ-16":"Alger","DZ-23":"Annaba","DZ-05":"Batna","DZ-08":"B\xE9char","DZ-06":"B\xE9ja\xEFa","DZ-52":"B\xE9ni Abb\xE8s","DZ-07":"Biskra","DZ-09":"Blida","DZ-50":"Bordj Badji Mokhtar","DZ-34":"Bordj Bou Arr\xE9ridj","DZ-10":"Bouira","DZ-35":"Boumerd\xE8s","DZ-02":"Chlef","DZ-25":"Constantine","DZ-56":"Djanet","DZ-17":"Djelfa","DZ-32":"El Bayadh","DZ-57":"El Meghaier","DZ-58":"El Meniaa","DZ-39":"El Oued","DZ-36":"El Tarf","DZ-47":"Gharda\xEFa","DZ-24":"Guelma","DZ-33":"Illizi","DZ-54":"In Guezzam","DZ-53":"In Salah","DZ-18":"Jijel","DZ-40":"Khenchela","DZ-03":"Laghouat","DZ-28":"M'sila","DZ-29":"Mascara","DZ-26":"M\xE9d\xE9a","DZ-43":"Mila","DZ-27":"Mostaganem","DZ-45":"Naama","DZ-31":"Oran","DZ-30":"Ouargla","DZ-51":"Ouled Djellal","DZ-04":"Oum el Bouaghi","DZ-48":"Relizane","DZ-20":"Sa\xEFda","DZ-19":"S\xE9tif","DZ-22":"Sidi Bel Abb\xE8s","DZ-21":"Skikda","DZ-41":"Souk Ahras","DZ-11":"Tamanrasset","DZ-12":"T\xE9bessa","DZ-14":"Tiaret","DZ-49":"Timimoun","DZ-37":"Tindouf","DZ-42":"Tipaza","DZ-38":"Tissemsilt","DZ-15":"Tizi Ouzou","DZ-13":"Tlemcen","DZ-55":"Touggourt","AD-07":"Andorra la Vella","AD-02":"Canillo","AD-03":"Encamp","AD-08":"Escaldes-Engordany","AD-04":"La Massana","AD-05":"Ordino","AD-06":"Sant Juli\xE0 de L\xF2ria","AO-BGO":"Bengo","AO-BGU":"Benguela","AO-BIE":"Bi\xE9","AO-CAB":"Cabinda","AO-CCU":"Cuando Cubango","AO-CNO":"Cuanza-Norte","AO-CUS":"Cuanza-Sul","AO-CNN":"Cunene","AO-HUA":"Huambo","AO-HUI":"Hu\xEDla","AO-LUA":"Luanda","AO-LNO":"Lunda-Norte","AO-LSU":"Lunda-Sul","AO-MAL":"Malange","AO-MOX":"Moxico","AO-NAM":"Namibe","AO-UIG":"U\xEDge","AO-ZAI":"Zaire","AG-03":"Saint George","AG-04":"Saint John","AG-05":"Saint Mary","AG-06":"Saint Paul","AG-07":"Saint Peter","AG-08":"Saint Philip","AG-10":"Barbuda","AG-11":"Redonda","AR-B":"Buenos Aires","AR-K":"Catamarca","AR-H":"Chaco","AR-U":"Chubut","AR-C":"Ciudad Aut\xF3noma de Buenos Aires","AR-X":"C\xF3rdoba","AR-W":"Corrientes","AR-E":"Entre R\xEDos","AR-P":"Formosa","AR-Y":"Jujuy","AR-L":"La Pampa","AR-F":"La Rioja","AR-M":"Mendoza","AR-N":"Misiones","AR-Q":"Neuqu\xE9n","AR-R":"R\xEDo Negro","AR-A":"Salta","AR-J":"San Juan","AR-D":"San Luis","AR-Z":"Santa Cruz","AR-S":"Santa Fe","AR-G":"Santiago del Estero","AR-V":"Tierra del Fuego","AR-T":"Tucum\xE1n","AM-AG":"Aragac\u0323otn","AM-AR":"Ararat","AM-AV":"Armavir","AM-ER":"Erevan","AM-GR":"Ge\u0121ark'unik'","AM-KT":"Kotayk'","AM-LO":"Lo\u1E59i","AM-SH":"\u0160irak","AM-SU":"Syunik'","AM-TV":"Tavu\u0161","AM-VD":"Vayo\u0107 Jor","AU-NSW":"New South Wales","AU-QLD":"Queensland","AU-SA":"South Australia","AU-TAS":"Tasmania","AU-VIC":"Victoria","AU-WA":"Western Australia","AU-ACT":"Australian Capital Territory","AU-NT":"Northern Territory","AT-1":"Burgenland","AT-2":"K\xE4rnten","AT-3":"Nieder\xF6sterreich","AT-4":"Ober\xF6sterreich","AT-5":"Salzburg","AT-6":"Steiermark","AT-7":"Tirol","AT-8":"Vorarlberg","AT-9":"Wien","AZ-NX":"Nax\xE7\u0131van","BS-AK":"Acklins","BS-BY":"Berry Islands","BS-BI":"Bimini","BS-BP":"Black Point","BS-CI":"Cat Island","BS-CO":"Central Abaco","BS-CS":"Central Andros","BS-CE":"Central Eleuthera","BS-FP":"City of Freeport","BS-CK":"Crooked Island and Long Cay","BS-EG":"East Grand Bahama","BS-EX":"Exuma","BS-GC":"Grand Cay","BS-HI":"Harbour Island","BS-HT":"Hope Town","BS-IN":"Inagua","BS-LI":"Long Island","BS-MC":"Mangrove Cay","BS-MG":"Mayaguana","BS-MI":"Moore's Island","BS-NP":"New Providence","BS-NO":"North Abaco","BS-NS":"North Andros","BS-NE":"North Eleuthera","BS-RI":"Ragged Island","BS-RC":"Rum Cay","BS-SS":"San Salvador","BS-SO":"South Abaco","BS-SA":"South Andros","BS-SE":"South Eleuthera","BS-SW":"Spanish Wells","BS-WG":"West Grand Bahama","BH-13":"Al \u2018\u0100\u015Fimah","BH-14":"Al Jan\u016Bb\u012Byah","BH-15":"Al Mu\u1E29arraq","BH-17":"Ash Sham\u0101l\u012Byah","BD-A":"Barishal","BD-B":"Chattogram","BD-C":"Dhaka","BD-D":"Khulna","BD-H":"Mymensingh","BD-E":"Rajshahi","BD-F":"Rangpur","BD-G":"Sylhet","BB-01":"Christ Church","BB-02":"Saint Andrew","BB-03":"Saint George","BB-04":"Saint James","BB-05":"Saint John","BB-06":"Saint Joseph","BB-07":"Saint Lucy","BB-08":"Saint Michael","BB-09":"Saint Peter","BB-10":"Saint Philip","BB-11":"Saint Thomas","BY-BR":"Brestskaya voblasts'","BY-HO":"Homyel'skaya voblasts'","BY-HM":"Horad Minsk","BY-HR":"Hrodzyenskaya voblasts'","BY-MA":"Mahilyowskaya voblasts'","BY-MI":"Minskaya voblasts'","BY-VI":"Vitsyebskaya voblasts'","BE-BRU":"Brussels Hoofdstedelijk Gewest","BE-VLG":"Vlaams Gewest","BE-WAL":"Waals Gewest[note 2]","BZ-BZ":"Belize","BZ-CY":"Cayo","BZ-CZL":"Corozal","BZ-OW":"Orange Walk","BZ-SC":"Stann Creek","BZ-TOL":"Toledo","BJ-AL":"Alibori","BJ-AK":"Atacora","BJ-AQ":"Atlantique","BJ-BO":"Borgou","BJ-CO":"Collines","BJ-KO":"Couffo","BJ-DO":"Donga","BJ-LI":"Littoral","BJ-MO":"Mono","BJ-OU":"Ou\xE9m\xE9","BJ-PL":"Plateau","BJ-ZO":"Zou","BT-33":"Bumthang","BT-12":"Chhukha","BT-22":"Dagana","BT-GA":"Gasa","BT-13":"Haa","BT-44":"Lhuentse","BT-42":"Monggar","BT-11":"Paro","BT-43":"Pema Gatshel","BT-23":"Punakha","BT-45":"Samdrup Jongkhar","BT-14":"Samtse","BT-31":"Sarpang","BT-15":"Thimphu","BT-41":"Trashigang","BT-TY":"Trashi Yangtse","BT-32":"Trongsa","BT-21":"Tsirang","BT-24":"Wangdue Phodrang","BT-34":"Zhemgang","BO-C":"Cochabamba","BO-H":"Chuquisaca","BO-B":"El Beni","BO-L":"La Paz","BO-O":"Oruro","BO-N":"Pando","BO-P":"Potos\xED","BO-S":"Santa Cruz","BO-T":"Tarija","BA-BIH":"Federacija Bosne i Hercegovine","BA-SRP":"Republika Srpska","BA-BRC":"Br\u010Dko distrikt","BW-CE":"Central","BW-CH":"Chobe","BW-FR":"Francistown","BW-GA":"Gaborone","BW-GH":"Ghanzi","BW-JW":"Jwaneng","BW-KG":"Kgalagadi","BW-KL":"Kgatleng","BW-KW":"Kweneng","BW-LO":"Lobatse","BW-NE":"North East","BW-NW":"North West","BW-SP":"Selibe Phikwe","BW-SE":"South East","BW-SO":"Southern","BW-ST":"Sowa Town","BR-AC":"Acre","BR-AL":"Alagoas","BR-AP":"Amap\xE1","BR-AM":"Amazonas","BR-BA":"Bahia","BR-CE":"Cear\xE1","BR-DF":"Distrito Federal","BR-ES":"Esp\xEDrito Santo","BR-GO":"Goi\xE1s","BR-MA":"Maranh\xE3o","BR-MT":"Mato Grosso","BR-MS":"Mato Grosso do Sul","BR-MG":"Minas Gerais","BR-PA":"Par\xE1","BR-PB":"Para\xEDba","BR-PR":"Paran\xE1","BR-PE":"Pernambuco","BR-PI":"Piau\xED","BR-RJ":"Rio de Janeiro","BR-RN":"Rio Grande do Norte","BR-RS":"Rio Grande do Sul","BR-RO":"Rond\xF4nia","BR-RR":"Roraima","BR-SC":"Santa Catarina","BR-SP":"S\xE3o Paulo","BR-SE":"Sergipe","BR-TO":"Tocantins","BN-BE":"Belait","BN-BM":"Brunei-Muara","BN-TE":"Temburong","BN-TU":"Tutong","BG-01":"Blagoevgrad","BG-02":"Burgas","BG-08":"Dobrich","BG-07":"Gabrovo","BG-26":"Haskovo","BG-09":"Kardzhali","BG-10":"Kyustendil","BG-11":"Lovech","BG-12":"Montana","BG-13":"Pazardzhik","BG-14":"Pernik","BG-15":"Pleven","BG-16":"Plovdiv","BG-17":"Razgrad","BG-18":"Ruse","BG-27":"Shumen","BG-19":"Silistra","BG-20":"Sliven","BG-21":"Smolyan","BG-23":"Sofia","BG-22":"Sofia (stolitsa)","BG-24":"Stara Zagora","BG-25":"Targovishte","BG-03":"Varna","BG-04":"Veliko Tarnovo","BG-05":"Vidin","BG-06":"Vratsa","BG-28":"Yambol","BF-01":"Boucle du Mouhoun","BF-02":"Cascades","BF-03":"Centre","BF-04":"Centre-Est","BF-05":"Centre-Nord","BF-06":"Centre-Ouest","BF-07":"Centre-Sud","BF-08":"Est","BF-09":"Hauts-Bassins","BF-10":"Nord","BF-11":"Plateau-Central","BF-12":"Sahel","BF-13":"Sud-Ouest","BI-BB":"Bubanza","BI-BM":"Bujumbura Mairie","BI-BL":"Bujumbura Rural","BI-BR":"Bururi","BI-CA":"Cankuzo","BI-CI":"Cibitoke","BI-GI":"Gitega","BI-KR":"Karuzi","BI-KY":"Kayanza","BI-KI":"Kirundo","BI-MA":"Makamba","BI-MU":"Muramvya","BI-MY":"Muyinga","BI-MW":"Mwaro","BI-NG":"Ngozi","BI-RM":"Rumonge","BI-RT":"Rutana","BI-RY":"Ruyigi","KH-2":"Baat Dambang","KH-1":"Banteay Mean Cho\u0103y","KH-23":"Kaeb","KH-3":"Kampong Chaam","KH-4":"Kampong Chhnang","KH-5":"Kampong Spueu","KH-6":"Kampong Thum","KH-7":"Kampot","KH-8":"Kandaal","KH-9":"Kaoh Kong","KH-10":"Kracheh","KH-11":"Mondol Kiri","KH-22":"Otdar Mean Chey","KH-24":"Pailin","KH-12":"Phnom Penh","KH-15":"Pousaat","KH-18":"Preah Sihanouk","KH-13":"Preah Vihear","KH-14":"Prey Veaeng","KH-16":"Rotanak Kiri","KH-17":"Siem Reab","KH-19":"Stueng Traeng","KH-20":"Svaay Rieng","KH-21":"Taakaev","KH-25":"Tbong Khmum","CM-AD":"Adamaoua","CM-CE":"Centre","CM-ES":"East","CM-EN":"Far North","CM-LT":"Littoral","CM-NO":"North","CM-NW":"North-West","CM-SU":"South","CM-SW":"South-West","CM-OU":"West","CA-AB":"Alberta","CA-BC":"British Columbia","CA-MB":"Manitoba","CA-NB":"New Brunswick","CA-NL":"Newfoundland and Labrador","CA-NT":"Northwest Territories","CA-NS":"Nova Scotia","CA-NU":"Nunavut","CA-ON":"Ontario","CA-PE":"Prince Edward Island","CA-QC":"Quebec","CA-SK":"Saskatchewan","CA-YT":"Yukon","CV-B":"Ilhas de Barlavento","CV-S":"Ilhas de Sotavento","CF-BB":"Bamingui-Bangoran","CF-BGF":"Bangui","CF-BK":"Basse-Kotto","CF-KB":"Gribingui","CF-HM":"Haut-Mbomou","CF-HK":"Haute-Kotto","CF-HS":"Haute-Sangha / Mamb\xE9r\xE9-Kad\xE9\xEF","CF-KG":"K\xE9mo-Gribingui","CF-LB":"Lobaye","CF-MB":"Mbomou","CF-NM":"Nana-Mamb\xE9r\xE9","CF-MP":"Ombella-Mpoko","CF-UK":"Ouaka","CF-AC":"Ouham","CF-OP":"Ouham-Pend\xE9","CF-SE":"Sangha","CF-VK":"Vakaga","TD-BG":"Ba\u1E29r al Ghaz\u0101l","TD-BA":"Al Ba\u0163\u1E29\u0101\u2019","TD-BO":"B\u016Brk\u016B","TD-CB":"Sh\u0101r\u012B B\u0101qirm\u012B","TD-EE":"In\u012Bd\u012B ash Sharq\u012B","TD-EO":"In\u012Bd\u012B al Gharb\u012B","TD-GR":"Q\u012Br\u0101","TD-HL":"\u1E28ajjar Lam\u012Bs","TD-KA":"K\u0101nim","TD-LC":"Al Bu\u1E29ayrah","TD-LO":"L\u016Bgh\u016Bn al Gharb\u012B","TD-LR":"L\u016Bgh\u016Bn ash Sharq\u012B","TD-MA":"M\u0101nd\u016Bl","TD-ME":"M\u0101y\u016B K\u012Bbb\u012B ash Sharq\u012B","TD-MO":"M\u0101y\u016B K\u012Bbb\u012B al Gharb\u012B","TD-MC":"Sh\u0101r\u012B al Awsa\u0163","TD-OD":"Wadd\u0101y","TD-SA":"Sal\u0101m\u0101t","TD-SI":"S\u012Bl\u0101","TD-TA":"T\u0101nj\u012Bl\u012B","TD-TI":"Tibast\u012B","TD-ND":"Mad\u012Bnat Injam\u012Bn\u0101","TD-WF":"W\u0101d\u012B F\u012Br\u0101\u2019","CL-AI":"Ais\xE9n del General Carlos Iba\xF1ez del Campo","CL-AN":"Antofagasta","CL-AP":"Arica y Parinacota","CL-AT":"Atacama","CL-BI":"Biob\xEDo","CL-CO":"Coquimbo","CL-AR":"La Araucan\xEDa","CL-LI":"Libertador General Bernardo O'Higgins","CL-LL":"Los Lagos","CL-LR":"Los R\xEDos","CL-MA":"Magallanes","CL-ML":"Maule","CL-NB":"\xD1uble","CL-RM":"Regi\xF3n Metropolitana de Santiago","CL-TA":"Tarapac\xE1","CL-VS":"Valpara\xEDso","CN-AH":"Anhui Sheng","CN-BJ":"Beijing Shi","CN-CQ":"Chongqing Shi","CN-FJ":"Fujian Sheng","CN-GS":"Gansu Sheng","CN-GD":"Guangdong Sheng","CN-GX":"Guangxi Zhuangzu Zizhiqu","CN-GZ":"Guizhou Sheng","CN-HI":"Hainan Sheng","CN-HE":"Hebei Sheng","CN-HL":"Heilongjiang Sheng","CN-HA":"Henan Sheng","CN-HK":"Hong Kong SARen","CN-HB":"Hubei Sheng","CN-HN":"Hunan Sheng","CN-JS":"Jiangsu Sheng","CN-JX":"Jiangxi Sheng","CN-JL":"Jilin Sheng","CN-LN":"Liaoning Sheng","CN-MO":"Macao SARpt","CN-NM":"Nei Mongol Zizhiqu","CN-NX":"Ningxia Huizu Zizhiqu","CN-QH":"Qinghai Sheng","CN-SN":"Shaanxi Sheng","CN-SD":"Shandong Sheng","CN-SH":"Shanghai Shi","CN-SX":"Shanxi Sheng","CN-SC":"Sichuan Sheng","CN-TW":"Taiwan Sheng","CN-TJ":"Tianjin Shi","CN-XJ":"Xinjiang Uygur Zizhiqu","CN-XZ":"Xizang Zizhiqu","CN-YN":"Yunnan Sheng","CN-ZJ":"Zhejiang Sheng","CO-AMA":"Amazonas","CO-ANT":"Antioquia","CO-ARA":"Arauca","CO-ATL":"Atl\xE1ntico","CO-BOL":"Bol\xEDvar","CO-BOY":"Boyac\xE1","CO-CAL":"Caldas","CO-CAQ":"Caquet\xE1","CO-CAS":"Casanare","CO-CAU":"Cauca","CO-CES":"Cesar","CO-COR":"C\xF3rdoba","CO-CUN":"Cundinamarca","CO-CHO":"Choc\xF3","CO-DC":"Distrito Capital de Bogot\xE1","CO-GUA":"Guain\xEDa","CO-GUV":"Guaviare","CO-HUI":"Huila","CO-LAG":"La Guajira","CO-MAG":"Magdalena","CO-MET":"Meta","CO-NAR":"Nari\xF1o","CO-NSA":"Norte de Santander","CO-PUT":"Putumayo","CO-QUI":"Quind\xEDo","CO-RIS":"Risaralda","CO-SAP":"San Andr\xE9s","CO-SAN":"Santander","CO-SUC":"Sucre","CO-TOL":"Tolima","CO-VAC":"Valle del Cauca","CO-VAU":"Vaup\xE9s","CO-VID":"Vichada","KM-G":"Grande Comore","KM-A":"Anjouan","KM-M":"Moh\xE9li","CG-11":"Bouenza","CG-BZV":"Brazzaville","CG-8":"Cuvette","CG-15":"Cuvette-Ouest","CG-5":"Kouilou","CG-2":"L\xE9koumou","CG-7":"Likouala","CG-9":"Niari","CG-14":"Plateaux","CG-16":"Pointe-Noire","CG-12":"Pool","CG-13":"Sangha","CD-BU":"Bas-U\xE9l\xE9","CD-EQ":"\xC9quateur","CD-HK":"Haut-Katanga","CD-HL":"Haut-Lomami","CD-HU":"Haut-U\xE9l\xE9","CD-IT":"Ituri","CD-KS":"Kasa\xEF","CD-KC":"Kasa\xEF Central","CD-KE":"Kasa\xEF Oriental","CD-KN":"Kinshasa","CD-BC":"Kongo Central","CD-KG":"Kwango","CD-KL":"Kwilu","CD-LO":"Lomami","CD-LU":"Lualaba","CD-MN":"Mai-Ndombe","CD-MA":"Maniema","CD-MO":"Mongala","CD-NK":"Nord-Kivu","CD-NU":"Nord-Ubangi","CD-SA":"Sankuru","CD-SK":"Sud-Kivu","CD-SU":"Sud-Ubangi","CD-TA":"Tanganyika","CD-TO":"Tshopo","CD-TU":"Tshuapa","CR-A":"Alajuela","CR-C":"Cartago","CR-G":"Guanacaste","CR-H":"Heredia","CR-L":"Lim\xF3n","CR-P":"Puntarenas","CR-SJ":"San Jos\xE9","CI-AB":"Abidjan","CI-BS":"Bas-Sassandra","CI-CM":"Como\xE9","CI-DN":"Dengu\xE9l\xE9","CI-GD":"G\xF4h-Djiboua","CI-LC":"Lacs","CI-LG":"Lagunes","CI-MG":"Montagnes","CI-SM":"Sassandra-Marahou\xE9","CI-SV":"Savanes","CI-VB":"Vall\xE9e du Bandama","CI-WR":"Woroba","CI-YM":"Yamoussoukro","CI-ZZ":"Zanzan","HR-07":"Bjelovarsko-bilogorska \u017Eupanija","HR-12":"Brodsko-posavska \u017Eupanija","HR-19":"Dubrova\u010Dko-neretvanska \u017Eupanija","HR-21":"Grad Zagreb","HR-18":"Istarska \u017Eupanija","HR-04":"Karlova\u010Dka \u017Eupanija","HR-06":"Koprivni\u010Dko-kri\u017Eeva\u010Dka \u017Eupanija","HR-02":"Krapinsko-zagorska \u017Eupanija","HR-09":"Li\u010Dko-senjska \u017Eupanija","HR-20":"Me\u0111imurska \u017Eupanija","HR-14":"Osje\u010Dko-baranjska \u017Eupanija","HR-11":"Po\u017Ee\u0161ko-slavonska \u017Eupanija","HR-08":"Primorsko-goranska \u017Eupanija","HR-03":"Sisa\u010Dko-moslava\u010Dka \u017Eupanija","HR-17":"Splitsko-dalmatinska \u017Eupanija","HR-15":"\u0160ibensko-kninska \u017Eupanija","HR-05":"Vara\u017Edinska \u017Eupanija","HR-10":"Viroviti\u010Dko-podravska \u017Eupanija","HR-16":"Vukovarsko-srijemska \u017Eupanija","HR-13":"Zadarska \u017Eupanija","HR-01":"Zagreba\u010Dka \u017Eupanija","CU-15":"Artemisa","CU-09":"Camag\xFCey","CU-08":"Ciego de \xC1vila","CU-06":"Cienfuegos","CU-12":"Granma","CU-14":"Guant\xE1namo","CU-11":"Holgu\xEDn","CU-03":"La Habana","CU-10":"Las Tunas","CU-04":"Matanzas","CU-16":"Mayabeque","CU-01":"Pinar del R\xEDo","CU-07":"Sancti Sp\xEDritus","CU-13":"Santiago de Cuba","CU-05":"Villa Clara","CU-99":"Isla de la Juventud","CY-04":"Ammochostos","CY-06":"Keryneia","CY-03":"Larnaka","CY-01":"Lefkosia","CY-02":"Lemesos","CY-05":"Pafos","CZ-31":"Jiho\u010Desk\xFD kraj","CZ-64":"Jihomoravsk\xFD kraj","CZ-41":"Karlovarsk\xFD kraj","CZ-52":"Kr\xE1lov\xE9hradeck\xFD kraj","CZ-51":"Libereck\xFD kraj","CZ-80":"Moravskoslezsk\xFD kraj","CZ-71":"Olomouck\xFD kraj","CZ-53":"Pardubick\xFD kraj","CZ-32":"Plze\u0148sk\xFD kraj","CZ-10":"Praha","CZ-20":"St\u0159edo\u010Desk\xFD kraj","CZ-42":"\xDAsteck\xFD kraj","CZ-63":"Kraj Vyso\u010Dina","CZ-72":"Zl\xEDnsk\xFD kraj","DK-84":"Region Hovedstaden","DK-82":"Region Midjylland","DK-81":"Region Nordjylland","DK-85":"Region Sj\xE6lland","DK-83":"Region Syddanmark","DJ-AS":"Ali Sabieh","DJ-AR":"Arta","DJ-DI":"Dikhil","DJ-DJ":"Djibouti","DJ-OB":"Obock","DJ-TA":"Tadjourah","DM-02":"Saint Andrew","DM-03":"Saint David","DM-04":"Saint George","DM-05":"Saint John","DM-06":"Saint Joseph","DM-07":"Saint Luke","DM-08":"Saint Mark","DM-09":"Saint Patrick","DM-10":"Saint Paul","DM-11":"Saint Peter","DO-33":"Cibao Nordeste","DO-34":"Cibao Noroeste","DO-35":"Cibao Norte","DO-36":"Cibao Sur","DO-37":"El Valle","DO-38":"Enriquillo","DO-39":"Higuamo","DO-40":"Ozama","DO-41":"Valdesia","DO-42":"Yuma","EC-A":"Azuay","EC-B":"Bol\xEDvar","EC-F":"Ca\xF1ar","EC-C":"Carchi","EC-H":"Chimborazo","EC-X":"Cotopaxi","EC-O":"El Oro","EC-E":"Esmeraldas","EC-W":"Gal\xE1pagos","EC-G":"Guayas","EC-I":"Imbabura","EC-L":"Loja","EC-R":"Los R\xEDos","EC-M":"Manab\xED","EC-S":"Morona Santiago","EC-N":"Napo","EC-D":"Orellana","EC-Y":"Pastaza","EC-P":"Pichincha","EC-SE":"Santa Elena","EC-SD":"Santo Domingo de los Ts\xE1chilas","EC-U":"Sucumb\xEDos","EC-T":"Tungurahua","EC-Z":"Zamora Chinchipe","EG-DK":"Ad Daqahl\u012Byah","EG-BA":"Al Ba\u1E29r al A\u1E29mar","EG-BH":"Al Bu\u1E29ayrah","EG-FYM":"Al Fayy\u016Bm","EG-GH":"Al Gharb\u012Byah","EG-ALX":"Al Iskandar\u012Byah","EG-IS":"Al Ism\u0101'\u012Bl\u012Byah","EG-GZ":"Al J\u012Bzah","EG-MNF":"Al Min\u016Bf\u012Byah","EG-MN":"Al Miny\u0101","EG-C":"Al Q\u0101hirah","EG-KB":"Al Qaly\u016Bb\u012Byah","EG-LX":"Al Uq\u015Fur","EG-WAD":"Al W\u0101d\u012B al Jad\u012Bd","EG-SUZ":"As Suways","EG-SHR":"Ash Sharq\u012Byah","EG-ASN":"Asw\u0101n","EG-AST":"Asy\u016B\u0163","EG-BNS":"Ban\u012B Suwayf","EG-PTS":"B\u016Br Sa\u2018\u012Bd","EG-DT":"Dumy\u0101\u0163","EG-JS":"Jan\u016Bb S\u012Bn\u0101'","EG-KFS":"Kafr ash Shaykh","EG-MT":"Ma\u0163r\u016B\u1E29","EG-KN":"Qin\u0101","EG-SIN":"Sham\u0101l S\u012Bn\u0101'","EG-SHG":"S\u016Bh\u0101j","SV-AH":"Ahuachap\xE1n","SV-CA":"Caba\xF1as","SV-CH":"Chalatenango","SV-CU":"Cuscatl\xE1n","SV-LI":"La Libertad","SV-PA":"La Paz","SV-UN":"La Uni\xF3n","SV-MO":"Moraz\xE1n","SV-SM":"San Miguel","SV-SS":"San Salvador","SV-SV":"San Vicente","SV-SA":"Santa Ana","SV-SO":"Sonsonate","SV-US":"Usulut\xE1n","GQ-C":"Regi\xF3n Continental","GQ-I":"Regi\xF3n Insular","ER-MA":"Al Awsa\u0163","ER-DU":"Al Jan\u016Bb\u012B","ER-AN":"Ansab\u0101","ER-DK":"Jan\u016Bb\u012B al Ba\u1E29r\u012B al A\u1E29mar","ER-GB":"Q\u0101sh-Barkah","ER-SK":"Shim\u0101l\u012B al Ba\u1E29r\u012B al A\u1E29mar","EE-37":"Harjumaa","EE-39":"Hiiumaa","EE-45":"Ida-Virumaa","EE-50":"J\xF5gevamaa","EE-52":"J\xE4rvamaa","EE-60":"L\xE4\xE4ne-Virumaa","EE-56":"L\xE4\xE4nemaa","EE-64":"P\xF5lvamaa","EE-68":"P\xE4rnumaa","EE-71":"Raplamaa","EE-74":"Saaremaa","EE-79":"Tartumaa","EE-81":"Valgamaa","EE-84":"Viljandimaa","EE-87":"V\xF5rumaa","ET-AA":"\u0100d\u012Bs \u0100beba","ET-AF":"\u0100far","ET-AM":"\u0100mara","ET-BE":"B\u012Bnshangul Gumuz","ET-DD":"Dir\u0113 Dawa","ET-GA":"Gamb\u0113la Hizboch","ET-HA":"H\u0101rer\u012B Hizb","ET-OR":"Orom\u012Bya","ET-SI":"S\u012Bdama","ET-SO":"Sumal\u0113","ET-TI":"Tigray","ET-SN":"YeDebub Bih\u0113roch Bih\u0113reseboch na Hizboch","ET-SW":"YeDebub M\u2018irab \u012Atyop\u2019iya Hizboch","FJ-C":"Central","FJ-E":"Eastern","FJ-N":"Northern","FJ-W":"Western","FJ-R":"Rotuma","FI-01":"Ahvenanmaan maakunta","FI-02":"Etel\xE4-Karjala","FI-03":"Etel\xE4-Pohjanmaa","FI-04":"Etel\xE4-Savo","FI-05":"Kainuu","FI-06":"Kanta-H\xE4me","FI-07":"Keski-Pohjanmaa","FI-08":"Keski-Suomi","FI-09":"Kymenlaakso","FI-10":"Lappi","FI-11":"Pirkanmaa","FI-12":"Pohjanmaa","FI-13":"Pohjois-Karjala","FI-14":"Pohjois-Pohjanmaa","FI-15":"Pohjois-Savo","FI-16":"P\xE4ij\xE4t-H\xE4me","FI-17":"Satakunta","FI-18":"Uusimaa","FI-19":"Varsinais-Suomi","FR-ARA":"Auvergne-Rh\xF4ne-Alpes","FR-BFC":"Bourgogne-Franche-Comt\xE9","FR-BRE":"Bretagne","FR-CVL":"Centre-Val de Loire","FR-20R":"Corse","FR-GES":"Grand Est","FR-HDF":"Hauts-de-France","FR-IDF":"\xCEle-de-France","FR-NOR":"Normandie","FR-NAQ":"Nouvelle-Aquitaine","FR-OCC":"Occitanie","FR-PDL":"Pays-de-la-Loire","FR-PAC":"Provence-Alpes-C\xF4te-d\u2019Azur","GA-1":"Estuaire","GA-2":"Haut-Ogoou\xE9","GA-3":"Moyen-Ogoou\xE9","GA-4":"Ngouni\xE9","GA-5":"Nyanga","GA-6":"Ogoou\xE9-Ivindo","GA-7":"Ogoou\xE9-Lolo","GA-8":"Ogoou\xE9-Maritime","GA-9":"Woleu-Ntem","GM-B":"Banjul","GM-M":"Central River","GM-L":"Lower River","GM-N":"North Bank","GM-U":"Upper River","GM-W":"Western","GE-AB":"Abkhazia","GE-AJ":"Ajaria","GE-GU":"Guria","GE-IM":"Imereti","GE-KA":"K'akheti","GE-KK":"Kvemo Kartli","GE-MM":"Mtskheta-Mtianeti","GE-RL":"Rach'a-Lechkhumi-Kvemo Svaneti","GE-SZ":"Samegrelo-Zemo Svaneti","GE-SJ":"Samtskhe-Javakheti","GE-SK":"Shida Kartli","GE-TB":"Tbilisi","DE-BW":"Baden-W\xFCrttemberg","DE-BY":"Bayern","DE-BE":"Berlin","DE-BB":"Brandenburg","DE-HB":"Bremen","DE-HH":"Hamburg","DE-HE":"Hessen","DE-MV":"Mecklenburg-Vorpommern","DE-NI":"Niedersachsen","DE-NW":"Nordrhein-Westfalen","DE-RP":"Rheinland-Pfalz","DE-SL":"Saarland","DE-SN":"Sachsen","DE-ST":"Sachsen-Anhalt","DE-SH":"Schleswig-Holstein","DE-TH":"Th\xFCringen","GH-AF":"Ahafo","GH-AH":"Ashanti","GH-BO":"Bono","GH-BE":"Bono East","GH-CP":"Central","GH-EP":"Eastern","GH-AA":"Greater Accra","GH-NE":"North East","GH-NP":"Northern","GH-OT":"Oti","GH-SV":"Savannah","GH-UE":"Upper East","GH-UW":"Upper West","GH-TV":"Volta","GH-WP":"Western","GH-WN":"Western North","GR-69":"\xC1gion \xD3ros","GR-A":"Anatolik\xED Makedon\xEDa kaiThr\xE1ki","GR-I":"Attik\xED","GR-G":"Dytik\xED Ell\xE1da","GR-C":"Dytik\xED Makedon\xEDa","GR-F":"Ion\xEDa N\xEDsia","GR-D":"\xCDpeiros","GR-B":"Kentrik\xED Makedon\xEDa","GR-M":"Kr\xEDti","GR-L":"N\xF3tio Aiga\xEDo","GR-J":"Pelop\xF3nnisos","GR-H":"Stere\xE1 Ell\xE1da","GR-E":"Thessal\xEDa","GR-K":"V\xF3reio Aiga\xEDo","GL-AV":"Avannaata Kommunia","GL-KU":"Kommune Kujalleq","GL-QT":"Kommune Qeqertalik","GL-SM":"Kommuneqarfik Sermersooq","GL-QE":"Qeqqata Kommunia","GD-01":"Saint Andrew","GD-02":"Saint David","GD-03":"Saint George","GD-04":"Saint John","GD-05":"Saint Mark","GD-06":"Saint Patrick","GD-10":"Southern Grenadine Islands","GT-16":"Alta Verapaz","GT-15":"Baja Verapaz","GT-04":"Chimaltenango","GT-20":"Chiquimula","GT-02":"El Progreso","GT-05":"Escuintla","GT-01":"Guatemala","GT-13":"Huehuetenango","GT-18":"Izabal","GT-21":"Jalapa","GT-22":"Jutiapa","GT-17":"Pet\xE9n","GT-09":"Quetzaltenango","GT-14":"Quich\xE9","GT-11":"Retalhuleu","GT-03":"Sacatep\xE9quez","GT-12":"San Marcos","GT-06":"Santa Rosa","GT-07":"Solol\xE1","GT-10":"Suchitep\xE9quez","GT-08":"Totonicap\xE1n","GT-19":"Zacapa","GN-B":"Bok\xE9","GN-F":"Faranah","GN-K":"Kankan","GN-D":"Kindia","GN-L":"Lab\xE9","GN-M":"Mamou","GN-N":"Nz\xE9r\xE9kor\xE9","GN-C":"Conakry","GW-L":"Leste","GW-N":"Norte","GW-S":"Sul","GY-BA":"Barima-Waini","GY-CU":"Cuyuni-Mazaruni","GY-DE":"Demerara-Mahaica","GY-EB":"East Berbice-Corentyne","GY-ES":"Essequibo Islands-West Demerara","GY-MA":"Mahaica-Berbice","GY-PM":"Pomeroon-Supenaam","GY-PT":"Potaro-Siparuni","GY-UD":"Upper Demerara-Berbice","GY-UT":"Upper Takutu-Upper Essequibo","HT-AR":"Artibonite","HT-CE":"Centre","HT-GA":"Grande\u2019Anse","HT-NI":"Nippes","HT-ND":"Nord","HT-NE":"Nord-Est","HT-NO":"Nord-Ouest","HT-OU":"Ouest","HT-SD":"Sud","HT-SE":"Sud-Est","HN-AT":"Atl\xE1ntida","HN-CH":"Choluteca","HN-CL":"Col\xF3n","HN-CM":"Comayagua","HN-CP":"Cop\xE1n","HN-CR":"Cort\xE9s","HN-EP":"El Para\xEDso","HN-FM":"Francisco Moraz\xE1n","HN-GD":"Gracias a Dios","HN-IN":"Intibuc\xE1","HN-IB":"Islas de la Bah\xEDa","HN-LP":"La Paz","HN-LE":"Lempira","HN-OC":"Ocotepeque","HN-OL":"Olancho","HN-SB":"Santa B\xE1rbara","HN-VA":"Valle","HN-YO":"Yoro","HU-BK":"B\xE1cs-Kiskun","HU-BA":"Baranya","HU-BE":"B\xE9k\xE9s","HU-BC":"B\xE9k\xE9scsaba","HU-BZ":"Borsod-Aba\xFAj-Zempl\xE9n","HU-BU":"Budapest","HU-CS":"Csongr\xE1d-Csan\xE1d","HU-DE":"Debrecen","HU-DU":"Duna\xFAjv\xE1ros","HU-EG":"Eger","HU-ER":"\xC9rd","HU-FE":"Fej\xE9r","HU-GY":"Gy\u0151r","HU-GS":"Gy\u0151r-Moson-Sopron","HU-HB":"Hajd\xFA-Bihar","HU-HE":"Heves","HU-HV":"H\xF3dmez\u0151v\xE1s\xE1rhely","HU-JN":"J\xE1sz-Nagykun-Szolnok","HU-KV":"Kaposv\xE1r","HU-KM":"Kecskem\xE9t","HU-KE":"Kom\xE1rom-Esztergom","HU-MI":"Miskolc","HU-NK":"Nagykanizsa","HU-NO":"N\xF3gr\xE1d","HU-NY":"Ny\xEDregyh\xE1za","HU-PS":"P\xE9cs","HU-PE":"Pest","HU-ST":"Salg\xF3tarj\xE1n","HU-SO":"Somogy","HU-SN":"Sopron","HU-SZ":"Szabolcs-Szatm\xE1r-Bereg","HU-SD":"Szeged","HU-SF":"Sz\xE9kesfeh\xE9rv\xE1r","HU-SS":"Szeksz\xE1rd","HU-SK":"Szolnok","HU-SH":"Szombathely","HU-TB":"Tatab\xE1nya","HU-TO":"Tolna","HU-VA":"Vas","HU-VM":"Veszpr\xE9m","HU-VE":"Veszpr\xE9m","HU-ZA":"Zala","HU-ZE":"Zalaegerszeg","IS-7":"Austurland","IS-1":"H\xF6fu\xF0borgarsv\xE6\xF0i","IS-6":"Nor\xF0urland eystra","IS-5":"Nor\xF0urland vestra","IS-8":"Su\xF0urland","IS-2":"Su\xF0urnes","IS-4":"Vestfir\xF0ir","IS-3":"Vesturland","IN-AN":"Andaman and Nicobar Islands","IN-AP":"Andhra Pradesh","IN-AR":"Arun\u0101chal Pradesh","IN-AS":"Assam","IN-BR":"Bih\u0101r","IN-CH":"Chand\u012Bgarh","IN-CG":"Chhatt\u012Bsgarh","IN-DH":"D\u0101dra and Nagar Haveli and Dam\u0101n and Diu[1]","IN-DL":"Delhi","IN-GA":"Goa","IN-GJ":"Gujar\u0101t","IN-HR":"Hary\u0101na","IN-HP":"Him\u0101chal Pradesh","IN-JK":"Jammu and Kashm\u012Br","IN-JH":"Jh\u0101rkhand","IN-KA":"Karn\u0101taka","IN-KL":"Kerala","IN-LA":"Lad\u0101kh","IN-LD":"Lakshadweep","IN-MP":"Madhya Pradesh","IN-MH":"Mah\u0101r\u0101shtra","IN-MN":"Manipur","IN-ML":"Megh\u0101laya","IN-MZ":"Mizoram","IN-NL":"N\u0101g\u0101land","IN-OD":"Odisha","IN-PY":"Puducherry","IN-PB":"Punjab","IN-RJ":"R\u0101jasth\u0101n","IN-SK":"Sikkim","IN-TN":"Tamil N\u0101du","IN-TS":"Telang\u0101na[2]","IN-TR":"Tripura","IN-UP":"Uttar Pradesh","IN-UK":"Uttar\u0101khand","IN-WB":"West Bengal","ID-JW":"Jawa","ID-KA":"Kalimantan","ID-ML":"Maluku","ID-NU":"Nusa Tenggara","ID-PP":"Papua","ID-SL":"Sulawesi","ID-SM":"Sumatera","IR-30":"Alborz","IR-24":"Ardab\u012Bl","IR-04":"\u0100z\u0304\u0101rb\u0101yj\u0101n-e Gh\u0101rb\u012B","IR-03":"\u0100z\u0304\u0101rb\u0101yj\u0101n-e Sh\u0101rq\u012B","IR-18":"B\u016Bshehr","IR-14":"Chah\u0101r Ma\u1E29\u0101l va Bakht\u012B\u0101r\u012B","IR-10":"E\u015Ffah\u0101n","IR-07":"F\u0101rs","IR-01":"G\u012Bl\u0101n","IR-27":"Golest\u0101n","IR-13":"Hamad\u0101n","IR-22":"Hormozg\u0101n","IR-16":"\u012Al\u0101m","IR-08":"Kerm\u0101n","IR-05":"Kerm\u0101nsh\u0101h","IR-29":"Khor\u0101s\u0101n-e Jon\u016Bb\u012B","IR-09":"Khor\u0101s\u0101n-e Ra\u1E95av\u012B","IR-28":"Khor\u0101s\u0101n-e Shom\u0101l\u012B","IR-06":"Kh\u016Bzest\u0101n","IR-17":"Kohg\u012Bl\u016Byeh va Bowyer A\u1E29mad","IR-12":"Kordest\u0101n","IR-15":"Lorest\u0101n","IR-00":"Markaz\u012B","IR-02":"M\u0101zandar\u0101n","IR-26":"Qazv\u012Bn","IR-25":"Qom","IR-20":"Semn\u0101n","IR-11":"S\u012Bst\u0101n va Bal\u016Bchest\u0101n","IR-23":"Tehr\u0101n","IR-21":"Yazd","IR-19":"Zanj\u0101n","IQ-AN":"Al Anb\u0101r","IQ-BA":"Al Ba\u015Frah","IQ-MU":"Al Muthann\xE1","IQ-QA":"Al Q\u0101dis\u012Byah","IQ-NA":"An Najaf","IQ-AR":"Arb\u012Bl","IQ-SU":"As Sulaym\u0101n\u012Byah","IQ-BB":"B\u0101bil","IQ-BG":"Baghd\u0101d","IQ-DA":"Dah\u016Bk","IQ-DQ":"Dh\u012B Q\u0101r","IQ-DI":"Diy\u0101l\xE1","IQ-KR":"Iql\u012Bm K\u016Brdist\u0101n","IQ-KA":"Karbal\u0101\u2019","IQ-KI":"Kirk\u016Bk","IQ-MA":"Mays\u0101n","IQ-NI":"N\u012Bnaw\xE1","IQ-SD":"\u015Eal\u0101\u1E29 ad D\u012Bn","IQ-WA":"W\u0101si\u0163","IE-C":"Connaught","IE-L":"Leinster","IE-M":"Munster","IE-U":"Ulster[a]","IL-D":"HaDarom","IL-M":"HaMerkaz","IL-Z":"HaTsafon","IL-HA":"H\u0331efa","IL-TA":"Tel Aviv","IL-JM":"Yerushalayim","IT-65":"Abruzzo","IT-77":"Basilicata","IT-78":"Calabria","IT-72":"Campania","IT-45":"Emilia-Romagna","IT-36":"Friuli Venezia Giulia","IT-62":"Lazio","IT-42":"Liguria","IT-25":"Lombardia","IT-57":"Marche","IT-67":"Molise","IT-21":"Piemonte","IT-75":"Puglia","IT-88":"Sardegna","IT-82":"Sicilia","IT-52":"Toscana","IT-32":"Trentino-Alto Adigede","IT-55":"Umbria","IT-23":"Valle d'Aostafr","IT-34":"Veneto","JM-13":"Clarendon","JM-09":"Hanover","JM-01":"Kingston","JM-12":"Manchester","JM-04":"Portland","JM-02":"Saint Andrew","JM-06":"Saint Ann","JM-14":"Saint Catherine","JM-11":"Saint Elizabeth","JM-08":"Saint James","JM-05":"Saint Mary","JM-03":"Saint Thomas","JM-07":"Trelawny","JM-10":"Westmoreland","JP-23":"Aiti","JP-05":"Akita","JP-02":"Aomori","JP-38":"Ehime","JP-21":"Gihu","JP-10":"Gunma","JP-34":"Hirosima","JP-01":"Hokkaid\xF4","JP-18":"Hukui","JP-40":"Hukuoka","JP-07":"Hukusima","JP-28":"Hy\xF4go","JP-08":"Ibaraki","JP-17":"Isikawa","JP-03":"Iwate","JP-37":"Kagawa","JP-46":"Kagosima","JP-14":"Kanagawa","JP-39":"K\xF4ti","JP-43":"Kumamoto","JP-26":"Ky\xF4to","JP-24":"Mie","JP-04":"Miyagi","JP-45":"Miyazaki","JP-20":"Nagano","JP-42":"Nagasaki","JP-29":"Nara","JP-15":"Niigata","JP-44":"\xD4ita","JP-33":"Okayama","JP-47":"Okinawa","JP-27":"\xD4saka","JP-41":"Saga","JP-11":"Saitama","JP-25":"Siga","JP-32":"Simane","JP-22":"Sizuoka","JP-12":"Tiba","JP-36":"Tokusima","JP-13":"T\xF4ky\xF4","JP-09":"Totigi","JP-31":"Tottori","JP-16":"Toyama","JP-30":"Wakayama","JP-06":"Yamagata","JP-35":"Yamaguti","JP-19":"Yamanasi","JO-AJ":"\u2018Ajl\u016Bn","JO-AQ":"Al \u2018Aqabah","JO-AM":"Al \u2018A\u0305\u015Fimah","JO-BA":"Al Balq\u0101\u2019","JO-KA":"Al Karak","JO-MA":"Al Mafraq","JO-AT":"A\u0163 \u0162af\u012Blah","JO-AZ":"Az Zarq\u0101\u2019","JO-IR":"Irbid","JO-JA":"Jarash","JO-MN":"Ma\u2018\u0101n","JO-MD":"M\u0101dab\u0101","KZ-10":"Abayoblysy","KZ-75":"Almaty","KZ-19":"Almatyoblysy","KZ-11":"Aqmola oblysy","KZ-15":"Aqt\xF6be oblysy","KZ-71":"Astana","KZ-23":"Atyra\u016Boblysy","KZ-27":"Batys Qazaqstan oblysy","KZ-47":"Mangghysta\u016B oblysy","KZ-55":"Pavlodar oblysy","KZ-35":"Qaraghandy oblysy","KZ-39":"Qostanay oblysy","KZ-43":"Qyzylorda oblysy","KZ-63":"Shyghys Qazaqstan oblysy","KZ-79":"Shymkent","KZ-59":"Solt\xFCstik Qazaqstan oblysy","KZ-61":"T\xFCrkistan oblysy","KZ-62":"Ulyta\u016Boblysy","KZ-31":"Zhambyl oblysy","KZ-33":"Zhetis\u016B oblysy","KE-01":"Baringo","KE-02":"Bomet","KE-03":"Bungoma","KE-04":"Busia","KE-05":"Elgeyo/Marakwet","KE-06":"Embu","KE-07":"Garissa","KE-08":"Homa Bay","KE-09":"Isiolo","KE-10":"Kajiado","KE-11":"Kakamega","KE-12":"Kericho","KE-13":"Kiambu","KE-14":"Kilifi","KE-15":"Kirinyaga","KE-16":"Kisii","KE-17":"Kisumu","KE-18":"Kitui","KE-19":"Kwale","KE-20":"Laikipia","KE-21":"Lamu","KE-22":"Machakos","KE-23":"Makueni","KE-24":"Mandera","KE-25":"Marsabit","KE-26":"Meru","KE-27":"Migori","KE-28":"Mombasa","KE-29":"Murang'a","KE-30":"Nairobi City","KE-31":"Nakuru","KE-32":"Nandi","KE-33":"Narok","KE-34":"Nyamira","KE-35":"Nyandarua","KE-36":"Nyeri","KE-37":"Samburu","KE-38":"Siaya","KE-39":"Taita/Taveta","KE-40":"Tana River","KE-41":"Tharaka-Nithi","KE-42":"Trans Nzoia","KE-43":"Turkana","KE-44":"Uasin Gishu","KE-45":"Vihiga","KE-46":"Wajir","KE-47":"West Pokot","KI-G":"Gilbert Islands","KI-L":"Line Islands","KI-P":"Phoenix Islands","KP-04":"Chagang-do","KP-09":"Hamgy\u01D2ng-bukto","KP-08":"Hamgy\u01D2ng-namdo","KP-06":"Hwanghae-bukto","KP-05":"Hwanghae-namdo","KP-15":"Kaes\u014Fng","KP-07":"Kangw\u01D2n-do","KP-14":"Namp\u2019o","KP-03":"P'y\u01D2ngan-bukto","KP-02":"P'y\u01D2ngan-namdo","KP-01":"P'y\u01D2ngyang","KP-13":"Ras\u01D2n","KP-10":"Ryanggang-do","KR-26":"Busan-gwangyeoksi","KR-43":"Chungcheongbuk-do","KR-44":"Chungcheongnam-do","KR-27":"Daegu-gwangyeoksi","KR-30":"Daejeon-gwangyeoksi","KR-42":"Gangwon-teukbyeoljachido","KR-29":"Gwangju-gwangyeoksi","KR-41":"Gyeonggi-do","KR-47":"Gyeongsangbuk-do","KR-48":"Gyeongsangnam-do","KR-28":"Incheon-gwangyeoksi","KR-49":"Jeju-teukbyeoljachido","KR-45":"Jeollabuk-do","KR-46":"Jeollanam-do","KR-50":"Sejong","KR-11":"Seoul-teukbyeolsi","KR-31":"Ulsan-gwangyeoksi","KW-AH":"Al A\u1E29mad\u012B","KW-FA":"Al Farw\u0101n\u012Byah","KW-JA":"Al Jahr\u0101\u2019","KW-KU":"Al \u2018\u0100\u015Fimah","KW-HA":"\u1E28awall\u012B","KW-MU":"Mub\u0101rak al Kab\u012Br","KG-B":"Batken","KG-GB":"Bishkek Shaary","KG-C":"Ch\xFCy","KG-J":"Jalal-Abad","KG-N":"Naryn","KG-O":"Osh","KG-GO":"Osh Shaary","KG-T":"Talas","KG-Y":"Ysyk-K\xF6l","LA-AT":"Attapu","LA-BK":"Bok\xE8o","LA-BL":"Bolikhamxai","LA-CH":"Champasak","LA-HO":"Houaphan","LA-KH":"Khammouan","LA-LM":"Louang Namtha","LA-LP":"Louangphabang","LA-OU":"Oud\xF4mxai","LA-PH":"Ph\xF4ngsali","LA-SL":"Salavan","LA-SV":"Savannakh\xE9t","LA-VI":"Viangchan","LA-VT":"Viangchan","LA-XA":"Xaignabouli","LA-XS":"Xais\xF4mboun","LA-XE":"X\xE9kong","LA-XI":"Xiangkhouang","LV-002":"Aizkraukles novads","LV-007":"Al\u016Bksnes novads","LV-111":"Aug\u0161daugavas novads","LV-011":"\u0100da\u017Eu novads","LV-015":"Balvu novads","LV-016":"Bauskas novads","LV-022":"C\u0113su novads","LV-DGV":"Daugavpils","LV-112":"Dienvidkurzemes Novads","LV-026":"Dobeles novads","LV-033":"Gulbenes novads","LV-JEL":"Jelgava","LV-041":"Jelgavas novads","LV-042":"J\u0113kabpils novads","LV-JUR":"J\u016Brmala","LV-047":"Kr\u0101slavas novads","LV-050":"Kuld\u012Bgas novads","LV-052":"\u0136ekavas novads","LV-LPX":"Liep\u0101ja","LV-054":"Limba\u017Eu novads","LV-056":"L\u012Bv\u0101nu novads","LV-058":"Ludzas novads","LV-059":"Madonas novads","LV-062":"M\u0101rupes novads","LV-067":"Ogres novads","LV-068":"Olaines novads","LV-073":"Prei\u013Cu novads","LV-REZ":"R\u0113zekne","LV-077":"R\u0113zeknes novads","LV-RIX":"R\u012Bga","LV-080":"Ropa\u017Eu novads","LV-087":"Salaspils novads","LV-088":"Saldus novads","LV-089":"Saulkrastu novads","LV-091":"Siguldas novads","LV-094":"Smiltenes novads","LV-097":"Talsu novads","LV-099":"Tukuma novads","LV-101":"Valkas novads","LV-113":"Valmieras Novads","LV-102":"Varak\u013C\u0101nu novads","LV-VEN":"Ventspils","LV-106":"Ventspils novads","LB-AK":"Aakk\xE2r","LB-BH":"Baalbek-Hermel","LB-BI":"B\xE9qaa","LB-BA":"Beyrouth","LB-AS":"Liban-Nord","LB-JA":"Liban-Sud","LB-JL":"Mont-Liban","LB-NA":"Nabat\xEEy\xE9","LS-D":"Berea","LS-B":"Botha-Bothe","LS-C":"Leribe","LS-E":"Mafeteng","LS-A":"Maseru","LS-F":"Mohale's Hoek","LS-J":"Mokhotlong","LS-H":"Qacha's Nek","LS-G":"Quthing","LS-K":"Thaba-Tseka","LR-BM":"Bomi","LR-BG":"Bong","LR-GP":"Gbarpolu","LR-GB":"Grand Bassa","LR-CM":"Grand Cape Mount","LR-GG":"Grand Gedeh","LR-GK":"Grand Kru","LR-LO":"Lofa","LR-MG":"Margibi","LR-MY":"Maryland","LR-MO":"Montserrado","LR-NI":"Nimba","LR-RI":"River Cess","LR-RG":"River Gee","LR-SI":"Sinoe","LY-BU":"Al Bu\u0163n\u0101n","LY-JA":"Al Jabal al Akh\u1E11ar","LY-JG":"Al Jabal al Gharb\u012B","LY-JI":"Al Jaf\u0101rah","LY-JU":"Al Jufrah","LY-KF":"Al Kufrah","LY-MJ":"Al Marj","LY-MB":"Al Marqab","LY-WA":"Al W\u0101\u1E29\u0101t","LY-NQ":"An Nuq\u0101\u0163 al Khams","LY-ZA":"Az Z\u0101wiyah","LY-BA":"Bangh\u0101z\u012B","LY-DR":"Darnah","LY-GT":"Gh\u0101t","LY-MI":"Mi\u015Fr\u0101tah","LY-MQ":"Murzuq","LY-NL":"N\u0101l\u016Bt","LY-SB":"Sabh\u0101","LY-SR":"Surt","LY-TB":"\u0162ar\u0101bulus","LY-WD":"W\u0101d\u012B al \u1E28ay\u0101t","LY-WS":"W\u0101d\u012B ash Sh\u0101\u0163i\u2019","LI-01":"Balzers","LI-02":"Eschen","LI-03":"Gamprin","LI-04":"Mauren","LI-05":"Planken","LI-06":"Ruggell","LI-07":"Schaan","LI-08":"Schellenberg","LI-09":"Triesen","LI-10":"Triesenberg","LI-11":"Vaduz","LT-AL":"Alytaus apskritis","LT-KU":"Kauno apskritis","LT-KL":"Klaip\u0117dos apskritis","LT-MR":"Marijampol\u0117s apskritis","LT-PN":"Panev\u0117\u017Eio apskritis","LT-SA":"\u0160iauli\u0173 apskritis","LT-TA":"Taurag\u0117s apskritis","LT-TE":"Tel\u0161i\u0173 apskritis","LT-UT":"Utenos apskritis","LT-VL":"Vilniaus apskritis","LU-CA":"Capellen","LU-CL":"Clervaux","LU-DI":"Diekirch","LU-EC":"Echternach","LU-ES":"Esch-sur-Alzette","LU-GR":"Grevenmacher","LU-LU":"Luxembourg","LU-ME":"Mersch","LU-RD":"Redange","LU-RM":"Remich","LU-VD":"Vianden","LU-WI":"Wiltz","MG-T":"Antananarivo","MG-D":"Antsiranana","MG-F":"Fianarantsoa","MG-M":"Mahajanga","MG-A":"Toamasina","MG-U":"Toliara","MW-N":"Chakumpoto","MW-S":"Chakumwera","MW-C":"Chapakati","MY-01":"Johor","MY-02":"Kedah","MY-03":"Kelantan","MY-04":"Melaka","MY-05":"Negeri Sembilan","MY-06":"Pahang","MY-08":"Perak","MY-09":"Perlis","MY-07":"Pulau Pinang","MY-12":"Sabah","MY-13":"Sarawak","MY-10":"Selangor","MY-11":"Terengganu","MY-14":"Wilayah Persekutuan Kuala Lumpur","MY-15":"Wilayah Persekutuan Labuan","MY-16":"Wilayah Persekutuan Putrajaya","MV-01":"Addu","MV-00":"Ariatholhu Dhekunuburi","MV-02":"Ariatholhu Uthuruburi","MV-03":"Faadhippolhu","MV-04":"Felidheatholhu","MV-29":"Fuvammulah","MV-05":"Hahdhunmathi","MV-28":"Huvadhuatholhu Dhekunuburi","MV-27":"Huvadhuatholhu Uthuruburi","MV-08":"Kolhumadulu","MV-MLE":"Maale","MV-26":"Maaleatholhu","MV-20":"Maalhosmadulu Dhekunuburi","MV-13":"Maalhosmadulu Uthuruburi","MV-25":"Miladhunmadulu Dhekunuburi","MV-24":"Miladhunmadulu Uthuruburi","MV-12":"Mulakatholhu","MV-17":"Nilandheatholhu Dhekunuburi","MV-14":"Nilandheatholhu Uthuruburi","MV-23":"Thiladhunmathee Dhekunuburi","MV-07":"Thiladhunmathee Uthuruburi","ML-BKO":"Bamako","ML-7":"Gao","ML-1":"Kayes","ML-8":"Kidal","ML-2":"Koulikoro","ML-9":"M\xE9naka","ML-5":"Mopti","ML-4":"S\xE9gou","ML-3":"Sikasso","ML-10":"Taoud\xE9nit","ML-6":"Tombouctou","MT-01":"Attard","MT-02":"Balzan","MT-03":"Birgu","MT-04":"Birkirkara","MT-05":"Bir\u017Cebbu\u0121a","MT-06":"Bormla","MT-07":"Dingli","MT-08":"Fgura","MT-09":"Floriana","MT-10":"Fontana","MT-11":"Gudja","MT-12":"G\u017Cira","MT-13":"G\u0127ajnsielem","MT-14":"G\u0127arb","MT-15":"G\u0127arg\u0127ur","MT-16":"G\u0127asri","MT-17":"G\u0127axaq","MT-18":"\u0126amrun","MT-19":"Iklin","MT-20":"Isla","MT-21":"Kalkara","MT-22":"Ker\u010Bem","MT-23":"Kirkop","MT-24":"Lija","MT-25":"Luqa","MT-26":"Marsa","MT-27":"Marsaskala","MT-28":"Marsaxlokk","MT-29":"Mdina","MT-30":"Mellie\u0127a","MT-31":"M\u0121arr","MT-32":"Mosta","MT-33":"Mqabba","MT-34":"Msida","MT-35":"Mtarfa","MT-36":"Munxar","MT-37":"Nadur","MT-38":"Naxxar","MT-39":"Paola","MT-40":"Pembroke","MT-41":"Piet\xE0","MT-42":"Qala","MT-43":"Qormi","MT-44":"Qrendi","MT-45":"Rabat G\u0127awdex","MT-46":"Rabat Malta","MT-47":"Safi","MT-48":"San \u0120iljan","MT-49":"San \u0120wann","MT-50":"San Lawrenz","MT-51":"San Pawl il-Ba\u0127ar","MT-52":"Sannat","MT-53":"Santa Lu\u010Bija","MT-54":"Santa Venera","MT-55":"Si\u0121\u0121iewi","MT-56":"Sliema","MT-57":"Swieqi","MT-58":"Ta' Xbiex","MT-59":"Tarxien","MT-60":"Valletta","MT-61":"Xag\u0127ra","MT-62":"Xewkija","MT-63":"Xg\u0127ajra","MT-64":"\u017Babbar","MT-65":"\u017Bebbu\u0121 G\u0127awdex","MT-66":"\u017Bebbu\u0121 Malta","MT-67":"\u017Bejtun","MT-68":"\u017Burrieq","MH-L":"Ralik chain","MH-T":"Ratak chain","MR-07":"Adrar","MR-03":"Assaba","MR-05":"Brakna","MR-08":"Dakhlet Nou\xE2dhibou","MR-04":"Gorgol","MR-10":"Guidimaka","MR-01":"Hodh ech Chargui","MR-02":"Hodh el Gharbi","MR-12":"Inchiri","MR-09":"Tagant","MR-11":"Tiris Zemmour","MR-06":"Trarza","MU-AG":"Agalega Islands","MU-BL":"Black River","MU-CC":"Cargados Carajos Shoals","MU-FL":"Flacq","MU-GP":"Grand Port","MU-MO":"Moka","MU-PA":"Pamplemousses","MU-PW":"Plaines Wilhems","MU-PL":"Port Louis","MU-RR":"Rivi\xE8re du Rempart","MU-RO":"Rodrigues Island","MU-SA":"Savanne","MX-AGU":"Aguascalientes","MX-BCN":"Baja California","MX-BCS":"Baja California Sur","MX-CAM":"Campeche","MX-CMX":"Ciudad de M\xE9xico","MX-COA":"Coahuila de Zaragoza","MX-COL":"Colima","MX-CHP":"Chiapas","MX-CHH":"Chihuahua","MX-DUR":"Durango","MX-GUA":"Guanajuato","MX-GRO":"Guerrero","MX-HID":"Hidalgo","MX-JAL":"Jalisco","MX-MEX":"M\xE9xico","MX-MIC":"Michoac\xE1n de Ocampo","MX-MOR":"Morelos","MX-NAY":"Nayarit","MX-NLE":"Nuevo Le\xF3n","MX-OAX":"Oaxaca","MX-PUE":"Puebla","MX-QUE":"Quer\xE9taro","MX-ROO":"Quintana Roo","MX-SLP":"San Luis Potos\xED","MX-SIN":"Sinaloa","MX-SON":"Sonora","MX-TAB":"Tabasco","MX-TAM":"Tamaulipas","MX-TLA":"Tlaxcala","MX-VER":"Veracruz de Ignacio de la Llave","MX-YUC":"Yucat\xE1n","MX-ZAC":"Zacatecas","FM-TRK":"Chuuk","FM-KSA":"Kosrae","FM-PNI":"Pohnpei","FM-YAP":"Yap","MD-AN":"Anenii Noi","MD-BS":"Basarabeasca","MD-BA":"B\u0103l\u021Bi","MD-BD":"Bender","MD-BR":"Briceni","MD-CA":"Cahul","MD-CT":"Cantemir","MD-CL":"C\u0103l\u0103ra\u0219i","MD-CS":"C\u0103u\u0219eni","MD-CU":"Chi\u0219in\u0103u","MD-CM":"Cimi\u0219lia","MD-CR":"Criuleni","MD-DO":"Dondu\u0219eni","MD-DR":"Drochia","MD-DU":"Dub\u0103sari","MD-ED":"Edine\u021B","MD-FA":"F\u0103le\u0219ti","MD-FL":"Flore\u0219ti","MD-GA":"G\u0103g\u0103uzia","MD-GL":"Glodeni","MD-HI":"H\xEEnce\u0219ti","MD-IA":"Ialoveni","MD-LE":"Leova","MD-NI":"Nisporeni","MD-OC":"Ocni\u021Ba","MD-OR":"Orhei","MD-RE":"Rezina","MD-RI":"R\xEE\u0219cani","MD-SI":"S\xEEngerei","MD-SO":"Soroca","MD-SN":"St\xEEnga Nistrului","MD-ST":"Str\u0103\u0219eni","MD-SD":"\u0218old\u0103ne\u0219ti","MD-SV":"\u0218tefan Vod\u0103","MD-TA":"Taraclia","MD-TE":"Telene\u0219ti","MD-UN":"Ungheni","MC-FO":"Fontvieille","MC-JE":"Jardin Exotique","MC-CL":"La Colle","MC-CO":"La Condamine","MC-GA":"La Gare","MC-SO":"La Source","MC-LA":"Larvotto","MC-MA":"Malbousquet","MC-MO":"Monaco-Ville","MC-MG":"Moneghetti","MC-MC":"Monte-Carlo","MC-MU":"Moulins","MC-PH":"Port-Hercule","MC-SR":"Saint-Roman","MC-SD":"Sainte-D\xE9vote","MC-SP":"Sp\xE9lugues","MC-VR":"Vallon de la Rousse","MN-073":"Arhangay","MN-069":"Bayanhongor","MN-071":"Bayan-\xD6lgiy","MN-067":"Bulgan","MN-037":"Darhan uul","MN-061":"Dornod","MN-063":"Dornogov\u012D","MN-059":"Dundgov\u012D","MN-057":"Dzavhan","MN-065":"Gov\u012D-Altay","MN-064":"Gov\u012D-S\xFCmber","MN-039":"Hentiy","MN-043":"Hovd","MN-041":"H\xF6vsg\xF6l","MN-053":"\xD6mn\xF6gov\u012D","MN-035":"Orhon","MN-055":"\xD6v\xF6rhangay","MN-049":"Selenge","MN-051":"S\xFChbaatar","MN-047":"T\xF6v","MN-1":"Ulaanbaatar","MN-046":"Uvs","MA-05":"B\xE9ni Mellal-Kh\xE9nifra","MA-06":"Casablanca-Settat","MA-12":"Dakhla-Oued Ed-Dahab","MA-08":"Dr\xE2a-Tafilalet","MA-03":"F\xE8s-Mekn\xE8s","MA-10":"Guelmim-Oued Noun","MA-02":"L'Oriental","MA-11":"La\xE2youne-Sakia El Hamra","MA-07":"Marrakech-Safi","MA-04":"Rabat-Sal\xE9-K\xE9nitra","MA-09":"Souss-Massa","MA-01":"Tanger-T\xE9touan-Al Hoce\xEFma","MZ-P":"Cabo Delgado","MZ-G":"Gaza","MZ-I":"Inhambane","MZ-B":"Manica","MZ-MPM":"Maputo","MZ-L":"Maputo","MZ-N":"Nampula","MZ-A":"Niassa","MZ-S":"Sofala","MZ-T":"Tete","MZ-Q":"Zamb\xE9zia","MM-07":"Ayeyarwady","MM-02":"Bago","MM-14":"Chin","MM-11":"Kachin","MM-12":"Kayah","MM-13":"Kayin","MM-03":"Magway","MM-04":"Mandalay","MM-15":"Mon","MM-18":"Nay Pyi Taw","MM-16":"Rakhine","MM-01":"Sagaing","MM-17":"Shan","MM-05":"Tanintharyi","MM-06":"Yangon","NA-ER":"Erongo","NA-HA":"Hardap","NA-KA":"//Karas","NA-KE":"Kavango East","NA-KW":"Kavango West","NA-KH":"Khomas","NA-KU":"Kunene","NA-OW":"Ohangwena","NA-OH":"Omaheke","NA-OS":"Omusati","NA-ON":"Oshana","NA-OT":"Oshikoto","NA-OD":"Otjozondjupa","NA-CA":"Zambezi","NR-01":"Aiwo","NR-02":"Anabar","NR-03":"Anetan","NR-04":"Anibare","NR-05":"Baitsi","NR-06":"Boe","NR-07":"Buada","NR-08":"Denigomodu","NR-09":"Ewa","NR-10":"Ijuw","NR-11":"Meneng","NR-12":"Nibok","NR-13":"Uaboe","NR-14":"Yaren","NP-P3":"B\u0101gmat\u012B","NP-P4":"Ga\u1E47\u1E0Dak\u012B","NP-P6":"Kar\u1E47\u0101l\u012B","NP-P1":"Kosh\u012B","NP-P5":"Lumbin\u012B","NP-P2":"Madhesh","NP-P7":"Sud\u016Brpashchim","NL-DR":"Drenthe","NL-FL":"Flevoland","NL-FR":"Frysl\xE2nfy","NL-GE":"Gelderland","NL-GR":"Groningen","NL-LI":"Limburg","NL-NB":"Noord-Brabant","NL-NH":"Noord-Holland","NL-OV":"Overijssel","NL-UT":"Utrecht","NL-ZE":"Zeeland","NL-ZH":"Zuid-Holland","NZ-AUK":"Auckland","NZ-BOP":"Bay of Plenty","NZ-CAN":"Canterbury","NZ-CIT":"Chatham Islands Territory","NZ-GIS":"Gisborne","NZ-WGN":"Greater Wellington","NZ-HKB":"Hawke's Bay","NZ-MWT":"Manawat\u016B-Whanganui","NZ-MBH":"Marlborough","NZ-NSN":"Nelson","NZ-NTL":"Northland","NZ-OTA":"Otago","NZ-STL":"Southland","NZ-TKI":"Taranaki","NZ-TAS":"Tasman","NZ-WKO":"Waikato","NZ-WTC":"West Coast","NI-BO":"Boaco","NI-CA":"Carazo","NI-CI":"Chinandega","NI-CO":"Chontales","NI-AN":"Costa Caribe Norte","NI-AS":"Costa Caribe Sur","NI-ES":"Estel\xED","NI-GR":"Granada","NI-JI":"Jinotega","NI-LE":"Le\xF3n","NI-MD":"Madriz","NI-MN":"Managua","NI-MS":"Masaya","NI-MT":"Matagalpa","NI-NS":"Nueva Segovia","NI-SJ":"R\xEDo San Juan","NI-RI":"Rivas","NE-1":"Agadez","NE-2":"Diffa","NE-3":"Dosso","NE-4":"Maradi","NE-8":"Niamey","NE-5":"Tahoua","NE-6":"Tillab\xE9ri","NE-7":"Zinder","NG-AB":"Abia","NG-FC":"Abuja Federal Capital Territory","NG-AD":"Adamawa","NG-AK":"Akwa Ibom","NG-AN":"Anambra","NG-BA":"Bauchi","NG-BY":"Bayelsa","NG-BE":"Benue","NG-BO":"Borno","NG-CR":"Cross River","NG-DE":"Delta","NG-EB":"Ebonyi","NG-ED":"Edo","NG-EK":"Ekiti","NG-EN":"Enugu","NG-GO":"Gombe","NG-IM":"Imo","NG-JI":"Jigawa","NG-KD":"Kaduna","NG-KN":"Kano","NG-KT":"Katsina","NG-KE":"Kebbi","NG-KO":"Kogi","NG-KW":"Kwara","NG-LA":"Lagos","NG-NA":"Nasarawa","NG-NI":"Niger","NG-OG":"Ogun","NG-ON":"Ondo","NG-OS":"Osun","NG-OY":"Oyo","NG-PL":"Plateau","NG-RI":"Rivers","NG-SO":"Sokoto","NG-TA":"Taraba","NG-YO":"Yobe","NG-ZA":"Zamfara","MK-801":"Aerodrom","MK-802":"Ara\u010Dinovo","MK-201":"Berovo","MK-501":"Bitola","MK-401":"Bogdanci","MK-601":"Bogovinje","MK-402":"Bosilovo","MK-602":"Brvenica","MK-803":"Butel","MK-814":"Centar","MK-313":"Centar \u017Dupa","MK-815":"\u010Cair","MK-109":"\u010Ca\u0161ka","MK-210":"\u010Ce\u0161inovo-Oble\u0161evo","MK-816":"\u010Cu\u010Der-Sandevo","MK-303":"Debar","MK-304":"Debrca","MK-203":"Del\u010Devo","MK-502":"Demir Hisar","MK-103":"Demir Kapija","MK-406":"Dojran","MK-503":"Dolneni","MK-804":"Gazi Baba","MK-405":"Gevgelija","MK-805":"Gjor\u010De Petrov","MK-604":"Gostivar","MK-102":"Gradsko","MK-807":"Ilinden","MK-606":"Jegunovce","MK-205":"Karbinci","MK-808":"Karpo\u0161","MK-104":"Kavadarci","MK-307":"Ki\u010Devo","MK-809":"Kisela Voda","MK-206":"Ko\u010Dani","MK-407":"Kon\u010De","MK-701":"Kratovo","MK-702":"Kriva Palanka","MK-504":"Krivoga\u0161tani","MK-505":"Kru\u0161evo","MK-703":"Kumanovo","MK-704":"Lipkovo","MK-105":"Lozovo","MK-207":"Makedonska Kamenica","MK-308":"Makedonski Brod","MK-607":"Mavrovo i Rostu\u0161e","MK-506":"Mogila","MK-106":"Negotino","MK-507":"Novaci","MK-408":"Novo Selo","MK-310":"Ohrid","MK-208":"Peh\u010Devo","MK-810":"Petrovec","MK-311":"Plasnica","MK-508":"Prilep","MK-209":"Probi\u0161tip","MK-409":"Radovi\u0161","MK-705":"Rankovce","MK-509":"Resen","MK-107":"Rosoman","MK-811":"Saraj","MK-812":"Sopi\u0161te","MK-706":"Staro Nagori\u010Dane","MK-312":"Struga","MK-410":"Strumica","MK-813":"Studeni\u010Dani","MK-108":"Sveti Nikole","MK-211":"\u0160tip","MK-817":"\u0160uto Orizari","MK-608":"Tearce","MK-609":"Tetovo","MK-403":"Valandovo","MK-404":"Vasilevo","MK-101":"Veles","MK-301":"Vev\u010Dani","MK-202":"Vinica","MK-603":"Vrap\u010Di\u0161te","MK-806":"Zelenikovo","MK-204":"Zrnovci","MK-605":"\u017Delino","NO-42":"Agder","NO-34":"Innlandet","NO-22":"Jan Mayen","NO-15":"M\xF8re og Romsdal","NO-18":"Nordland","NO-03":"Oslo","NO-11":"Rogaland","NO-21":"Svalbard","NO-54":"Troms og Finnmarksefkv","NO-50":"Tr\xF8ndelagsma","NO-38":"Vestfold og Telemark","NO-46":"Vestland","NO-30":"Viken","OM-DA":"Ad D\u0101khil\u012Byah","OM-BU":"Al Buraym\u012B","OM-WU":"Al Wus\u0163\xE1","OM-ZA":"Az\u0327 Z\u0327\u0101hirah","OM-BJ":"Jan\u016Bb al B\u0101\u0163inah","OM-SJ":"Jan\u016Bb ash Sharq\u012Byah","OM-MA":"Masqa\u0163","OM-MU":"Musandam","OM-BS":"Sham\u0101l al B\u0101\u0163inah","OM-SS":"Sham\u0101l ash Sharq\u012Byah","OM-ZU":"Z\u0327uf\u0101r","PK-JK":"\u0100z\u0101d Jamm\u016B\xF1 o Kashm\u012Br","PK-BA":"Bal\u014Dchist\u0101n","PK-GB":"Gilgit-Baltist\u0101n","PK-IS":"Isl\u0101m\u0101b\u0101d","PK-KP":"Kha\u012Bbar Pakht\u016Bnkhw\u0101","PK-PB":"Panj\u0101b","PK-SD":"Sindh","PW-002":"Aimeliik","PW-004":"Airai","PW-010":"Angaur","PW-050":"Hatohobei","PW-100":"Kayangel","PW-150":"Koror","PW-212":"Melekeok","PW-214":"Ngaraard","PW-218":"Ngarchelong","PW-222":"Ngardmau","PW-224":"Ngatpang","PW-226":"Ngchesar","PW-227":"Ngeremlengui","PW-228":"Ngiwal","PW-350":"Peleliu","PW-370":"Sonsorol","PS-BTH":"Bayt La\u1E29m","PS-DEB":"Dayr al Bala\u1E29","PS-GZA":"Ghazzah","PS-HBN":"Al Khal\u012Bl","PS-JEN":"Jan\u012Bn","PS-JRH":"Ar\u012B\u1E29\u0101 wal Aghw\u0101r","PS-JEM":"Al Quds","PS-KYS":"Kh\u0101n Y\u016Bnis","PS-NBS":"N\u0101blus","PS-NGZ":"Sham\u0101l Ghazzah","PS-QQA":"Qalq\u012Blyah","PS-RFH":"Rafa\u1E29","PS-RBH":"R\u0101m All\u0101h wal B\u012Brah","PS-SLT":"Salf\u012Bt","PS-TBS":"\u0162\u016Bb\u0101s","PS-TKM":"\u0162\u016Blkarm","PA-1":"Bocas del Toro","PA-4":"Chiriqu\xED","PA-2":"Cocl\xE9","PA-3":"Col\xF3n","PA-5":"Dari\xE9n","PA-EM":"Ember\xE1","PA-KY":"Guna Yala","PA-6":"Herrera","PA-7":"Los Santos","PA-NT":"Naso Tj\xEBr Di","PA-NB":"Ng\xE4be-Bugl\xE9","PA-8":"Panam\xE1","PA-10":"Panam\xE1 Oeste","PA-9":"Veraguas","PG-NSB":"Bougainville","PG-CPM":"Central","PG-CPK":"Chimbu","PG-EBR":"East New Britain","PG-ESW":"East Sepik","PG-EHG":"Eastern Highlands","PG-EPW":"Enga","PG-GPK":"Gulf","PG-HLA":"Hela","PG-JWK":"Jiwaka","PG-MPM":"Madang","PG-MRL":"Manus","PG-MBA":"Milne Bay","PG-MPL":"Morobe","PG-NCD":"National Capital District","PG-NIK":"New Ireland","PG-NPP":"Northern","PG-SHM":"Southern Highlands","PG-WBK":"West New Britain","PG-SAN":"West Sepik","PG-WPD":"Western","PG-WHM":"Western Highlands","PY-16":"Alto Paraguay","PY-10":"Alto Paran\xE1","PY-13":"Amambay","PY-ASU":"Asunci\xF3n","PY-19":"Boquer\xF3n","PY-5":"Caaguaz\xFA","PY-6":"Caazap\xE1","PY-14":"Canindey\xFA","PY-11":"Central","PY-1":"Concepci\xF3n","PY-3":"Cordillera","PY-4":"Guair\xE1","PY-7":"Itap\xFAa","PY-8":"Misiones","PY-12":"\xD1eembuc\xFA","PY-9":"Paraguar\xED","PY-15":"Presidente Hayes","PY-2":"San Pedro","PE-AMA":"Amazonas","PE-ANC":"Ancash","PE-APU":"Apur\xEDmac","PE-ARE":"Arequipa","PE-AYA":"Ayacucho","PE-CAJ":"Cajamarca","PE-CUS":"Cusco","PE-CAL":"El Callao","PE-HUV":"Huancavelica","PE-HUC":"Hu\xE1nuco","PE-ICA":"Ica","PE-JUN":"Jun\xEDn","PE-LAL":"La Libertad","PE-LAM":"Lambayeque","PE-LIM":"Lima","PE-LOR":"Loreto","PE-MDD":"Madre de Dios","PE-MOQ":"Moquegua","PE-LMA":"Municipalidad Metropolitana de Lima","PE-PAS":"Pasco","PE-PIU":"Piura","PE-PUN":"Puno","PE-SAM":"San Mart\xEDn","PE-TAC":"Tacna","PE-TUM":"Tumbes","PE-UCA":"Ucayali","PH-14":"Autonomous Region in Muslim Mindanao[b]","PH-05":"Bicol","PH-02":"Cagayan Valley","PH-40":"Calabarzon","PH-13":"Caraga","PH-03":"Central Luzon","PH-07":"Central Visayas","PH-15":"Cordillera Administrative Region","PH-11":"Davao","PH-08":"Eastern Visayas","PH-01":"Ilocos","PH-41":"Mimaropa","PH-00":"National Capital Region","PH-10":"Northern Mindanao","PH-12":"Soccsksargen","PH-06":"Western Visayas","PH-09":"Zamboanga Peninsula","PL-02":"Dolno\u015Bl\u0105skie","PL-04":"Kujawsko-Pomorskie","PL-06":"Lubelskie","PL-08":"Lubuskie","PL-10":"\u0141\xF3dzkie","PL-12":"Ma\u0142opolskie","PL-14":"Mazowieckie","PL-16":"Opolskie","PL-18":"Podkarpackie","PL-20":"Podlaskie","PL-22":"Pomorskie","PL-24":"\u015Al\u0105skie","PL-26":"\u015Awi\u0119tokrzyskie","PL-28":"Warmi\u0144sko-Mazurskie","PL-30":"Wielkopolskie","PL-32":"Zachodniopomorskie","PT-01":"Aveiro","PT-02":"Beja","PT-03":"Braga","PT-04":"Bragan\xE7a","PT-05":"Castelo Branco","PT-06":"Coimbra","PT-07":"\xC9vora","PT-08":"Faro","PT-09":"Guarda","PT-10":"Leiria","PT-11":"Lisboa","PT-12":"Portalegre","PT-13":"Porto","PT-30":"Regi\xE3o Aut\xF3noma da Madeira","PT-20":"Regi\xE3o Aut\xF3noma dos A\xE7ores","PT-14":"Santar\xE9m","PT-15":"Set\xFAbal","PT-16":"Viana do Castelo","PT-17":"Vila Real","PT-18":"Viseu","QA-DA":"Ad Daw\u1E29ah","QA-KH":"Al Khawr wa adh Dhakh\u012Brah","QA-WA":"Al Wakrah","QA-RA":"Ar Rayy\u0101n","QA-MS":"Ash Sham\u0101l","QA-SH":"Ash Sh\u012B\u1E29\u0101n\u012Byah","QA-ZA":"Az\u0327 Z\u0327a\u2018\u0101yin","QA-US":"Umm \u015Eal\u0101l","RO-AB":"Alba","RO-AR":"Arad","RO-AG":"Arge\u0219","RO-BC":"Bac\u0103u","RO-BH":"Bihor","RO-BN":"Bistri\u021Ba-N\u0103s\u0103ud","RO-BT":"Boto\u0219ani","RO-BV":"Bra\u0219ov","RO-BR":"Br\u0103ila","RO-B":"Bucure\u0219ti","RO-BZ":"Buz\u0103u","RO-CS":"Cara\u0219-Severin","RO-CL":"C\u0103l\u0103ra\u0219i","RO-CJ":"Cluj","RO-CT":"Constan\u021Ba","RO-CV":"Covasna","RO-DB":"D\xE2mbovi\u021Ba","RO-DJ":"Dolj","RO-GL":"Gala\u021Bi","RO-GR":"Giurgiu","RO-GJ":"Gorj","RO-HR":"Harghita","RO-HD":"Hunedoara","RO-IL":"Ialomi\u021Ba","RO-IS":"Ia\u0219i","RO-IF":"Ilfov","RO-MM":"Maramure\u0219","RO-MH":"Mehedin\u021Bi","RO-MS":"Mure\u0219","RO-NT":"Neam\u021B","RO-OT":"Olt","RO-PH":"Prahova","RO-SM":"Satu Mare","RO-SJ":"S\u0103laj","RO-SB":"Sibiu","RO-SV":"Suceava","RO-TR":"Teleorman","RO-TM":"Timi\u0219","RO-TL":"Tulcea","RO-VS":"Vaslui","RO-VL":"V\xE2lcea","RO-VN":"Vrancea","RU-AD":"Adygeya","RU-AL":"Altay","RU-ALT":"Altayskiy kray","RU-AMU":"Amurskaya oblast'","RU-ARK":"Arkhangel'skaya oblast'","RU-AST":"Astrakhanskaya oblast'","RU-BA":"Bashkortostan","RU-BEL":"Belgorodskaya oblast'","RU-BRY":"Bryanskaya oblast'","RU-BU":"Buryatiya","RU-CE":"Chechenskaya Respublika","RU-CHE":"Chelyabinskaya oblast'","RU-CHU":"Chukotskiy avtonomnyy okrug","RU-CU":"Chuvashskaya Respublika","RU-DA":"Dagestan","RU-IN":"Ingushetiya","RU-IRK":"Irkutskaya oblast'","RU-IVA":"Ivanovskaya oblast'","RU-KB":"Kabardino-BalkarskayaRespublika","RU-KGD":"Kaliningradskaya oblast'","RU-KL":"Kalmykiya","RU-KLU":"Kaluzhskaya oblast'","RU-KAM":"Kamchatskiy kray","RU-KC":"Karachayevo-CherkesskayaRespublika","RU-KR":"Kareliya","RU-KEM":"Kemerovskaya oblast'","RU-KHA":"Khabarovskiy kray","RU-KK":"Khakasiya","RU-KHM":"Khanty-Mansiyskiyavtonomnyy okrug","RU-KIR":"Kirovskaya oblast'","RU-KO":"Komi","RU-KOS":"Kostromskaya oblast'","RU-KDA":"Krasnodarskiy kray","RU-KYA":"Krasnoyarskiy kray","RU-KGN":"Kurganskaya oblast'","RU-KRS":"Kurskaya oblast'","RU-LEN":"Leningradskayaoblast'","RU-LIP":"Lipetskaya oblast'","RU-MAG":"Magadanskaya oblast'","RU-ME":"Mariy El","RU-MO":"Mordoviya","RU-MOS":"Moskovskaya oblast'","RU-MOW":"Moskva","RU-MUR":"Murmanskaya oblast'","RU-NEN":"Nenetskiyavtonomnyy okrug","RU-NIZ":"Nizhegorodskaya oblast'","RU-NGR":"Novgorodskaya oblast'","RU-NVS":"Novosibirskayaoblast'","RU-OMS":"Omskaya oblast'","RU-ORE":"Orenburgskaya oblast'","RU-ORL":"Orlovskaya oblast'","RU-PNZ":"Penzenskaya oblast'","RU-PER":"Permskiy kray","RU-PRI":"Primorskiy kray","RU-PSK":"Pskovskaya oblast'","RU-ROS":"Rostovskaya oblast'","RU-RYA":"Ryazanskaya oblast'","RU-SA":"Saha","RU-SAK":"Sakhalinskaya oblast'","RU-SAM":"Samarskaya oblast'","RU-SPE":"Sankt-Peterburg","RU-SAR":"Saratovskaya oblast'","RU-SE":"Severnaya Osetiya","RU-SMO":"Smolenskaya oblast'","RU-STA":"Stavropol'skiy kray","RU-SVE":"Sverdlovskaya oblast'","RU-TAM":"Tambovskaya oblast'","RU-TA":"Tatarstan","RU-TOM":"Tomskaya oblast'","RU-TUL":"Tul'skaya oblast'","RU-TVE":"Tverskaya oblast'","RU-TYU":"Tyumenskaya oblast'","RU-TY":"Tyva","RU-UD":"Udmurtskaya Respublika","RU-ULY":"Ul'yanovskaya oblast'","RU-VLA":"Vladimirskayaoblast'","RU-VGG":"Volgogradskayaoblast'","RU-VLG":"Vologodskaya oblast'","RU-VOR":"Voronezhskaya oblast'","RU-YAN":"Yamalo-Nenetskiyavtonomnyy okrug","RU-YAR":"Yaroslavskaya oblast'","RU-YEV":"Yevreyskaya avtonomnaya oblast'","RU-ZAB":"Zabaykal'skiy kray","RW-01":"City of Kigali","RW-02":"Eastern","RW-03":"Northern","RW-05":"Southern","RW-04":"Western","SH-AC":"Ascension","SH-HL":"Saint Helena","SH-TA":"Tristan da Cunha","KN-K":"Saint Kitts","KN-N":"Nevis","LC-01":"Anse la Raye","LC-12":"Canaries","LC-02":"Castries","LC-03":"Choiseul","LC-05":"Dennery","LC-06":"Gros Islet","LC-07":"Laborie","LC-08":"Micoud","LC-10":"Soufri\xE8re","LC-11":"Vieux Fort","VC-01":"Charlotte","VC-06":"Grenadines","VC-02":"Saint Andrew","VC-03":"Saint David","VC-04":"Saint George","VC-05":"Saint Patrick","WS-AA":"A'ana","WS-AL":"Aiga-i-le-Tai","WS-AT":"Atua","WS-FA":"Fa'asaleleaga","WS-GE":"Gaga'emauga","WS-GI":"Gagaifomauga","WS-PA":"Palauli","WS-SA":"Satupa'itea","WS-TU":"Tuamasaga","WS-VF":"Va'a-o-Fonoti","WS-VS":"Vaisigano","SM-01":"Acquaviva","SM-06":"Borgo Maggiore","SM-02":"Chiesanuova","SM-07":"Citt\xE0 di San Marino","SM-03":"Domagnano","SM-04":"Faetano","SM-05":"Fiorentino","SM-08":"Montegiardino","SM-09":"Serravalle","ST-01":"\xC1gua Grande","ST-02":"Cantagalo","ST-03":"Cau\xE9","ST-04":"Lemb\xE1","ST-05":"Lobata","ST-06":"M\xE9-Z\xF3chi","ST-P":"Pr\xEDncipe","SA-14":"'As\u012Br","SA-11":"Al B\u0101\u1E29ah","SA-08":"Al \u1E28ud\u016Bd ash Sham\u0101l\u012Byah","SA-12":"Al Jawf","SA-03":"Al Mad\u012Bnah al Munawwarah","SA-05":"Al Qa\u015F\u012Bm","SA-01":"Ar Riy\u0101\u1E11","SA-04":"Ash Sharq\u012Byah","SA-06":"\u1E28\u0101'il","SA-09":"J\u0101z\u0101n","SA-02":"Makkah al Mukarramah","SA-10":"Najr\u0101n","SA-07":"Tab\u016Bk","SN-DK":"Dakar","SN-DB":"Diourbel","SN-FK":"Fatick","SN-KA":"Kaffrine","SN-KL":"Kaolack","SN-KE":"K\xE9dougou","SN-KD":"Kolda","SN-LG":"Louga","SN-MT":"Matam","SN-SL":"Saint-Louis","SN-SE":"S\xE9dhiou","SN-TC":"Tambacounda","SN-TH":"Thi\xE8s","SN-ZG":"Ziguinchor","SC-01":"Anse aux Pins","SC-02":"Anse Boileau","SC-03":"Anse Etoile","SC-05":"Anse Royale","SC-04":"Au Cap","SC-06":"Baie Lazare","SC-07":"Baie Sainte Anne","SC-08":"Beau Vallon","SC-09":"Bel Air","SC-10":"Bel Ombre","SC-11":"Cascade","SC-16":"English River","SC-12":"Glacis","SC-13":"Grand Anse Mahe","SC-14":"Grand Anse Praslin","SC-26":"Ile Perseverance I","SC-27":"Ile Perseverance II","SC-15":"La Digue","SC-24":"Les Mamelles","SC-17":"Mont Buxton","SC-18":"Mont Fleuri","SC-19":"Plaisance","SC-20":"Pointe Larue","SC-21":"Port Glaud","SC-25":"Roche Caiman","SC-22":"Saint Louis","SC-23":"Takamaka","SL-E":"Eastern","SL-NW":"North Western","SL-N":"Northern","SL-S":"Southern","SL-W":"Western Area","SG-01":"Central Singapore","SG-02":"North East","SG-03":"North West","SG-04":"South East","SG-05":"South West","SK-BC":"Banskobystrick\xFD kraj","SK-BL":"Bratislavsk\xFD kraj","SK-KI":"Ko\u0161ick\xFD kraj","SK-NI":"Nitriansky kraj","SK-PV":"Pre\u0161ovsk\xFD kraj","SK-TC":"Tren\u010Diansky kraj","SK-TA":"Trnavsk\xFD kraj","SK-ZI":"\u017Dilinsk\xFD kraj","SI-001":"Ajdov\u0161\u010Dina","SI-213":"Ankaran","SI-195":"Apa\u010De","SI-002":"Beltinci","SI-148":"Benedikt","SI-149":"Bistrica ob Sotli","SI-003":"Bled","SI-150":"Bloke","SI-004":"Bohinj","SI-005":"Borovnica","SI-006":"Bovec","SI-151":"Braslov\u010De","SI-007":"Brda","SI-008":"Brezovica","SI-009":"Bre\u017Eice","SI-152":"Cankova","SI-011":"Celje","SI-012":"Cerklje na Gorenjskem","SI-013":"Cerknica","SI-014":"Cerkno","SI-153":"Cerkvenjak","SI-196":"Cirkulane","SI-015":"\u010Cren\u0161ovci","SI-016":"\u010Crna na Koro\u0161kem","SI-017":"\u010Crnomelj","SI-018":"Destrnik","SI-019":"Diva\u010Da","SI-154":"Dobje","SI-020":"Dobrepolje","SI-155":"Dobrna","SI-021":"Dobrova-Polhov Gradec","SI-156":"Dobrovnik","SI-022":"Dol pri Ljubljani","SI-157":"Dolenjske Toplice","SI-023":"Dom\u017Eale","SI-024":"Dornava","SI-025":"Dravograd","SI-026":"Duplek","SI-027":"Gorenja vas-Poljane","SI-028":"Gori\u0161nica","SI-207":"Gorje","SI-029":"Gornja Radgona","SI-030":"Gornji Grad","SI-031":"Gornji Petrovci","SI-158":"Grad","SI-032":"Grosuplje","SI-159":"Hajdina","SI-160":"Ho\u010De-Slivnica","SI-161":"Hodo\u0161","SI-162":"Horjul","SI-034":"Hrastnik","SI-035":"Hrpelje-Kozina","SI-036":"Idrija","SI-037":"Ig","SI-038":"Ilirska Bistrica","SI-039":"Ivan\u010Dna Gorica","SI-040":"Izola","SI-041":"Jesenice","SI-163":"Jezersko","SI-042":"Jur\u0161inci","SI-043":"Kamnik","SI-044":"Kanal ob So\u010Di","SI-045":"Kidri\u010Devo","SI-046":"Kobarid","SI-047":"Kobilje","SI-048":"Ko\u010Devje","SI-049":"Komen","SI-164":"Komenda","SI-050":"Koper","SI-197":"Kostanjevica na Krki","SI-165":"Kostel","SI-051":"Kozje","SI-052":"Kranj","SI-053":"Kranjska Gora","SI-166":"Kri\u017Eevci","SI-054":"Kr\u0161ko","SI-055":"Kungota","SI-056":"Kuzma","SI-057":"La\u0161ko","SI-058":"Lenart","SI-059":"Lendava","SI-060":"Litija","SI-061":"Ljubljana","SI-062":"Ljubno","SI-063":"Ljutomer","SI-208":"Log-Dragomer","SI-064":"Logatec","SI-065":"Lo\u0161ka dolina","SI-066":"Lo\u0161ki Potok","SI-167":"Lovrenc na Pohorju","SI-067":"Lu\u010De","SI-068":"Lukovica","SI-069":"Maj\u0161perk","SI-198":"Makole","SI-070":"Maribor","SI-168":"Markovci","SI-071":"Medvode","SI-072":"Menge\u0161","SI-073":"Metlika","SI-074":"Me\u017Eica","SI-169":"Miklav\u017E na Dravskem polju","SI-075":"Miren-Kostanjevica","SI-212":"Mirna","SI-170":"Mirna Pe\u010D","SI-076":"Mislinja","SI-199":"Mokronog-Trebelno","SI-077":"Morav\u010De","SI-078":"Moravske Toplice","SI-079":"Mozirje","SI-080":"Murska Sobota","SI-081":"Muta","SI-082":"Naklo","SI-083":"Nazarje","SI-084":"Nova Gorica","SI-085":"Novo Mesto","SI-086":"Odranci","SI-171":"Oplotnica","SI-087":"Ormo\u017E","SI-088":"Osilnica","SI-089":"Pesnica","SI-090":"Piran","SI-091":"Pivka","SI-092":"Pod\u010Detrtek","SI-172":"Podlehnik","SI-093":"Podvelka","SI-200":"Polj\u010Dane","SI-173":"Polzela","SI-094":"Postojna","SI-174":"Prebold","SI-095":"Preddvor","SI-175":"Prevalje","SI-096":"Ptuj","SI-097":"Puconci","SI-098":"Ra\u010De-Fram","SI-099":"Rade\u010De","SI-100":"Radenci","SI-101":"Radlje ob Dravi","SI-102":"Radovljica","SI-103":"Ravne na Koro\u0161kem","SI-176":"Razkri\u017Eje","SI-209":"Re\u010Dica ob Savinji","SI-201":"Ren\u010De-Vogrsko","SI-104":"Ribnica","SI-177":"Ribnica na Pohorju","SI-106":"Roga\u0161ka Slatina","SI-105":"Roga\u0161ovci","SI-107":"Rogatec","SI-108":"Ru\u0161e","SI-178":"Selnica ob Dravi","SI-109":"Semi\u010D","SI-110":"Sevnica","SI-111":"Se\u017Eana","SI-112":"Slovenj Gradec","SI-113":"Slovenska Bistrica","SI-114":"Slovenske Konjice","SI-179":"Sodra\u017Eica","SI-180":"Sol\u010Dava","SI-202":"Sredi\u0161\u010De ob Dravi","SI-115":"Star\u0161e","SI-203":"Stra\u017Ea","SI-181":"Sveta Ana","SI-204":"Sveta Trojica v Slovenskih goricah","SI-182":"Sveti Andra\u017E v Slovenskih goricah","SI-116":"Sveti Jurij ob \u0160\u010Davnici","SI-210":"Sveti Jurij v Slovenskih goricah","SI-205":"Sveti Toma\u017E","SI-033":"\u0160alovci","SI-183":"\u0160empeter-Vrtojba","SI-117":"\u0160en\u010Dur","SI-118":"\u0160entilj","SI-119":"\u0160entjernej","SI-120":"\u0160entjur","SI-211":"\u0160entrupert","SI-121":"\u0160kocjan","SI-122":"\u0160kofja Loka","SI-123":"\u0160kofljica","SI-124":"\u0160marje pri Jel\u0161ah","SI-206":"\u0160marje\u0161ke Toplice","SI-125":"\u0160martno ob Paki","SI-194":"\u0160martno pri Litiji","SI-126":"\u0160o\u0161tanj","SI-127":"\u0160tore","SI-184":"Tabor","SI-010":"Ti\u0161ina","SI-128":"Tolmin","SI-129":"Trbovlje","SI-130":"Trebnje","SI-185":"Trnovska Vas","SI-186":"Trzin","SI-131":"Tr\u017Ei\u010D","SI-132":"Turni\u0161\u010De","SI-133":"Velenje","SI-187":"Velika Polana","SI-134":"Velike La\u0161\u010De","SI-188":"Ver\u017Eej","SI-135":"Videm","SI-136":"Vipava","SI-137":"Vitanje","SI-138":"Vodice","SI-139":"Vojnik","SI-189":"Vransko","SI-140":"Vrhnika","SI-141":"Vuzenica","SI-142":"Zagorje ob Savi","SI-143":"Zavr\u010D","SI-144":"Zre\u010De","SI-190":"\u017Dalec","SI-146":"\u017Delezniki","SI-191":"\u017Detale","SI-147":"\u017Diri","SI-192":"\u017Dirovnica","SI-193":"\u017Du\u017Eemberk","SB-CT":"Capital Territory","SB-CE":"Central","SB-CH":"Choiseul","SB-GU":"Guadalcanal","SB-IS":"Isabel","SB-MK":"Makira-Ulawa","SB-ML":"Malaita","SB-RB":"Rennell and Bellona","SB-TE":"Temotu","SB-WE":"Western","SO-AW":"Awdal","SO-BK":"Bakool","SO-BN":"Banaadir","SO-BR":"Bari","SO-BY":"Bay","SO-GA":"Galguduud","SO-GE":"Gedo","SO-HI":"Hiiraan","SO-JD":"Jubbada Dhexe","SO-JH":"Jubbada Hoose","SO-MU":"Mudug","SO-NU":"Nugaal","SO-SA":"Sanaag","SO-SD":"Shabeellaha Dhexe","SO-SH":"Shabeellaha Hoose","SO-SO":"Sool","SO-TO":"Togdheer","SO-WO":"Woqooyi Galbeed","ZA-EC":"Eastern Cape","ZA-FS":"Free State","ZA-GP":"Gauteng","ZA-KZN":"Kwazulu-Natal","ZA-LP":"Limpopo","ZA-MP":"Mpumalanga","ZA-NW":"North-West","ZA-NC":"Northern Cape","ZA-WC":"Western Cape","ES-AN":"Andaluc\xEDa","ES-AR":"Arag\xF3n","ES-AS":"Asturias","ES-CN":"Canarias","ES-CB":"Cantabria","ES-CL":"Castilla y Le\xF3n","ES-CM":"Castilla-La Mancha","ES-CT":"Catalunya","ES-CE":"Ceuta","ES-EX":"Extremadura","ES-GA":"Galicia","ES-IB":"Illes Balears","ES-RI":"La Rioja","ES-MD":"Madrid","ES-ML":"Melilla","ES-MC":"Murcia","ES-NC":"Navarra","ES-PV":"Pa\xEDs Vasco","ES-VC":"Valenciana","LK-1":"Basn\u0101hira pa\u1E37\u0101ta","LK-3":"Daku\u1E47u pa\u1E37\u0101ta","LK-2":"Madhyama pa\u1E37\u0101ta","LK-5":"N\xE6\u0306g\u0115nahira pa\u1E37\u0101ta","LK-9":"Sabaragamuva pa\u1E37\u0101ta","LK-4":"Uturu pa\u1E37\u0101ta","LK-7":"Uturum\xE6\u0306da pa\u1E37\u0101ta","LK-8":"\u016Ava pa\u1E37\u0101ta","LK-6":"Vayamba pa\u1E37\u0101ta","SD-RS":"Al Ba\u1E29r al A\u1E29mar","SD-GZ":"Al Jaz\u012Brah","SD-KH":"Al Khar\u0163\u016Bm","SD-GD":"Al Qa\u1E11\u0101rif","SD-NW":"An N\u012Bl al Abya\u1E11","SD-NB":"An N\u012Bl al Azraq","SD-NO":"Ash Sham\u0101l\u012Byah","SD-DW":"Gharb D\u0101rf\u016Br","SD-GK":"Gharb Kurduf\u0101n","SD-DS":"Jan\u016Bb D\u0101rf\u016Br","SD-KS":"Jan\u016Bb Kurduf\u0101n","SD-KA":"Kassal\u0101","SD-NR":"Nahr an N\u012Bl","SD-DN":"Sham\u0101l D\u0101rf\u016Br","SD-KN":"Sham\u0101l Kurduf\u0101n","SD-DE":"Sharq D\u0101rf\u016Br","SD-SI":"Sinn\u0101r","SD-DC":"Wasa\u0163 D\u0101rf\u016Br","SR-BR":"Brokopondo","SR-CM":"Commewijne","SR-CR":"Coronie","SR-MA":"Marowijne","SR-NI":"Nickerie","SR-PR":"Para","SR-PM":"Paramaribo","SR-SA":"Saramacca","SR-SI":"Sipaliwini","SR-WA":"Wanica","SZ-HH":"Hhohho","SZ-LU":"Lubombo","SZ-MA":"Manzini","SZ-SH":"Shiselweni","SE-K":"Blekinge l\xE4n","SE-W":"Dalarnas l\xE4n","SE-I":"Gotlands l\xE4n","SE-X":"G\xE4vleborgs l\xE4n","SE-N":"Hallands l\xE4n","SE-Z":"J\xE4mtlands l\xE4n","SE-F":"J\xF6nk\xF6pings l\xE4n","SE-H":"Kalmar l\xE4n","SE-G":"Kronobergs l\xE4n","SE-BD":"Norrbottens l\xE4n","SE-M":"Sk\xE5ne l\xE4n","SE-AB":"Stockholms l\xE4n","SE-D":"S\xF6dermanlands l\xE4n","SE-C":"Uppsala l\xE4n","SE-S":"V\xE4rmlands l\xE4n","SE-AC":"V\xE4sterbottens l\xE4n","SE-Y":"V\xE4sternorrlands l\xE4n","SE-U":"V\xE4stmanlands l\xE4n","SE-O":"V\xE4stra G\xF6talands l\xE4n","SE-T":"\xD6rebro l\xE4n","SE-E":"\xD6sterg\xF6tlands l\xE4n","CH-AG":"Aargau","CH-AR":"Appenzell Ausserrhoden","CH-AI":"Appenzell Innerrhoden","CH-BL":"Basel-Landschaft","CH-BS":"Basel-Stadt","CH-BE":"Bern","CH-FR":"Fribourg","CH-GE":"Gen\xE8ve","CH-GL":"Glarus","CH-GR":"Graub\xFCnden","CH-JU":"Jura","CH-LU":"Luzern","CH-NE":"Neuch\xE2tel","CH-NW":"Nidwalden","CH-OW":"Obwalden","CH-SG":"Sankt Gallen","CH-SH":"Schaffhausen","CH-SZ":"Schwyz","CH-SO":"Solothurn","CH-TG":"Thurgau","CH-TI":"Ticino","CH-UR":"Uri","CH-VS":"Valais","CH-VD":"Vaud","CH-ZG":"Zug","CH-ZH":"Z\xFCrich","SY-HA":"Al \u1E28asakah","SY-LA":"Al L\u0101dhiq\u012Byah","SY-QU":"Al Qunay\u0163irah","SY-RA":"Ar Raqqah","SY-SU":"As Suwayd\u0101'","SY-DR":"Dar'\u0101","SY-DY":"Dayr az Zawr","SY-DI":"Dimashq","SY-HL":"\u1E28alab","SY-HM":"\u1E28am\u0101h","SY-HI":"\u1E28im\u015F","SY-ID":"Idlib","SY-RD":"R\u012Bf Dimashq","SY-TA":"\u0162ar\u0163\u016Bs","TW-CHA":"Changhua","TW-CYI":"Chiayi","TW-CYQ":"Chiayi","TW-HSZ":"Hsinchu","TW-HSQ":"Hsinchu","TW-HUA":"Hualien","TW-KHH":"Kaohsiung","TW-KEE":"Keelung","TW-KIN":"Kinmen","TW-LIE":"Lienchiang","TW-MIA":"Miaoli","TW-NAN":"Nantou","TW-NWT":"New Taipei","TW-PEN":"Penghu","TW-PIF":"Pingtung","TW-TXG":"Taichung","TW-TNN":"Tainan","TW-TPE":"Taipei","TW-TTT":"Taitung","TW-TAO":"Taoyuan","TW-ILA":"Yilan","TW-YUN":"Yunlin","TJ-DU":"Dushanbe","TJ-KT":"Khatlon","TJ-GB":"K\u016Dhistoni Badakhshon","TJ-RA":"nohiyahoi tobei jumhur\xED","TJ-SU":"Sughd","TZ-01":"Arusha","TZ-02":"Dar es Salaam","TZ-03":"Dodoma","TZ-27":"Geita","TZ-04":"Iringa","TZ-05":"Kagera","TZ-06":"Kaskazini Pemba","TZ-07":"Kaskazini Unguja","TZ-28":"Katavi","TZ-08":"Kigoma","TZ-09":"Kilimanjaro","TZ-10":"Kusini Pemba","TZ-11":"Kusini Unguja","TZ-12":"Lindi","TZ-26":"Manyara","TZ-13":"Mara","TZ-14":"Mbeya","TZ-15":"Mjini Magharibi","TZ-16":"Morogoro","TZ-17":"Mtwara","TZ-18":"Mwanza","TZ-29":"Njombe","TZ-19":"Pwani","TZ-20":"Rukwa","TZ-21":"Ruvuma","TZ-22":"Shinyanga","TZ-30":"Simiyu","TZ-23":"Singida","TZ-31":"Songwe","TZ-24":"Tabora","TZ-25":"Tanga","TH-37":"Amnat Charoen","TH-15":"Ang Thong","TH-38":"Bueng Kan","TH-31":"Buri Ram","TH-24":"Chachoengsao","TH-18":"Chai Nat","TH-36":"Chaiyaphum","TH-22":"Chanthaburi","TH-50":"Chiang Mai","TH-57":"Chiang Rai","TH-20":"Chon Buri","TH-86":"Chumphon","TH-46":"Kalasin","TH-62":"Kamphaeng Phet","TH-71":"Kanchanaburi","TH-40":"Khon Kaen","TH-81":"Krabi","TH-10":"Bangkok","TH-52":"Lampang","TH-51":"Lamphun","TH-42":"Loei","TH-16":"Lop Buri","TH-58":"Mae Hong Son","TH-44":"Maha Sarakham","TH-49":"Mukdahan","TH-26":"Nakhon Nayok","TH-73":"Nakhon Pathom","TH-48":"Nakhon Phanom","TH-30":"Nakhon Ratchasima","TH-60":"Nakhon Sawan","TH-80":"Nakhon Si Thammarat","TH-55":"Nan","TH-96":"Narathiwat","TH-39":"Nong Bua Lam Phu","TH-43":"Nong Khai","TH-12":"Nonthaburi","TH-13":"Pathum Thani","TH-94":"Pattani","TH-82":"Phangnga","TH-93":"Phatthalung","TH-S":"Phatthaya","TH-56":"Phayao","TH-67":"Phetchabun","TH-76":"Phetchaburi","TH-66":"Phichit","TH-65":"Phitsanulok","TH-14":"Phra Nakhon Si Ayutthaya","TH-54":"Phrae","TH-83":"Phuket","TH-25":"Prachin Buri","TH-77":"Prachuap Khiri Khan","TH-85":"Ranong","TH-70":"Ratchaburi","TH-21":"Rayong","TH-45":"Roi Et","TH-27":"Sa Kaeo","TH-47":"Sakon Nakhon","TH-11":"Samut Prakan","TH-74":"Samut Sakhon","TH-75":"Samut Songkhram","TH-19":"Saraburi","TH-91":"Satun","TH-33":"Si Sa Ket","TH-17":"Sing Buri","TH-90":"Songkhla","TH-64":"Sukhothai","TH-72":"Suphan Buri","TH-84":"Surat Thani","TH-32":"Surin","TH-63":"Tak","TH-92":"Trang","TH-23":"Trat","TH-34":"Ubon Ratchathani","TH-41":"Udon Thani","TH-61":"Uthai Thani","TH-53":"Uttaradit","TH-95":"Yala","TH-35":"Yasothon","TL-AL":"Aileu","TL-AN":"Ainaro","TL-BA":"Baucau","TL-BO":"Bobonaro","TL-CO":"Cova Lima","TL-DI":"D\xEDli","TL-ER":"Ermera","TL-LA":"Laut\xE9m","TL-LI":"Liqui\xE7a","TL-MT":"Manatuto","TL-MF":"Manufahi","TL-OE":"O\xE9-Cusse Ambeno","TL-VI":"Viqueque","TG-C":"Centrale","TG-K":"Kara","TG-M":"Maritime","TG-P":"Plateaux","TG-S":"Savanes","TO-01":"'Eua","TO-02":"Ha'apai","TO-03":"Niuas","TO-04":"Tongatapu","TO-05":"Vava'u","TT-ARI":"Arima","TT-CHA":"Chaguanas","TT-CTT":"Couva-Tabaquite-Talparo","TT-DMN":"Diego Martin","TT-MRC":"Mayaro-Rio Claro","TT-PED":"Penal-Debe","TT-POS":"Port of Spain","TT-PRT":"Princes Town","TT-PTF":"Point Fortin","TT-SFO":"San Fernando","TT-SGE":"Sangre Grande","TT-SIP":"Siparia","TT-SJL":"San Juan-Laventille","TT-TOB":"Tobago","TT-TUP":"Tunapuna-Piarco","TN-31":"B\xE9ja","TN-13":"Ben Arous","TN-23":"Bizerte","TN-81":"Gab\xE8s","TN-71":"Gafsa","TN-32":"Jendouba","TN-41":"Kairouan","TN-42":"Kasserine","TN-73":"K\xE9bili","TN-12":"L'Ariana","TN-14":"La Manouba","TN-33":"Le Kef","TN-53":"Mahdia","TN-82":"M\xE9denine","TN-52":"Monastir","TN-21":"Nabeul","TN-61":"Sfax","TN-43":"Sidi Bouzid","TN-34":"Siliana","TN-51":"Sousse","TN-83":"Tataouine","TN-72":"Tozeur","TN-11":"Tunis","TN-22":"Zaghouan","TR-01":"Adana","TR-02":"Ad\u0131yaman","TR-03":"Afyonkarahisar","TR-04":"A\u011Fr\u0131","TR-68":"Aksaray","TR-05":"Amasya","TR-06":"Ankara","TR-07":"Antalya","TR-75":"Ardahan","TR-08":"Artvin","TR-09":"Ayd\u0131n","TR-10":"Bal\u0131kesir","TR-74":"Bart\u0131n","TR-72":"Batman","TR-69":"Bayburt","TR-11":"Bilecik","TR-12":"Bing\xF6l","TR-13":"Bitlis","TR-14":"Bolu","TR-15":"Burdur","TR-16":"Bursa","TR-17":"\xC7anakkale","TR-18":"\xC7ank\u0131r\u0131","TR-19":"\xC7orum","TR-20":"Denizli","TR-21":"Diyarbak\u0131r","TR-81":"D\xFCzce","TR-22":"Edirne","TR-23":"Elaz\u0131\u011F","TR-24":"Erzincan","TR-25":"Erzurum","TR-26":"Eski\u015Fehir","TR-27":"Gaziantep","TR-28":"Giresun","TR-29":"G\xFCm\xFC\u015Fhane","TR-30":"Hakk\xE2ri","TR-31":"Hatay","TR-76":"I\u011Fd\u0131r","TR-32":"Isparta","TR-34":"\u0130stanbul","TR-35":"\u0130zmir","TR-46":"Kahramanmara\u015F","TR-78":"Karab\xFCk","TR-70":"Karaman","TR-36":"Kars","TR-37":"Kastamonu","TR-38":"Kayseri","TR-71":"K\u0131r\u0131kkale","TR-39":"K\u0131rklareli","TR-40":"K\u0131r\u015Fehir","TR-79":"Kilis","TR-41":"Kocaeli","TR-42":"Konya","TR-43":"K\xFCtahya","TR-44":"Malatya","TR-45":"Manisa","TR-47":"Mardin","TR-33":"Mersin","TR-48":"Mu\u011Fla","TR-49":"Mu\u015F","TR-50":"Nev\u015Fehir","TR-51":"Ni\u011Fde","TR-52":"Ordu","TR-80":"Osmaniye","TR-53":"Rize","TR-54":"Sakarya","TR-55":"Samsun","TR-56":"Siirt","TR-57":"Sinop","TR-58":"Sivas","TR-63":"\u015Eanl\u0131urfa","TR-73":"\u015E\u0131rnak","TR-59":"Tekirda\u011F","TR-60":"Tokat","TR-61":"Trabzon","TR-62":"Tunceli","TR-64":"U\u015Fak","TR-65":"Van","TR-77":"Yalova","TR-66":"Yozgat","TR-67":"Zonguldak","TM-A":"Ahal","TM-S":"A\u015Fgabat","TM-B":"Balkan","TM-D":"Da\u015Foguz","TM-L":"Lebap","TM-M":"Mary","TV-FUN":"Funafuti","TV-NMG":"Nanumaga","TV-NMA":"Nanumea","TV-NIT":"Niutao","TV-NUI":"Nui","TV-NKF":"Nukufetau","TV-NKL":"Nukulaelae","TV-VAI":"Vaitupu","UG-C":"Central","UG-E":"Eastern","UG-N":"Northern","UG-W":"Western","UA-43":"Avtonomna Respublika Krym","UA-71":"Cherkaska oblast","UA-74":"Chernihivska oblast","UA-77":"Chernivetska oblast","UA-12":"Dnipropetrovska oblast","UA-14":"Donetska oblast","UA-26":"Ivano-Frankivska oblast","UA-63":"Kharkivska oblast","UA-65":"Khersonska oblast","UA-68":"Khmelnytska oblast","UA-35":"Kirovohradska oblast","UA-30":"Kyiv","UA-32":"Kyivska oblast","UA-09":"Luhanska oblast","UA-46":"Lvivska oblast","UA-48":"Mykolaivska oblast","UA-51":"Odeska oblast","UA-53":"Poltavska oblast","UA-56":"Rivnenska oblast","UA-40":"Sevastopol","UA-59":"Sumska oblast","UA-61":"Ternopilska oblast","UA-05":"Vinnytska oblast","UA-07":"Volynska oblast","UA-21":"Zakarpatska oblast","UA-23":"Zaporizka oblast","UA-18":"Zhytomyrska oblast","AE-AJ":"\u2018Ajm\u0101n","AE-AZ":"Ab\u016B Z\u0327aby","AE-FU":"Al Fujayrah","AE-SH":"Ash Sh\u0101riqah","AE-DU":"Dubayy","AE-RK":"Ra\u2019s al Khaymah","AE-UQ":"Umm al Qaywayn","GB-ENG":"England","GB-NIR":"Northern Ireland","GB-SCT":"Scotland","GB-WLS":"Wales","US-AL":"Alabama","US-AK":"Alaska","US-AZ":"Arizona","US-AR":"Arkansas","US-CA":"California","US-CO":"Colorado","US-CT":"Connecticut","US-DE":"Delaware","US-FL":"Florida","US-GA":"Georgia","US-HI":"Hawaii","US-ID":"Idaho","US-IL":"Illinois","US-IN":"Indiana","US-IA":"Iowa","US-KS":"Kansas","US-KY":"Kentucky","US-LA":"Louisiana","US-ME":"Maine","US-MD":"Maryland","US-MA":"Massachusetts","US-MI":"Michigan","US-MN":"Minnesota","US-MS":"Mississippi","US-MO":"Missouri","US-MT":"Montana","US-NE":"Nebraska","US-NV":"Nevada","US-NH":"New Hampshire","US-NJ":"New Jersey","US-NM":"New Mexico","US-NY":"New York","US-NC":"North Carolina","US-ND":"North Dakota","US-OH":"Ohio","US-OK":"Oklahoma","US-OR":"Oregon","US-PA":"Pennsylvania","US-RI":"Rhode Island","US-SC":"South Carolina","US-SD":"South Dakota","US-TN":"Tennessee","US-TX":"Texas","US-UT":"Utah","US-VT":"Vermont","US-VA":"Virginia","US-WA":"Washington","US-WV":"West Virginia","US-WI":"Wisconsin","US-WY":"Wyoming","US-DC":"District of Columbia","US-AS":"American Samoa","US-GU":"Guam","US-MP":"Northern Mariana Islands","US-PR":"Puerto Rico","US-UM":"United States Minor Outlying Islands","US-VI":"Virgin Islands","UM-81":"Baker Island","UM-84":"Howland Island","UM-86":"Jarvis Island","UM-67":"Johnston Atoll","UM-89":"Kingman Reef","UM-71":"Midway Islands","UM-76":"Navassa Island","UM-95":"Palmyra Atoll","UM-79":"Wake Island","UY-AR":"Artigas","UY-CA":"Canelones","UY-CL":"Cerro Largo","UY-CO":"Colonia","UY-DU":"Durazno","UY-FS":"Flores","UY-FD":"Florida","UY-LA":"Lavalleja","UY-MA":"Maldonado","UY-MO":"Montevideo","UY-PA":"Paysand\xFA","UY-RN":"R\xEDo Negro","UY-RV":"Rivera","UY-RO":"Rocha","UY-SA":"Salto","UY-SJ":"San Jos\xE9","UY-SO":"Soriano","UY-TA":"Tacuaremb\xF3","UY-TT":"Treinta y Tres","UZ-AN":"Andijon","UZ-BU":"Buxoro","UZ-FA":"Farg\u2018ona","UZ-JI":"Jizzax","UZ-NG":"Namangan","UZ-NW":"Navoiy","UZ-QA":"Qashqadaryo","UZ-QR":"Qoraqalpog\u2018iston Respublikasi","UZ-SA":"Samarqand","UZ-SI":"Sirdaryo","UZ-SU":"Surxondaryo","UZ-TK":"Toshkent","UZ-TO":"Toshkent","UZ-XO":"Xorazm","VU-MAP":"Malampa","VU-PAM":"P\xE9nama","VU-SAM":"Sanma","VU-SEE":"Sh\xE9fa","VU-TAE":"Taf\xE9a","VU-TOB":"Torba","VE-Z":"Amazonas","VE-B":"Anzo\xE1tegui","VE-C":"Apure","VE-D":"Aragua","VE-E":"Barinas","VE-F":"Bol\xEDvar","VE-G":"Carabobo","VE-H":"Cojedes","VE-Y":"Delta Amacuro","VE-W":"Dependencias Federales","VE-A":"Distrito Capital","VE-I":"Falc\xF3n","VE-J":"Gu\xE1rico","VE-X":"La Guaira","VE-K":"Lara","VE-L":"M\xE9rida","VE-M":"Miranda","VE-N":"Monagas","VE-O":"Nueva Esparta","VE-P":"Portuguesa","VE-R":"Sucre","VE-S":"T\xE1chira","VE-T":"Trujillo","VE-U":"Yaracuy","VE-V":"Zulia","VN-44":"An Giang","VN-43":"B\xE0 R\u1ECBa - V\u0169ng T\xE0u","VN-54":"B\u1EAFc Giang","VN-53":"B\u1EAFc K\u1EA1n","VN-55":"B\u1EA1c Li\xEAu","VN-56":"B\u1EAFc Ninh","VN-50":"B\u1EBFn Tre","VN-31":"B\xECnh \u0110\u1ECBnh","VN-57":"B\xECnh D\u01B0\u01A1ng","VN-58":"B\xECnh Ph\u01B0\u1EDBc","VN-40":"B\xECnh Thu\u1EADn","VN-59":"C\xE0 Mau","VN-CT":"C\u1EA7n Th\u01A1","VN-04":"Cao B\u1EB1ng","VN-DN":"\u0110\xE0 N\u1EB5ng","VN-33":"\u0110\u1EAFk L\u1EAFk","VN-72":"\u0110\u1EAFk N\xF4ng","VN-71":"\u0110i\u1EC7n Bi\xEAn","VN-39":"\u0110\u1ED3ng Nai","VN-45":"\u0110\u1ED3ng Th\xE1p","VN-30":"Gia Lai","VN-03":"H\xE0 Giang","VN-63":"H\xE0 Nam","VN-HN":"H\xE0 N\u1ED9i","VN-23":"H\xE0 T\u0129nh","VN-61":"H\u1EA3i D\u01B0\u01A1ng","VN-HP":"H\u1EA3i Ph\xF2ng","VN-73":"H\u1EADu Giang","VN-SG":"H\u1ED3 Ch\xED Minh","VN-14":"H\xF2a B\xECnh","VN-66":"H\u01B0ng Y\xEAn","VN-34":"Kh\xE1nh H\xF2a","VN-47":"Ki\u1EBFn Giang","VN-28":"Kon Tum","VN-01":"Lai Ch\xE2u","VN-35":"L\xE2m \u0110\u1ED3ng","VN-09":"L\u1EA1ng S\u01A1n","VN-02":"L\xE0o Cai","VN-41":"Long An","VN-67":"Nam \u0110\u1ECBnh","VN-22":"Ngh\u1EC7 An","VN-18":"Ninh B\xECnh","VN-36":"Ninh Thu\u1EADn","VN-68":"Ph\xFA Th\u1ECD","VN-32":"Ph\xFA Y\xEAn","VN-24":"Qu\u1EA3ng B\xECnh","VN-27":"Qu\u1EA3ng Nam","VN-29":"Qu\u1EA3ng Ng\xE3i","VN-13":"Qu\u1EA3ng Ninh","VN-25":"Qu\u1EA3ng Tr\u1ECB","VN-52":"S\xF3c Tr\u0103ng","VN-05":"S\u01A1n La","VN-37":"T\xE2y Ninh","VN-20":"Th\xE1i B\xECnh","VN-69":"Th\xE1i Nguy\xEAn","VN-21":"Thanh H\xF3a","VN-26":"Th\u1EEBa Thi\xEAn-Hu\u1EBF","VN-46":"Ti\u1EC1n Giang","VN-51":"Tr\xE0 Vinh","VN-07":"Tuy\xEAn Quang","VN-49":"V\u0129nh Long","VN-70":"V\u0129nh Ph\xFAc","VN-06":"Y\xEAn B\xE1i","WF-AL":"Alo","WF-SG":"Sigave","WF-UV":"Uvea","YE-AD":"\u2018Adan","YE-AM":"\u2018Amr\u0101n","YE-AB":"Abyan","YE-DA":"A\u1E11 \u1E10\u0101li\u2018","YE-BA":"Al Bay\u1E11\u0101\u2019","YE-HU":"Al \u1E28udaydah","YE-JA":"Al Jawf","YE-MR":"Al Mahrah","YE-MW":"Al Ma\u1E29w\u012Bt","YE-SA":"Am\u0101nat al \u2018\u0100\u015Fimah","YE-SU":"Arkhab\u012Bl Suqu\u0163r\xE1","YE-DH":"Dham\u0101r","YE-HD":"\u1E28a\u1E11ramawt","YE-HJ":"\u1E28ajjah","YE-IB":"Ibb","YE-LA":"La\u1E29ij","YE-MA":"Ma\u2019rib","YE-RA":"Raymah","YE-SD":"\u015E\u0101\u02BBdah","YE-SN":"\u015Ean\u02BB\u0101\u2019","YE-SH":"Shabwah","YE-TA":"T\u0101\u02BBizz","ZM-02":"Central","ZM-08":"Copperbelt","ZM-03":"Eastern","ZM-04":"Luapula","ZM-09":"Lusaka","ZM-10":"Muchinga","ZM-06":"North-Western","ZM-05":"Northern","ZM-07":"Southern","ZM-01":"Western","ZW-BU":"Bulawayo","ZW-HA":"Harare","ZW-MA":"Manicaland","ZW-MC":"Mashonaland Central","ZW-ME":"Mashonaland East","ZW-MW":"Mashonaland West","ZW-MV":"Masvingo","ZW-MN":"Matabeleland North","ZW-MS":"Matabeleland South","ZW-MI":"Midlands","BQ-BO":"Bonaire","BQ-SA":"Saba","BQ-SE":"Sint Eustatius","ME-01":"Andrijevica","ME-02":"Bar","ME-03":"Berane","ME-04":"Bijelo Polje","ME-05":"Budva","ME-06":"Cetinje","ME-07":"Danilovgrad","ME-22":"Gusinje","ME-08":"Herceg-Novi","ME-09":"Kola\u0161in","ME-10":"Kotor","ME-11":"Mojkovac","ME-12":"Nik\u0161i\u0107","ME-23":"Petnjica","ME-13":"Plav","ME-14":"Pljevlja","ME-15":"Plu\u017Eine","ME-16":"Podgorica","ME-17":"Ro\u017Eaje","ME-18":"\u0160avnik","ME-19":"Tivat","ME-24":"Tuzi","ME-20":"Ulcinj","ME-21":"\u017Dabljak","ME-25":"Zeta","RS-KM":"Kosovo-Metohija[1]","RS-VO":"Vojvodina","SS-EC":"Central Equatoria","SS-EE":"Eastern Equatoria","SS-JG":"Jonglei","SS-LK":"Lakes","SS-BN":"Northern Bahr el Ghazal","SS-UY":"Unity","SS-NU":"Upper Nile","SS-WR":"Warrap","SS-BW":"Western Bahr el Ghazal","SS-EW":"Western Equatoria"},NR=Object.keys(FT);var kp=async e=>{let t;try{let n=typeof e=="string"?e:e.url;t=await fetch(n,{method:typeof e=="string"?"GET":e.method,mode:"cors",headers:typeof e!="string"&&te(e.body)?{"Content-Type":"application/json"}:void 0,body:typeof e!="string"&&te(e.body)?JSON.stringify(e.body):void 0});let r=await t.json();if(!t.ok)throw typeof r=="object"&&r!==null&&"error"in r?r.error:r;return{data:r,response:t}}catch(n){return console.error(n),{error:n,response:t}}},te=e=>e!=null,Je=e=>e==null,He=e=>e==null||e==="",Ee=e=>e!=null&&e!=="";var Ap=e=>{e.split("</noscript>").forEach(n=>{let[r,o]=n.split("<noscript>"),a=document.createRange().createContextualFragment(r??"");if(document.head.append(a),Je(o))return;let i=document.createElement("noscript"),s=document.createRange().createContextualFragment(o);i.append(s),document.head.append(i)})};var Zt=e=>e?.startsWith("data:image/svg")||e?.endsWith(".svg");var dn=class extends Error{constructor(t,n,r){let o=t.status||t.status===0?t.status:"",a=t.statusText||"",i=`${o} ${a}`.trim(),s=i?`status code ${i}`:"an unknown error";super(`Request failed with ${s}`),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="HTTPError",this.response=t,this.request=n,this.options=r}};var yo=class extends Error{constructor(t){super("Request timed out"),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.request=t}};var fa=e=>e!==null&&typeof e=="object";var pa=(...e)=>{for(let t of e)if((!fa(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return ji({},...e)},mc=(e={},t={})=>{let n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(let[a,i]of o.entries())r&&i==="undefined"||i===void 0?n.delete(a):n.set(a,i);return n},ji=(...e)=>{let t={},n={};for(let r of e)if(Array.isArray(r))Array.isArray(t)||(t=[]),t=[...t,...r];else if(fa(r)){for(let[o,a]of Object.entries(r))fa(a)&&o in t&&(a=ji(t[o],a)),t={...t,[o]:a};fa(r.headers)&&(n=mc(n,r.headers),t.headers=n)}return t};var Pp=(()=>{let e=!1,t=!1,n=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";return n&&r&&(t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")),e&&!t})(),Ip=typeof globalThis.AbortController=="function",_p=typeof globalThis.ReadableStream=="function",Mp=typeof globalThis.FormData=="function",Wi=["get","post","put","patch","head","delete"],HT=()=>{};HT();var Rp={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},zi=2147483647,Zi=Symbol("stop"),Np={json:!0,parseJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},Op={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0};var Dp=e=>Wi.includes(e)?e.toUpperCase():e,KT=["get","put","head","delete","options","trace"],VT=[408,413,429,500,502,503,504],Bp=[413,429,503],Lp={limit:2,methods:KT,statusCodes:VT,afterStatusCodes:Bp,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},Up=(e={})=>{if(typeof e=="number")return{...Lp,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...Lp,...e,afterStatusCodes:Bp}};async function gc(e,t,n,r){return new Promise((o,a)=>{let i=setTimeout(()=>{n&&n.abort(),a(new yo(e))},r.timeout);r.fetch(e,t).then(o).catch(a).then(()=>{clearTimeout(i)})})}async function hc(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));function o(){clearTimeout(a),r(t.reason)}let a=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e)})}var Fp=(e,t)=>{let n={};for(let r in t)!(r in Op)&&!(r in Np)&&!(r in e)&&(n[r]=t[r]);return n};var ma=class e{static create(t,n){let r=new e(t,n),o=async()=>{if(typeof r._options.timeout=="number"&&r._options.timeout>zi)throw new RangeError(`The \`timeout\` option cannot be greater than ${zi}`);await Promise.resolve();let s=await r._fetch();for(let c of r._options.hooks.afterResponse){let l=await c(r.request,r._options,r._decorateResponse(s.clone()));l instanceof globalThis.Response&&(s=l)}if(r._decorateResponse(s),!s.ok&&r._options.throwHttpErrors){let c=new dn(s,r.request,r._options);for(let l of r._options.hooks.beforeError)c=await l(c);throw c}if(r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!_p)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return r._stream(s.clone(),r._options.onDownloadProgress)}return s},i=r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(o):o();for(let[s,c]of Object.entries(Rp))i[s]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||c);let u=(await i).clone();if(s==="json"){if(u.status===204||(await u.clone().arrayBuffer()).byteLength===0)return"";if(n.parseJson)return n.parseJson(await u.text())}return u[s]()};return i}constructor(t,n={}){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"abortController",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_retryCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._input=t;let r=this._input instanceof Request&&"credentials"in Request.prototype?this._input.credentials:void 0;if(this._options={...r&&{credentials:r},...n,headers:mc(this._input.headers,n.headers),hooks:ji({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:Dp(n.method??this._input.method),prefixUrl:String(n.prefixUrl||""),retry:Up(n.retry),throwHttpErrors:n.throwHttpErrors!==!1,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(Ip){if(this.abortController=new globalThis.AbortController,this._options.signal){let o=this._options.signal;this._options.signal.addEventListener("abort",()=>{this.abortController.abort(o.reason)})}this._options.signal=this.abortController.signal}if(Pp&&(this._options.duplex="half"),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let a="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),i=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,a);(Mp&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(i,{...this.request}),this._options)}this._options.json!==void 0&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type",this._options.headers.get("content-type")??"application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<=this._options.retry.limit&&!(t instanceof yo)){if(t instanceof dn){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;let r=t.response.headers.get("Retry-After");if(r&&this._options.retry.afterStatusCodes.includes(t.response.status)){let o=Number(r);return Number.isNaN(o)?o=Date.parse(r)-Date.now():o*=1e3,this._options.retry.maxRetryAfter!==void 0&&o>this._options.retry.maxRetryAfter?0:o}if(t.response.status===413)return 0}let n=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,n)}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(n){let r=Math.min(this._calculateRetryDelay(n),zi);if(r!==0&&this._retryCount>0){await hc(r,{signal:this._options.signal});for(let o of this._options.hooks.beforeRetry)if(await o({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===Zi)return;return this._retry(t)}throw n}}async _fetch(){for(let n of this._options.hooks.beforeRequest){let r=await n(this.request,this._options);if(r instanceof Request){this.request=r;break}if(r instanceof Response)return r}let t=Fp(this.request,this._options);return this._options.timeout===!1?this._options.fetch(this.request.clone(),t):gc(this.request.clone(),t,this.abortController,this._options)}_stream(t,n){let r=Number(t.headers.get("content-length"))||0,o=0;return t.status===204?(n&&n({percent:1,totalBytes:r,transferredBytes:o},new Uint8Array),new globalThis.Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(a){let i=t.body.getReader();n&&n({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array);async function s(){let{done:c,value:l}=await i.read();if(c){a.close();return}if(n){o+=l.byteLength;let u=r===0?0:o/r;n({percent:u,transferredBytes:o,totalBytes:r},l)}a.enqueue(l),await s()}await s()}}),{status:t.status,statusText:t.statusText,headers:t.headers})}};var bc=e=>{let t=(n,r)=>ma.create(n,pa(e,r));for(let n of Wi)t[n]=(r,o)=>ma.create(r,pa(e,o,{method:n}));return t.create=n=>bc(pa(n)),t.extend=n=>bc(pa(e,n)),t.stop=Zi,t},jT=bc(),Jn=jT;async function $p({agent:e,isPreview:t,apiHost:n,prefilledVariables:r,resultId:o,stripeRedirectStatus:a,startFrom:i,sessionId:s}){if(Je(e))throw new Error("Agent is required to start the chat");let c=io()??void 0,l=c?JSON.parse(c):void 0;if(l)return WT({apiHost:n,stripeRedirectStatus:a,paymentInProgressState:l});let u=typeof e=="string"?e:e.id;if(t)return zT({apiHost:n,agentId:u,startFrom:i,agent:e,prefilledVariables:r,sessionId:s});try{let f=parent!==window&&Ee(document.referrer)?new URL(document.referrer).origin:void 0,d=await Jn.post(`${yc(n)}/api/v1/agents/${u}/startChat`,{headers:{"x-agent-iframe-referrer-origin":f},json:{isStreamEnabled:!0,prefilledVariables:r,resultId:o,isOnlyRegistering:!1},timeout:!1}),p=d.headers.get("access-control-allow-origin");if(f&&p&&p!=="*"&&!f.includes(p))throw new so(p);return{data:await d.json()}}catch(f){return{error:f}}}var WT=async({apiHost:e,stripeRedirectStatus:t,paymentInProgressState:n})=>{Ri();try{return{data:{...await Jn.post(`${yc(e)}/api/v1/sessions/${n.sessionId}/continueChat`,{json:{message:t==="failed"?"fail":"Success"},timeout:!1}).json(),...n}}}catch(r){return{error:r}}},zT=async({apiHost:e,agentId:t,startFrom:n,agent:r,prefilledVariables:o,sessionId:a})=>{try{return{data:await Jn.post(`${yc(e)}/api/v1/agents/${t}/preview/startChat`,{json:{isStreamEnabled:!0,startFrom:n,agent:r,prefilledVariables:o,sessionId:a},timeout:!1}).json()}}catch(i){return{error:i}}},yc=e=>Ee(e)?e:Ct();var[Gp,Hp]=M("100%");var[UN,Kp]=M();var Yi="#303235",qi="#FFFFFF",Vp="Google",vo="Open Sans",xo="Color",ga="#ffffff";var jp="#000",Wp="#000",zp=2,Ji="absolute",Zp="Top",wr="medium",vt=1,Yp=0,qp="800px",Jp="100%",ha="transparent";var So="#F7F8FF",Xp=Yi,Qp="#FF8E21",em=qi,ba="#0042DA",tm=qi,nm=1;var rm="#FFFFFF",ya=Yi,om="#9095A0",am="md";var wo=!0,va=!1;var ZT="https://fonts.bunny.net/css2",Xi="agent-font",vc=e=>{let t=document.getElementById(Xi);if(typeof e=="string"||e.type==="Google"){let n=(typeof e=="string"?e:e.family)??vo;if(t?.getAttribute("href")?.includes(n))return;t?.remove();let r=document.createElement("link");r.href=`${ZT}?family=${n}:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap`,r.rel="stylesheet",r.id=Xi,document.head.appendChild(r);return}if(e.type==="Custom"){if(Ee(e.css)){if(t?.innerHTML===e.css)return;t?.remove();let n=document.createElement("style");n.innerHTML=e.css,n.id=Xi,document.head.appendChild(n)}if(Ee(e.url)){if(t?.getAttribute("href")===e.url)return;t?.remove();let n=document.createElement("link");n.href=e.url,n.rel="stylesheet",n.id=Xi,document.head.appendChild(n)}}};var[Y,im]=M();var at={general:{isInputPrefillEnabled:!1,isHideQueryParamsEnabled:!0,isNewResultOnRefreshEnabled:!0,rememberUser:{isEnabled:!1,storage:"session"},isBrandingEnabled:!1,isTypingEmulationEnabled:!0},typingEmulation:{enabled:!0,speed:400,maxDelay:3,delayBetweenBubbles:0,isDisabledOnFirstMessage:!0},metadata:{description:"Automate customer interactions with Release0. Build AI agents that respond, collect data, and integrate seamlessly\u2014without writing code.",favIconUrl:e=>e+"/favicon.png",imageUrl:e=>e+"/site-preview.png"}};var xc=Symbol("store-raw"),Co=Symbol("store-node"),In=Symbol("store-has"),sm=Symbol("store-self");function lm(e){let t=e[Lt];if(!t&&(Object.defineProperty(e,Lt,{value:t=new Proxy(e,JT)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,a=n.length;o<a;o++){let i=n[o];r[i].get&&Object.defineProperty(e,i,{enumerable:r[i].enumerable,get:r[i].get.bind(t)})}}return t}function Xn(e){let t;return e!=null&&typeof e=="object"&&(e[Lt]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Eo(e,t=new Set){let n,r,o,a;if(n=e!=null&&e[xc])return n;if(!Xn(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let i=0,s=e.length;i<s;i++)o=e[i],(r=Eo(o,t))!==o&&(e[i]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let i=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let c=0,l=i.length;c<l;c++)a=i[c],!s[a].get&&(o=e[a],(r=Eo(o,t))!==o&&(e[a]=r))}return e}function Qi(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Sa(e,t,n){if(e[t])return e[t];let[r,o]=M(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function YT(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===Lt||t===Co||(delete n.value,delete n.writable,n.get=()=>e[Lt][t]),n}function cm(e){Ai()&&Sa(Qi(e,Co),sm)()}function qT(e){return cm(e),Reflect.ownKeys(e)}var JT={get(e,t,n){if(t===xc)return e;if(t===Lt)return n;if(t===Ei)return cm(e),n;let r=Qi(e,Co),o=r[t],a=o?o():e[t];if(t===Co||t===In||t==="__proto__")return a;if(!o){let i=Object.getOwnPropertyDescriptor(e,t);Ai()&&(typeof a!="function"||e.hasOwnProperty(t))&&!(i&&i.get)&&(a=Sa(r,t,a)())}return Xn(a)?lm(a):a},has(e,t){return t===xc||t===Lt||t===Ei||t===Co||t===In||t==="__proto__"?!0:(Ai()&&Sa(Qi(e,In),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:qT,getOwnPropertyDescriptor:YT};function Bt(e,t,n,r=!1){if(!r&&e[t]===n)return;let o=e[t],a=e.length;n===void 0?(delete e[t],e[In]&&e[In][t]&&o!==void 0&&e[In][t].$()):(e[t]=n,e[In]&&e[In][t]&&o===void 0&&e[In][t].$());let i=Qi(e,Co),s;if((s=Sa(i,t,o))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let c=e.length;c<a;c++)(s=i[c])&&s.$();(s=Sa(i,"length",a))&&s.$(e.length)}(s=i[sm])&&s.$()}function um(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let o=n[r];Bt(e,o,t[o])}}function XT(e,t){if(typeof t=="function"&&(t=t(e)),t=Eo(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let o=t[n];e[n]!==o&&Bt(e,n,o)}Bt(e,"length",r)}else um(e,t)}function xa(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();let i=typeof r,s=Array.isArray(e);if(Array.isArray(r)){for(let c=0;c<r.length;c++)xa(e,[r[c]].concat(t),n);return}else if(s&&i==="function"){for(let c=0;c<e.length;c++)r(e[c],c)&&xa(e,[c].concat(t),n);return}else if(s&&i==="object"){let{from:c=0,to:l=e.length-1,by:u=1}=r;for(let f=c;f<=l;f+=u)xa(e,[f].concat(t),n);return}else if(t.length>1){xa(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let a=t[0];typeof a=="function"&&(a=a(o,n),a===o)||r===void 0&&a==null||(a=Eo(a),r===void 0||Xn(o)&&Xn(a)&&!Array.isArray(a)?um(o,a):Bt(e,r,a))}function dm(...[e,t]){let n=Eo(e||{}),r=Array.isArray(n),o=lm(n);function a(...i){Hd(()=>{r&&i.length===1?XT(n,i[0]):xa(n,i)})}return[o,a]}var Sc=Symbol("store-root");function To(e,t,n,r,o){let a=t[n];if(e===a)return;let i=Array.isArray(e);if(n!==Sc&&(!Xn(e)||!Xn(a)||i!==Array.isArray(a)||o&&e[o]!==a[o])){Bt(t,n,e);return}if(i){if(e.length&&a.length&&(!r||o&&e[0]&&e[0][o]!=null)){let l,u,f,d,p,h,g,x;for(f=0,d=Math.min(a.length,e.length);f<d&&(a[f]===e[f]||o&&a[f]&&e[f]&&a[f][o]===e[f][o]);f++)To(e[f],a,f,r,o);let b=new Array(e.length),E=new Map;for(d=a.length-1,p=e.length-1;d>=f&&p>=f&&(a[d]===e[p]||o&&a[f]&&e[f]&&a[d][o]===e[p][o]);d--,p--)b[p]=a[d];if(f>p||f>d){for(u=f;u<=p;u++)Bt(a,u,e[u]);for(;u<e.length;u++)Bt(a,u,b[u]),To(e[u],a,u,r,o);a.length>e.length&&Bt(a,"length",e.length);return}for(g=new Array(p+1),u=p;u>=f;u--)h=e[u],x=o&&h?h[o]:h,l=E.get(x),g[u]=l===void 0?-1:l,E.set(x,u);for(l=f;l<=d;l++)h=a[l],x=o&&h?h[o]:h,u=E.get(x),u!==void 0&&u!==-1&&(b[u]=a[l],u=g[u],E.set(x,u));for(u=f;u<e.length;u++)u in b?(Bt(a,u,b[u]),To(e[u],a,u,r,o)):Bt(a,u,e[u])}else for(let l=0,u=e.length;l<u;l++)To(e[l],a,l,r,o);a.length>e.length&&Bt(a,"length",e.length);return}let s=Object.keys(e);for(let l=0,u=s.length;l<u;l++)To(e[s[l]],a,s[l],r,o);let c=Object.keys(a);for(let l=0,u=c.length;l<u;l++)e[c[l]]===void 0&&Bt(a,c[l],void 0)}function es(e,t={}){let{merge:n,key:r="id"}=t,o=Eo(e);return a=>{if(!Xn(a)||!Xn(o))return o;let i=To(o,{[Sc]:a},Sc,n,r);return i===void 0?a:i}}function fn(e,t){if(!t.storage)return[...e];let n=QT(t.storage||at.general.rememberUser.storage),r=s=>{let c=JSON.parse(JSON.stringify(s));return typeof c!="object"||("blobUrl"in c&&(c.blobUrl=void 0),"attachments"in c&&Array.isArray(c.attachments)&&c.attachments.forEach(l=>{l&&"blobUrl"in l&&(l.blobUrl=void 0)})),JSON.stringify(c)},o=JSON.parse.bind(JSON),a=n.getItem(t.key),i=typeof e[0]=="function"?s=>e[1](()=>o(s)):s=>e[1](es(o(s)));return a&&(i(a),t.onRecovered?.()),[e[0],typeof e[0]=="function"?s=>{let c=e[1](s);return s?n.setItem(t.key,r(c)):n.removeItem(t.key),c}:(...s)=>{e[1](...s);let c=r(qe(()=>e[0]));n.setItem(t.key,c)}]}var QT=e=>(e??at.general.rememberUser.storage)==="session"?sessionStorage:localStorage;var tt=e=>{let t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,(r,o,a,i)=>o+o+a+a+i+i);let n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?[Number.parseInt(n[1]??"",16),Number.parseInt(n[2]??"",16),Number.parseInt(n[3]??"",16)]:[0,0,0]},_n=e=>(([t,n,r])=>(t*299+n*587+r*114)/1e3>155)(tt(e));var fm=({chatContainer:e,generalBackground:t})=>{let n=e?.backgroundColor??ha;if((e?.opacity??vt)<=.3||n==="transparent"||He(n)){let o=t?.type??xo,a=o==="Image"?"#000000":o==="Color"&&Ee(t?.content)?t.content:"#ffffff";return _n(a)}return _n(e?.backgroundColor??ga)};var z={general:{bgImage:"--agent-container-bg-image",bgColor:"--agent-container-bg-color",fontFamily:"--agent-container-font-family",progressBar:{position:"--agent-progress-bar-position",color:"--agent-progress-bar-color",colorRgb:"--agent-progress-bar-bg-rgb",height:"--agent-progress-bar-height",top:"--agent-progress-bar-top",bottom:"--agent-progress-bar-bottom"}},chat:{container:{maxWidth:"--agent-chat-container-max-width",maxHeight:"--agent-chat-container-max-height",bgColor:"--agent-chat-container-bg-rgb",color:"--agent-chat-container-color",borderRadius:"--agent-chat-container-border-radius",borderWidth:"--agent-chat-container-border-width",borderColor:"--agent-chat-container-border-rgb",borderOpacity:"--agent-chat-container-border-opacity",opacity:"--agent-chat-container-opacity",blur:"--agent-chat-container-blur",boxShadow:"--agent-chat-container-box-shadow"},hostBubbles:{bgColor:"--agent-host-bubble-bg-rgb",color:"--agent-host-bubble-color",borderRadius:"--agent-host-bubble-border-radius",borderWidth:"--agent-host-bubble-border-width",borderColor:"--agent-host-bubble-border-rgb",borderOpacity:"--agent-host-bubble-border-opacity",opacity:"--agent-host-bubble-opacity",blur:"--agent-host-bubble-blur",boxShadow:"--agent-host-bubble-box-shadow"},guestBubbles:{bgColor:"--agent-guest-bubble-bg-rgb",color:"--agent-guest-bubble-color",borderRadius:"--agent-guest-bubble-border-radius",borderWidth:"--agent-guest-bubble-border-width",borderColor:"--agent-guest-bubble-border-rgb",borderOpacity:"--agent-guest-bubble-border-opacity",opacity:"--agent-guest-bubble-opacity",blur:"--agent-guest-bubble-blur",boxShadow:"--agent-guest-bubble-box-shadow"},inputs:{bgColor:"--agent-input-bg-rgb",color:"--agent-input-color",placeholderColor:"--agent-input-placeholder-color",borderRadius:"--agent-input-border-radius",borderWidth:"--agent-input-border-width",borderColor:"--agent-input-border-rgb",borderOpacity:"--agent-input-border-opacity",opacity:"--agent-input-opacity",blur:"--agent-input-blur",boxShadow:"--agent-input-box-shadow"},buttons:{bgRgb:"--agent-button-bg-rgb",color:"--agent-button-color",borderRadius:"--agent-button-border-radius",borderWidth:"--agent-button-border-width",borderColor:"--agent-button-border-rgb",borderOpacity:"--agent-button-border-opacity",opacity:"--agent-button-opacity",blur:"--agent-button-blur",boxShadow:"--agent-button-box-shadow"},checkbox:{bgRgb:"--agent-checkbox-bg-rgb",alphaRatio:"--selectable-alpha-ratio"}}},pm=(e,t,n)=>{if(!e)return;let r=t?.style;r&&(tC(e.general,r,n),rC(e.chat,e.general?.background,r))},tC=(e,t,n)=>{uC(e?.background,t),t.setProperty(z.general.fontFamily,(typeof e?.font=="string"?e.font:e?.font?.family)??vo),nC(e?.progressBar,t,n)},nC=(e,t,n)=>{let r=e?.position??Ji;t.setProperty(z.general.progressBar.position,r==="fixed"?n?"absolute":"fixed":r),t.setProperty(z.general.progressBar.color,e?.color??jp),t.setProperty(z.general.progressBar.colorRgb,tt(e?.backgroundColor??Wp).join(", ")),t.setProperty(z.general.progressBar.height,`${e?.thickness??zp}px`);let o=e?.placement??Zp;t.setProperty(z.general.progressBar.top,o==="Top"?"0":"auto"),t.setProperty(z.general.progressBar.bottom,o==="Bottom"?"0":"auto")},rC=(e,t,n)=>{oC(e?.container,t,n,e?.roundness),aC(e?.hostBubbles,n,e?.roundness),iC(e?.guestBubbles,n,e?.roundness),sC(e?.buttons,n,e?.roundness),lC(e?.inputs,n,e?.roundness),cC(e?.container,t,n)},oC=(e,t,n,r)=>{let o=e?.backgroundColor??ha,a=o==="transparent"||He(o);n.setProperty(z.chat.container.bgColor,a?"0, 0, 0":tt(o).join(", ")),n.setProperty(z.chat.container.color,tt(e?.color??(fm({chatContainer:e,generalBackground:t})?Yi:qi)).join(", ")),n.setProperty(z.chat.container.maxWidth,e?.maxWidth??qp),n.setProperty(z.chat.container.maxHeight,e?.maxHeight??Jp);let i=a?"1":(e?.opacity??vt).toString();n.setProperty(z.chat.container.opacity,a?"0":(e?.opacity??vt).toString()),n.setProperty(z.chat.container.blur,i==="1"||a?"0xp":`${e?.blur??Yp}px`),Ta(e?.shadow,n,z.chat.container.boxShadow),wa(e?.border??{roundeness:r??wr},n,z.chat.container.borderRadius),n.setProperty(z.chat.container.borderWidth,te(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),n.setProperty(z.chat.container.borderOpacity,te(e?.border?.opacity)?e.border.opacity.toString():vt.toString()),n.setProperty(z.chat.container.borderColor,tt(e?.border?.color??"").join(", "))},aC=(e,t,n)=>{t.setProperty(z.chat.hostBubbles.bgColor,tt(e?.backgroundColor??So).join(", ")),t.setProperty(z.chat.hostBubbles.color,e?.color??Xp),wa(e?.border??{roundeness:n??wr},t,z.chat.hostBubbles.borderRadius),t.setProperty(z.chat.hostBubbles.borderWidth,te(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),t.setProperty(z.chat.hostBubbles.borderColor,tt(e?.border?.color??"").join(", ")),t.setProperty(z.chat.hostBubbles.opacity,e?.backgroundColor==="transparent"?"0":te(e?.opacity)?e.opacity.toString():vt.toString()),t.setProperty(z.chat.hostBubbles.borderOpacity,te(e?.border?.opacity)?e.border.opacity.toString():vt.toString()),t.setProperty(z.chat.hostBubbles.blur,te(e?.blur)?`${e.blur??0}px`:"none"),Ta(e?.shadow,t,z.chat.hostBubbles.boxShadow)},iC=(e,t,n)=>{t.setProperty(z.chat.guestBubbles.bgColor,tt(e?.backgroundColor??Qp).join(", ")),t.setProperty(z.chat.guestBubbles.color,e?.color??em),wa(e?.border??{roundeness:n??wr},t,z.chat.guestBubbles.borderRadius),t.setProperty(z.chat.guestBubbles.borderWidth,te(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),t.setProperty(z.chat.guestBubbles.borderColor,tt(e?.border?.color??"").join(", ")),t.setProperty(z.chat.guestBubbles.borderOpacity,te(e?.border?.opacity)?e.border.opacity.toString():vt.toString()),t.setProperty(z.chat.guestBubbles.opacity,e?.backgroundColor==="transparent"?"0":te(e?.opacity)?e.opacity.toString():vt.toString()),t.setProperty(z.chat.guestBubbles.blur,te(e?.blur)?`${e.blur??0}px`:"none"),Ta(e?.shadow,t,z.chat.guestBubbles.boxShadow)},sC=(e,t,n)=>{let r=e?.backgroundColor??ba;t.setProperty(z.chat.buttons.bgRgb,tt(r).join(", ")),t.setProperty(z.chat.buttons.bgRgb,tt(r).join(", ")),t.setProperty(z.chat.buttons.color,e?.color??tm),wa(e?.border??{roundeness:n??wr},t,z.chat.buttons.borderRadius),t.setProperty(z.chat.buttons.borderWidth,te(e?.border?.thickness)?`${e?.border?.thickness}px`:`${nm}px`),t.setProperty(z.chat.buttons.borderColor,tt(e?.border?.color??e?.backgroundColor??ba).join(", ")),t.setProperty(z.chat.buttons.borderOpacity,te(e?.border?.opacity)?e.border.opacity.toString():vt.toString()),t.setProperty(z.chat.buttons.opacity,e?.backgroundColor==="transparent"?"0":te(e?.opacity)?e.opacity.toString():vt.toString()),t.setProperty(z.chat.buttons.blur,te(e?.blur)?`${e.blur??0}px`:"none"),Ta(e?.shadow,t,z.chat.buttons.boxShadow)},lC=(e,t,n)=>{t.setProperty(z.chat.inputs.bgColor,tt(e?.backgroundColor??rm).join(", ")),t.setProperty(z.chat.inputs.color,e?.color??ya),t.setProperty(z.chat.inputs.placeholderColor,e?.placeholderColor??om),wa(e?.border??{roundeness:n??wr},t,z.chat.inputs.borderRadius),t.setProperty(z.chat.inputs.borderWidth,te(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),t.setProperty(z.chat.inputs.borderColor,tt(e?.border?.color??"").join(", ")),t.setProperty(z.chat.inputs.borderOpacity,te(e?.border?.opacity)?e.border.opacity.toString():vt.toString()),t.setProperty(z.chat.inputs.opacity,e?.backgroundColor==="transparent"?"0":te(e?.opacity)?e.opacity.toString():vt.toString()),t.setProperty(z.chat.inputs.blur,te(e?.blur)?`${e.blur??0}px`:"none"),Ta(e?.shadow??am,t,z.chat.inputs.boxShadow)},cC=(e,t,n)=>{let r=e?.backgroundColor??ha;if(r==="transparent"||He(r)||(e?.opacity??vt)<=.2){let a=t?.type??xo;n.setProperty(z.chat.checkbox.bgRgb,a==="Image"?"rgba(255, 255, 255, 0.75)":tt((a==="Color"?t?.content:"#ffffff")??"#ffffff").join(", ")),a==="Image"?n.setProperty(z.chat.checkbox.alphaRatio,"3"):n.setProperty(z.chat.checkbox.alphaRatio,t?.content&&_n(t?.content)?"1":"2")}else n.setProperty(z.chat.checkbox.bgRgb,tt(r).concat(e?.opacity??1).join(", ")),n.setProperty(z.chat.checkbox.alphaRatio,_n(r)?"1":"2")},uC=(e,t)=>{t.setProperty(z.general.bgImage,null),t.setProperty(z.general.bgColor,null),t.setProperty((e?.type??xo)==="Image"?z.general.bgImage:z.general.bgColor,dC({type:e?.type??xo,content:e?.content??ga}))},dC=({type:e,content:t}={})=>{switch(e){case"None":return"transparent";case void 0:case"Color":return t??ga;case"Image":return`url(${t})`}},wa=(e,t,n)=>{switch(e?.roundeness??wr){case"none":{t.setProperty(n,"0");break}case"medium":{t.setProperty(n,"6px");break}case"large":{t.setProperty(n,"20px");break}case"custom":{t.setProperty(n,`${e.customRoundeness??6}px`);break}}},Ta=(e,t,n)=>{if(e===void 0){t.setProperty(n,"0 0 #0000");return}switch(e){case"none":t.setProperty(n,"0 0 #0000");break;case"sm":t.setProperty(n,"0 1px 2px 0 rgb(0 0 0 / 0.05)");break;case"md":t.setProperty(n,"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)");break;case"lg":t.setProperty(n,"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)");break;case"xl":t.setProperty(n,"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)");break;case"2xl":t.setProperty(n,"0 25px 50px -12px rgb(0 0 0 / 0.25)");break}};var wc="resultId",mm=e=>{if(e)try{return sessionStorage.getItem(`${wc}-${e}`)??localStorage.getItem(`${wc}-${e}`)??void 0}catch{}},gm=(e="session")=>(t,n)=>{try{bm(e).setItem(`${wc}-${t}`,n)}catch{}},hm=e=>{if(e)try{let t=sessionStorage.getItem(`agent-${e}-initialChatReply`)??localStorage.getItem(`agent-${e}-initialChatReply`);return t?JSON.parse(t):void 0}catch{}},Tc=(e,{agentId:t,storage:n})=>{try{let r=JSON.stringify(e);bm(n).setItem(`agent-${t}-initialChatReply`,r)}catch{}},ts=()=>{try{sessionStorage.setItem("agent-typeOpened","true")}catch{}},ns=()=>{try{sessionStorage.removeItem("agent-typeOpened")}catch{}},rs=()=>{try{return sessionStorage.getItem("agent-typeOpened")==="true"}catch{return!1}},bm=e=>(e??at.general.rememberUser.storage)==="session"?sessionStorage:localStorage,os=e=>{Object.keys(localStorage).forEach(t=>{t.startsWith(`agent-${e}`)&&localStorage.removeItem(t)}),Object.keys(sessionStorage).forEach(t=>{t.startsWith(`agent-${e}`)&&sessionStorage.removeItem(t)})};var lt=()=>(e,t)=>Ke(e,t);function fC(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ze(e={}){let{strict:t=!0,hookName:n="useContext",providerName:r="Provider",errorMessage:o,defaultValue:a}=e,i=Vd(a);function s(){let c=Kl(i);if(!c&&t){let l=new Error(o??fC(n,r));throw l.name="ContextError",Error.captureStackTrace?.(l,s),l}return c}return[i.Provider,s,i]}var[Cc,ym]=Ze({hookName:"useRenderStrategyContext",providerName:"<RenderStrategyProvider />"}),Ca=e=>lt()(e,["lazyMount","unmountOnExit"]);var yO=Symbol(),pC=Symbol();var vm=Object.getPrototypeOf,Ec=new WeakMap,mC=e=>e&&(Ec.has(e)?Ec.get(e):vm(e)===Object.prototype||vm(e)===Array.prototype);var xm=e=>mC(e)&&e[pC]||null,kc=(e,t=!0)=>{Ec.set(e,t)};function gC(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Sm(e,t){let n=gC();return n?(n[e]||(n[e]=t()),n[e]):t()}var as=()=>!1,Ac=e=>typeof e=="object"&&e!==null,Tr=Sm("__zag__proxyStateMap",()=>new WeakMap),Ea=Sm("__zag__refSet",()=>new WeakSet),hC=e=>typeof e=="object"&&e!==null&&"$$typeof"in e,bC=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,yC=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",vC=e=>hC(e)||bC(e)||yC(e),xC=(e=Object.is,t=(l,u)=>new Proxy(l,u),n=l=>Ac(l)&&!Ea.has(l)&&(Array.isArray(l)||!(Symbol.iterator in l))&&!vC(l)&&!(l instanceof WeakMap)&&!(l instanceof WeakSet)&&!(l instanceof Error)&&!(l instanceof Number)&&!(l instanceof Date)&&!(l instanceof String)&&!(l instanceof RegExp)&&!(l instanceof ArrayBuffer),r=l=>{switch(l.status){case"fulfilled":return l.value;case"rejected":throw l.reason;default:throw l}},o=new WeakMap,a=(l,u,f=r)=>{let d=o.get(l);if(d?.[0]===u)return d[1];let p=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l));return kc(p,!0),o.set(l,[u,p]),Reflect.ownKeys(l).forEach(h=>{let g=Reflect.get(l,h);Ea.has(g)?(kc(g,!1),p[h]=g):g instanceof Promise?Object.defineProperty(p,h,{get(){return f(g)}}):Tr.has(g)?p[h]=Qn(g,f):p[h]=g}),Object.freeze(p)},i=new WeakMap,s=[1,1],c=l=>{if(!Ac(l))throw new Error("object required");let u=i.get(l);if(u)return u;let f=s[0],d=new Set,p=(V,W=++s[0])=>{f!==W&&(f=W,d.forEach(L=>L(V,W)))},h=s[1],g=(V=++s[1])=>(h!==V&&!d.size&&(h=V,b.forEach(([W])=>{let L=W[1](V);L>f&&(f=L)})),f),x=V=>(W,L)=>{let P=[...W];P[1]=[V,...P[1]],p(P,L)},b=new Map,E=(V,W)=>{if(as()&&b.has(V))throw new Error("prop listener already exists");if(d.size){let L=W[3](x(V));b.set(V,[W,L])}else b.set(V,[W])},S=V=>{let W=b.get(V);W&&(b.delete(V),W[1]?.())},k=V=>(d.add(V),d.size===1&&b.forEach(([L,P],T)=>{if(as()&&P)throw new Error("remove already exists");let C=L[3](x(T));b.set(T,[L,C])}),()=>{d.delete(V),d.size===0&&b.forEach(([L,P],T)=>{P&&(P(),b.set(T,[L]))})}),I=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l)),D=t(I,{deleteProperty(V,W){let L=Reflect.get(V,W);S(W);let P=Reflect.deleteProperty(V,W);return P&&p(["delete",[W],L]),P},set(V,W,L,P){let T=Reflect.has(V,W),C=Reflect.get(V,W,P);if(T&&(e(C,L)||i.has(L)&&e(C,i.get(L))))return!0;S(W),Ac(L)&&(L=xm(L)||L);let R=L;if(!Object.getOwnPropertyDescriptor(V,W)?.set)if(L instanceof Promise)L.then(O=>{Object.assign(L,{status:"fulfilled",value:O}),p(["resolve",[W],O])}).catch(O=>{Object.assign(L,{status:"rejected",reason:O}),p(["reject",[W],O])});else{!Tr.has(L)&&n(L)&&(R=ka(L));let O=!Ea.has(R)&&Tr.get(R);O&&E(W,O)}return Reflect.set(V,W,R,P),p(["set",[W],L,C]),!0}});i.set(l,D);let ie=[I,g,a,k];return Tr.set(D,ie),Reflect.ownKeys(l).forEach(V=>{let W=Object.getOwnPropertyDescriptor(l,V);W.get||W.set?Object.defineProperty(I,V,W):D[V]=l[V]}),D})=>[c,Tr,Ea,e,t,n,r,o,a,i,s],[SC]=xC();function ka(e={}){return SC(e)}function ko(e,t,n){let r=Tr.get(e);as()&&!r&&console.warn("Please use proxy object");let o,a=[],i=r[3],s=!1,l=i(u=>{if(a.push(u),n){t(a.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,s&&t(a.splice(0))}))});return s=!0,()=>{s=!1,l()}}function Qn(e,t){let n=Tr.get(e);as()&&!n&&console.warn("Please use proxy object");let[r,o,a]=n;return a(r,o(),t)}function Rt(e){return Ea.add(e),e}function wm(e,t){Object.keys(t).forEach(o=>{if(Object.getOwnPropertyDescriptor(e,o))throw new Error("object property already defined");let a=t[o],{get:i,set:s}=typeof a=="function"?{get:a}:a,c={};c.get=()=>i(Qn(r)),s&&(c.set=l=>s(r,l)),Object.defineProperty(e,o,c)});let r=ka(e);return r}var Cm=e=>e[0],Em=e=>e[e.length-1];function km(e){for(;e.length>0;)e.pop();return e}var Tm=e=>e?.constructor.name==="Array",wC=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!is(e[n],t[n]))return!1;return!0},is=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Tm(e)&&Tm(t))return wC(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let o=0;o<r;o++)if(!Reflect.has(e,n[o]))return!1;for(let o=0;o<r;o++){let a=n[o];if(!is(e[a],t[a]))return!1}return!0},Mn=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,Ut=e=>e,ss=()=>{},Aa=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},Pa=(()=>{let e=0;return()=>(e++,e.toString(36))})();var Am=()=>!1,Ia=e=>Array.isArray(e);var Pm=e=>e!=null&&typeof e=="object",_a=e=>Pm(e)&&!Ia(e),Ma=e=>typeof e=="number"&&!Number.isNaN(e),kt=e=>typeof e=="string",er=e=>typeof e=="function",Im=e=>e==null,Pc=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),TC=e=>Object.prototype.toString.call(e),_m=Function.prototype.toString,CC=_m.call(Object),Mm=e=>{if(!Pm(e)||TC(e)!="[object Object]")return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Pc(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_m.call(n)==CC};function EC(e,t){let n={},r={},o=new Set(t);for(let a in e)o.has(a)?r[a]=e[a]:n[a]=e[a];return[r,n]}var pn=e=>function(n){return EC(n,e)};function gt(e){if(!kC(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(let r of t){let o=e[r];o!==void 0&&(n[r]=gt(o))}return n}var kC=e=>e&&typeof e=="object"&&e.constructor===Object;function Rn(...e){let t=e.length===1?e[0]:e[1],n=e.length===2?e[0]:!0}function Ra(...e){let t=e.length===1?e[0]:e[1],n=e.length===2?e[0]:!0}function Rm(e,t,n){typeof n.value=="object"&&(n.value=Cr(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function Cr(e){if(typeof e!="object")return e;var t=0,n,r,o,a=Object.prototype.toString.call(e);if(a==="[object Object]"?o=Object.create(e.__proto__||null):a==="[object Array]"?o=Array(e.length):a==="[object Set]"?(o=new Set,e.forEach(function(i){o.add(Cr(i))})):a==="[object Map]"?(o=new Map,e.forEach(function(i,s){o.set(Cr(s),Cr(i))})):a==="[object Date]"?o=new Date(+e):a==="[object RegExp]"?o=new RegExp(e.source,e.flags):a==="[object DataView]"?o=new e.constructor(Cr(e.buffer)):a==="[object ArrayBuffer]"?o=e.slice(0):a.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(r=Object.getOwnPropertySymbols(e);t<r.length;t++)Rm(o,r[t],Object.getOwnPropertyDescriptor(e,r[t]));for(t=0,r=Object.getOwnPropertyNames(e);t<r.length;t++)Object.hasOwnProperty.call(o,n=r[t])&&o[n]===e[n]||Rm(o,n,Object.getOwnPropertyDescriptor(e,n))}return o||e}var AC=Object.defineProperty,PC=(e,t,n)=>t in e?AC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>PC(e,typeof t!="symbol"?t+"":t,n);function Lm(e,...t){for(let n of t){let r=gt(n);for(let o in r)Mm(n[o])?(e[o]||(e[o]={}),Lm(e[o],n[o])):e[o]=n[o]}return e}function Nm(e){return Cr(e)}function Yt(e){return kt(e)?{type:e}:e}function tr(e){return e?Ia(e)?e.slice():[e]:[]}function Dm(e){return _a(e)&&e.predicate!=null}var IC=()=>!0;function _c(e,t,n,r){return o=>kt(o)?!!e[o]?.(t,n,r):er(o)?o(t,n,r):o.predicate(e)(t,n,r)}function _C(...e){return{predicate:t=>(n,r,o)=>e.map(_c(t,n,r,o)).some(Boolean)}}function MC(...e){return{predicate:t=>(n,r,o)=>e.map(_c(t,n,r,o)).every(Boolean)}}function RC(e){return{predicate:t=>(n,r,o)=>!_c(t,n,r,o)(e)}}function NC(...e){return(t,n,r)=>r.state.matches(...e)}var ls={or:_C,and:MC,not:RC,stateIn:NC};function Bm(e,t){return e=e??IC,(n,r,o)=>{if(kt(e)){let a=t[e];return er(a)?a(n,r,o):a}return Dm(e)?e.predicate(t)(n,r,o):e?.(n,r,o)}}function Ic(e,t){return(n,r,o)=>Dm(e)?e.predicate(t)(n,r,o):e}function OC(e){let t=e.computed??Ut({}),n=e.context??Ut({}),r=e.initial?e.states?.[e.initial]?.tags:[],o=ka({value:e.initial??"",previousValue:"",event:Ut({}),previousEvent:Ut({}),context:wm(n,t),done:!1,tags:r??[],hasTag(a){return this.tags.includes(a)},matches(...a){return a.includes(this.value)},can(a){return Ut(this).nextEvents.includes(a)},get nextEvents(){let a=e.states?.[this.value]?.on??{},i=e?.on??{};return Object.keys({...a,...i})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return Ut(o)}function Na(e,t){return(n,r)=>{if(Ma(e))return e;if(er(e))return e(n,r);if(kt(e)){let o=Number.parseFloat(e);if(!Number.isNaN(o))return o;if(t){let a=t?.[e];return Ra(a==null,`[@zag-js/core > determine-delay] Cannot determine delay for \`${e}\`. It doesn't exist in \`options.delays\``),er(a)?a(n,r):a}}}}function LC(e){return kt(e)?{target:e}:e}function DC(e,t){return(n,r,o)=>tr(e).map(LC).find(a=>Bm(a.guard,t)(n,r,o)??a.target??a.actions)}var Um=class{constructor(e,t){J(this,"status","Not Started"),J(this,"state"),J(this,"initialState"),J(this,"initialContext"),J(this,"id"),J(this,"type","machine"),J(this,"activityEvents",new Map),J(this,"delayedEvents",new Map),J(this,"stateListeners",new Set),J(this,"doneListeners",new Set),J(this,"contextWatchers",new Set),J(this,"removeStateListener",ss),J(this,"parent"),J(this,"children",new Map),J(this,"guardMap"),J(this,"actionMap"),J(this,"delayMap"),J(this,"activityMap"),J(this,"sync"),J(this,"options"),J(this,"config"),J(this,"_created",()=>{let n=Yt("machine.created");this.executeActions(this.config?.created,n)}),J(this,"start",n=>{if(this.state.value="",this.state.tags=[],this.status==="Running")return this;this.status="Running",this.removeStateListener=ko(this.state,()=>{this.stateListeners.forEach(c=>{c(this.stateSnapshot)})},this.sync),this.setupContextWatchers(),this.executeActivities(Yt("machine.start"),tr(this.config.activities),"machine.start"),this.executeActions(this.config.entry,Yt("machine.start"));let r=Yt("machine.init"),o=_a(n)?n.value:n,a=_a(n)?n.context:void 0;a&&this.setContext(a);let i={target:o??this.config.initial},s=this.getNextStateInfo(i,r);return this.initialState=s,this.performStateChangeEffects(this.state.value,s,r),this}),J(this,"setupContextWatchers",()=>{let{watch:n}=this.config;if(!n)return;let r=Qn(this.state.context),o=ko(this.state.context,()=>{let a=Qn(this.state.context);for(let[i,s]of Object.entries(n))(this.options.compareFns?.[i]??Object.is)(r[i],a[i])||this.executeActions(s,this.state.event);r=a});this.contextWatchers.add(o)}),J(this,"stop",()=>{if(this.status!=="Stopped")return this.performExitEffects(this.state.value,Yt("machine.stop")),this.executeActions(this.config.exit,Yt("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.status="Stopped",this}),J(this,"stopStateListeners",()=>{this.removeStateListener(),this.stateListeners.clear()}),J(this,"stopContextWatchers",()=>{this.contextWatchers.forEach(n=>n()),this.contextWatchers.clear()}),J(this,"stopDelayedEvents",()=>{this.delayedEvents.forEach(n=>{n.forEach(r=>r())}),this.delayedEvents.clear()}),J(this,"stopActivities",n=>{n?(this.activityEvents.get(n)?.forEach(r=>r()),this.activityEvents.get(n)?.clear(),this.activityEvents.delete(n)):(this.activityEvents.forEach(r=>{r.forEach(o=>o()),r.clear()}),this.activityEvents.clear())}),J(this,"sendChild",(n,r)=>{let o=Yt(n),a=Mn(r,this.contextSnapshot),i=this.children.get(a);i||Ra(`[@zag-js/core] Cannot send '${o.type}' event to unknown child`),i.send(o)}),J(this,"stopChild",n=>{this.children.has(n)||Ra(`[@zag-js/core > stop-child] Cannot stop unknown child ${n}`),this.children.get(n).stop(),this.children.delete(n)}),J(this,"removeChild",n=>{this.children.delete(n)}),J(this,"stopChildren",()=>{this.children.forEach(n=>n.stop()),this.children.clear()}),J(this,"setParent",n=>{this.parent=n}),J(this,"spawn",(n,r)=>{let o=Mn(n);return r&&(o.id=r),o.type="machine.actor",o.setParent(this),this.children.set(o.id,Ut(o)),o.onDone(()=>{this.removeChild(o.id)}).start(),Ut(Rt(o))}),J(this,"stopActivity",n=>{if(!this.state.value)return;let r=this.activityEvents.get(this.state.value);r?.get(n)?.(),r?.delete(n)}),J(this,"addActivityCleanup",(n,r,o)=>{n&&(this.activityEvents.has(n)?this.activityEvents.get(n)?.set(r,o):this.activityEvents.set(n,new Map([[r,o]])))}),J(this,"setState",n=>{this.state.previousValue=this.state.value,this.state.value=n;let r=this.getStateNode(n);n==null?km(this.state.tags):this.state.tags=tr(r?.tags)}),J(this,"setContext",n=>{n&&Lm(this.state.context,gt(n))}),J(this,"setOptions",n=>{let r=gt(n);this.actionMap={...this.actionMap,...r.actions},this.delayMap={...this.delayMap,...r.delays},this.activityMap={...this.activityMap,...r.activities},this.guardMap={...this.guardMap,...r.guards}}),J(this,"getStateNode",n=>{if(n)return this.config.states?.[n]}),J(this,"getNextStateInfo",(n,r)=>{let o=this.determineTransition(n,r),a=!o?.target,i=o?.target??this.state.value,s=this.state.value!==i,c=this.getStateNode(i),u={reenter:!a&&!s&&!o?.internal,transition:o,stateNode:c,target:i,changed:s};return this.log("NextState:",`[${r.type}]`,this.state.value,"---->",u.target),u}),J(this,"getAfterActions",(n,r)=>{let o,a=this.state.value;return{entry:()=>{o=globalThis.setTimeout(()=>{let i=this.getNextStateInfo(n,this.state.event);this.performStateChangeEffects(a,i,this.state.event)},r)},exit:()=>{globalThis.clearTimeout(o)}}}),J(this,"getDelayedEventActions",n=>{let r=this.getStateNode(n),o=this.state.event;if(!r||!r.after)return;let a=[],i=[];if(Ia(r.after)){let s=this.determineTransition(r.after,o);if(!s)return;if(!Pc(s,"delay"))throw new Error(`[@zag-js/core > after] Delay is required for after transition: ${JSON.stringify(s)}`);let l=Na(s.delay,this.delayMap)(this.contextSnapshot,o),u=this.getAfterActions(s,l);return a.push(u.entry),i.push(u.exit),{entries:a,exits:i}}if(_a(r.after))for(let s in r.after){let c=r.after[s],u=Na(s,this.delayMap)(this.contextSnapshot,o),f=this.getAfterActions(c,u);a.push(f.entry),i.push(f.exit)}return{entries:a,exits:i}}),J(this,"executeActions",(n,r)=>{let o=Ic(n,this.guardMap)(this.contextSnapshot,r,this.guardMeta);for(let a of tr(o)){let i=kt(a)?this.actionMap?.[a]:a;Rn(kt(a)&&!i,`[@zag-js/core > execute-actions] No implementation found for action: \`${a}\``),i?.(this.state.context,r,this.meta)}}),J(this,"executeActivities",(n,r,o)=>{for(let a of r){let i=kt(a)?this.activityMap?.[a]:a;if(!i){Rn(`[@zag-js/core > execute-activity] No implementation found for activity: \`${a}\``);continue}let s=i(this.state.context,n,this.meta);if(s){let c=kt(a)?a:a.name||Pa();this.addActivityCleanup(o??this.state.value,c,s)}}}),J(this,"createEveryActivities",(n,r)=>{if(n)if(Ia(n)){let o=tr(n).find(c=>{let l=c.delay,f=Na(l,this.delayMap)(this.contextSnapshot,this.state.event);return Bm(c.guard,this.guardMap)(this.contextSnapshot,this.state.event,this.guardMeta)??f!=null});if(!o)return;let i=Na(o.delay,this.delayMap)(this.contextSnapshot,this.state.event);r(()=>{let c=globalThis.setInterval(()=>{this.executeActions(o.actions,this.state.event)},i);return()=>{globalThis.clearInterval(c)}})}else for(let o in n){let a=n?.[o],s=Na(o,this.delayMap)(this.contextSnapshot,this.state.event);r(()=>{let l=globalThis.setInterval(()=>{this.executeActions(a,this.state.event)},s);return()=>{globalThis.clearInterval(l)}})}}),J(this,"setEvent",n=>{this.state.previousEvent=this.state.event,this.state.event=Rt(Yt(n))}),J(this,"performExitEffects",(n,r)=>{let o=this.state.value;if(o==="")return;let a=n?this.getStateNode(n):void 0;this.stopActivities(o);let i=Ic(a?.exit,this.guardMap)(this.contextSnapshot,r,this.guardMeta),s=tr(i),c=this.delayedEvents.get(o);c&&s.push(...c),this.executeActions(s,r),this.delayedEvents.delete(o)}),J(this,"performEntryEffects",(n,r)=>{let o=this.getStateNode(n),a=tr(o?.activities);this.createEveryActivities(o?.every,l=>{a.unshift(l)}),a.length>0&&this.executeActivities(r,a);let i=Ic(o?.entry,this.guardMap)(this.contextSnapshot,r,this.guardMeta),s=tr(i),c=this.getDelayedEventActions(n);o?.after&&c&&(this.delayedEvents.set(n,c?.exits),s.push(...c.entries)),this.executeActions(s,r),o?.type==="final"&&(this.state.done=!0,this.doneListeners.forEach(l=>{l(this.stateSnapshot)}),this.stop())}),J(this,"performTransitionEffects",(n,r)=>{let o=this.determineTransition(n,r);this.executeActions(o?.actions,r)}),J(this,"performStateChangeEffects",(n,r,o)=>{this.setEvent(o);let a=r.changed||r.reenter;a&&this.performExitEffects(n,o),this.performTransitionEffects(r.transition,o),this.setState(r.target),a&&this.performEntryEffects(r.target,o)}),J(this,"determineTransition",(n,r)=>DC(n,this.guardMap)?.(this.contextSnapshot,r,this.guardMeta)),J(this,"sendParent",n=>{this.parent||Ra("[@zag-js/core > send-parent] Cannot send event to an unknown parent");let r=Yt(n);this.parent?.send(r)}),J(this,"log",(...n)=>{Am()&&this.options.debug&&console.log(...n)}),J(this,"send",n=>{let r=Yt(n);this.transition(this.state.value,r)}),J(this,"transition",(n,r)=>{let o=kt(n)?this.getStateNode(n):n?.stateNode,a=Yt(r);if(!o&&!this.config.on){let c=this.status==="Stopped"?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${n}, \`event\`: ${a.type}`;Rn(c);return}let i=o?.on?.[a.type]??this.config.on?.[a.type],s=this.getNextStateInfo(i,a);return this.performStateChangeEffects(this.state.value,s,a),s.stateNode}),J(this,"subscribe",n=>(this.stateListeners.add(n),this.status==="Running"&&n(this.stateSnapshot),()=>{this.stateListeners.delete(n)})),J(this,"onDone",n=>(this.doneListeners.add(n),this)),J(this,"onTransition",n=>(this.stateListeners.add(n),this.status==="Running"&&n(this.stateSnapshot),this)),this.config=Nm(e),this.options=Nm(t??{}),this.id=this.config.id??`machine-${Pa()}`,this.guardMap=this.options?.guards??{},this.actionMap=this.options?.actions??{},this.delayMap=this.options?.delays??{},this.activityMap=this.options?.activities??{},this.sync=this.options?.sync??!1,this.state=OC(this.config),this.initialContext=Qn(this.state.context)}get stateSnapshot(){return Ut(Qn(this.state))}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){let e=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),stopActivity:this.stopActivity.bind(this),get state(){return e.stateSnapshot},get initialContext(){return e.initialContext},get initialState(){return e.initialState?.target??""}}}get meta(){return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:this.initialState?.target??"",getState:()=>this.stateSnapshot,getAction:e=>this.actionMap[e],getGuard:e=>this.guardMap[e]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}getHydrationState(){let e=this.getState();return{value:e.value,tags:e.tags}}},qt=(e,t)=>new Um(e,t),Fm=e=>e instanceof Um||e?.type==="machine",BC=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),UC=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Om=e=>{let t={},n;for(;n=UC.exec(e);)t[n[1]]=n[2];return t},FC=(e,t)=>{if(kt(e)){if(kt(t))return`${e};${t}`;e=Om(e)}else kt(t)&&(t=Om(t));return Object.assign({},e??{},t??{})};function cs(...e){let t={};for(let n of e){for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=Aa(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=BC(t[r],n[r]);continue}if(r==="style"){t[r]=FC(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r])}return t}function $m(e){return new Proxy({},{get(){return e}})}var Ft=()=>e=>Array.from(new Set(e));function ne(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r=="function"&&(r=r()),r){let o=Object.getOwnPropertyDescriptors(r);for(let a in o)a in t||Object.defineProperty(t,a,{enumerable:!0,get(){let i={};if(a==="style"||a==="class"||a==="className"||a.startsWith("on")){for(let s=0;s<e.length;s++){let c=e[s];typeof c=="function"&&(c=c()),i=cs(i,{[a]:(c||{})[a]})}return i[a]}for(let s=e.length-1;s>=0;s--){let c,l=e[s];if(typeof l=="function"&&(l=l()),c=(l||{})[a],c!==void 0)return c}}})}}return t}var $C=e=>Array.isArray(e),GC=e=>e!=null&&typeof e=="object",HC=e=>GC(e)&&!$C(e),KC=e=>typeof e=="number"&&!Number.isNaN(e),Hm=e=>typeof e=="string",VC=Function.prototype.toString;VC.call(Object);var Gm={onFocus:"onFocusIn",onBlur:"onFocusOut",onDoubleClick:"onDblClick",onChange:"onInput",defaultChecked:"checked",defaultValue:"value",htmlFor:"for",className:"class"},jC=e=>e.startsWith("--")?e:JC(e);function WC(e){return e in Gm?Gm[e]:e}var $t=$m(e=>{let t={};for(let n in e){let r=e[n];if(!(n==="readOnly"&&r===!1)){if(n==="style"&&HC(r)){t.style=zC(r);continue}if(n==="children"){Hm(r)&&(t.textContent=r);continue}t[WC(n)]=r}}return t});function zC(e){let t={};for(let n in e){let r=e[n];!Hm(r)&&!KC(r)||(t[jC(n)]=r)}return t}var ZC=/[A-Z]/g,YC=/^ms-/;function qC(e){return"-"+e.toLowerCase()}var Mc={};function JC(e){if(Mc.hasOwnProperty(e))return Mc[e];var t=e.replace(ZC,qC);return Mc[e]=YC.test(t)?"-"+t:t}function Km(e,t){let{actions:n,context:r}=t??{},[o,a]=dm(e.getState());return ae(()=>{let i=e.subscribe(s=>{a(es(s))});ue(()=>{i()})}),be(()=>{let i=typeof r=="function"?r():r;e.setContext(i)}),be(()=>{e.setOptions({actions:n})}),o}function Vm(e){return[Km(e),e.send]}function XC(e,t){let{state:n,context:r}=t??{},o=(()=>{let a=typeof e=="function"?e():e,i=typeof r=="function"?r():r;return i&&a.setContext(i),a._created(),a})();return ae(()=>{o.start(n),ue(()=>{o.stop()})}),o}function mn(e,t){let n=XC(e,t);return[Km(n,t),n.send,n]}var Rc=e=>n=>{let[r,o]=Ke(n,["asChild"]);if(r.asChild){let a=i=>{let[,s]=Ke(o,["ref"]);return ne(s,i)};return r.asChild(a)}return m(rf,Te({component:e},o))};function QC(){let e=new Map;return new Proxy(Rc,{apply(t,n,r){return Rc(r[0])},get(t,n){let r=n;return e.has(r)||e.set(r,Rc(r)),e.get(r)}})}var me=QC();function jm(e,t,n){let r=e.matches("mounted","unmountSuspended");return{skip:!e.context.initial&&r,present:r,setNode(o){o&&t({type:"NODE.SET",node:o})},unmount(){t({type:"UNMOUNT"})}}}function us(e){return e?.animationName||"none"}function Wm(e){return qt({initial:e.present?"mounted":"unmounted",context:{node:null,styles:null,unmountAnimationName:null,prevAnimationName:null,present:!1,initial:!1,...e},exit:["clearInitial"],watch:{present:["setInitial","syncPresence"]},on:{"NODE.SET":{actions:["setNode","setStyles"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["invokeOnExitComplete"]},"UNMOUNT.SUSPEND":"unmountSuspended"}},unmountSuspended:{activities:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},"ANIMATION.END":{target:"unmounted",actions:["invokeOnExitComplete"]},UNMOUNT:{target:"unmounted",actions:["invokeOnExitComplete"]}}},unmounted:{entry:["clearPrevAnimationName"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}}},{actions:{setInitial(t){t.initial=!0},clearInitial(t){t.initial=!1},invokeOnExitComplete(t){t.onExitComplete?.()},setNode(t,n){t.node=Rt(n.node)},setStyles(t,n){let r=n.node.ownerDocument.defaultView||window;t.styles=Rt(r.getComputedStyle(n.node))},syncPresence(t,n,{send:r}){if(t.present){r({type:"MOUNT",src:"presence.changed"});return}let o=us(t.styles);(t.immediate?queueMicrotask:requestAnimationFrame)(()=>{t.unmountAnimationName=o,o==="none"||o===t.prevAnimationName||t.styles?.display==="none"||t.styles?.animationDuration==="0s"?r({type:"UNMOUNT",src:"presence.changed"}):r({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName(t){(t.immediate?queueMicrotask:requestAnimationFrame)(()=>{t.prevAnimationName=us(t.styles)})},clearPrevAnimationName(t){t.prevAnimationName=null}},activities:{trackAnimationEvents(t,n,{send:r}){let o=t.node;if(!o)return;let a=s=>{(s.composedPath?.()?.[0]??s.target)===o&&(t.prevAnimationName=us(t.styles))},i=s=>{let c=us(t.styles);(s.composedPath?.()?.[0]??s.target)===o&&c===t.unmountAnimationName&&r({type:"UNMOUNT",src:"animationend"})};return o.addEventListener("animationstart",a),o.addEventListener("animationcancel",i),o.addEventListener("animationend",i),()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",i),o.removeEventListener("animationend",i)}}}})}var HO=Ft()(["onExitComplete","present","immediate"]);var Ao=e=>lt()(e,["immediate","lazyMount","onExitComplete","present","unmountOnExit"]),Er=e=>{let[t,n]=Ca(e),[r,o]=M(!1),[a,i]=mn(Wm(n),{context:n}),s=F(()=>jm(a,i,$t));return be(()=>{s().present&&o(!0)}),F(()=>({unmounted:!s().present&&!r()&&t.lazyMount||t.unmountOnExit&&!s().present&&r(),present:s().present,presenceProps:{ref:s().setNode,hidden:!s().present,"data-state":n.present?"open":"closed"}}))};var[Po,nr]=Ze({hookName:"usePresenceContext",providerName:"<PresenceProvider />"});var At=e=>e?"":void 0;var Zm=2147483647,tE=1,nE=9,rE=11,ds=e=>typeof e=="object"&&e!==null,ct=e=>ds(e)&&e.nodeType===tE&&typeof e.nodeName=="string",Ym=e=>ds(e)&&e.nodeType===nE,oE=e=>ds(e)&&e===e.window;var qm=e=>ct(e)?e.localName||"":"#document";function aE(e){return["html","body","#document"].includes(qm(e))}var iE=e=>ds(e)&&e.nodeType!==void 0,Oc=e=>iE(e)&&e.nodeType===rE&&"host"in e;function Gt(e,t){return!e||!t||!ct(e)||!ct(t)?!1:e===t||e.contains(t)}function Jt(e){return Ym(e)?e:oE(e)?e.document:e?.ownerDocument??document}function sE(e){return Jt(e).documentElement}function gn(e){return Oc(e)?gn(e.host):Ym(e)?e.defaultView??window:ct(e)?e.ownerDocument?.defaultView??window:window}function lE(e){let t=e.activeElement;for(;t?.shadowRoot;){let n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}var Jm=()=>typeof document<"u";function cE(){return navigator.userAgentData?.platform??navigator.platform}var Lc=e=>Jm()&&e.test(cE()),uE=e=>Jm()&&e.test(navigator.userAgent);var Xm=()=>Lc(/^Mac/);var Qm=()=>uE(/firefox\//i),dE=()=>Lc(/mac|iphone|ipad|ipod/i),eg=()=>Lc(/iP(hone|ad|od)|iOS/);function fE(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function hn(e){return fE(e)?.[0]??e.target}var tg=e=>Gt(e.currentTarget,hn(e));function Dc(e){let t=e.currentTarget;if(!t)return!1;let n=dE();if(n&&!e.metaKey||!n&&!e.ctrlKey)return!1;let r=t.localName;return r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit"}function Bc(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n==="a"||n==="button"&&t.type==="submit"||n==="input"&&t.type==="submit":!1}var Uc=e=>e.id;function pE(e,t,n=Uc){return e.find(r=>n(r)===t)}function Fc(e,t,n=Uc){let r=pE(e,t,n);return r?e.indexOf(r):-1}function ng(e,t,n=!0){let r=Fc(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function rg(e,t,n=!0){let r=Fc(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}var mE=e=>e.split("").map(t=>{let n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),gE=e=>mE(e.dataset.valuetext??e.textContent??""),hE=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase()),bE=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]);function yE(e,t,n,r=Uc){let o=n?Fc(e,n,r):-1,a=n?bE(e,o):e;return t.length===1&&(a=a.filter(s=>r(s)!==n)),a.find(s=>hE(gE(s),t))}function vE(e,t){let{state:n,activeId:r,key:o,timeout:a=350,itemToId:i}=t,s=n.keysSoFar+o,l=s.length>1&&Array.from(s).every(h=>h===s[0])?s[0]:s,u=e.slice(),f=yE(u,l,r,i);function d(){clearTimeout(n.timer),n.timer=-1}function p(h){n.keysSoFar=h,d(),h!==""&&(n.timer=+setTimeout(()=>{p(""),d()},a))}return p(s),f}var $c=Object.assign(vE,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:xE});function xE(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function SE(e){if(qm(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Oc(e)&&e.host||sE(e);return Oc(t)?t.host:t}var og=e=>typeof e=="object"&&e!==null&&e.nodeType===1,wE=e=>og(e)&&e.tagName==="IFRAME";function TE(e){return og(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1}function CE(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}var ag="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";function fs(e){return!e||e.closest("[inert]")?!1:e.matches(ag)&&TE(e)}function Gc(e,t){if(!e)return[];let n=Array.from(e.querySelectorAll(ag)),r=n.filter(zm);return t&&zm(e)&&r.unshift(e),r.forEach((o,a)=>{if(wE(o)&&o.contentDocument){let i=o.contentDocument.body,s=Gc(i);r.splice(a,1,...s)}}),!r.length&&t?n:r}function zm(e){return e!=null&&e.tabIndex>0?!0:fs(e)&&!CE(e)}function EE(e,t){let n=Gc(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function ig(e){let{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t?.querySelector("[data-autofocus],[autofocus]")),!a){let i=Gc(t);a=r?i.filter(r)[0]:i[0]}return a||t||void 0}function sg(e){let t=e.currentTarget;if(!t)return!1;let[n,r]=EE(t),o=t.ownerDocument||document;return!(o.activeElement===n&&e.shiftKey||o.activeElement===r&&!e.shiftKey||!n&&!r)}function Hc(e){if(e==null||!ct(e))return!1;try{let t=gn(e);return e instanceof t.HTMLInputElement&&e.selectionStart!=null||/(textarea|select)/.test(e.localName)||e.isContentEditable}catch{return!1}}var kE=/auto|scroll|overlay|hidden|clip/;function lg(e){let t=gn(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return kE.test(n+o+r)&&!["inline","contents"].includes(a)}function cg(e){let t=new Set;function n(r){let o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function Ye(e){let t=globalThis.requestAnimationFrame(e);return()=>{globalThis.cancelAnimationFrame(t)}}function AE(e,t){if(!e)return;let{attributes:n,callback:r}=t,o=e.ownerDocument.defaultView||window,a=new o.MutationObserver(i=>{for(let s of i)s.type==="attributes"&&s.attributeName&&n.includes(s.attributeName)&&r(s)});return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}function ug(e,t){let{defer:n}=t,r=n?Ye:a=>a(),o=[];return o.push(r(()=>{let a=typeof e=="function"?e():e;o.push(AE(a,t))})),()=>{o.forEach(a=>a?.())}}function Kc(e){let t=SE(e);return aE(t)?Jt(t).body:ct(t)&&lg(t)?t:Kc(t)}function ps(e,t){return Array.from(e?.querySelectorAll(t)??[])}function rr(e){let t={getRootNode:n=>n.getRootNode?.()??document,getDoc:n=>Jt(t.getRootNode(n)),getWin:n=>t.getDoc(n).defaultView??window,getActiveElement:n=>lE(t.getRootNode(n)),isActiveElement:(n,r)=>r===t.getActiveElement(n),getById:(n,r)=>t.getRootNode(n).getElementById(r),setValue:(n,r)=>{if(n==null||r==null)return;let o=r.toString();n.value!==o&&(n.value=r.toString())}};return{...t,...e}}function PE(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function dg(e,t){let{rootEl:n,...r}=t||{};!e||!n||!lg(n)||!PE(n)||e.scrollIntoView(r)}var Nc=new WeakMap;function IE(e,t,n){Nc.has(e)||Nc.set(e,new Map);let r=Nc.get(e),o=r.get(t);if(!o)return r.set(t,n()),()=>{r.get(t)?.(),r.delete(t)};let a=n(),i=()=>{a(),o(),r.delete(t)};return r.set(t,i),()=>{r.get(t)===i&&(a(),r.set(t,o))}}function fg(e,t){return e?IE(e,"style",()=>{let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}):()=>{}}var _E=1e3/60;function ME(e,t){let n=e();if(ct(n)&&n.isConnected)return t(n),()=>{};{let r=setInterval(()=>{let o=e();ct(o)&&o.isConnected&&(t(o),clearInterval(r))},_E);return()=>clearInterval(r)}}function pg(e,t){let n=[];return e?.forEach(r=>{let o=ME(r,t);n.push(o)}),()=>{n.forEach(r=>r())}}var[JO,Io]=Ze({hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:()=>({dir:"ltr",locale:"en-US"})});var RE=e=>typeof e=="function",mg=(e,...t)=>RE(e)?e(...t):e;var[NE,kr]=Ze({hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})}),OE=w("<span hidden>"),Ar=e=>{let[t,n]=M(),r=()=>mg(e.value)??t()?.ownerDocument??document,o=F(()=>({getRootNode:r,getDocument:()=>Jt(r()),getWindow:()=>gn(r())}));return m(NE,{value:o,get children(){return[F(()=>e.children),m(B,{get when(){return!e.value},get children(){var a=OE();return pe(n,a),a}})]}})};var LE=Object.defineProperty,or=(e,t)=>{for(var n in t)LE(e,n,{get:t[n],enumerable:!0})};var Xt=(e,t=[])=>({parts:(...n)=>{if(DE(t))return Xt(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Xt(e,[...t,...n]),rename:n=>Xt(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${_o(e)}"][data-part="${_o(r)}"]`,`& [data-scope="${_o(e)}"][data-part="${_o(r)}"]`].join(", "),attrs:{"data-scope":_o(e),"data-part":_o(r)}}}),{})}),_o=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),DE=e=>e.length===0;var gg=["top","right","bottom","left"];var bn=Math.min,xt=Math.max,La=Math.round,Da=Math.floor,Nn=e=>({x:e,y:e}),BE={left:"right",right:"left",bottom:"top",top:"bottom"},UE={start:"end",end:"start"};function gs(e,t,n){return xt(e,bn(t,n))}function yn(e,t){return typeof e=="function"?e(t):e}function vn(e){return e.split("-")[0]}function Pr(e){return e.split("-")[1]}function hs(e){return e==="x"?"y":"x"}function bs(e){return e==="y"?"height":"width"}function On(e){return["top","bottom"].includes(vn(e))?"y":"x"}function ys(e){return hs(On(e))}function hg(e,t,n){n===void 0&&(n=!1);let r=Pr(e),o=ys(e),a=bs(o),i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Oa(i)),[i,Oa(i)]}function bg(e){let t=Oa(e);return[ms(e),t,ms(t)]}function ms(e){return e.replace(/start|end/g,t=>UE[t])}function FE(e,t,n){let r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function yg(e,t,n,r){let o=Pr(e),a=FE(vn(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(ms)))),a}function Oa(e){return e.replace(/left|right|bottom|top/g,t=>BE[t])}function $E(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vc(e){return typeof e!="number"?$E(e):{top:e,right:e,bottom:e,left:e}}function Ir(e){let{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 vg(e,t,n){let{reference:r,floating:o}=e,a=On(t),i=ys(t),s=bs(i),c=vn(t),l=a==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[s]/2-o[s]/2,p;switch(c){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Pr(t)){case"start":p[i]-=d*(n&&l?-1:1);break;case"end":p[i]+=d*(n&&l?-1:1);break}return p}var wg=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t)),l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=vg(l,r,c),d=r,p={},h=0;for(let g=0;g<s.length;g++){let{name:x,fn:b}=s[g],{x:E,y:S,data:k,reset:I}=await b({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:l,platform:i,elements:{reference:e,floating:t}});u=E??u,f=S??f,p={...p,[x]:{...p[x],...k}},I&&h<=50&&(h++,typeof I=="object"&&(I.placement&&(d=I.placement),I.rects&&(l=I.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:u,y:f}=vg(l,d,c)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}};async function Mo(e,t){var n;t===void 0&&(t={});let{x:r,y:o,platform:a,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=yn(t,e),h=Vc(p),x=s[d?f==="floating"?"reference":"floating":f],b=Ir(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),E=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=await(a.isElement==null?void 0:a.isElement(S))?await(a.getScale==null?void 0:a.getScale(S))||{x:1,y:1}:{x:1,y:1},I=Ir(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:S,strategy:c}):E);return{top:(b.top-I.top+h.top)/k.y,bottom:(I.bottom-b.bottom+h.bottom)/k.y,left:(b.left-I.left+h.left)/k.x,right:(I.right-b.right+h.right)/k.x}}var Tg=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=yn(e,t)||{};if(l==null)return{};let f=Vc(u),d={x:n,y:r},p=ys(o),h=bs(p),g=await i.getDimensions(l),x=p==="y",b=x?"top":"left",E=x?"bottom":"right",S=x?"clientHeight":"clientWidth",k=a.reference[h]+a.reference[p]-d[p]-a.floating[h],I=d[p]-a.reference[p],G=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l)),D=G?G[S]:0;(!D||!await(i.isElement==null?void 0:i.isElement(G)))&&(D=s.floating[S]||a.floating[h]);let ie=k/2-I/2,V=D/2-g[h]/2-1,W=bn(f[b],V),L=bn(f[E],V),P=W,T=D-g[h]-L,C=D/2-g[h]/2+ie,R=gs(P,C,T),O=!c.arrow&&Pr(o)!=null&&C!==R&&a.reference[h]/2-(C<P?W:L)-g[h]/2<0,re=O?C<P?C-P:C-T:0;return{[p]:d[p]+re,data:{[p]:R,centerOffset:C-R-re,...O&&{alignmentOffset:re}},reset:O}}});var Cg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...x}=yn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let b=vn(o),E=On(s),S=vn(s)===s,k=await(c.isRTL==null?void 0:c.isRTL(l.floating)),I=d||(S||!g?[Oa(s)]:bg(s)),G=h!=="none";!d&&G&&I.push(...yg(s,g,h,k));let D=[s,...I],ie=await Mo(t,x),V=[],W=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&V.push(ie[b]),f){let C=hg(o,i,k);V.push(ie[C[0]],ie[C[1]])}if(W=[...W,{placement:o,overflows:V}],!V.every(C=>C<=0)){var L,P;let C=(((L=a.flip)==null?void 0:L.index)||0)+1,R=D[C];if(R)return{data:{index:C,overflows:W},reset:{placement:R}};let O=(P=W.filter(re=>re.overflows[0]<=0).sort((re,ge)=>re.overflows[1]-ge.overflows[1])[0])==null?void 0:P.placement;if(!O)switch(p){case"bestFit":{var T;let re=(T=W.filter(ge=>{if(G){let ve=On(ge.placement);return ve===E||ve==="y"}return!0}).map(ge=>[ge.placement,ge.overflows.filter(ve=>ve>0).reduce((ve,Ue)=>ve+Ue,0)]).sort((ge,ve)=>ge[1]-ve[1])[0])==null?void 0:T[0];re&&(O=re);break}case"initialPlacement":O=s;break}if(o!==O)return{reset:{placement:O}}}return{}}}};function xg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Sg(e){return gg.some(t=>e[t]>=0)}var Eg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=yn(e,t);switch(r){case"referenceHidden":{let a=await Mo(t,{...o,elementContext:"reference"}),i=xg(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Sg(i)}}}case"escaped":{let a=await Mo(t,{...o,altBoundary:!0}),i=xg(a,n.floating);return{data:{escapedOffsets:i,escaped:Sg(i)}}}default:return{}}}}};async function GE(e,t){let{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=vn(n),s=Pr(n),c=On(n)==="y",l=["left","top"].includes(i)?-1:1,u=a&&c?-1:1,f=yn(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),c?{x:p*u,y:d*l}:{x:d*l,y:p*u}}var kg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:a,placement:i,middlewareData:s}=t,c=await GE(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},Ag=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:x=>{let{x:b,y:E}=x;return{x:b,y:E}}},...c}=yn(e,t),l={x:n,y:r},u=await Mo(t,c),f=On(vn(o)),d=hs(f),p=l[d],h=l[f];if(a){let x=d==="y"?"top":"left",b=d==="y"?"bottom":"right",E=p+u[x],S=p-u[b];p=gs(E,p,S)}if(i){let x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",E=h+u[x],S=h-u[b];h=gs(E,h,S)}let g=s.fn({...t,[d]:p,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[d]:a,[f]:i}}}}}},Pg=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=yn(e,t),u={x:n,y:r},f=On(o),d=hs(f),p=u[d],h=u[f],g=yn(s,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){let S=d==="y"?"height":"width",k=a.reference[d]-a.floating[S]+x.mainAxis,I=a.reference[d]+a.reference[S]-x.mainAxis;p<k?p=k:p>I&&(p=I)}if(l){var b,E;let S=d==="y"?"width":"height",k=["top","left"].includes(vn(o)),I=a.reference[f]-a.floating[S]+(k&&((b=i.offset)==null?void 0:b[f])||0)+(k?0:x.crossAxis),G=a.reference[f]+a.reference[S]+(k?0:((E=i.offset)==null?void 0:E[f])||0)-(k?x.crossAxis:0);h<I?h=I:h>G&&(h=G)}return{[d]:p,[f]:h}}}},Ig=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...l}=yn(e,t),u=await Mo(t,l),f=vn(o),d=Pr(o),p=On(o)==="y",{width:h,height:g}=a.floating,x,b;f==="top"||f==="bottom"?(x=f,b=d===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=f,x=d==="end"?"top":"bottom");let E=g-u.top-u.bottom,S=h-u.left-u.right,k=bn(g-u[x],E),I=bn(h-u[b],S),G=!t.middlewareData.shift,D=k,ie=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ie=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=E),G&&!d){let W=xt(u.left,0),L=xt(u.right,0),P=xt(u.top,0),T=xt(u.bottom,0);p?ie=h-2*(W!==0||L!==0?W+L:xt(u.left,u.right)):D=g-2*(P!==0||T!==0?P+T:xt(u.top,u.bottom))}await c({...t,availableWidth:ie,availableHeight:D});let V=await i.getDimensions(s.floating);return h!==V.width||g!==V.height?{reset:{rects:!0}}:{}}}};function vs(){return typeof window<"u"}function _r(e){return Mg(e)?(e.nodeName||"").toLowerCase():"#document"}function Pt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qt(e){var t;return(t=(Mg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mg(e){return vs()?e instanceof Node||e instanceof Pt(e).Node:!1}function Ht(e){return vs()?e instanceof Element||e instanceof Pt(e).Element:!1}function en(e){return vs()?e instanceof HTMLElement||e instanceof Pt(e).HTMLElement:!1}function _g(e){return!vs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pt(e).ShadowRoot}function No(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Rg(e){return["table","td","th"].includes(_r(e))}function Ba(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function xs(e){let t=Ss(),n=Ht(e)?Kt(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 Ng(e){let t=Ln(e);for(;en(t)&&!Mr(t);){if(xs(t))return t;if(Ba(t))return null;t=Ln(t)}return null}function Ss(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Mr(e){return["html","body","#document"].includes(_r(e))}function Kt(e){return Pt(e).getComputedStyle(e)}function Ua(e){return Ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ln(e){if(_r(e)==="html")return e;let t=e.assignedSlot||e.parentNode||_g(e)&&e.host||Qt(e);return _g(t)?t.host:t}function Og(e){let t=Ln(e);return Mr(t)?e.ownerDocument?e.ownerDocument.body:e.body:en(t)&&No(t)?t:Og(t)}function Ro(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=Og(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=Pt(o);if(a){let s=ws(i);return t.concat(i,i.visualViewport||[],No(o)?o:[],s&&n?Ro(s):[])}return t.concat(o,Ro(o,[],n))}function ws(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bg(e){let t=Kt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=en(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=La(n)!==a||La(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function zc(e){return Ht(e)?e:e.contextElement}function Oo(e){let t=zc(e);if(!en(t))return Nn(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Bg(t),i=(a?La(n.width):n.width)/r,s=(a?La(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var HE=Nn(0);function Ug(e){let t=Pt(e);return!Ss()||!t.visualViewport?HE:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KE(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pt(e)?!1:t}function Rr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),a=zc(e),i=Nn(1);t&&(r?Ht(r)&&(i=Oo(r)):i=Oo(e));let s=KE(a,n,r)?Ug(a):Nn(0),c=(o.left+s.x)/i.x,l=(o.top+s.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(a){let d=Pt(a),p=r&&Ht(r)?Pt(r):r,h=d,g=ws(h);for(;g&&r&&p!==h;){let x=Oo(g),b=g.getBoundingClientRect(),E=Kt(g),S=b.left+(g.clientLeft+parseFloat(E.paddingLeft))*x.x,k=b.top+(g.clientTop+parseFloat(E.paddingTop))*x.y;c*=x.x,l*=x.y,u*=x.x,f*=x.y,c+=S,l+=k,h=Pt(g),g=ws(h)}}return Ir({width:u,height:f,x:c,y:l})}function VE(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,a=o==="fixed",i=Qt(r),s=t?Ba(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Nn(1),u=Nn(0),f=en(r);if((f||!f&&!a)&&((_r(r)!=="body"||No(i))&&(c=Ua(r)),en(r))){let d=Rr(r);l=Oo(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function jE(e){return Array.from(e.getClientRects())}function Wc(e,t){let n=Ua(e).scrollLeft;return t?t.left+n:Rr(Qt(e)).left+n}function WE(e){let t=Qt(e),n=Ua(e),r=e.ownerDocument.body,o=xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+Wc(e),s=-n.scrollTop;return Kt(r).direction==="rtl"&&(i+=xt(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function zE(e,t){let n=Pt(e),r=Qt(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;let l=Ss();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function ZE(e,t){let n=Rr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=en(e)?Oo(e):Nn(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=o*a.x,l=r*a.y;return{width:i,height:s,x:c,y:l}}function Lg(e,t,n){let r;if(t==="viewport")r=zE(e,n);else if(t==="document")r=WE(Qt(e));else if(Ht(t))r=ZE(t,n);else{let o=Ug(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ir(r)}function Fg(e,t){let n=Ln(e);return n===t||!Ht(n)||Mr(n)?!1:Kt(n).position==="fixed"||Fg(n,t)}function YE(e,t){let n=t.get(e);if(n)return n;let r=Ro(e,[],!1).filter(s=>Ht(s)&&_r(s)!=="body"),o=null,a=Kt(e).position==="fixed",i=a?Ln(e):e;for(;Ht(i)&&!Mr(i);){let s=Kt(i),c=xs(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||No(i)&&!c&&Fg(e,i))?r=r.filter(u=>u!==i):o=s,i=Ln(i)}return t.set(e,r),r}function qE(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[...n==="clippingAncestors"?Ba(t)?[]:YE(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((l,u)=>{let f=Lg(t,u,o);return l.top=xt(f.top,l.top),l.right=bn(f.right,l.right),l.bottom=bn(f.bottom,l.bottom),l.left=xt(f.left,l.left),l},Lg(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function JE(e){let{width:t,height:n}=Bg(e);return{width:t,height:n}}function XE(e,t,n){let r=en(t),o=Qt(t),a=n==="fixed",i=Rr(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Nn(0);if(r||!r&&!a)if((_r(t)!=="body"||No(o))&&(s=Ua(t)),r){let p=Rr(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&(c.x=Wc(o));let l=0,u=0;if(o&&!r&&!a){let p=o.getBoundingClientRect();u=p.top+s.scrollTop,l=p.left+s.scrollLeft-Wc(o,p)}let f=i.left+s.scrollLeft-c.x-l,d=i.top+s.scrollTop-c.y-u;return{x:f,y:d,width:i.width,height:i.height}}function jc(e){return Kt(e).position==="static"}function Dg(e,t){if(!en(e)||Kt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qt(e)===n&&(n=n.ownerDocument.body),n}function $g(e,t){let n=Pt(e);if(Ba(e))return n;if(!en(e)){let o=Ln(e);for(;o&&!Mr(o);){if(Ht(o)&&!jc(o))return o;o=Ln(o)}return n}let r=Dg(e,t);for(;r&&Rg(r)&&jc(r);)r=Dg(r,t);return r&&Mr(r)&&jc(r)&&!xs(r)?n:r||Ng(e)||n}var QE=async function(e){let t=this.getOffsetParent||$g,n=this.getDimensions,r=await n(e.floating);return{reference:XE(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function e1(e){return Kt(e).direction==="rtl"}var t1={convertOffsetParentRelativeRectToViewportRelativeRect:VE,getDocumentElement:Qt,getClippingRect:qE,getOffsetParent:$g,getElementRects:QE,getClientRects:jE,getDimensions:JE,getScale:Oo,isElement:Ht,isRTL:e1};function n1(e,t){let n=null,r,o=Qt(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let{left:l,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;let p=Da(u),h=Da(o.clientWidth-(l+f)),g=Da(o.clientHeight-(u+d)),x=Da(l),E={rootMargin:-p+"px "+-h+"px "+-g+"px "+-x+"px",threshold:xt(0,bn(1,c))||1},S=!0;function k(I){let G=I[0].intersectionRatio;if(G!==c){if(!S)return i();G?i(!1,G):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(k,{...E,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,E)}n.observe(e)}return i(!0),a}function Gg(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=zc(e),u=o||a?[...l?Ro(l):[],...Ro(t)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});let f=l&&s?n1(l,n):null,d=-1,p=null;i&&(p=new ResizeObserver(b=>{let[E]=b;E&&E.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let h,g=c?Rr(e):null;c&&x();function x(){let b=Rr(e);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,h=requestAnimationFrame(x)}return n(),()=>{var b;u.forEach(E=>{o&&E.removeEventListener("scroll",n),a&&E.removeEventListener("resize",n)}),f?.(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(h)}}var Hg=kg;var Kg=Ag,Vg=Cg,jg=Ig,Wg=Eg,zg=Tg;var Zg=Pg,Yg=(e,t,n)=>{let r=new Map,o={platform:t1,...n},a={...o.platform,_c:r};return wg(e,t,{...o,platform:a})};function qg(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);let o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...o,toJSON:()=>o}}function r1(e){if(!e)return qg();let{x:t,y:n,width:r,height:o}=e;return qg(t,n,r,o)}function o1(e,t){return{contextElement:ct(e)?e:void 0,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?r1(r):n.getBoundingClientRect()}}}var Fa=e=>({variable:e,reference:`var(${e})`}),Dn={arrowSize:Fa("--arrow-size"),arrowSizeHalf:Fa("--arrow-size-half"),arrowBg:Fa("--arrow-background"),transformOrigin:Fa("--transform-origin"),arrowOffset:Fa("--arrow-offset")},a1=e=>({top:"bottom center","top-start":e?`${e.x}px bottom`:"left bottom","top-end":e?`${e.x}px bottom`:"right bottom",bottom:"top center","bottom-start":e?`${e.x}px top`:"top left","bottom-end":e?`${e.x}px top`:"top right",left:"right center","left-start":e?`right ${e.y}px`:"right top","left-end":e?`right ${e.y}px`:"right bottom",right:"left center","right-start":e?`left ${e.y}px`:"left top","right-end":e?`left ${e.y}px`:"left bottom"}),i1={name:"transformOrigin",fn({placement:e,elements:t,middlewareData:n}){let{arrow:r}=n,o=a1(r)[e],{floating:a}=t;return a.style.setProperty(Dn.transformOrigin.variable,o),{data:{transformOrigin:o}}}},s1={name:"rects",fn({rects:e}){return{data:e}}},l1=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${Dn.arrowOffset.reference})`}),{}}}};function c1(e){let[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function Xg(e){return e.split("-")[0]}var u1={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Jg(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Qg(e){return Mn(e.boundary)}function d1(e,t){if(e)return zg({element:e,padding:t.arrowPadding})}function f1(e,t){if(!Im(t.offset??t.gutter))return Hg(({placement:n})=>{let r=(e?.clientHeight||0)/2,o=t.offset?.mainAxis??t.gutter,a=typeof o=="number"?o+r:o??r,{hasAlign:i}=c1(n),s=i?void 0:t.shift,c=t.offset?.crossAxis??s;return gt({crossAxis:c,mainAxis:a,alignmentAxis:t.shift})})}function p1(e){if(e.flip)return Vg({boundary:Qg(e),padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function m1(e){if(!(!e.slide&&!e.overlap))return Kg({boundary:Qg(e),mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Zg()})}function g1(e){return jg({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){let a=t.floating,i=Math.round(n.reference.width);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${i}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function h1(e){if(e.hideWhenDetached)return Wg({strategy:"referenceHidden",boundary:e.boundary?.()??"clippingAncestors"})}function b1(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function y1(e,t,n={}){let r=o1(e,n.getAnchorRect);if(!t||!r)return;let o=Object.assign({},u1,n),a=t.querySelector("[data-part=arrow]"),i=[f1(a,o),p1(o),m1(o),d1(a,o),l1(a),i1,g1(o),h1(o),s1],{placement:s,strategy:c,onComplete:l,onPositioned:u}=o,f=async()=>{if(!r||!t)return;let g=await Yg(r,t,{placement:s,middleware:i,strategy:c});l?.(g),u?.({placed:!0});let x=gn(t),b=Jg(x,g.x),E=Jg(x,g.y);t.style.setProperty("--x",`${b}px`),t.style.setProperty("--y",`${E}px`),o.hideWhenDetached&&g.middlewareData.hide?.referenceHidden&&t.style.setProperty("visibility","hidden");let S=t.firstElementChild;if(S){let k=x.getComputedStyle(S).zIndex;t.style.setProperty("--z-index",k)}},d=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:f}),u?.({placed:!0})):await f()},p=b1(o.listeners),h=o.listeners?Gg(r,t,d,p):ss;return d(),()=>{h?.(),u?.({placed:!1})}}function Zc(e,t,n={}){let{defer:r,...o}=n,a=r?Ye:s=>s(),i=[];return i.push(a(()=>{let s=typeof e=="function"?e():e,c=typeof t=="function"?t():t;i.push(y1(s,c,o))})),()=>{i.forEach(s=>s?.())}}var v1={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function eh(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Dn.arrowSize.reference,height:Dn.arrowSize.reference,[Dn.arrowSizeHalf.variable]:`calc(${Dn.arrowSize.reference} / 2)`,[Dn.arrowOffset.variable]:`calc(${Dn.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?v1[t.split("-")[0]]:void 0,background:Dn.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var tn=(e,t,n,r)=>{let o=typeof e=="function"?e():e;return o?.addEventListener(t,n,r),()=>{o?.removeEventListener(t,n,r)}};function nh(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Ts=e=>e.button===2||Xm()&&e.ctrlKey&&e.button===0,rh=e=>e.ctrlKey||e.altKey||e.metaKey;function x1(e,t,n){let o=(i=>{let s=requestAnimationFrame(i);return()=>cancelAnimationFrame(s)})(()=>{e.removeEventListener(t,a,!0),n()}),a=()=>{o(),n()};return e.addEventListener(t,a,{once:!0,capture:!0}),o}function S1(e){return e?.matches("a[href]")??!1}function oh(e){if(!S1(e))return;let t=()=>e.click();Qm()?x1(e,"keyup",t):queueMicrotask(t)}function Yc(e,t,n){if(!e)return;let r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}var w1={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},th={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function qc(e,t={}){let{dir:n="ltr",orientation:r="horizontal"}=t,{key:o}=e;return o=w1[o]??o,n==="rtl"&&r==="horizontal"&&o in th&&(o=th[o]),o}function T1(e,t="client"){let n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function C1(e,t="client"){return{x:e[`${t}X`],y:e[`${t}Y`]}}var E1=e=>"touches"in e&&e.touches.length>0;function Cs(e,t="client"){return E1(e)?T1(e,t):C1(e,t)}function k1(e){let t={each(n){for(let r=0;r<e.frames?.length;r+=1){let o=e.frames[r];o&&n(o)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch{}}),()=>{try{t.removeEventListener(n,r,o)}catch{}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch{}})}};return t}function A1(e){let t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t?.addEventListener(n,r,o)}catch{}return()=>{try{t?.removeEventListener(n,r,o)}catch{}}},removeEventListener:(n,r,o)=>{try{t?.removeEventListener(n,r,o)}catch{}}}}var ah="pointerdown.outside",ih="focus.outside";function P1(e){for(let t of e)if(ct(t)&&fs(t))return!0;return!1}var lh=e=>"clientY"in e;function I1(e,t){if(!lh(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function sh(e,t){if(!t||!lh(e))return!1;let r=t.scrollHeight>t.clientHeight&&e.clientX>t.clientWidth,a=t.scrollWidth>t.clientWidth&&e.clientY>t.clientHeight;return r||a}function _1(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:i}=t;if(!e)return;let s=Jt(e),c=gn(e),l=k1(c),u=A1(c);function f(b){let E=hn(b);if(!ct(E)||Gt(e,E)||I1(e,b)||sh(b,E))return!1;let S=Kc(e);return sh(b,S)?!1:!n?.(E)}let d=new Set;function p(b){function E(){let S=i?Ye:I=>I(),k=b.composedPath?.()??[b.target];S(()=>{if(!(!e||!f(b))){if(o||a){let I=Aa(o,a);e.addEventListener(ah,I,{once:!0})}Yc(e,ah,{bubbles:!1,cancelable:!0,detail:{originalEvent:b,contextmenu:Ts(b),focusable:P1(k)}})}})}b.pointerType==="touch"?(d.forEach(S=>S()),d.add(tn(s,"click",E,{once:!0})),d.add(u.addEventListener("click",E,{once:!0})),d.add(l.addEventListener("click",E,{once:!0}))):E()}let h=new Set,g=setTimeout(()=>{h.add(tn(s,"pointerdown",p,!0)),h.add(u.addEventListener("pointerdown",p,!0)),h.add(l.addEventListener("pointerdown",p,!0))},0);function x(b){(i?Ye:S=>S())(()=>{if(!(!e||!f(b))){if(r||a){let S=Aa(r,a);e.addEventListener(ih,S,{once:!0})}Yc(e,ih,{bubbles:!1,cancelable:!0,detail:{originalEvent:b,contextmenu:!1,focusable:fs(hn(b))}})}})}return h.add(tn(s,"focusin",x,!0)),h.add(u.addEventListener("focusin",x,!0)),h.add(l.addEventListener("focusin",x,!0)),()=>{clearTimeout(g),d.forEach(b=>b()),h.forEach(b=>b())}}function ch(e,t){let{defer:n}=t,r=n?Ye:a=>a(),o=[];return o.push(r(()=>{let a=typeof e=="function"?e():e;o.push(_1(a,t))})),()=>{o.forEach(a=>a?.())}}function M1(e,t){let n=r=>{r.key==="Escape"&&(r.isComposing||t?.(r))};return tn(Jt(e),"keydown",n,{capture:!0})}var Nt={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){let t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1;return t<n},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Gt(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Gt(t,e))},add(e){let t=this.layers.push(e);e.node.style.setProperty("--layer-index",`${t}`)},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>r.dismiss()),this.layers.splice(t,1),e.style.removeProperty("--layer-index"))},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e){this.layers[this.indexOf(e)]?.dismiss()},clear(){this.remove(this.layers[0].node)}},uh;function dh(){Nt.layers.forEach(({node:e})=>{e.style.pointerEvents=Nt.isBelowPointerBlockingLayer(e)?"none":"auto"})}function R1(e){e.style.pointerEvents=""}function N1(e,t){let n=Jt(e),r=[];if(Nt.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(uh=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t){let o=pg(t,a=>{r.push(fg(a,{pointerEvents:"auto"}))});r.push(o)}return()=>{Nt.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=uh,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function O1(e,t){if(!e){Rn("[@zag-js/dismissable] node is `null` or `undefined`");return}let{onDismiss:n,pointerBlocking:r,exclude:o,debug:a}=t,i={dismiss:n,node:e,pointerBlocking:r};Nt.add(i),dh();function s(d){let p=hn(d.detail.originalEvent);Nt.isBelowPointerBlockingLayer(e)||Nt.isInBranch(p)||(t.onPointerDownOutside?.(d),t.onInteractOutside?.(d),!d.defaultPrevented&&(a&&console.log("onPointerDownOutside:",d.detail.originalEvent),n?.()))}function c(d){let p=hn(d.detail.originalEvent);Nt.isInBranch(p)||(t.onFocusOutside?.(d),t.onInteractOutside?.(d),!d.defaultPrevented&&(a&&console.log("onFocusOutside:",d.detail.originalEvent),n?.()))}function l(d){Nt.isTopMost(e)&&(t.onEscapeKeyDown?.(d),!d.defaultPrevented&&n&&(d.preventDefault(),n()))}function u(d){if(!e)return!1;let p=typeof o=="function"?o():o,h=Array.isArray(p)?p:[p],g=t.persistentElements?.map(x=>x()).filter(ct);return g&&h.push(...g),h.some(x=>Gt(x,d))||Nt.isInNestedLayer(e,d)}let f=[r?N1(e,t.persistentElements):void 0,M1(e,l),ch(e,{exclude:u,onFocusOutside:c,onPointerDownOutside:s,defer:t.defer})];return()=>{Nt.remove(e),dh(),R1(e),f.forEach(d=>d?.())}}function Es(e,t){let{defer:n}=t,r=n?Ye:a=>a(),o=[];return o.push(r(()=>{let a=er(e)?e():e;o.push(O1(a,t))})),()=>{o.forEach(a=>a?.())}}function fh(e,t={}){let{defer:n}=t,r=n?Ye:a=>a(),o=[];return o.push(r(()=>{let a=er(e)?e():e;if(!a){Rn("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Nt.addBranch(a),o.push(()=>{Nt.removeBranch(a)})})),()=>{o.forEach(a=>a?.())}}var gh=Xt("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),Lo=gh.build(),ht=rr({getRegionId:e=>`toast-group:${e}`,getRegionEl:(e,t)=>ht.getById(e,`toast-group:${t}`),getRootId:e=>`toast:${e.id}`,getRootEl:e=>ht.getById(e,ht.getRootId(e)),getTitleId:e=>`toast:${e.id}:title`,getDescriptionId:e=>`toast:${e.id}:description`,getCloseTriggerId:e=>`toast${e.id}:close`});function Jc(e,t){return e.filter(n=>n.state.context.placement===t)}var ph={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function mh(e,t){return e??ph[t]??ph.DEFAULT}function L1(e,t){let n=e.offsets,r=typeof n=="string"?{left:n,right:n,bottom:n,top:n}:n,o=e.dir==="rtl",a=t.replace("-start",o?"-right":"-left").replace("-end",o?"-left":"-right"),i=a.includes("right"),s=a.includes("left"),c={position:"fixed",pointerEvents:e.count>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${e.gap}px`,"--first-height":`${e.heights[0]?.height||0}px`,zIndex:Zm},l="center";if(i&&(l="flex-end"),s&&(l="flex-start"),c.alignItems=l,a.includes("top")){let u=r.top;c.top=`max(env(safe-area-inset-top, 0px), ${u})`}if(a.includes("bottom")){let u=r.bottom;c.bottom=`max(env(safe-area-inset-bottom, 0px), ${u})`}if(!a.includes("left")){let u=r.right;c.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${u})`}if(!a.includes("right")){let u=r.left;c.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${u})`}return c}function D1(e,t){let[n]=e.placement.split("-"),r=!e.frontmost,o=!e.stacked,a={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${e.removeDelay}ms`,"--duration":`${e.type==="loading"?Number.MAX_SAFE_INTEGER:e.duration}ms`,"--initial-height":`${e.height}px`,"--offset":`${e.offset}px`,"--index":e.index,"--z-index":e.zIndex,"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},i=s=>Object.assign(a,s);return n==="top"?i({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):n==="bottom"&&i({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),e.mounted&&(i({"--y":"0","--opacity":"1"}),e.stacked&&i({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||i({"--opacity":"0",pointerEvents:"none"}),r&&o&&(i({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||i({"--y":"calc(var(--sign) * 40%)"})),r&&e.stacked&&!t&&i({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),e.frontmost&&!t&&i({"--y":"calc(var(--lift) * -100%)"}),a}function B1(e,t){let n={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},r=o=>Object.assign(n,o);return e.frontmost&&!t&&r({height:"calc(var(--initial-height) + 80%)"}),n}function U1(e,t){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function F1(e,t,n){function r(){return Fm(e)?e.getState():e}function o(u){return Jc(r().context.toasts,u)}function a(u){let f=r().context.toasts;return f.length?!!f.find(d=>d.id==u):!1}function i(u){let f=`toast:${Pa()}`,d=u.id?u.id:f;return a(d)||t({type:"ADD_TOAST",toast:{...u,id:d}}),d}function s(u,f){return a(u)&&t({type:"UPDATE_TOAST",id:u,toast:f}),u}function c(u){let{id:f}=u;return(f?a(f):!1)&&f!=null?s(f,u):i(u)}function l(u){u==null?t("DISMISS_ALL"):a(u)&&t({type:"DISMISS_TOAST",id:u})}return{getCount(){return r().context.count},getPlacements(){let f=r().context.toasts.map(d=>d.state.context.placement);return Array.from(new Set(f))},getToastsByPlacement:o,isVisible:a,create:i,update:s,upsert:c,dismiss:l,remove(u){u==null?t("REMOVE_ALL"):a(u)&&t({type:"REMOVE_TOAST",id:u})},dismissByPlacement(u){o(u).forEach(d=>l(d.id))},loading(u){return c({...u,type:"loading"})},success(u){return c({...u,type:"success"})},error(u){return c({...u,type:"error"})},promise(u,f,d={}){let p=c({...d,...f.loading,type:"loading"});return Mn(u).then(h=>{let g=Mn(f.success,h);c({...d,...g,id:p,type:"success"})}).catch(h=>{let g=Mn(f.error,h);c({...d,...g,id:p,type:"error"})}).finally(()=>{f.finally?.()}),p},pause(u){u==null?t("PAUSE_ALL"):a(u)&&t({type:"PAUSE_TOAST",id:u})},resume(u){u==null?t("RESUME_ALL"):a(u)&&t({type:"RESUME_TOAST",id:u})},getGroupProps(u){let{placement:f,label:d="Notifications"}=u,p=r(),h=p.context.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),[g,x="center"]=f.split("-");return n.element({...Lo.group.attrs,dir:p.context.dir,tabIndex:-1,"aria-label":`${f} ${d} ${h}`,id:ht.getRegionId(f),"data-placement":f,"data-side":g,"data-align":x,"aria-live":"polite",role:"region",style:L1(p.context,f),onMouseMove(){t({type:"REGION.POINTER_ENTER",placement:f})},onMouseLeave(){t({type:"REGION.POINTER_LEAVE",placement:f})},onFocus(b){t({type:"REGION.FOCUS",target:b.relatedTarget})},onBlur(b){p.context.isFocusWithin&&!Gt(b.currentTarget,b.relatedTarget)&&t({type:"REGION.BLUR"})}})},subscribe(u){let f=r();return ko(f.context.toasts,()=>{let p=o(f.context.placement).map(h=>h.getState().context);u(p)})}}}var{not:$1,and:G1,or:H1}=ls;function K1(e){let{type:t="info",duration:n,id:r="1",placement:o="bottom",removeDelay:a=200,...i}=e,s=gt(i),c=mh(n,t);return qt({id:r,context:{id:r,type:t,remaining:c,duration:c,removeDelay:a,createdAt:Date.now(),placement:o,...s,height:0,offset:0,frontmost:!1,mounted:!1,index:-1,zIndex:0},initial:t==="loading"?"visible:persist":"visible",on:{UPDATE:[{guard:G1("hasTypeChanged","isChangingToLoading"),target:"visible:persist",actions:["setContext"]},{guard:H1("hasDurationChanged","hasTypeChanged"),target:"visible:updating",actions:["setContext"]},{actions:["setContext"]}],MEASURE:{actions:["measureHeight"]}},entry:["invokeOnVisible"],activities:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],after:{0:"visible"}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:$1("isLoadingType"),target:"visible",actions:["setCreatedAt"]},DISMISS:"dismissing"}},visible:{tags:["visible"],after:{VISIBLE_DURATION:"dismissing"},on:{DISMISS:"dismissing",PAUSE:{target:"visible:persist",actions:"setRemainingDuration"}}},dismissing:{entry:"invokeOnDismiss",after:{REMOVE_DELAY:{target:"unmounted",actions:"notifyParentToRemove"}}},unmounted:{entry:"invokeOnUnmount",type:"final"}}},{activities:{trackHeight(l,u,{self:f}){let d;return Ye(()=>{let p=ht.getRootEl(l);if(!p)return;l.mounted=!0;let h=ps(p,"[data-ghost]");Rn(h.length!==2,"[toast] No ghost element found in toast. Render the `ghostBefore` and `ghostAfter` elements");let g=()=>{let E=p.style.height;p.style.height="auto";let S=p.getBoundingClientRect().height;p.style.height=E,l.height=S,f.sendParent({type:"UPDATE_HEIGHT",id:f.id,height:S,placement:l.placement})};g();let x=ht.getWin(l),b=new x.MutationObserver(g);b.observe(p,{childList:!0,subtree:!0,characterData:!0}),d=()=>b.disconnect()}),()=>d?.()}},guards:{isChangingToLoading:(l,u)=>u.toast?.type==="loading",isLoadingType:l=>l.type==="loading",hasTypeChanged:(l,u)=>u.toast?.type!=null&&u.toast.type!==l.type,hasDurationChanged:(l,u)=>u.toast?.duration!=null&&u.toast.duration!==l.duration},delays:{VISIBLE_DURATION:l=>l.remaining,REMOVE_DELAY:l=>l.removeDelay},actions:{measureHeight(l,u,{self:f}){Ye(()=>{let d=ht.getRootEl(l);if(!d)return;l.mounted=!0;let p=d.style.height;d.style.height="auto";let h=d.getBoundingClientRect().height;d.style.height=p,l.height=h,f.sendParent({type:"UPDATE_HEIGHT",id:f.id,height:h,placement:l.placement})})},setRemainingDuration(l){l.remaining-=Date.now()-l.createdAt},setCreatedAt(l){l.createdAt=Date.now()},notifyParentToRemove(l,u,{self:f}){f.sendParent({type:"REMOVE_TOAST",id:f.id})},invokeOnDismiss(l){l.onStatusChange?.({status:"dismissing"})},invokeOnUnmount(l){l.onStatusChange?.({status:"unmounted"})},invokeOnVisible(l){l.onStatusChange?.({status:"visible"})},setContext(l,u){let f=u.toast?.duration,d=u.toast?.type??l.type,p=mh(f,d);Object.assign(l,{...u.toast,duration:p,remaining:p})}}})}function V1(e){let t=gt(e);return qt({id:"toaster",initial:t.overlap?"overlap":"stack",context:{dir:"ltr",max:Number.MAX_SAFE_INTEGER,gap:16,pauseOnPageIdle:!1,hotkey:["altKey","KeyT"],offsets:"1rem",placement:"bottom",removeDelay:200,...t,toasts:[],lastFocusedEl:null,isFocusWithin:!1,heights:[]},computed:{count:n=>n.toasts.length},activities:["trackDocumentVisibility","trackHotKeyPress"],watch:{toasts:["collapsedIfEmpty","setDismissableBranch"]},exit:["removeToasts","clearDismissableBranch","clearLastFocusedEl"],on:{PAUSE_TOAST:{actions:["pauseToast"]},PAUSE_ALL:{actions:["pauseToasts"]},RESUME_TOAST:{actions:["resumeToast"]},RESUME_ALL:{actions:["resumeToasts"]},ADD_TOAST:{guard:"isWithinRange",actions:["createToast","syncToastIndex"]},UPDATE_TOAST:{actions:["updateToast"]},DISMISS_TOAST:{actions:["dismissToast"]},DISMISS_ALL:{actions:["dismissToasts"]},REMOVE_TOAST:{actions:["removeToast","syncToastIndex","syncToastOffset"]},REMOVE_ALL:{actions:["removeToasts"]},UPDATE_HEIGHT:{actions:["syncHeights","syncToastOffset"]},"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:"isOverlapping",target:"overlap",actions:["resumeToasts","restoreLastFocusedEl"]},{actions:["resumeToasts","restoreLastFocusedEl"]}]},states:{stack:{entry:["expandToasts"],on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["resumeToasts"]},{actions:["resumeToasts"]}],"REGION.OVERLAP":{target:"overlap"},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["pauseToasts"]}}},overlap:{entry:["collapseToasts"],on:{"REGION.STACK":{target:"stack"},"REGION.POINTER_ENTER":{target:"stack",actions:["pauseToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts"]}}}}},{guards:{isWithinRange:n=>n.toasts.length<n.max,isOverlapping:n=>!!n.overlap},activities:{trackHotKeyPress(n,r,{send:o}){return tn(document,"keydown",i=>{n.hotkey.every(c=>i[c]||i.code===c)&&o({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility(n,r,{send:o}){if(!n.pauseOnPageIdle)return;let a=ht.getDoc(n);return tn(a,"visibilitychange",()=>{o(a.visibilityState==="hidden"?"PAUSE_ALL":"RESUME_ALL")})}},actions:{setDismissableBranch(n){let o=Jc(n.toasts,n.placement).length>0;if(!o){n._cleanup?.();return}if(o&&n._cleanup)return;let a=()=>ht.getRegionEl(n,n.placement);n._cleanup=fh(a,{defer:!0})},clearDismissableBranch(n){n._cleanup?.()},focusRegionEl(n){queueMicrotask(()=>{ht.getRegionEl(n,n.placement)?.focus()})},expandToasts(n){ks(n,r=>{r.state.context.stacked=!0})},collapseToasts(n){ks(n,r=>{r.state.context.stacked=!1})},collapsedIfEmpty(n,r,{send:o}){!n.overlap||n.toasts.length>1||o("REGION.OVERLAP")},pauseToast(n,r,{self:o}){o.sendChild("PAUSE",r.id)},pauseToasts(n){n.toasts.forEach(r=>r.send("PAUSE"))},resumeToast(n,r,{self:o}){o.sendChild("RESUME",r.id)},resumeToasts(n){n.toasts.forEach(r=>r.send("RESUME"))},measureToasts(n){n.toasts.forEach(r=>r.send("MEASURE"))},createToast(n,r,{self:o,getState:a}){let i={placement:n.placement,duration:n.duration,removeDelay:n.removeDelay,...r.toast,dir:n.dir,getRootNode:n.getRootNode,stacked:a().matches("stack")},s=K1(i),c=o.spawn(s);n.toasts=[c,...n.toasts]},updateToast(n,r,{self:o}){o.sendChild({type:"UPDATE",toast:r.toast},r.id)},dismissToast(n,r,{self:o}){o.sendChild("DISMISS",r.id)},dismissToasts(n){n.toasts.forEach(r=>r.send("DISMISS"))},removeToast(n,r,{self:o}){o.stopChild(r.id),n.toasts=n.toasts.filter(a=>a.id!==r.id),n.heights=n.heights.filter(a=>a.id!==r.id)},removeToasts(n,r,{self:o}){n.toasts.forEach(a=>o.stopChild(a.id)),n.toasts=[],n.heights=[]},syncHeights(n,r){let o=n.heights.find(a=>a.id===r.id);if(o)o.height=r.height,o.placement=r.placement;else{let a={id:r.id,height:r.height,placement:r.placement};n.heights=[a,...n.heights]}},syncToastIndex(n){ks(n,(r,o,a)=>{r.state.context.index=o,r.state.context.frontmost=o===0,r.state.context.zIndex=a.length-o})},syncToastOffset(n,r){let o=r.placement??n.placement;ks({...n,placement:o},a=>{let i=Math.max(n.heights.findIndex(c=>c.id===a.id),0),s=n.heights.reduce((c,l,u)=>u>=i?c:c+l.height,0);a.state.context.offset=i*n.gap+s})},setLastFocusedEl(n,r){n.isFocusWithin||!r.target||(n.isFocusWithin=!0,n.lastFocusedEl=Rt(r.target))},restoreLastFocusedEl(n){n.isFocusWithin=!1,n.lastFocusedEl&&(n.lastFocusedEl.focus({preventScroll:!0}),n.lastFocusedEl=null)},clearLastFocusedEl(n){n.lastFocusedEl&&(n.lastFocusedEl.focus({preventScroll:!0}),n.lastFocusedEl=null,n.isFocusWithin=!1)}}})}function ks(e,t){Jc(e.toasts,e.placement).forEach(t)}function hh(e,t,n){let r=e.hasTag("visible"),o=e.hasTag("paused"),a=e.context.placement,i=e.context.type,[s,c="center"]=a.split("-");return{type:i,title:e.context.title,description:e.context.description,placement:a,visible:r,paused:o,pause(){t("PAUSE")},resume(){t("RESUME")},dismiss(){t("DISMISS")},getRootProps(){return n.element({...Lo.root.attrs,dir:e.context.dir,id:ht.getRootId(e.context),"data-state":r?"open":"closed","data-type":i,"data-placement":a,"data-align":c,"data-side":s,"data-mounted":At(e.context.mounted),"data-paused":At(o),"data-first":At(e.context.frontmost),"data-sibling":At(!e.context.frontmost),"data-stack":At(e.context.stacked),"data-overlap":At(!e.context.stacked),role:"status","aria-atomic":"true","aria-describedby":e.context.description?ht.getDescriptionId(e.context):void 0,"aria-labelledby":e.context.title?ht.getTitleId(e.context):void 0,tabIndex:0,style:D1(e.context,r),onKeyDown(l){l.defaultPrevented||l.key=="Escape"&&(t("DISMISS"),l.preventDefault())}})},getGhostBeforeProps(){return n.element({"data-ghost":"before",style:B1(e.context,r)})},getGhostAfterProps(){return n.element({"data-ghost":"after",style:U1()})},getTitleProps(){return n.element({...Lo.title.attrs,id:ht.getTitleId(e.context)})},getDescriptionProps(){return n.element({...Lo.description.attrs,id:ht.getDescriptionId(e.context)})},getActionTriggerProps(){return n.button({...Lo.actionTrigger.attrs,type:"button",onClick(l){l.defaultPrevented||(e.context.action?.onClick?.(),t("DISMISS"))}})},getCloseTriggerProps(){return n.button({id:ht.getCloseTriggerId(e.context),...Lo.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(l){l.defaultPrevented||t("DISMISS")}})}}}var As={connect:F1,machine:V1};var Xc=e=>{let t=As.machine({id:"1",...e});return{...As.connect(t,t.send,$t),machine:t}},[W1,Nr]=Ze({hookName:"useToastContext",providerName:"<ToastProvider />"}),bh=e=>{let t=Nr(),n=ne(()=>t().getActionTriggerProps(),e);return m(me.button,n)},yh=e=>{let t=Nr(),n=ne(()=>t().getCloseTriggerProps(),e);return m(me.button,n)},vh=e=>e.children(Nr()),xh=e=>{let t=Nr(),n=ne(()=>t().getDescriptionProps(),e);return m(me.div,n)},z1=w("<div><div></div><div>"),Sh=e=>{let t=Nr(),n=ne(()=>t().getRootProps(),e);return(()=>{var r=z1(),o=r.firstChild,a=o.nextSibling;return Ce(r,n,!1,!0),Ce(o,Te(()=>t().getGhostBeforeProps()),!1,!1),v(r,()=>e.children,a),Ce(a,Te(()=>t().getGhostAfterProps()),!1,!1),r})()},wh=e=>{let t=Nr(),n=ne(()=>t().getTitleProps(),e);return m(me.div,n)},Qc=e=>{let[t,n]=Ke(e,["toaster","children"]),[r,o]=mn(t.toaster.machine),a=r.context.placement,i=F(()=>As.connect(r,o,$t)),s=F(()=>i().getToastsByPlacement(a)),c=ne(i().getGroupProps({placement:a}),n);return m(me.div,Te(c,{get children(){return m(ye,{get each(){return s()},children:l=>m(Z1,{value:l,children:u=>t.children(u)})})}}))},Z1=e=>{let[t,n]=Vm(e.value),r=F(()=>hh(t,n,$t)),o=F(()=>t.context);return m(W1,{value:r,get children(){return e.children(o)}})},Or={};or(Or,{ActionTrigger:()=>bh,CloseTrigger:()=>yh,Context:()=>vh,Description:()=>xh,Root:()=>Sh,Title:()=>wh});var $a=(e,t)=>({x:e,y:t});function Y1(e){let{x:t,y:n,width:r,height:o}=e,a=t+r/2,i=n+o/2;return{x:t,y:n,width:r,height:o,minX:t,minY:n,maxX:t+r,maxY:n+o,midX:a,midY:i,center:$a(a,i)}}function q1(e){let t=$a(e.minX,e.minY),n=$a(e.maxX,e.minY),r=$a(e.maxX,e.maxY),o=$a(e.minX,e.maxY);return{top:t,right:n,bottom:r,left:o}}var{min:Z2,max:Y2}=Math;function Th(e,t){let n=Y1(e),{top:r,right:o,left:a,bottom:i}=q1(n),[s]=t.split("-");return{top:[a,r,o,i],right:[r,o,i,a],bottom:[r,a,i,o],left:[o,r,a,i]}[s]}function Ch(e,t){let{x:n,y:r}=t,o=!1;for(let a=0,i=e.length-1;a<e.length;i=a++){let s=e[a].x,c=e[a].y,l=e[i].x,u=e[i].y;c>r!=u>r&&n<(l-s)*(r-c)/(u-c)+s&&(o=!o)}return o}var{sign:q2,abs:J2,min:X2}=Math;var kh=Xt("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),St=kh.build(),X=rr({getTriggerId:e=>e.ids?.trigger??`menu:${e.id}:trigger`,getContextTriggerId:e=>e.ids?.contextTrigger??`menu:${e.id}:ctx-trigger`,getContentId:e=>e.ids?.content??`menu:${e.id}:content`,getArrowId:e=>e.ids?.arrow??`menu:${e.id}:arrow`,getPositionerId:e=>e.ids?.positioner??`menu:${e.id}:popper`,getGroupId:(e,t)=>e.ids?.group?.(t)??`menu:${e.id}:group:${t}`,getGroupLabelId:(e,t)=>e.ids?.groupLabel?.(t)??`menu:${e.id}:group-label:${t}`,getContentEl:e=>X.getById(e,X.getContentId(e)),getPositionerEl:e=>X.getById(e,X.getPositionerId(e)),getTriggerEl:e=>X.getById(e,X.getTriggerId(e)),getHighlightedItemEl:e=>e.highlightedValue?X.getById(e,e.highlightedValue):null,getArrowEl:e=>X.getById(e,X.getArrowId(e)),getElements:e=>{let n=`[role^="menuitem"][data-ownedby=${CSS.escape(X.getContentId(e))}]:not([data-disabled])`;return ps(X.getContentEl(e),n)},getFirstEl:e=>Cm(X.getElements(e)),getLastEl:e=>Em(X.getElements(e)),getNextEl:(e,t)=>ng(X.getElements(e),e.highlightedValue,t??e.loopFocus),getPrevEl:(e,t)=>rg(X.getElements(e),e.highlightedValue,t??e.loopFocus),getElemByKey:(e,t)=>$c(X.getElements(e),{state:e.typeaheadState,key:t,activeId:e.highlightedValue}),isTargetDisabled:e=>ct(e)&&(e.dataset.disabled===""||e.hasAttribute("disabled")),isTriggerItem:e=>!!e?.getAttribute("role")?.startsWith("menuitem")&&!!e?.hasAttribute("aria-controls"),getOptionFromItemEl(e){return{id:e.id,name:e.dataset.name,value:e.dataset.value,valueText:e.dataset.valueText,type:e.dataset.type}}});function Ah(e,t,n){let r=e.context.isSubmenu,o=e.context.isTypingAhead,a=e.context.composite,i=e.hasTag("open"),s=eh({...e.context.positioning,placement:e.context.anchorPoint?"bottom":e.context.currentPlacement});function c(d){return{disabled:!!d.disabled,highlighted:e.context.highlightedValue===d.value}}function l(d){let p=d.valueText??d.value;return{...d,id:d.value,valueText:p}}function u(d){return{...c(l(d)),checked:!!d.checked}}function f(d){let{value:p,closeOnSelect:h,valueText:g}=d,x=c(d);return n.element({...St.item.attrs,id:p,role:"menuitem","aria-disabled":x.disabled,"data-disabled":At(x.disabled),"data-ownedby":X.getContentId(e.context),"data-highlighted":At(x.highlighted),"data-valuetext":g,onDragStart(b){b.currentTarget.matches("a[href]")&&b.preventDefault()},onPointerMove(b){if(x.disabled||b.pointerType!=="mouse")return;let E=b.currentTarget;x.highlighted||t({type:"ITEM_POINTERMOVE",id:p,target:E,closeOnSelect:h})},onPointerLeave(b){if(x.disabled||b.pointerType!=="mouse"||!e.previousEvent.type.includes("POINTER"))return;let S=b.currentTarget;t({type:"ITEM_POINTERLEAVE",id:p,target:S,closeOnSelect:h})},onPointerDown(b){if(x.disabled)return;let E=b.currentTarget;t({type:"ITEM_POINTERDOWN",target:E,id:p,closeOnSelect:h})},onClick(b){if(Bc(b)||Dc(b)||x.disabled)return;let E=b.currentTarget;t({type:"ITEM_CLICK",target:E,id:p,closeOnSelect:h})}})}return{highlightedValue:e.context.highlightedValue,open:i,setOpen(d){d!==i&&t(d?"OPEN":"CLOSE")},setHighlightedValue(d){t({type:"HIGHLIGHTED.SET",id:d})},setParent(d){t({type:"PARENT.SET",value:d,id:d.state.context.id})},setChild(d){t({type:"CHILD.SET",value:d,id:d.state.context.id})},reposition(d={}){t({type:"POSITIONING.SET",options:d})},getContextTriggerProps(){return n.element({...St.contextTrigger.attrs,dir:e.context.dir,id:X.getContextTriggerId(e.context),onPointerDown(d){if(d.pointerType==="mouse")return;let p=Cs(d);t({type:"CONTEXT_MENU_START",point:p})},onPointerCancel(d){d.pointerType!=="mouse"&&t("CONTEXT_MENU_CANCEL")},onPointerMove(d){d.pointerType!=="mouse"&&t("CONTEXT_MENU_CANCEL")},onPointerUp(d){d.pointerType!=="mouse"&&t("CONTEXT_MENU_CANCEL")},onContextMenu(d){let p=Cs(d);t({type:"CONTEXT_MENU",point:p}),d.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}})},getTriggerItemProps(d){return cs(f({value:d.getTriggerProps().id}),d.getTriggerProps())},getTriggerProps(){return n.button({...r?St.triggerItem.attrs:St.trigger.attrs,"data-placement":e.context.currentPlacement,type:"button",dir:e.context.dir,id:X.getTriggerId(e.context),"data-uid":e.context.id,"aria-haspopup":a?"menu":"dialog","aria-controls":X.getContentId(e.context),"aria-expanded":i||void 0,"data-state":i?"open":"closed",onPointerMove(d){d.pointerType!=="mouse"||X.isTargetDisabled(d.currentTarget)||!r||t({type:"TRIGGER_POINTERMOVE",target:d.currentTarget})},onPointerLeave(d){if(X.isTargetDisabled(d.currentTarget)||d.pointerType!=="mouse"||!r)return;let p=Cs(d);t({type:"TRIGGER_POINTERLEAVE",target:d.currentTarget,point:p})},onPointerDown(d){X.isTargetDisabled(d.currentTarget)||Ts(d)||d.preventDefault()},onClick(d){d.defaultPrevented||X.isTargetDisabled(d.currentTarget)||t({type:"TRIGGER_CLICK",target:d.currentTarget})},onBlur(){t("TRIGGER_BLUR")},onFocus(){t("TRIGGER_FOCUS")},onKeyDown(d){if(d.defaultPrevented)return;let p={ArrowDown(){t("ARROW_DOWN")},ArrowUp(){t("ARROW_UP")},Enter(){t({type:"ARROW_DOWN",src:"enter"})},Space(){t({type:"ARROW_DOWN",src:"space"})}},h=qc(d,e.context),g=p[h];g&&(d.preventDefault(),g(d))}})},getIndicatorProps(){return n.element({...St.indicator.attrs,dir:e.context.dir,"data-state":i?"open":"closed"})},getPositionerProps(){return n.element({...St.positioner.attrs,dir:e.context.dir,id:X.getPositionerId(e.context),style:s.floating})},getArrowProps(){return n.element({id:X.getArrowId(e.context),...St.arrow.attrs,dir:e.context.dir,style:s.arrow})},getArrowTipProps(){return n.element({...St.arrowTip.attrs,dir:e.context.dir,style:s.arrowTip})},getContentProps(){return n.element({...St.content.attrs,id:X.getContentId(e.context),"aria-label":e.context["aria-label"],hidden:!i,"data-state":i?"open":"closed",role:a?"menu":"dialog",tabIndex:0,dir:e.context.dir,"aria-activedescendant":e.context.highlightedValue??void 0,"aria-labelledby":X.getTriggerId(e.context),"data-placement":e.context.currentPlacement,onPointerEnter(d){d.pointerType==="mouse"&&t("MENU_POINTERENTER")},onKeyDown(d){if(d.defaultPrevented||!tg(d))return;let p=hn(d);if(!(p?.closest("[role=menu]")===d.currentTarget||p===d.currentTarget))return;if(d.key==="Tab"&&!sg(d)){d.preventDefault();return}let g=X.getHighlightedItemEl(e.context),x={ArrowDown(){t("ARROW_DOWN")},ArrowUp(){t("ARROW_UP")},ArrowLeft(){t("ARROW_LEFT")},ArrowRight(){t("ARROW_RIGHT")},Enter(){t("ENTER"),oh(g)},Space(S){o?t({type:"TYPEAHEAD",key:S.key}):x.Enter?.(S)},Home(){t("HOME")},End(){t("END")}},b=qc(d,{dir:e.context.dir}),E=x[b];if(E){E(d),d.stopPropagation(),d.preventDefault();return}e.context.typeahead&&nh(d)&&(rh(d)||Hc(p)||(t({type:"TYPEAHEAD",key:d.key}),d.preventDefault()))}})},getSeparatorProps(){return n.element({...St.separator.attrs,role:"separator",dir:e.context.dir,"aria-orientation":"horizontal"})},getItemState:c,getItemProps:f,getOptionItemState:u,getOptionItemProps(d){let{type:p,disabled:h,onCheckedChange:g,closeOnSelect:x}=d,b=l(d),E=u(d);return{...f(b),...n.element({"data-type":p,...St.item.attrs,dir:e.context.dir,"data-value":b.value,role:`menuitem${p}`,"aria-checked":!!E.checked,"data-state":E.checked?"checked":"unchecked",onClick(S){if(h||Bc(S)||Dc(S))return;let k=S.currentTarget;t({type:"ITEM_CLICK",target:k,option:b,closeOnSelect:x}),g?.(!E.checked)}})}},getItemIndicatorProps(d){let p=u(d);return n.element({...St.itemIndicator.attrs,dir:e.context.dir,"data-disabled":At(p.disabled),"data-highlighted":At(p.highlighted),"data-state":p.checked?"checked":"unchecked",hidden:!p.checked})},getItemTextProps(d){let p=u(d);return n.element({...St.itemText.attrs,dir:e.context.dir,"data-disabled":At(p.disabled),"data-highlighted":At(p.highlighted),"data-state":p.checked?"checked":"unchecked"})},getItemGroupLabelProps(d){return n.element({id:X.getGroupLabelId(e.context,d.htmlFor),dir:e.context.dir,...St.itemGroupLabel.attrs})},getItemGroupProps(d){return n.element({id:X.getGroupId(e.context,d.id),...St.itemGroup.attrs,dir:e.context.dir,"aria-labelledby":X.getGroupLabelId(e.context,d.id),role:"group"})}}}var{not:Vt,and:Do,or:J1}=ls;function Ph(e){let t=gt(e);return qt({id:"menu",initial:t.open?"open":"idle",context:{highlightedValue:null,loopFocus:!1,anchorPoint:null,closeOnSelect:!0,typeahead:!0,composite:!0,...t,positioning:{placement:"bottom-start",gutter:8,...t.positioning},intentPolygon:null,parent:null,lastHighlightedValue:null,children:Ut(Rt({})),suspendPointer:!1,restoreFocus:!0,typeaheadState:$c.defaultOptions},computed:{isSubmenu:n=>n.parent!==null,isRtl:n=>n.dir==="rtl",isTypingAhead:n=>n.typeaheadState.keysSoFar!==""},watch:{isSubmenu:"setSubmenuPlacement",anchorPoint:"reposition",open:"toggleVisibility"},on:{"PARENT.SET":{actions:"setParentMenu"},"CHILD.SET":{actions:"setChildMenu"},OPEN:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{internal:!0,target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}],"HIGHLIGHTED.RESTORE":{actions:"restoreHighlightedItem"},"HIGHLIGHTED.SET":{actions:"setHighlightedItem"}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":"closed",CONTEXT_MENU_START:{target:"opening:contextmenu",actions:"setAnchorPoint"},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}],TRIGGER_FOCUS:{guard:Vt("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],after:{LONG_PRESS_DELAY:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}]},on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":"closed",CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}]}},opening:{tags:["closed"],after:{SUBMENU_OPEN_DELAY:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}]},on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":"closed",BLUR:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}]}},closing:{tags:["open"],activities:["trackPointerMove","trackInteractOutside"],after:{SUBMENU_CLOSE_DELAY:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHiglightedItem","invokeOnClose"]}]},on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHiglightedItem"]},MENU_POINTERENTER:{target:"open",actions:"clearIntentPolygon"},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:["focusParentMenu","restoreParentHiglightedItem"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","resumePointer"],on:{"CONTROLLED.OPEN":[{guard:J1("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:"highlightFirstItem"},{guard:"isArrowUpEvent",target:"open",actions:"highlightLastItem"},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:"setAnchorPoint"},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:"idle",ARROW_DOWN:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],activities:["trackInteractOutside","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:Do(Vt("isTriggerItem"),"isOpenControlled"),actions:"invokeOnClose"},{guard:Vt("isTriggerItem"),target:"closed",actions:"invokeOnClose"}],ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:Do("isSubmenu","isOpenControlled"),actions:"invokeOnClose"},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:"openSubmenu"},ENTER:[{guard:"isTriggerItemHighlighted",actions:"openSubmenu"},{actions:"clickHighlightedItem"}],ITEM_POINTERMOVE:[{guard:Vt("suspendPointer"),actions:["setHighlightedItem","focusMenu"]},{actions:"setLastHighlightedItem"}],ITEM_POINTERLEAVE:{guard:Do(Vt("suspendPointer"),Vt("isTriggerItem")),actions:"clearHighlightedItem"},ITEM_CLICK:[{guard:Do(Vt("isTriggerItemHighlighted"),Vt("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:Do(Vt("isTriggerItemHighlighted"),Vt("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:Do(Vt("isTriggerItemHighlighted"),Vt("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:"setHighlightedItem"}],TRIGGER_POINTERLEAVE:{target:"closing",actions:"setIntentPolygon"},ITEM_POINTERDOWN:{actions:"setHighlightedItem"},TYPEAHEAD:{actions:"highlightMatchedItem"},FOCUS_MENU:{actions:"focusMenu"},"POSITIONING.SET":{actions:"reposition"}}}}},{delays:{LONG_PRESS_DELAY:700,SUBMENU_OPEN_DELAY:100,SUBMENU_CLOSE_DELAY:100},guards:{closeOnSelect:(n,r)=>!!(r?.closeOnSelect??n.closeOnSelect),isTriggerItem:(n,r)=>X.isTriggerItem(r.target),isTriggerItemHighlighted:(n,r)=>!!(r.target??X.getHighlightedItemEl(n))?.hasAttribute("aria-controls"),isSubmenu:n=>n.isSubmenu,suspendPointer:n=>n.suspendPointer,isHighlightedItemEditable:n=>Hc(X.getHighlightedItemEl(n)),isWithinPolygon:(n,r)=>n.intentPolygon?Ch(n.intentPolygon,r.point):!1,isOpenControlled:n=>!!n["open.controlled"],isArrowLeftEvent:(n,r)=>r.previousEvent?.type==="ARROW_LEFT",isArrowUpEvent:(n,r)=>r.previousEvent?.type==="ARROW_UP",isArrowDownEvent:(n,r)=>r.previousEvent?.type==="ARROW_DOWN",isOpenAutoFocusEvent:(n,r)=>r.previousEvent?.type==="OPEN_AUTOFOCUS"},activities:{trackPositioning(n){if(n.anchorPoint)return;n.currentPlacement=n.positioning.placement;let r=()=>X.getPositionerEl(n);return Zc(X.getTriggerEl(n),r,{...n.positioning,defer:!0,onComplete(o){n.currentPlacement=o.placement}})},trackInteractOutside(n,r,{send:o}){return Es(()=>X.getContentEl(n),{defer:!0,exclude:[X.getTriggerEl(n)],onInteractOutside:n.onInteractOutside,onFocusOutside:n.onFocusOutside,onEscapeKeyDown(i){n.onEscapeKeyDown?.(i),n.isSubmenu&&i.preventDefault(),Eh(n)},onPointerDownOutside(i){n.restoreFocus=!i.detail.focusable,n.onPointerDownOutside?.(i)},onDismiss(){o({type:"CLOSE",src:"interact-outside"})}})},trackPointerMove(n,r,{guards:o,send:a}){let{isWithinPolygon:i}=o;n.parent.state.context.suspendPointer=!0;let s=X.getDoc(n);return tn(s,"pointermove",c=>{let l={x:c.clientX,y:c.clientY};i(n,{point:l})||(a("POINTER_MOVED_AWAY_FROM_SUBMENU"),n.parent.state.context.suspendPointer=!1)})},scrollToHighlightedItem(n,r,{getState:o}){let a=()=>{if(o().event.type.startsWith("ITEM_POINTER"))return;let c=X.getHighlightedItemEl(n),l=X.getContentEl(n);dg(c,{rootEl:l,block:"nearest"})};return Ye(()=>a()),ug(()=>X.getContentEl(n),{defer:!0,attributes:["aria-activedescendant"],callback:a})}},actions:{setAnchorPoint(n,r){n.anchorPoint=r.point},setSubmenuPlacement(n){n.isSubmenu&&(n.positioning.placement=n.isRtl?"left-start":"right-start",n.positioning.gutter=0)},reposition(n,r){let o=()=>X.getPositionerEl(n),a=n.anchorPoint?()=>({width:0,height:0,...n.anchorPoint}):void 0;Zc(X.getTriggerEl(n),o,{...n.positioning,defer:!0,getAnchorRect:a,...r.options??{},listeners:!1,onComplete(i){n.currentPlacement=i.placement}})},setOptionState(n,r){if(!r.option)return;let{checked:o,onCheckedChange:a,type:i}=r.option;i==="radio"?a?.(!0):i==="checkbox"&&a?.(!o)},clickHighlightedItem(n,r){let o=X.getHighlightedItemEl(n);!o||o.dataset.disabled||queueMicrotask(()=>o.click())},setIntentPolygon(n,r){let o=X.getContentEl(n),a=n.currentPlacement;if(!o||!a)return;let i=o.getBoundingClientRect(),s=Th(i,a);if(!s)return;let l=Xg(a)==="right"?-5:5;n.intentPolygon=[{...r.point,x:r.point.x+l},...s]},clearIntentPolygon(n){n.intentPolygon=null},resumePointer(n){n.parent&&(n.parent.state.context.suspendPointer=!1)},setHighlightedItem(n,r){ar.highlighted(n,r.id)},clearHighlightedItem(n){ar.highlighted(n,null)},focusMenu(n){Ye(()=>{let r=X.getContentEl(n);ig({root:r,enabled:!Gt(r,X.getActiveElement(n)),filter(a){return!a.role?.startsWith("menuitem")}})?.focus({preventScroll:!0})})},highlightFirstItem(n){(X.getContentEl(n)?queueMicrotask:Ye)(()=>{let o=X.getFirstEl(n);o&&ar.highlighted(n,o.id)})},highlightLastItem(n){(X.getContentEl(n)?queueMicrotask:Ye)(()=>{let o=X.getLastEl(n);o&&ar.highlighted(n,o.id)})},highlightNextItem(n,r){let o=X.getNextEl(n,r.loop);ar.highlighted(n,o?.id??null)},highlightPrevItem(n,r){let o=X.getPrevEl(n,r.loop);ar.highlighted(n,o?.id??null)},invokeOnSelect(n){n.highlightedValue&&n.onSelect?.({value:n.highlightedValue})},focusTrigger(n){n.isSubmenu||n.anchorPoint||!n.restoreFocus||queueMicrotask(()=>X.getTriggerEl(n)?.focus({preventScroll:!0}))},highlightMatchedItem(n,r){let o=X.getElemByKey(n,r.key);o&&ar.highlighted(n,o.id)},setParentMenu(n,r){n.parent=Rt(r.value)},setChildMenu(n,r){n.children[r.id]=Rt(r.value)},closeRootMenu(n){Eh(n)},openSubmenu(n){let o=X.getHighlightedItemEl(n)?.getAttribute("data-uid");(o?n.children[o]:null)?.send("OPEN_AUTOFOCUS")},focusParentMenu(n){n.parent?.send("FOCUS_MENU")},setLastHighlightedItem(n,r){n.lastHighlightedValue=r.id},restoreHighlightedItem(n){n.lastHighlightedValue&&(ar.highlighted(n,n.lastHighlightedValue),n.lastHighlightedValue=null)},restoreParentHiglightedItem(n){n.parent?.send("HIGHLIGHTED.RESTORE")},invokeOnOpen(n){n.onOpenChange?.({open:!0})},invokeOnClose(n){n.onOpenChange?.({open:!1})},toggleVisibility(n,r,{send:o}){o({type:n.open?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:r})}}})}function Eh(e){let t=e.parent;for(;t&&t.state.context.isSubmenu;)t=t.state.context.parent;t?.send("CLOSE")}var ar={highlighted(e,t){is(e.highlightedValue,t)||(e.highlightedValue=t,e.onHighlightChange?.({highlightedValue:t}))}},X1=Ft()(["anchorPoint","aria-label","closeOnSelect","dir","getRootNode","highlightedValue","id","ids","loopFocus","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onEscapeKeyDown","onSelect","onHighlightChange","open","open.controlled","positioning","typeahead","composite"]),cL=pn(X1),Q1=Ft()(["closeOnSelect","disabled","value","valueText"]),uL=pn(Q1),ek=Ft()(["htmlFor"]),dL=pn(ek),tk=Ft()(["id"]),fL=pn(tk),nk=Ft()(["disabled","valueText","closeOnSelect","type","value","checked","onCheckedChange"]),pL=pn(nk);var[Ih,Xe]=Ze({hookName:"useMenuContext",providerName:"<MenuProvider />",strict:!1}),_h=e=>{let t=Xe(),n=ne(()=>t().getArrowProps(),e);return m(me.div,n)},Mh=e=>{let t=Xe(),n=ne(()=>t().getArrowTipProps(),e);return m(me.div,n)},[eu,Rh]=Ze({hookName:"useMenuItemContext",providerName:"<MenuItemProvider />"}),[Nh,Oh]=Ze({hookName:"useMenuOptionItemPropsContext",providerName:"<MenuOptionItemPropsProvider />"}),Lh=e=>{let[t,n]=lt()(e,["checked","closeOnSelect","disabled","onCheckedChange","value","valueText"]),r=ne(t,{type:"checkbox"}),o=Xe(),a=ne(()=>o().getOptionItemProps(r),n),i=F(()=>o().getItemState(r));return m(Nh,{value:r,get children(){return m(eu,{value:i,get children(){return m(me.div,a)}})}})},Dh=e=>{let t=Xe(),n=nr(),r=ne(()=>t().getContentProps(),()=>n().presenceProps,e);return m(B,{get when(){return!n().unmounted},get children(){return m(me.div,r)}})},Bh=e=>e.children(Xe()),Uh=e=>{let t=Xe(),n=ne(()=>t().getContextTriggerProps(),e);return m(me.button,n)},Fh=e=>{let t=Xe(),n=ne(()=>t().getIndicatorProps(),e);return m(me.div,n)},$h=e=>{let[t,n]=lt()(e,["closeOnSelect","disabled","value","valueText"]),r=Xe(),o=ne(()=>r().getItemProps(t),n),a=F(()=>r().getItemState(t));return m(eu,{value:a,get children(){return m(me.div,o)}})},Gh=e=>e.children(Rh()),[Hh,Kh]=Ze({hookName:"useMenuItemGroupContext",providerName:"<MenuItemGroupProvider />"}),Vh=e=>{let[t,n]=lt()(e,["id"]),r=ne({id:ln()},t),o=Xe(),a=ne(()=>o().getItemGroupProps(r),n);return m(Hh,{value:r,get children(){return m(me.div,a)}})},jh=e=>{let t=Xe(),n=Kh(),r=ne(t().getItemGroupLabelProps({htmlFor:n.id}),e);return m(me.div,r)},Wh=e=>{let t=Xe(),n=Oh(),r=ne(()=>t().getItemIndicatorProps(n),e);return m(me.div,r)},zh=e=>{let t=Xe(),n=Oh(),r=ne(()=>t().getItemTextProps(n),e);return m(me.div,r)},Zh=e=>{let t=Xe(),n=nr(),r=ne(()=>t().getPositionerProps(),e);return m(B,{get when(){return!n().unmounted},get children(){return m(me.div,r)}})},Yh=e=>{let[t,n]=lt()(e,["closeOnSelect","disabled","value","valueText"]),r=Xe(),o=Kh(),a=ne(t,()=>({type:"radio",checked:o.value===t.value,onCheckedChange:()=>o.onValueChange?.({value:t.value})})),i=ne(()=>r().getOptionItemProps(a),n),s=F(()=>r().getOptionItemState(a));return m(Nh,{value:a,get children(){return m(eu,{value:s,get children(){return m(me.div,i)}})}})},qh=e=>{let[t,n]=lt()(e,["id","onValueChange","value"]),r=Xe(),o=ne({id:ln()},t),a=ne(()=>r().getItemGroupProps(o),n);return m(Hh,{value:o,get children(){return m(me.div,a)}})},Jh=e=>{let t=Io(),n=kr(),r=ln(),o=F(()=>({id:r,dir:t().dir,getRootNode:n().getRootNode,open:e.defaultOpen,"open.controlled":e.open!==void 0,...e})),[a,i,s]=mn(Ph(o()),{context:o});return{api:F(()=>Ah(a,i,$t)),machine:s}},[Xh,Qh]=Ze({hookName:"useMenuMachineContext",providerName:"<MenuMachineProvider />",strict:!1}),[eb,ok]=Ze({hookName:"useMenuMachineContext",providerName:"<MenuMachineProvider />",strict:!1}),tb=e=>{let[t,n]=Ao(e),[r,o]=lt()(n,["anchorPoint","aria-label","closeOnSelect","composite","defaultOpen","highlightedValue","id","ids","loopFocus","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","open","positioning","typeahead"]),a=Xe(),i=Qh(),s=Jh(r),c=Er(ne(t,()=>({present:s.api().open})));return be(()=>{i&&(a?.().setChild(s.machine),s.api().setParent(i))}),m(eb,{value:()=>a?.().getTriggerItemProps(s.api()),get children(){return m(Xh,{get value(){return s.machine},get children(){return m(Ih,{get value(){return s.api},get children(){return m(Po,{value:c,get children(){return o.children}})}})}})}})},nb=e=>{let t=Xe(),n=Qh(),[r,o]=Ao(e),a=Er(ne(r,()=>({present:o.value.api().open})));return be(()=>{n&&(t?.().setChild(o.value.machine),o.value.api().setParent(n))}),m(eb,{value:()=>t?.().getTriggerItemProps(o.value.api()),get children(){return m(Xh,{get value(){return o.value.machine},get children(){return m(Ih,{get value(){return o.value.api},get children(){return m(Po,{value:a,get children(){return o.children}})}})}})}})},rb=e=>{let t=Xe(),n=ne(()=>t().getSeparatorProps(),e);return m(me.hr,n)},ob=e=>{let t=Xe(),n=nr(),r=ne(()=>t().getTriggerProps(),()=>({"aria-controls":n().unmounted&&null}),e);return m(me.button,r)},ab=e=>{let t=ok(),n=ne(()=>t?.(),e);return m(me.div,n)},Bn={};or(Bn,{Arrow:()=>_h,ArrowTip:()=>Mh,CheckboxItem:()=>Lh,Content:()=>Dh,Context:()=>Bh,ContextTrigger:()=>Uh,Indicator:()=>Fh,Item:()=>$h,ItemContext:()=>Gh,ItemGroup:()=>Vh,ItemGroupLabel:()=>jh,ItemIndicator:()=>Wh,ItemText:()=>zh,Positioner:()=>Zh,RadioItem:()=>Yh,RadioItemGroup:()=>qh,Root:()=>tb,RootProvider:()=>nb,Separator:()=>rb,Trigger:()=>ob,TriggerItem:()=>ab});var ib=Xt("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange"),Un=ib.build(),Ps=rr({getRootId:e=>e.ids?.root??`progress-${e.id}`,getTrackId:e=>e.ids?.track??`progress-${e.id}-track`,getLabelId:e=>e.ids?.label??`progress-${e.id}-label`,getCircleId:e=>e.ids?.circle??`progress-${e.id}-circle`});function sb(e,t,n){let r=e.context.percent,o=e.context.isIndeterminate?"":`${r}%`,a=e.context.max,i=e.context.min,s=e.context.orientation,c=e.context.translations,l=e.context.isIndeterminate,u=e.context.value,f=c.value({value:u,max:a,percent:r,min:i}),d=ak(u,a),p={role:"progressbar","aria-label":f,"data-max":a,"aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":u??void 0,"data-orientation":s,"data-state":d},h=ik(e.context);return{value:u,valueAsString:f,min:i,max:a,percent:r,percentAsString:o,indeterminate:l,setValue(g){t({type:"VALUE.SET",value:g})},setToMax(){t({type:"VALUE.SET",value:a})},setToMin(){t({type:"VALUE.SET",value:i})},getRootProps(){return n.element({dir:e.context.dir,...Un.root.attrs,id:Ps.getRootId(e.context),"data-max":a,"data-value":u??void 0,"data-state":d,"data-orientation":s,style:{"--percent":l?void 0:r}})},getLabelProps(){return n.element({dir:e.context.dir,id:Ps.getLabelId(e.context),...Un.label.attrs,"data-orientation":s})},getValueTextProps(){return n.element({dir:e.context.dir,"aria-live":"polite",...Un.valueText.attrs})},getTrackProps(){return n.element({dir:e.context.dir,id:Ps.getTrackId(e.context),...Un.track.attrs,...p})},getRangeProps(){return n.element({dir:e.context.dir,...Un.range.attrs,"data-orientation":s,"data-state":d,style:{[e.context.isHorizontal?"width":"height"]:l?void 0:`${r}%`}})},getCircleProps(){return n.element({dir:e.context.dir,id:Ps.getCircleId(e.context),...Un.circle.attrs,...p,...h.root})},getCircleTrackProps(){return n.element({dir:e.context.dir,"data-orientation":s,...Un.circleTrack.attrs,...h.track})},getCircleRangeProps(){return n.element({dir:e.context.dir,...Un.circleRange.attrs,...h.range,"data-state":d})},getViewProps(g){return n.element({dir:e.context.dir,...Un.view.attrs,"data-state":g.state,hidden:g.state!==d})}}}function ak(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ik(e){let t={style:{"--radius":"calc(var(--size) / 2 - var(--thickness) / 2)",cx:"calc(var(--size) / 2)",cy:"calc(var(--size) / 2)",r:"var(--radius)",fill:"transparent",strokeWidth:"var(--thickness)"}};return{root:{style:{width:"var(--size)",height:"var(--size)"}},track:t,range:{opacity:e.value===0?0:void 0,style:{...t.style,"--percent":e.percent,"--circumference":"calc(2 * 3.14159 * var(--radius))","--offset":"calc(var(--circumference) * (100 - var(--percent)) / 100)",strokeDashoffset:"calc(var(--circumference) * ((100 - var(--percent)) / 100))",strokeDasharray:e.isIndeterminate?void 0:"var(--circumference)",transformOrigin:"center",transform:"rotate(-90deg)"}}}}function sk(e,t){return e+(t-e)/2}function lb(e){let t=gt(e);return qt({id:"progress",initial:"idle",context:{max:t.max??100,min:t.min??0,value:sk(t.min??0,t.max??100),orientation:"horizontal",translations:{value:({percent:n})=>n===-1?"loading...":`${n} percent`,...t.translations},...t},created:["validateContext"],computed:{isIndeterminate:n=>n.value===null,percent(n){return Ma(n.value)?Math.round((n.value-n.min)/(n.max-n.min)*100):-1},isAtMax:n=>n.value===n.max,isHorizontal:n=>n.orientation==="horizontal",isRtl:n=>n.dir==="rtl"},states:{idle:{on:{"VALUE.SET":{actions:["setValue"]}}}}},{actions:{setValue:(n,r)=>{n.value=r.value===null?null:Math.max(0,Math.min(r.value,n.max))},validateContext:n=>{if(n.value!=null){if(!tu(n.max))throw new Error(`[progress] The max value passed \`${n.max}\` is not a valid number`);if(!lk(n.value,n.max))throw new Error(`[progress] The value passed \`${n.value}\` exceeds the max value \`${n.max}\``);if(!ck(n.value,n.min))throw new Error(`[progress] The value passed \`${n.value}\` exceeds the min value \`${n.min}\``)}}}})}function tu(e){return Ma(e)&&!isNaN(e)}function lk(e,t){return tu(e)&&e<=t}function ck(e,t){return tu(e)&&e>=t}var uk=Ft()(["dir","getRootNode","id","ids","max","min","orientation","translations","value"]),_L=pn(uk);var[cb,xn]=Ze({hookName:"useProgressContext",providerName:"<ProgressProvider />"}),ub=e=>{let t=xn(),n=ne(()=>t().getCircleProps(),e);return m(me.svg,n)},db=e=>{let t=xn(),n=ne(()=>t().getCircleRangeProps(),e);return m(me.circle,n)},fb=e=>{let t=xn(),n=ne(()=>t().getCircleTrackProps(),e);return m(me.circle,n)},pb=e=>e.children(xn()),mb=e=>{let t=xn(),n=ne(()=>t().getLabelProps(),e);return m(me.label,n)},gb=e=>{let t=xn(),n=ne(()=>t().getRangeProps(),e);return m(me.div,n)},hb=e=>{let t=Io(),n=kr(),r=ln(),o=F(()=>({id:r,dir:t().dir,getRootNode:n().getRootNode,...e})),[a,i]=mn(lb(o()),{context:o});return F(()=>sb(a,i,$t))},bb=e=>{let[t,n]=lt()(e,["id","ids","max","min","orientation","translations","value"]),r=hb(t),o=ne(()=>r().getRootProps(),n);return m(cb,{value:r,get children(){return m(me.div,o)}})},yb=e=>{let[{value:t},n]=lt()(e,["value"]),r=ne(()=>t().getRootProps(),n);return m(cb,{value:t,get children(){return m(me.div,r)}})},vb=e=>{let t=xn(),n=ne(()=>t().getTrackProps(),e);return m(me.div,n)},xb=e=>{let t=xn(),n=ne(()=>t().getValueTextProps(),e);return m(me.span,Te(n,{get children(){return e.children||t().percentAsString}}))},Sb=e=>{let[t,n]=lt()(e,["state"]),r=xn(),o=ne(()=>r().getViewProps(t),n);return m(me.span,o)},Lr={};or(Lr,{Circle:()=>ub,CircleRange:()=>db,CircleTrack:()=>fb,Context:()=>pb,Label:()=>mb,Range:()=>gb,Root:()=>bb,RootProvider:()=>yb,Track:()=>vb,ValueText:()=>xb,View:()=>Sb});var fk=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Bo=new WeakMap,Is=new WeakMap,_s={},nu=0,wb=function(e){return e&&(e.host||wb(e.parentNode))},pk=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=wb(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},mk=function(e,t,n,r){var o=pk(t,Array.isArray(e)?e:[e]);_s[n]||(_s[n]=new WeakMap);var a=_s[n],i=[],s=new Set,c=new Set(o),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};o.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))u(d);else try{var p=d.getAttribute(r),h=p!==null&&p!=="false",g=(Bo.get(d)||0)+1,x=(a.get(d)||0)+1;Bo.set(d,g),a.set(d,x),i.push(d),g===1&&h&&Is.set(d,!0),x===1&&d.setAttribute(n,"true"),h||d.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",d,b)}})};return u(t),s.clear(),nu++,function(){i.forEach(function(f){var d=Bo.get(f)-1,p=a.get(f)-1;Bo.set(f,d),a.set(f,p),d||(Is.has(f)||f.removeAttribute(r),Is.delete(f)),p||f.removeAttribute(n)}),nu--,nu||(Bo=new WeakMap,Bo=new WeakMap,Is=new WeakMap,_s={})}},Tb=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||fk(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),mk(r,o,n,"aria-hidden")):function(){return null}};var gk=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Cb(e,t={}){let{defer:n=!0}=t,r=n?gk:a=>a(),o=[];return o.push(r(()=>{let i=(typeof e=="function"?e():e).filter(Boolean);o.push(Tb(i))})),()=>{o.forEach(a=>a?.())}}var ru="data-scroll-lock";function Eb(e,t){if(!e)return;let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function hk(e,t,n){if(!e)return;let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{r?e.style.setProperty(t,r):e.style.removeProperty(t)}}function bk(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function kb(e){let t=e??document,n=t.defaultView??window,{documentElement:r,body:o}=t;if(o.hasAttribute(ru))return;o.setAttribute(ru,"");let i=n.innerWidth-r.clientWidth,s=()=>hk(r,"--scrollbar-width",`${i}px`),c=bk(r),l=()=>Eb(o,{overflow:"hidden",[c]:`${i}px`}),u=()=>{let{scrollX:d,scrollY:p,visualViewport:h}=n,g=h?.offsetLeft??0,x=h?.offsetTop??0,b=Eb(o,{position:"fixed",overflow:"hidden",top:`${-(p-Math.floor(x))}px`,left:`${-(d-Math.floor(g))}px`,right:"0",[c]:`${i}px`});return()=>{b?.(),n.scrollTo({left:d,top:p,behavior:"instant"})}},f=[s(),eg()?u():l()];return()=>{f.forEach(d=>d?.()),o.removeAttribute(ru)}}var Pb=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ms=Pb.join(","),Ib=typeof Element>"u",Dr=Ib?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Rs=!Ib&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Ns=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=o===""||o==="true",i=a||n&&t&&e(t.parentNode);return i},yk=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},_b=function(t,n,r){if(Ns(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ms));return n&&Dr.call(t,Ms)&&o.unshift(t),o=o.filter(r),o},Mb=function e(t,n,r){for(var o=[],a=Array.from(t);a.length;){var i=a.shift();if(!Ns(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),c=s.length?s:i.children,l=e(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:i,candidates:l})}else{var u=Dr.call(i,Ms);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var f=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),d=!Ns(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(f&&d){var p=e(f===!0?i.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:i,candidates:p})}else a.unshift.apply(a,i.children)}}return o},Rb=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ir=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||yk(t))&&!Rb(t)?0:t.tabIndex},vk=function(t,n){var r=ir(t);return r<0&&n&&!Rb(t)?0:r},xk=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Nb=function(t){return t.tagName==="INPUT"},Sk=function(t){return Nb(t)&&t.type==="hidden"},wk=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Tk=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Ck=function(t){if(!t.name)return!0;var n=t.form||Rs(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=Tk(o,t.form);return!a||a===t},Ek=function(t){return Nb(t)&&t.type==="radio"},kk=function(t){return Ek(t)&&!Ck(t)},Ak=function(t){var n,r=t&&Rs(t),o=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var i,s,c;for(a=!!((i=o)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!a&&o;){var l,u,f;r=Rs(o),o=(l=r)===null||l===void 0?void 0:l.host,a=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return a},Ab=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Pk=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Dr.call(t,"details>summary:first-of-type"),i=a?t.parentElement:t;if(Dr.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,l=Rs(t);if(c&&!c.shadowRoot&&o(c)===!0)return Ab(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(Ak(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ab(t);return!1},Ik=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Dr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Os=function(t,n){return!(n.disabled||Ns(n)||Sk(n)||Pk(n,t)||wk(n)||Ik(n))},ou=function(t,n){return!(kk(n)||ir(n)<0||!Os(t,n))},_k=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Mk=function e(t){var n=[],r=[];return t.forEach(function(o,a){var i=!!o.scopeParent,s=i?o.scopeParent:o,c=vk(s,i),l=i?e(o.candidates):s;c===0?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:a,tabIndex:c,item:o,isScope:i,content:l})}),r.sort(xk).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concat(n)},Ob=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mb([t],n.includeContainer,{filter:ou.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:_k}):r=_b(t,n.includeContainer,ou.bind(null,n)),Mk(r)},Lb=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mb([t],n.includeContainer,{filter:Os.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=_b(t,n.includeContainer,Os.bind(null,n)),r},Br=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Dr.call(t,Ms)===!1?!1:ou(n,t)},Rk=Pb.concat("iframe").join(","),Ls=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Dr.call(t,Rk)===!1?!1:Os(n,t)};function Nk(e,t,n){return(t=Lk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Db(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Bb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Db(Object(n),!0).forEach(function(r){Nk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Db(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ok(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lk(e){var t=Ok(e,"string");return typeof t=="symbol"?t:t+""}var Ub={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},Dk=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},Bk=function(t){return t?.key==="Escape"||t?.key==="Esc"||t?.keyCode===27},Ha=function(t){return t?.key==="Tab"||t?.keyCode===9},Uk=function(t){return Ha(t)&&!t.shiftKey},Fk=function(t){return Ha(t)&&t.shiftKey},Fb=function(t){return setTimeout(t,0)},$b=function(t,n){var r=-1;return t.every(function(o,a){return n(o)?(r=a,!1):!0}),r},Ga=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},Ds=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},$k=[],Gb=function(t,n){var r=n?.document||document,o=n?.trapStack||$k,a=Bb({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Uk,isKeyBackward:Fk},n),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(T,C,R){return T&&T[C]!==void 0?T[C]:a[R||C]},l=function(T,C){var R=typeof C?.composedPath=="function"?C.composedPath():void 0;return i.containerGroups.findIndex(function(O){var re=O.container,ge=O.tabbableNodes;return re.contains(T)||R?.includes(re)||ge.find(function(ve){return ve===T})})},u=function(T){var C=a[T];if(typeof C=="function"){for(var R=arguments.length,O=new Array(R>1?R-1:0),re=1;re<R;re++)O[re-1]=arguments[re];C=C.apply(void 0,O)}if(C===!0&&(C=void 0),!C){if(C===void 0||C===!1)return C;throw new Error("`".concat(T,"` was specified but was not a node, or did not return a node"))}var ge=C;if(typeof C=="string"&&(ge=r.querySelector(C),!ge))throw new Error("`".concat(T,"` as selector refers to no known node"));return ge},f=function(){var T=u("initialFocus");if(T===!1)return!1;if(T===void 0||!Ls(T,a.tabbableOptions))if(l(r.activeElement)>=0)T=r.activeElement;else{var C=i.tabbableGroups[0],R=C&&C.firstTabbableNode;T=R||u("fallbackFocus")}if(!T)throw new Error("Your focus-trap needs to have at least one focusable element");return T},d=function(){if(i.containerGroups=i.containers.map(function(T){var C=Ob(T,a.tabbableOptions),R=Lb(T,a.tabbableOptions),O=C.length>0?C[0]:void 0,re=C.length>0?C[C.length-1]:void 0,ge=R.find(function(We){return Br(We)}),ve=R.slice().reverse().find(function(We){return Br(We)}),Ue=!!C.find(function(We){return ir(We)>0});return{container:T,tabbableNodes:C,focusableNodes:R,posTabIndexesFound:Ue,firstTabbableNode:O,lastTabbableNode:re,firstDomTabbableNode:ge,lastDomTabbableNode:ve,nextTabbableNode:function(wn){var dr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,an=C.indexOf(wn);return an<0?dr?R.slice(R.indexOf(wn)+1).find(function(fr){return Br(fr)}):R.slice(0,R.indexOf(wn)).reverse().find(function(fr){return Br(fr)}):C[an+(dr?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(T){return T.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(T){return T.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function(T){var C=T.activeElement;if(C)return C.shadowRoot&&C.shadowRoot.activeElement!==null?p(C.shadowRoot):C},h=function(T){if(T!==!1&&T!==p(document)){if(!T||!T.focus){h(f());return}T.focus({preventScroll:!!a.preventScroll}),i.mostRecentlyFocusedNode=T,Dk(T)&&T.select()}},g=function(T){var C=u("setReturnFocus",T);return C||(C===!1?!1:T)},x=function(T){var C=T.target,R=T.event,O=T.isBackward,re=O===void 0?!1:O;C=C||Ds(R),d();var ge=null;if(i.tabbableGroups.length>0){var ve=l(C,R),Ue=ve>=0?i.containerGroups[ve]:void 0;if(ve<0)re?ge=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:ge=i.tabbableGroups[0].firstTabbableNode;else if(re){var We=$b(i.tabbableGroups,function(Yo){var qo=Yo.firstTabbableNode;return C===qo});if(We<0&&(Ue.container===C||Ls(C,a.tabbableOptions)&&!Br(C,a.tabbableOptions)&&!Ue.nextTabbableNode(C,!1))&&(We=ve),We>=0){var wn=We===0?i.tabbableGroups.length-1:We-1,dr=i.tabbableGroups[wn];ge=ir(C)>=0?dr.lastTabbableNode:dr.lastDomTabbableNode}else Ha(R)||(ge=Ue.nextTabbableNode(C,!1))}else{var an=$b(i.tabbableGroups,function(Yo){var qo=Yo.lastTabbableNode;return C===qo});if(an<0&&(Ue.container===C||Ls(C,a.tabbableOptions)&&!Br(C,a.tabbableOptions)&&!Ue.nextTabbableNode(C))&&(an=ve),an>=0){var fr=an===i.tabbableGroups.length-1?0:an+1,Zo=i.tabbableGroups[fr];ge=ir(C)>=0?Zo.firstTabbableNode:Zo.firstDomTabbableNode}else Ha(R)||(ge=Ue.nextTabbableNode(C))}}else ge=u("fallbackFocus");return ge},b=function(T){var C=Ds(T);if(!(l(C,T)>=0)){if(Ga(a.clickOutsideDeactivates,T)){s.deactivate({returnFocus:a.returnFocusOnDeactivate});return}Ga(a.allowOutsideClick,T)||T.preventDefault()}},E=function(T){var C=Ds(T),R=l(C,T)>=0;if(R||C instanceof Document)R&&(i.mostRecentlyFocusedNode=C);else{T.stopImmediatePropagation();var O,re=!0;if(i.mostRecentlyFocusedNode)if(ir(i.mostRecentlyFocusedNode)>0){var ge=l(i.mostRecentlyFocusedNode),ve=i.containerGroups[ge].tabbableNodes;if(ve.length>0){var Ue=ve.findIndex(function(We){return We===i.mostRecentlyFocusedNode});Ue>=0&&(a.isKeyForward(i.recentNavEvent)?Ue+1<ve.length&&(O=ve[Ue+1],re=!1):Ue-1>=0&&(O=ve[Ue-1],re=!1))}}else i.containerGroups.some(function(We){return We.tabbableNodes.some(function(wn){return ir(wn)>0})})||(re=!1);else re=!1;re&&(O=x({target:i.mostRecentlyFocusedNode,isBackward:a.isKeyBackward(i.recentNavEvent)})),h(O||i.mostRecentlyFocusedNode||f())}i.recentNavEvent=void 0},S=function(T){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=T;var R=x({event:T,isBackward:C});R&&(Ha(T)&&T.preventDefault(),h(R))},k=function(T){(a.isKeyForward(T)||a.isKeyBackward(T))&&S(T,a.isKeyBackward(T))},I=function(T){Bk(T)&&Ga(a.escapeDeactivates,T)!==!1&&(T.preventDefault(),s.deactivate())},G=function(T){var C=Ds(T);l(C,T)>=0||Ga(a.clickOutsideDeactivates,T)||Ga(a.allowOutsideClick,T)||(T.preventDefault(),T.stopImmediatePropagation())},D=function(){if(i.active)return Ub.activateTrap(o,s),i.delayInitialFocusTimer=a.delayInitialFocus?Fb(function(){h(f())}):h(f()),r.addEventListener("focusin",E,!0),r.addEventListener("mousedown",b,{capture:!0,passive:!1}),r.addEventListener("touchstart",b,{capture:!0,passive:!1}),r.addEventListener("click",G,{capture:!0,passive:!1}),r.addEventListener("keydown",k,{capture:!0,passive:!1}),r.addEventListener("keydown",I),s},ie=function(){if(i.active)return r.removeEventListener("focusin",E,!0),r.removeEventListener("mousedown",b,!0),r.removeEventListener("touchstart",b,!0),r.removeEventListener("click",G,!0),r.removeEventListener("keydown",k,!0),r.removeEventListener("keydown",I),s},V=function(T){var C=T.some(function(R){var O=Array.from(R.removedNodes);return O.some(function(re){return re===i.mostRecentlyFocusedNode})});C&&h(f())},W=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(V):void 0,L=function(){W&&(W.disconnect(),i.active&&!i.paused&&i.containers.map(function(T){W.observe(T,{subtree:!0,childList:!0})}))};return s={get active(){return i.active},get paused(){return i.paused},activate:function(T){if(i.active)return this;var C=c(T,"onActivate"),R=c(T,"onPostActivate"),O=c(T,"checkCanFocusTrap");O||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,C?.();var re=function(){O&&d(),D(),L(),R?.()};return O?(O(i.containers.concat()).then(re,re),this):(re(),this)},deactivate:function(T){if(!i.active)return this;var C=Bb({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},T);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,ie(),i.active=!1,i.paused=!1,L(),Ub.deactivateTrap(o,s);var R=c(C,"onDeactivate"),O=c(C,"onPostDeactivate"),re=c(C,"checkCanReturnFocus"),ge=c(C,"returnFocus","returnFocusOnDeactivate");R?.();var ve=function(){Fb(function(){ge&&h(g(i.nodeFocusedBeforeActivation)),O?.()})};return ge&&re?(re(g(i.nodeFocusedBeforeActivation)).then(ve,ve),this):(ve(),this)},pause:function(T){if(i.paused||!i.active)return this;var C=c(T,"onPause"),R=c(T,"onPostPause");return i.paused=!0,C?.(),ie(),L(),R?.(),this},unpause:function(T){if(!i.paused||!i.active)return this;var C=c(T,"onUnpause"),R=c(T,"onPostUnpause");return i.paused=!1,C?.(),d(),D(),L(),R?.(),this},updateContainerElements:function(T){var C=[].concat(T).filter(Boolean);return i.containers=C.map(function(R){return typeof R=="string"?r.querySelector(R):R}),i.active&&d(),L(),this}},s.updateContainerElements(t),s};var Hb=Xt("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Ur=Hb.build(),Se=rr({getPositionerId:e=>e.ids?.positioner??`dialog:${e.id}:positioner`,getBackdropId:e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,getContentId:e=>e.ids?.content??`dialog:${e.id}:content`,getTriggerId:e=>e.ids?.trigger??`dialog:${e.id}:trigger`,getTitleId:e=>e.ids?.title??`dialog:${e.id}:title`,getDescriptionId:e=>e.ids?.description??`dialog:${e.id}:description`,getCloseTriggerId:e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,getContentEl:e=>Se.getById(e,Se.getContentId(e)),getPositionerEl:e=>Se.getById(e,Se.getPositionerId(e)),getBackdropEl:e=>Se.getById(e,Se.getBackdropId(e)),getTriggerEl:e=>Se.getById(e,Se.getTriggerId(e)),getTitleEl:e=>Se.getById(e,Se.getTitleId(e)),getDescriptionEl:e=>Se.getById(e,Se.getDescriptionId(e)),getCloseTriggerEl:e=>Se.getById(e,Se.getCloseTriggerId(e))});function Kb(e,t,n){let r=e.context["aria-label"],o=e.matches("open"),a=e.context.renderedElements;return{open:o,setOpen(i){i!==o&&t(i?"OPEN":"CLOSE")},getTriggerProps(){return n.button({...Ur.trigger.attrs,dir:e.context.dir,id:Se.getTriggerId(e.context),"aria-haspopup":"dialog",type:"button","aria-expanded":o,"data-state":o?"open":"closed","aria-controls":Se.getContentId(e.context),onClick(i){i.defaultPrevented||t("TOGGLE")}})},getBackdropProps(){return n.element({...Ur.backdrop.attrs,dir:e.context.dir,hidden:!o,id:Se.getBackdropId(e.context),"data-state":o?"open":"closed"})},getPositionerProps(){return n.element({...Ur.positioner.attrs,dir:e.context.dir,id:Se.getPositionerId(e.context),style:{pointerEvents:o?void 0:"none"}})},getContentProps(){return n.element({...Ur.content.attrs,dir:e.context.dir,role:e.context.role,hidden:!o,id:Se.getContentId(e.context),tabIndex:-1,"data-state":o?"open":"closed","aria-modal":!0,"aria-label":r||void 0,"aria-labelledby":r||!a.title?void 0:Se.getTitleId(e.context),"aria-describedby":a.description?Se.getDescriptionId(e.context):void 0})},getTitleProps(){return n.element({...Ur.title.attrs,dir:e.context.dir,id:Se.getTitleId(e.context)})},getDescriptionProps(){return n.element({...Ur.description.attrs,dir:e.context.dir,id:Se.getDescriptionId(e.context)})},getCloseTriggerProps(){return n.button({...Ur.closeTrigger.attrs,dir:e.context.dir,id:Se.getCloseTriggerId(e.context),type:"button",onClick(i){i.defaultPrevented||(i.stopPropagation(),t("CLOSE"))}})}}}function Vb(e){let t=gt(e);return qt({id:"dialog",initial:t.open?"open":"closed",context:{role:"dialog",renderedElements:{title:!0,description:!0},modal:!0,trapFocus:!0,preventScroll:!0,closeOnInteractOutside:!0,closeOnEscape:!0,restoreFocus:!0,...t},created:["setAlertDialogProps"],watch:{open:["toggleVisibility"]},states:{open:{entry:["checkRenderedElements","syncZIndex"],activities:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}}},{guards:{isOpenControlled:n=>!!n["open.controlled"]},activities:{trackDismissableElement(n,r,{send:o}){return Es(()=>Se.getContentEl(n),{defer:!0,pointerBlocking:n.modal,exclude:[Se.getTriggerEl(n)],onInteractOutside(i){n.onInteractOutside?.(i),n.closeOnInteractOutside||i.preventDefault()},persistentElements:n.persistentElements,onFocusOutside:n.onFocusOutside,onPointerDownOutside:n.onPointerDownOutside,onEscapeKeyDown(i){n.onEscapeKeyDown?.(i),n.closeOnEscape||i.preventDefault()},onDismiss(){o({type:"CLOSE",src:"interact-outside"})}})},preventScroll(n){if(n.preventScroll)return kb(Se.getDoc(n))},trapFocus(n){if(!n.trapFocus||!n.modal)return;let r,o=cg(()=>{let a=Se.getContentEl(n);if(a){r=Gb(a,{document:Se.getDoc(n),escapeDeactivates:!1,preventScroll:!0,fallbackFocus:a,returnFocusOnDeactivate:n.restoreFocus,allowOutsideClick:!0,initialFocus:n.initialFocusEl?.()??void 0,setReturnFocus(i){return n.finalFocusEl?.()??i}});try{r.activate()}catch{}}});return()=>{r?.deactivate(),o()}},hideContentBelow(n){return n.modal?Cb(()=>[Se.getContentEl(n)],{defer:!0}):void 0}},actions:{setAlertDialogProps(n){n.role==="alertdialog"&&(n.initialFocusEl||(n.initialFocusEl=()=>Se.getCloseTriggerEl(n)),n.closeOnInteractOutside=!1)},checkRenderedElements(n){Ye(()=>{n.renderedElements.title=!!Se.getTitleEl(n),n.renderedElements.description=!!Se.getDescriptionEl(n)})},syncZIndex(n){Ye(()=>{let r=Se.getContentEl(n);if(!r)return;let a=Se.getWin(n).getComputedStyle(r);[Se.getPositionerEl(n),Se.getBackdropEl(n)].forEach(s=>{s?.style.setProperty("--z-index",a.zIndex)})})},invokeOnClose(n){n.onOpenChange?.({open:!1})},invokeOnOpen(n){n.onOpenChange?.({open:!0})},toggleVisibility(n,r,{send:o}){o({type:n.open?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:r})}}})}var Gk=Ft()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","open.controlled","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),oD=pn(Gk);var[jb,Fn]=Ze({hookName:"useDialogContext",providerName:"<DialogProvider />"}),Wb=e=>{let t=Fn(),n=ym(),r=Er(ne(n,()=>({present:t().open}))),o=ne(()=>t().getBackdropProps(),()=>r().presenceProps,e);return m(B,{get when(){return!r().unmounted},get children(){return m(me.div,o)}})},zb=e=>{let t=Fn(),n=ne(()=>t().getCloseTriggerProps(),e);return m(me.button,n)},Zb=e=>{let t=Fn(),n=nr(),r=ne(()=>t().getContentProps(),()=>n().presenceProps,e);return m(B,{get when(){return!n().unmounted},get children(){return m(me.div,r)}})},Yb=e=>e.children(Fn()),qb=e=>{let t=Fn(),n=ne(()=>t().getDescriptionProps(),e);return m(me.div,n)},Jb=e=>{let t=Fn(),n=nr(),r=ne(()=>t().getPositionerProps(),e);return m(B,{get when(){return!n().unmounted},get children(){return m(me.div,r)}})},Xb=e=>{let t=Io(),n=kr(),r=ln(),o=F(()=>({id:r,dir:t().dir,getRootNode:n().getRootNode,open:e.defaultOpen,"open.controlled":e.open!==void 0,...e})),[a,i]=mn(Vb(o()),{context:o});return F(()=>Kb(a,i,$t))},Qb=e=>{let[t,n]=Ao(e),[r]=Ca(t),[o,a]=lt()(n,["aria-label","closeOnEscape","closeOnInteractOutside","defaultOpen","finalFocusEl","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),i=Xb(o),s=Er(ne(t,()=>({present:i().open})));return m(jb,{value:i,get children(){return m(Cc,{value:r,get children(){return m(Po,{value:s,get children(){return a.children}})}})}})},ey=e=>{let[t,n]=Ao(e),[r]=Ca(t),o=Er(ne(t,()=>({present:n.value().open})));return m(jb,{get value(){return n.value},get children(){return m(Cc,{value:r,get children(){return m(Po,{value:o,get children(){return n.children}})}})}})},ty=e=>{let t=Fn(),n=ne(()=>t().getTitleProps(),e);return m(me.h2,n)},ny=e=>{let t=Fn(),n=nr(),r=ne(()=>t().getTriggerProps(),()=>({"aria-controls":n().unmounted&&null}),e);return m(me.button,r)},sr={};or(sr,{Backdrop:()=>Wb,CloseTrigger:()=>zb,Content:()=>Zb,Context:()=>Yb,Description:()=>qb,Positioner:()=>Jb,Root:()=>Qb,RootProvider:()=>ey,Title:()=>ty,Trigger:()=>ny});var lr=Xc({placement:"bottom-end",gap:24});var ry=`#brand-mark {
|
|
9
|
+
`);if(t===null||ws(t)!=="object")throw new Error(n);if(Object.keys(t).length===1&&typeof t.advancedFraudSignals=="boolean")return t;throw new Error(n)},Ss,Mc=!1,ey=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Mc=!0;var o=Date.now();return hE(Ss).then(function(i){return bE(i,n,o)})};ey.setLoadParameters=function(e){if(Mc&&Ss){var t=Jb(e),n=Object.keys(t),r=n.reduce(function(o,i){var a;return o&&e[i]===((a=Ss)===null||a===void 0?void 0:a[i])},!0);if(r)return}if(Mc)throw new Error("You cannot change load parameters after calling loadStripe");Ss=Jb(e)};Dc.loadStripe=ey});var ry=Ne((C4,ny)=>{"use strict";ny.exports=ty()});var Gi={};Gv(Gi,{__addDisposableResource:()=>zy,__assign:()=>_s,__asyncDelegator:()=>Ny,__asyncGenerator:()=>Ly,__asyncValues:()=>$y,__await:()=>Co,__awaiter:()=>Iy,__classPrivateFieldGet:()=>jy,__classPrivateFieldIn:()=>Hy,__classPrivateFieldSet:()=>Vy,__createBinding:()=>Es,__decorate:()=>Sy,__disposeResources:()=>Gy,__esDecorate:()=>Cy,__exportStar:()=>Oy,__extends:()=>vy,__generator:()=>Ay,__importDefault:()=>Uy,__importStar:()=>Fy,__makeTemplateObject:()=>By,__metadata:()=>Py,__param:()=>Ty,__propKey:()=>ky,__read:()=>Uc,__rest:()=>wy,__rewriteRelativeImportExtension:()=>Wy,__runInitializers:()=>_y,__setFunctionName:()=>Ey,__spread:()=>Ry,__spreadArray:()=>Dy,__spreadArrays:()=>My,__values:()=>ks,default:()=>XE});function vy(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Bc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function wy(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Sy(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function Ty(e,t){return function(n,r){t(n,r,e)}}function Cy(e,t,n,r,o,i){function a(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var s=r.kind,c=s==="getter"?"get":s==="setter"?"set":"value",l=!t&&e?r.static?e:e.prototype:null,u=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f,d=!1,p=n.length-1;p>=0;p--){var h={};for(var g in r)h[g]=g==="access"?{}:r[g];for(var g in r.access)h.access[g]=r.access[g];h.addInitializer=function(y){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(y||null))};var v=(0,n[p])(s==="accessor"?{get:u.get,set:u.set}:u[c],h);if(s==="accessor"){if(v===void 0)continue;if(v===null||typeof v!="object")throw new TypeError("Object expected");(f=a(v.get))&&(u.get=f),(f=a(v.set))&&(u.set=f),(f=a(v.init))&&o.unshift(f)}else(f=a(v))&&(s==="field"?o.unshift(f):u[c]=f)}l&&Object.defineProperty(l,r.name,u),d=!0}function _y(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function ky(e){return typeof e=="symbol"?e:"".concat(e)}function Ey(e,t,n){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function Py(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Iy(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((r=r.apply(e,t||[])).next())})}function Ay(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Oy(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Es(t,e,n)}function ks(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Uc(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Ry(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Uc(arguments[t]));return e}function My(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function Dy(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Co(e){return this instanceof Co?(this.v=e,this):new Co(e)}function Ly(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),o[Symbol.asyncIterator]=function(){return this},o;function a(p){return function(h){return Promise.resolve(h).then(p,f)}}function s(p,h){r[p]&&(o[p]=function(g){return new Promise(function(v,y){i.push([p,g,v,y])>1||c(p,g)})},h&&(o[p]=h(o[p])))}function c(p,h){try{l(r[p](h))}catch(g){d(i[0][3],g)}}function l(p){p.value instanceof Co?Promise.resolve(p.value.v).then(u,f):d(i[0][2],p)}function u(p){c("next",p)}function f(p){c("throw",p)}function d(p,h){p(h),i.shift(),i.length&&c(i[0][0],i[0][1])}}function Ny(e){var t,n;return t={},r("next"),r("throw",function(o){throw o}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(o,i){t[o]=e[o]?function(a){return(n=!n)?{value:Co(e[o](a)),done:!1}:i?i(a):a}:i}}function $y(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof ks=="function"?ks(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=e[i]&&function(a){return new Promise(function(s,c){a=e[i](a),o(s,c,a.done,a.value)})}}function o(i,a,s,c){Promise.resolve(c).then(function(l){i({value:l,done:s})},a)}}function By(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Fy(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=Fc(e),r=0;r<n.length;r++)n[r]!=="default"&&Es(t,e,n[r]);return KE(t,e),t}function Uy(e){return e&&e.__esModule?e:{default:e}}function jy(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function Vy(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n}function Hy(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function zy(e,t,n){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if(typeof r!="function")throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(i){return Promise.reject(i)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}function Gy(e){function t(i){e.error=e.hasError?new YE(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}var n,r=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&r===1)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(a){return t(a),o()})}else r|=1}catch(a){t(a)}if(r===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}function Wy(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,o,i,a){return r?t?".jsx":".js":o&&(!i||!a)?n:o+i+"."+a.toLowerCase()+"js"}):e}var Bc,_s,Es,KE,Fc,YE,XE,Wi=zv(()=>{"use strict";Bc=function(e,t){return Bc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Bc(e,t)};_s=function(){return _s=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},_s.apply(this,arguments)};Es=Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]};KE=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},Fc=function(e){return Fc=Object.getOwnPropertyNames||function(t){var n=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[n.length]=r);return n},Fc(e)};YE=typeof SuppressedError=="function"?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};XE={__extends:vy,__assign:_s,__rest:wy,__decorate:Sy,__param:Ty,__esDecorate:Cy,__runInitializers:_y,__propKey:ky,__setFunctionName:Ey,__metadata:Py,__awaiter:Iy,__generator:Ay,__createBinding:Es,__exportStar:Oy,__values:ks,__read:Uc,__spread:Ry,__spreadArrays:My,__spreadArray:Dy,__await:Co,__asyncGenerator:Ly,__asyncDelegator:Ny,__asyncValues:$y,__makeTemplateObject:By,__importStar:Fy,__importDefault:Uy,__classPrivateFieldGet:jy,__classPrivateFieldSet:Vy,__classPrivateFieldIn:Hy,__addDisposableResource:zy,__disposeResources:Gy,__rewriteRelativeImportExtension:Wy}});var _o=Ne(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.WebmBase=void 0;var jc=class{constructor(t="Unknown",n=0){this.name=t,this.start=n}getType(){return"Unknown"}updateBySource(){}setSource(t){this.source=t,this.updateBySource()}updateByData(){}setData(t){this.data=t,this.updateByData()}getValue(){return this.data}setValue(t){this.setData(t)}};Ps.WebmBase=jc});var As=Ne(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.SectionType=void 0;var qy;(function(e){e.Container="Container",e.Uint="Uint",e.Int="Int",e.Float="Float",e.String="String",e.Date="Date",e.Binary="Binary"})(qy||(Is.SectionType=qy={}))});var Vc=Ne(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.sections=void 0;var b=As();Os.sections={172351395:{name:"EBML",type:b.SectionType.Container},646:{name:"EBMLVersion",type:b.SectionType.Uint},759:{name:"EBMLReadVersion",type:b.SectionType.Uint},754:{name:"EBMLMaxIDLength",type:b.SectionType.Uint},755:{name:"EBMLMaxSizeLength",type:b.SectionType.Uint},642:{name:"DocType",type:b.SectionType.String},647:{name:"DocTypeVersion",type:b.SectionType.Uint},645:{name:"DocTypeReadVersion",type:b.SectionType.Uint},108:{name:"Void",type:b.SectionType.Binary},63:{name:"CRC-32",type:b.SectionType.Binary},190023271:{name:"SignatureSlot",type:b.SectionType.Container},16010:{name:"SignatureAlgo",type:b.SectionType.Uint},16026:{name:"SignatureHash",type:b.SectionType.Uint},16037:{name:"SignaturePublicKey",type:b.SectionType.Binary},16053:{name:"Signature",type:b.SectionType.Binary},15963:{name:"SignatureElements",type:b.SectionType.Container},15995:{name:"SignatureElementList",type:b.SectionType.Container},9522:{name:"SignedElement",type:b.SectionType.Binary},139690087:{name:"Segment",type:b.SectionType.Container},21863284:{name:"SeekHead",type:b.SectionType.Container},3515:{name:"Seek",type:b.SectionType.Container},5035:{name:"SeekID",type:b.SectionType.Binary},5036:{name:"SeekPosition",type:b.SectionType.Uint},88713574:{name:"Info",type:b.SectionType.Container},13220:{name:"SegmentUID",type:b.SectionType.Binary},13188:{name:"SegmentFilename",type:b.SectionType.String},1882403:{name:"PrevUID",type:b.SectionType.Binary},1868715:{name:"PrevFilename",type:b.SectionType.String},2013475:{name:"NextUID",type:b.SectionType.Binary},1999803:{name:"NextFilename",type:b.SectionType.String},1092:{name:"SegmentFamily",type:b.SectionType.Binary},10532:{name:"ChapterTranslate",type:b.SectionType.Container},10748:{name:"ChapterTranslateEditionUID",type:b.SectionType.Uint},10687:{name:"ChapterTranslateCodec",type:b.SectionType.Uint},10661:{name:"ChapterTranslateID",type:b.SectionType.Binary},710577:{name:"TimecodeScale",type:b.SectionType.Uint},1161:{name:"Duration",type:b.SectionType.Float},1121:{name:"DateUTC",type:b.SectionType.Date},15273:{name:"Title",type:b.SectionType.String},3456:{name:"MuxingApp",type:b.SectionType.String},5953:{name:"WritingApp",type:b.SectionType.String},103:{name:"Timecode",type:b.SectionType.Uint},6228:{name:"SilentTracks",type:b.SectionType.Container},6359:{name:"SilentTrackNumber",type:b.SectionType.Uint},39:{name:"Position",type:b.SectionType.Uint},43:{name:"PrevSize",type:b.SectionType.Uint},35:{name:"SimpleBlock",type:b.SectionType.Binary},32:{name:"BlockGroup",type:b.SectionType.Container},33:{name:"Block",type:b.SectionType.Binary},34:{name:"BlockVirtual",type:b.SectionType.Binary},13729:{name:"BlockAdditions",type:b.SectionType.Container},38:{name:"BlockMore",type:b.SectionType.Container},110:{name:"BlockAddID",type:b.SectionType.Uint},37:{name:"BlockAdditional",type:b.SectionType.Binary},27:{name:"BlockDuration",type:b.SectionType.Uint},122:{name:"ReferencePriority",type:b.SectionType.Uint},123:{name:"ReferenceBlock",type:b.SectionType.Int},125:{name:"ReferenceVirtual",type:b.SectionType.Int},36:{name:"CodecState",type:b.SectionType.Binary},13730:{name:"DiscardPadding",type:b.SectionType.Int},14:{name:"Slices",type:b.SectionType.Container},104:{name:"TimeSlice",type:b.SectionType.Container},76:{name:"LaceNumber",type:b.SectionType.Uint},77:{name:"FrameNumber",type:b.SectionType.Uint},75:{name:"BlockAdditionID",type:b.SectionType.Uint},78:{name:"Delay",type:b.SectionType.Uint},79:{name:"SliceDuration",type:b.SectionType.Uint},72:{name:"ReferenceFrame",type:b.SectionType.Container},73:{name:"ReferenceOffset",type:b.SectionType.Uint},74:{name:"ReferenceTimeCode",type:b.SectionType.Uint},47:{name:"EncryptedBlock",type:b.SectionType.Binary},106212971:{name:"Tracks",type:b.SectionType.Container},46:{name:"TrackEntry",type:b.SectionType.Container},87:{name:"TrackNumber",type:b.SectionType.Uint},13253:{name:"TrackUID",type:b.SectionType.Uint},3:{name:"TrackType",type:b.SectionType.Uint},57:{name:"FlagEnabled",type:b.SectionType.Uint},8:{name:"FlagDefault",type:b.SectionType.Uint},5546:{name:"FlagForced",type:b.SectionType.Uint},28:{name:"FlagLacing",type:b.SectionType.Uint},11751:{name:"MinCache",type:b.SectionType.Uint},11768:{name:"MaxCache",type:b.SectionType.Uint},254851:{name:"DefaultDuration",type:b.SectionType.Uint},216698:{name:"DefaultDecodedFieldDuration",type:b.SectionType.Uint},209231:{name:"TrackTimecodeScale",type:b.SectionType.Float},4991:{name:"TrackOffset",type:b.SectionType.Int},5614:{name:"MaxBlockAdditionID",type:b.SectionType.Uint},4974:{name:"Name",type:b.SectionType.String},177564:{name:"Language",type:b.SectionType.String},6:{name:"CodecID",type:b.SectionType.String},9122:{name:"CodecPrivate",type:b.SectionType.Binary},362120:{name:"CodecName",type:b.SectionType.String},13382:{name:"AttachmentLink",type:b.SectionType.Uint},1742487:{name:"CodecSettings",type:b.SectionType.String},1785920:{name:"CodecInfoURL",type:b.SectionType.String},438848:{name:"CodecDownloadURL",type:b.SectionType.String},42:{name:"CodecDecodeAll",type:b.SectionType.Uint},12203:{name:"TrackOverlay",type:b.SectionType.Uint},5802:{name:"CodecDelay",type:b.SectionType.Uint},5819:{name:"SeekPreRoll",type:b.SectionType.Uint},9764:{name:"TrackTranslate",type:b.SectionType.Container},9980:{name:"TrackTranslateEditionUID",type:b.SectionType.Uint},9919:{name:"TrackTranslateCodec",type:b.SectionType.Uint},9893:{name:"TrackTranslateTrackID",type:b.SectionType.Binary},96:{name:"Video",type:b.SectionType.Container},26:{name:"FlagInterlaced",type:b.SectionType.Uint},5048:{name:"StereoMode",type:b.SectionType.Uint},5056:{name:"AlphaMode",type:b.SectionType.Uint},5049:{name:"OldStereoMode",type:b.SectionType.Uint},48:{name:"PixelWidth",type:b.SectionType.Uint},58:{name:"PixelHeight",type:b.SectionType.Uint},5290:{name:"PixelCropBottom",type:b.SectionType.Uint},5307:{name:"PixelCropTop",type:b.SectionType.Uint},5324:{name:"PixelCropLeft",type:b.SectionType.Uint},5341:{name:"PixelCropRight",type:b.SectionType.Uint},5296:{name:"DisplayWidth",type:b.SectionType.Uint},5306:{name:"DisplayHeight",type:b.SectionType.Uint},5298:{name:"DisplayUnit",type:b.SectionType.Uint},5299:{name:"AspectRatioType",type:b.SectionType.Uint},963876:{name:"ColourSpace",type:b.SectionType.Binary},1029411:{name:"GammaValue",type:b.SectionType.Float},230371:{name:"FrameRate",type:b.SectionType.Float},97:{name:"Audio",type:b.SectionType.Container},53:{name:"SamplingFrequency",type:b.SectionType.Float},14517:{name:"OutputSamplingFrequency",type:b.SectionType.Float},31:{name:"Channels",type:b.SectionType.Uint},15739:{name:"ChannelPositions",type:b.SectionType.Binary},8804:{name:"BitDepth",type:b.SectionType.Uint},98:{name:"TrackOperation",type:b.SectionType.Container},99:{name:"TrackCombinePlanes",type:b.SectionType.Container},100:{name:"TrackPlane",type:b.SectionType.Container},101:{name:"TrackPlaneUID",type:b.SectionType.Uint},102:{name:"TrackPlaneType",type:b.SectionType.Uint},105:{name:"TrackJoinBlocks",type:b.SectionType.Container},109:{name:"TrackJoinUID",type:b.SectionType.Uint},64:{name:"TrickTrackUID",type:b.SectionType.Uint},65:{name:"TrickTrackSegmentUID",type:b.SectionType.Binary},70:{name:"TrickTrackFlag",type:b.SectionType.Uint},71:{name:"TrickMasterTrackUID",type:b.SectionType.Uint},68:{name:"TrickMasterTrackSegmentUID",type:b.SectionType.Binary},11648:{name:"ContentEncodings",type:b.SectionType.Container},8768:{name:"ContentEncoding",type:b.SectionType.Container},4145:{name:"ContentEncodingOrder",type:b.SectionType.Uint},4146:{name:"ContentEncodingScope",type:b.SectionType.Uint},4147:{name:"ContentEncodingType",type:b.SectionType.Uint},4148:{name:"ContentCompression",type:b.SectionType.Container},596:{name:"ContentCompAlgo",type:b.SectionType.Uint},597:{name:"ContentCompSettings",type:b.SectionType.Binary},4149:{name:"ContentEncryption",type:b.SectionType.Container},2017:{name:"ContentEncAlgo",type:b.SectionType.Uint},2018:{name:"ContentEncKeyID",type:b.SectionType.Binary},2019:{name:"ContentSignature",type:b.SectionType.Binary},2020:{name:"ContentSigKeyID",type:b.SectionType.Binary},2021:{name:"ContentSigAlgo",type:b.SectionType.Uint},2022:{name:"ContentSigHashAlgo",type:b.SectionType.Uint},206814059:{name:"Cues",type:b.SectionType.Container},59:{name:"CuePoint",type:b.SectionType.Container},51:{name:"CueTime",type:b.SectionType.Uint},55:{name:"CueTrackPositions",type:b.SectionType.Container},119:{name:"CueTrack",type:b.SectionType.Uint},113:{name:"CueClusterPosition",type:b.SectionType.Uint},112:{name:"CueRelativePosition",type:b.SectionType.Uint},50:{name:"CueDuration",type:b.SectionType.Uint},4984:{name:"CueBlockNumber",type:b.SectionType.Uint},106:{name:"CueCodecState",type:b.SectionType.Uint},91:{name:"CueReference",type:b.SectionType.Container},22:{name:"CueRefTime",type:b.SectionType.Uint},23:{name:"CueRefCluster",type:b.SectionType.Uint},4959:{name:"CueRefNumber",type:b.SectionType.Uint},107:{name:"CueRefCodecState",type:b.SectionType.Uint},155296873:{name:"Attachments",type:b.SectionType.Container},8615:{name:"AttachedFile",type:b.SectionType.Container},1662:{name:"FileDescription",type:b.SectionType.String},1646:{name:"FileName",type:b.SectionType.String},1632:{name:"FileMimeType",type:b.SectionType.String},1628:{name:"FileData",type:b.SectionType.Binary},1710:{name:"FileUID",type:b.SectionType.Uint},1653:{name:"FileReferral",type:b.SectionType.Binary},1633:{name:"FileUsedStartTime",type:b.SectionType.Uint},1634:{name:"FileUsedEndTime",type:b.SectionType.Uint},4433776:{name:"Chapters",type:b.SectionType.Container},1465:{name:"EditionEntry",type:b.SectionType.Container},1468:{name:"EditionUID",type:b.SectionType.Uint},1469:{name:"EditionFlagHidden",type:b.SectionType.Uint},1499:{name:"EditionFlagDefault",type:b.SectionType.Uint},1501:{name:"EditionFlagOrdered",type:b.SectionType.Uint},54:{name:"ChapterAtom",type:b.SectionType.Container},13252:{name:"ChapterUID",type:b.SectionType.Uint},5716:{name:"ChapterStringUID",type:b.SectionType.String},17:{name:"ChapterTimeStart",type:b.SectionType.Uint},18:{name:"ChapterTimeEnd",type:b.SectionType.Uint},24:{name:"ChapterFlagHidden",type:b.SectionType.Uint},1432:{name:"ChapterFlagEnabled",type:b.SectionType.Uint},11879:{name:"ChapterSegmentUID",type:b.SectionType.Binary},11964:{name:"ChapterSegmentEditionUID",type:b.SectionType.Uint},9155:{name:"ChapterPhysicalEquiv",type:b.SectionType.Uint},15:{name:"ChapterTrack",type:b.SectionType.Container},9:{name:"ChapterTrackNumber",type:b.SectionType.Uint},0:{name:"ChapterDisplay",type:b.SectionType.Container},5:{name:"ChapString",type:b.SectionType.String},892:{name:"ChapLanguage",type:b.SectionType.String},894:{name:"ChapCountry",type:b.SectionType.String},10564:{name:"ChapProcess",type:b.SectionType.Container},10581:{name:"ChapProcessCodecID",type:b.SectionType.Uint},1293:{name:"ChapProcessPrivate",type:b.SectionType.Binary},10513:{name:"ChapProcessCommand",type:b.SectionType.Container},10530:{name:"ChapProcessTime",type:b.SectionType.Uint},10547:{name:"ChapProcessData",type:b.SectionType.Binary},39109479:{name:"Tags",type:b.SectionType.Container},13171:{name:"Tag",type:b.SectionType.Container},9152:{name:"Targets",type:b.SectionType.Container},10442:{name:"TargetTypeValue",type:b.SectionType.Uint},9162:{name:"TargetType",type:b.SectionType.String},9157:{name:"TagTrackUID",type:b.SectionType.Uint},9161:{name:"TagEditionUID",type:b.SectionType.Uint},9156:{name:"TagChapterUID",type:b.SectionType.Uint},9158:{name:"TagAttachmentUID",type:b.SectionType.Uint},10184:{name:"SimpleTag",type:b.SectionType.Container},1443:{name:"TagName",type:b.SectionType.String},1146:{name:"TagLanguage",type:b.SectionType.String},1156:{name:"TagDefault",type:b.SectionType.Uint},1159:{name:"TagString",type:b.SectionType.String},1157:{name:"TagBinary",type:b.SectionType.Binary},5552:{name:"Colour",type:b.SectionType.Container},5553:{name:"MatrixCoefficients",type:b.SectionType.Uint},5554:{name:"BitsPerChannel",type:b.SectionType.Uint},5555:{name:"ChromaSubsamplingHorz",type:b.SectionType.Uint},5556:{name:"ChromaSubsamplingVert",type:b.SectionType.Uint},5557:{name:"CbSubsamplingHorz",type:b.SectionType.Uint},5558:{name:"CbSubsamplingVert",type:b.SectionType.Uint},5559:{name:"ChromaSitingHorz",type:b.SectionType.Uint},5560:{name:"ChromaSitingVert",type:b.SectionType.Uint},5561:{name:"Range",type:b.SectionType.Uint},5562:{name:"TransferCharacteristics",type:b.SectionType.Uint},5563:{name:"Primaries",type:b.SectionType.Uint},5564:{name:"MaxCLL",type:b.SectionType.Uint},5565:{name:"MaxFALL",type:b.SectionType.Uint}}});var zc=Ne(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.WebmUint=void 0;var ZE=_o();function Ky(e){return e.length%2===1?"0"+e:e}var Hc=class extends ZE.WebmBase{constructor(t,n=0){super(t,n)}getType(){return"Uint"}updateBySource(){this.data="";for(let t=0;t<this.source.length;t++){let n=this.source[t].toString(16);this.data+=Ky(n)}}updateByData(){let t=this.data.length/2;this.source=new Uint8Array(t);for(let n=0;n<t;n++){let r=this.data.substring(n*2,n*2+2);this.source[n]=parseInt(r,16)}}getValue(){return parseInt(this.data,16)}setValue(t){this.setData(Ky(t.toString(16)))}};Rs.WebmUint=Hc});var Wc=Ne(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.WebmFloat=void 0;var JE=_o(),Gc=class extends JE.WebmBase{constructor(t,n=0){super(t,n)}getType(){return"Float"}getFloatArrayType(){return this.source&&this.source.length===4?Float32Array:Float64Array}updateBySource(){let t=this.source.reverse(),n=this.getFloatArrayType(),r=new n(t.buffer);this.data=r[0]}updateByData(){let t=this.getFloatArrayType(),n=new t([this.data]),r=new Uint8Array(n.buffer);this.source=r.reverse()}};Ms.WebmFloat=Gc});var Kc=Ne(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds.WebmString=void 0;var QE=_o(),qc=class extends QE.WebmBase{constructor(t,n=0){super(t,n)}getType(){return"String"}updateBySource(){this.data=this.source}updateByData(){this.source=this.data}getValue(){let t="";return this.source.forEach(n=>{t+=String.fromCharCode(n)}),t}};Ds.WebmString=qc});var Xc=Ne(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});Ns.WebmContainer=void 0;var Yy=_o(),eP=Vc(),Ls=As(),tP=zc(),nP=Wc(),rP=Kc(),Yc=class e extends Yy.WebmBase{constructor(t,n=!1,r=0){super(t,r),this.isInfinite=n,this.offset=0}getType(){return"Container"}readByte(){return this.source[this.offset++]}readUint(){let t=this.readByte(),n=8-t.toString(2).length,r=t-(1<<7-n);for(let o=0;o<n;o++)r<<=8,r|=this.readByte();return r}updateBySource(){var t;this.data=[];let n;for(this.offset=0;this.offset<this.source.length;this.offset=n){let r=this.offset,o=this.readUint(),{name:i,type:a}=(t=eP.sections[o])!==null&&t!==void 0?t:{},s=this.readUint();n=this.source.length,s>=0&&(n=Math.min(this.offset+s,n));let c=this.source.slice(this.offset,n),l;switch(a){case Ls.SectionType.Container:l=new e(i,s<0,r);break;case Ls.SectionType.Uint:l=new tP.WebmUint(i,r);break;case Ls.SectionType.Float:l=new nP.WebmFloat(i,r);break;case Ls.SectionType.String:l=new rP.WebmString(i,r);break;default:l=new Yy.WebmBase(i,r);break}l.setSource(c),this.data.push({id:o,idHex:o.toString(16),data:l})}}writeUint(t,n=!1){let r;for(r=1;(t<0||t>=1<<7*r)&&r<8;r++);if(!n){for(let o=0;o<r;o++)this.source[this.offset+o]=t>>8*(r-1-o)&255;this.source[this.offset]&=(1<<8-r)-1,this.source[this.offset]|=1<<8-r}this.offset+=r}writeSections(t=!1){this.offset=0;for(let n=0;n<this.data.length;n++){let r=this.data[n],o=r.data.source,i=o.length;this.writeUint(r.id,t),this.writeUint(r.data instanceof e&&r.data.isInfinite?-1:i,t),t||this.source.set(o,this.offset),this.offset+=i}return this.offset}updateByData(){let t=this.writeSections(!0);this.source=new Uint8Array(t),this.writeSections()}getSectionById(t){for(let n=0;n<this.data.length;n++){let r=this.data[n];if(r.id===t)return r.data}return null}};Ns.WebmContainer=Yc});var Xy=Ne($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.WebmFile=void 0;var oP=(Wi(),ra(Gi)),iP=Xc(),Zc=class e extends iP.WebmContainer{constructor(t){super("File"),this.setSource(t)}getType(){return"File"}toBlob(t="video/webm"){return new Blob([this.source.buffer],{type:t})}static blobToArray(t){return new Promise((n,r)=>{try{let o=new FileReader;o.onloadend=()=>{try{n(new Uint8Array(o.result))}catch(i){r(i)}},o.readAsArrayBuffer(t)}catch(o){r(o)}})}static fromBlob(t){return oP.__awaiter(this,void 0,void 0,function*(){let n=yield e.blobToArray(t);return new e(n)})}};$s.WebmFile=Zc});var Jy=Ne(Zy=>{"use strict";Object.defineProperty(Zy,"__esModule",{value:!0})});var Jc=Ne(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});var In=(Wi(),ra(Gi));In.__exportStar(_o(),Yt);In.__exportStar(Xc(),Yt);In.__exportStar(Xy(),Yt);In.__exportStar(Wc(),Yt);In.__exportStar(Kc(),Yt);In.__exportStar(zc(),Yt);In.__exportStar(As(),Yt);In.__exportStar(Jy(),Yt);In.__exportStar(Vc(),Yt)});var Qc=Ne(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.fixParsedWebmDuration=void 0;var aP=Jc(),sP=(e,t,n={})=>{let r=n.logger;r===void 0?r=c=>console.debug(c):r||(r=()=>{});let o=e.getSectionById(139690087);if(!o)return r("[fix-webm-duration] Segment section is missing"),!1;let i=o.getSectionById(88713574);if(!i)return r("[fix-webm-duration] Info section is missing"),!1;let a=i.getSectionById(710577);if(!a)return r("[fix-webm-duration] TimecodeScale section is missing"),!1;let s=i.getSectionById(1161);if(s)if(s.getValue()<=0)r(`[fix-webm-duration] Duration section is present, but the value is ${s.getValue()}`),s.setValue(t);else return r(`[fix-webm-duration] Duration section is present, and the value is ${s.getValue()}`),!1;else r("[fix-webm-duration] Duration section is missing"),s=new aP.WebmFloat("Duration"),s.setValue(t),i.data.push({id:1161,data:s});return a.setValue(1e6),i.updateByData(),o.updateByData(),e.updateByData(),!0};Bs.fixParsedWebmDuration=sP});var Qy=Ne(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});Fs.fixWebmDuration=void 0;var lP=(Wi(),ra(Gi)),cP=Jc(),uP=Qc(),dP=(e,t,n)=>lP.__awaiter(void 0,void 0,void 0,function*(){try{let r=yield cP.WebmFile.fromBlob(e);if((0,uP.fixParsedWebmDuration)(r,t,n))return r.toBlob(e.type)}catch{}return e});Fs.fixWebmDuration=dP});var tx=Ne(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});var ex=(Wi(),ra(Gi));ex.__exportStar(Qy(),Us);ex.__exportStar(Qc(),Us)});var Ex=Ne((su,lu)=>{"use strict";(function(e,t){typeof su=="object"&&typeof lu<"u"?lu.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.DOMPurify=t())})(su,function(){"use strict";let{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object,{freeze:i,seal:a,create:s}=Object,{apply:c,construct:l}=typeof Reflect<"u"&&Reflect;i||(i=function(ae){return ae}),a||(a=function(ae){return ae}),c||(c=function(ae,Ae,ke){return ae.apply(Ae,ke)}),l||(l=function(ae,Ae){return new ae(...Ae)});let u=I(Array.prototype.forEach),f=I(Array.prototype.pop),d=I(Array.prototype.push),p=I(String.prototype.toLowerCase),h=I(String.prototype.toString),g=I(String.prototype.match),v=I(String.prototype.replace),y=I(String.prototype.indexOf),T=I(String.prototype.trim),C=I(RegExp.prototype.test),E=U(TypeError);function I(Ie){return function(ae){for(var Ae=arguments.length,ke=new Array(Ae>1?Ae-1:0),ct=1;ct<Ae;ct++)ke[ct-1]=arguments[ct];return c(Ie,ae,ke)}}function U(Ie){return function(){for(var ae=arguments.length,Ae=new Array(ae),ke=0;ke<ae;ke++)Ae[ke]=arguments[ke];return l(Ie,Ae)}}function R(Ie,ae){let Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p;t&&t(Ie,null);let ke=ae.length;for(;ke--;){let ct=ae[ke];if(typeof ct=="string"){let pn=Ae(ct);pn!==ct&&(n(ae)||(ae[ke]=pn),ct=pn)}Ie[ct]=!0}return Ie}function oe(Ie){let ae=s(null);for(let[Ae,ke]of e(Ie))o(Ie,Ae)!==void 0&&(ae[Ae]=ke);return ae}function H(Ie,ae){for(;Ie!==null;){let ke=o(Ie,ae);if(ke){if(ke.get)return I(ke.get);if(typeof ke.value=="function")return I(ke.value)}Ie=r(Ie)}function Ae(ke){return console.warn("fallback value for",ke),null}return Ae}let G=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),w=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=i(["#text"]),J=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),ue=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),le=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xe=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),we=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),St=a(/<%[\w\W]*|[\w\W]*%>/gm),$t=a(/\${[\w\W]*}/gm),mt=a(/^data-[\-\w.\u00B7-\uFFFF]/),Xt=a(/^aria-[\-\w]+$/),Ao=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Oo=a(/^(?:\w+script|data):/i),Ro=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hu=a(/^html$/i);var bu=Object.freeze({__proto__:null,MUSTACHE_EXPR:we,ERB_EXPR:St,TMPLIT_EXPR:$t,DATA_ATTR:mt,ARIA_ATTR:Xt,IS_ALLOWED_URI:Ao,IS_SCRIPT_OR_DATA:Oo,ATTR_WHITESPACE:Ro,DOCTYPE_NAME:hu});let mv=function(){return typeof window>"u"?null:window},gv=function(ae,Ae){if(typeof ae!="object"||typeof ae.createPolicy!="function")return null;let ke=null,ct="data-tt-policy-suffix";Ae&&Ae.hasAttribute(ct)&&(ke=Ae.getAttribute(ct));let pn="dompurify"+(ke?"#"+ke:"");try{return ae.createPolicy(pn,{createHTML(Rr){return Rr},createScriptURL(Rr){return Rr}})}catch{return console.warn("TrustedTypes policy "+pn+" could not be created."),null}};function yu(){let Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mv(),ae=Q=>yu(Q);if(ae.version="3.0.6",ae.removed=[],!Ie||!Ie.document||Ie.document.nodeType!==9)return ae.isSupported=!1,ae;let{document:Ae}=Ie,ke=Ae,ct=ke.currentScript,{DocumentFragment:pn,HTMLTemplateElement:Rr,Node:qs,Element:xu,NodeFilter:Ks,NamedNodeMap:bv=Ie.NamedNodeMap||Ie.MozNamedAttrMap,HTMLFormElement:yv,DOMParser:xv,trustedTypes:Yi}=Ie,Xi=xu.prototype,vv=H(Xi,"cloneNode"),wv=H(Xi,"nextSibling"),Sv=H(Xi,"childNodes"),Ys=H(Xi,"parentNode");if(typeof Rr=="function"){let Q=Ae.createElement("template");Q.content&&Q.content.ownerDocument&&(Ae=Q.content.ownerDocument)}let ut,Mo="",{implementation:Xs,createNodeIterator:Tv,createDocumentFragment:Cv,getElementsByTagName:_v}=Ae,{importNode:kv}=ke,Zt={};ae.isSupported=typeof e=="function"&&typeof Ys=="function"&&Xs&&Xs.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Zs,ERB_EXPR:Js,TMPLIT_EXPR:Qs,DATA_ATTR:Ev,ARIA_ATTR:Pv,IS_SCRIPT_OR_DATA:Iv,ATTR_WHITESPACE:vu}=bu,{IS_ALLOWED_URI:wu}=bu,Ye=null,Su=R({},[...G,...L,...P,...w,...D]),Xe=null,Tu=R({},[...J,...ue,...le,...xe]),je=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Do=null,el=null,Cu=!0,tl=!0,_u=!1,ku=!0,Mr=!1,Zn=!1,nl=!1,rl=!1,Dr=!1,Zi=!1,Ji=!1,Eu=!0,Pu=!1,Av="user-content-",ol=!0,Lo=!1,Lr={},Nr=null,Iu=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Au=null,Ou=R({},["audio","video","img","source","image","track"]),il=null,Ru=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qi="http://www.w3.org/1998/Math/MathML",ea="http://www.w3.org/2000/svg",mn="http://www.w3.org/1999/xhtml",$r=mn,al=!1,sl=null,Ov=R({},[Qi,ea,mn],h),Jn=null,Rv=["application/xhtml+xml","text/html"],Mv="text/html",Ze=null,Br=null,Dv=Ae.createElement("form"),Mu=function(k){return k instanceof RegExp||k instanceof Function},ll=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Br&&Br===k)){if((!k||typeof k!="object")&&(k={}),k=oe(k),Jn=Rv.indexOf(k.PARSER_MEDIA_TYPE)===-1?Jn=Mv:Jn=k.PARSER_MEDIA_TYPE,Ze=Jn==="application/xhtml+xml"?h:p,Ye="ALLOWED_TAGS"in k?R({},k.ALLOWED_TAGS,Ze):Su,Xe="ALLOWED_ATTR"in k?R({},k.ALLOWED_ATTR,Ze):Tu,sl="ALLOWED_NAMESPACES"in k?R({},k.ALLOWED_NAMESPACES,h):Ov,il="ADD_URI_SAFE_ATTR"in k?R(oe(Ru),k.ADD_URI_SAFE_ATTR,Ze):Ru,Au="ADD_DATA_URI_TAGS"in k?R(oe(Ou),k.ADD_DATA_URI_TAGS,Ze):Ou,Nr="FORBID_CONTENTS"in k?R({},k.FORBID_CONTENTS,Ze):Iu,Do="FORBID_TAGS"in k?R({},k.FORBID_TAGS,Ze):{},el="FORBID_ATTR"in k?R({},k.FORBID_ATTR,Ze):{},Lr="USE_PROFILES"in k?k.USE_PROFILES:!1,Cu=k.ALLOW_ARIA_ATTR!==!1,tl=k.ALLOW_DATA_ATTR!==!1,_u=k.ALLOW_UNKNOWN_PROTOCOLS||!1,ku=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Mr=k.SAFE_FOR_TEMPLATES||!1,Zn=k.WHOLE_DOCUMENT||!1,Dr=k.RETURN_DOM||!1,Zi=k.RETURN_DOM_FRAGMENT||!1,Ji=k.RETURN_TRUSTED_TYPE||!1,rl=k.FORCE_BODY||!1,Eu=k.SANITIZE_DOM!==!1,Pu=k.SANITIZE_NAMED_PROPS||!1,ol=k.KEEP_CONTENT!==!1,Lo=k.IN_PLACE||!1,wu=k.ALLOWED_URI_REGEXP||Ao,$r=k.NAMESPACE||mn,je=k.CUSTOM_ELEMENT_HANDLING||{},k.CUSTOM_ELEMENT_HANDLING&&Mu(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(je.tagNameCheck=k.CUSTOM_ELEMENT_HANDLING.tagNameCheck),k.CUSTOM_ELEMENT_HANDLING&&Mu(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(je.attributeNameCheck=k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(je.allowCustomizedBuiltInElements=k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Mr&&(tl=!1),Zi&&(Dr=!0),Lr&&(Ye=R({},[...D]),Xe=[],Lr.html===!0&&(R(Ye,G),R(Xe,J)),Lr.svg===!0&&(R(Ye,L),R(Xe,ue),R(Xe,xe)),Lr.svgFilters===!0&&(R(Ye,P),R(Xe,ue),R(Xe,xe)),Lr.mathMl===!0&&(R(Ye,w),R(Xe,le),R(Xe,xe))),k.ADD_TAGS&&(Ye===Su&&(Ye=oe(Ye)),R(Ye,k.ADD_TAGS,Ze)),k.ADD_ATTR&&(Xe===Tu&&(Xe=oe(Xe)),R(Xe,k.ADD_ATTR,Ze)),k.ADD_URI_SAFE_ATTR&&R(il,k.ADD_URI_SAFE_ATTR,Ze),k.FORBID_CONTENTS&&(Nr===Iu&&(Nr=oe(Nr)),R(Nr,k.FORBID_CONTENTS,Ze)),ol&&(Ye["#text"]=!0),Zn&&R(Ye,["html","head","body"]),Ye.table&&(R(Ye,["tbody"]),delete Do.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ut=k.TRUSTED_TYPES_POLICY,Mo=ut.createHTML("")}else ut===void 0&&(ut=gv(Yi,ct)),ut!==null&&typeof Mo=="string"&&(Mo=ut.createHTML(""));i&&i(k),Br=k}},Du=R({},["mi","mo","mn","ms","mtext"]),Lu=R({},["foreignobject","desc","title","annotation-xml"]),Lv=R({},["title","style","font","a","script"]),ta=R({},L);R(ta,P),R(ta,_);let cl=R({},w);R(cl,M);let Nv=function(k){let F=Ys(k);(!F||!F.tagName)&&(F={namespaceURI:$r,tagName:"template"});let Y=p(k.tagName),Re=p(F.tagName);return sl[k.namespaceURI]?k.namespaceURI===ea?F.namespaceURI===mn?Y==="svg":F.namespaceURI===Qi?Y==="svg"&&(Re==="annotation-xml"||Du[Re]):!!ta[Y]:k.namespaceURI===Qi?F.namespaceURI===mn?Y==="math":F.namespaceURI===ea?Y==="math"&&Lu[Re]:!!cl[Y]:k.namespaceURI===mn?F.namespaceURI===ea&&!Lu[Re]||F.namespaceURI===Qi&&!Du[Re]?!1:!cl[Y]&&(Lv[Y]||!ta[Y]):!!(Jn==="application/xhtml+xml"&&sl[k.namespaceURI]):!1},Qn=function(k){d(ae.removed,{element:k});try{k.parentNode.removeChild(k)}catch{k.remove()}},ul=function(k,F){try{d(ae.removed,{attribute:F.getAttributeNode(k),from:F})}catch{d(ae.removed,{attribute:null,from:F})}if(F.removeAttribute(k),k==="is"&&!Xe[k])if(Dr||Zi)try{Qn(F)}catch{}else try{F.setAttribute(k,"")}catch{}},Nu=function(k){let F=null,Y=null;if(rl)k="<remove></remove>"+k;else{let ot=g(k,/^[\r\n\t ]+/);Y=ot&&ot[0]}Jn==="application/xhtml+xml"&&$r===mn&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");let Re=ut?ut.createHTML(k):k;if($r===mn)try{F=new xv().parseFromString(Re,Jn)}catch{}if(!F||!F.documentElement){F=Xs.createDocument($r,"template",null);try{F.documentElement.innerHTML=al?Mo:Re}catch{}}let rt=F.body||F.documentElement;return k&&Y&&rt.insertBefore(Ae.createTextNode(Y),rt.childNodes[0]||null),$r===mn?_v.call(F,Zn?"html":"body")[0]:Zn?F.documentElement:rt},$u=function(k){return Tv.call(k.ownerDocument||k,k,Ks.SHOW_ELEMENT|Ks.SHOW_COMMENT|Ks.SHOW_TEXT,null)},$v=function(k){return k instanceof yv&&(typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||!(k.attributes instanceof bv)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function")},Bu=function(k){return typeof qs=="function"&&k instanceof qs},gn=function(k,F,Y){Zt[k]&&u(Zt[k],Re=>{Re.call(ae,F,Y,Br)})},Fu=function(k){let F=null;if(gn("beforeSanitizeElements",k,null),$v(k))return Qn(k),!0;let Y=Ze(k.nodeName);if(gn("uponSanitizeElement",k,{tagName:Y,allowedTags:Ye}),k.hasChildNodes()&&!Bu(k.firstElementChild)&&C(/<[/\w]/g,k.innerHTML)&&C(/<[/\w]/g,k.textContent))return Qn(k),!0;if(!Ye[Y]||Do[Y]){if(!Do[Y]&&ju(Y)&&(je.tagNameCheck instanceof RegExp&&C(je.tagNameCheck,Y)||je.tagNameCheck instanceof Function&&je.tagNameCheck(Y)))return!1;if(ol&&!Nr[Y]){let Re=Ys(k)||k.parentNode,rt=Sv(k)||k.childNodes;if(rt&&Re){let ot=rt.length;for(let gt=ot-1;gt>=0;--gt)Re.insertBefore(vv(rt[gt],!0),wv(k))}}return Qn(k),!0}return k instanceof xu&&!Nv(k)||(Y==="noscript"||Y==="noembed"||Y==="noframes")&&C(/<\/no(script|embed|frames)/i,k.innerHTML)?(Qn(k),!0):(Mr&&k.nodeType===3&&(F=k.textContent,u([Zs,Js,Qs],Re=>{F=v(F,Re," ")}),k.textContent!==F&&(d(ae.removed,{element:k.cloneNode()}),k.textContent=F)),gn("afterSanitizeElements",k,null),!1)},Uu=function(k,F,Y){if(Eu&&(F==="id"||F==="name")&&(Y in Ae||Y in Dv))return!1;if(!(tl&&!el[F]&&C(Ev,F))){if(!(Cu&&C(Pv,F))){if(!Xe[F]||el[F]){if(!(ju(k)&&(je.tagNameCheck instanceof RegExp&&C(je.tagNameCheck,k)||je.tagNameCheck instanceof Function&&je.tagNameCheck(k))&&(je.attributeNameCheck instanceof RegExp&&C(je.attributeNameCheck,F)||je.attributeNameCheck instanceof Function&&je.attributeNameCheck(F))||F==="is"&&je.allowCustomizedBuiltInElements&&(je.tagNameCheck instanceof RegExp&&C(je.tagNameCheck,Y)||je.tagNameCheck instanceof Function&&je.tagNameCheck(Y))))return!1}else if(!il[F]){if(!C(wu,v(Y,vu,""))){if(!((F==="src"||F==="xlink:href"||F==="href")&&k!=="script"&&y(Y,"data:")===0&&Au[k])){if(!(_u&&!C(Iv,v(Y,vu,"")))){if(Y)return!1}}}}}}return!0},ju=function(k){return k.indexOf("-")>0},Vu=function(k){gn("beforeSanitizeAttributes",k,null);let{attributes:F}=k;if(!F)return;let Y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Xe},Re=F.length;for(;Re--;){let rt=F[Re],{name:ot,namespaceURI:gt,value:er}=rt,No=Ze(ot),ht=ot==="value"?er:T(er);if(Y.attrName=No,Y.attrValue=ht,Y.keepAttr=!0,Y.forceKeepAttr=void 0,gn("uponSanitizeAttribute",k,Y),ht=Y.attrValue,Y.forceKeepAttr||(ul(ot,k),!Y.keepAttr))continue;if(!ku&&C(/\/>/i,ht)){ul(ot,k);continue}Mr&&u([Zs,Js,Qs],zu=>{ht=v(ht,zu," ")});let Hu=Ze(k.nodeName);if(Uu(Hu,No,ht)){if(Pu&&(No==="id"||No==="name")&&(ul(ot,k),ht=Av+ht),ut&&typeof Yi=="object"&&typeof Yi.getAttributeType=="function"&&!gt)switch(Yi.getAttributeType(Hu,No)){case"TrustedHTML":{ht=ut.createHTML(ht);break}case"TrustedScriptURL":{ht=ut.createScriptURL(ht);break}}try{gt?k.setAttributeNS(gt,ot,ht):k.setAttribute(ot,ht),f(ae.removed)}catch{}}}gn("afterSanitizeAttributes",k,null)},Bv=function Q(k){let F=null,Y=$u(k);for(gn("beforeSanitizeShadowDOM",k,null);F=Y.nextNode();)gn("uponSanitizeShadowNode",F,null),!Fu(F)&&(F.content instanceof pn&&Q(F.content),Vu(F));gn("afterSanitizeShadowDOM",k,null)};return ae.sanitize=function(Q){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=null,Y=null,Re=null,rt=null;if(al=!Q,al&&(Q="<!-->"),typeof Q!="string"&&!Bu(Q))if(typeof Q.toString=="function"){if(Q=Q.toString(),typeof Q!="string")throw E("dirty is not a string, aborting")}else throw E("toString is not a function");if(!ae.isSupported)return Q;if(nl||ll(k),ae.removed=[],typeof Q=="string"&&(Lo=!1),Lo){if(Q.nodeName){let er=Ze(Q.nodeName);if(!Ye[er]||Do[er])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(Q instanceof qs)F=Nu("<!---->"),Y=F.ownerDocument.importNode(Q,!0),Y.nodeType===1&&Y.nodeName==="BODY"||Y.nodeName==="HTML"?F=Y:F.appendChild(Y);else{if(!Dr&&!Mr&&!Zn&&Q.indexOf("<")===-1)return ut&&Ji?ut.createHTML(Q):Q;if(F=Nu(Q),!F)return Dr?null:Ji?Mo:""}F&&rl&&Qn(F.firstChild);let ot=$u(Lo?Q:F);for(;Re=ot.nextNode();)Fu(Re)||(Re.content instanceof pn&&Bv(Re.content),Vu(Re));if(Lo)return Q;if(Dr){if(Zi)for(rt=Cv.call(F.ownerDocument);F.firstChild;)rt.appendChild(F.firstChild);else rt=F;return(Xe.shadowroot||Xe.shadowrootmode)&&(rt=kv.call(ke,rt,!0)),rt}let gt=Zn?F.outerHTML:F.innerHTML;return Zn&&Ye["!doctype"]&&F.ownerDocument&&F.ownerDocument.doctype&&F.ownerDocument.doctype.name&&C(hu,F.ownerDocument.doctype.name)&&(gt="<!DOCTYPE "+F.ownerDocument.doctype.name+`>
|
|
10
|
+
`+gt),Mr&&u([Zs,Js,Qs],er=>{gt=v(gt,er," ")}),ut&&Ji?ut.createHTML(gt):gt},ae.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ll(Q),nl=!0},ae.clearConfig=function(){Br=null,nl=!1},ae.isValidAttribute=function(Q,k,F){Br||ll({});let Y=Ze(Q),Re=Ze(k);return Uu(Y,Re,F)},ae.addHook=function(Q,k){typeof k=="function"&&(Zt[Q]=Zt[Q]||[],d(Zt[Q],k))},ae.removeHook=function(Q){if(Zt[Q])return f(Zt[Q])},ae.removeHooks=function(Q){Zt[Q]&&(Zt[Q]=[])},ae.removeAllHooks=function(){Zt={}},ae}var hv=yu();return hv})});function Wv(e){return Object.keys(e).reduce((n,r)=>{let o=e[r];return n[r]=Object.assign({},o),Ku(o.value)&&!Zv(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 qv(e){return e?Object.keys(e).reduce((n,r)=>{let o=e[r];return n[r]=Ku(o)&&"value"in o?o:{value:o},n[r].attribute||(n[r].attribute=Xv(r)),n[r].parse="parse"in n[r]?n[r].parse:typeof n[r].value!="string",n},{}):{}}function Kv(e){return Object.keys(e).reduce((n,r)=>(n[r]=e[r].value,n),{})}function Yv(e,t){let n=Wv(t);return Object.keys(t).forEach(o=>{let i=n[o],a=e.getAttribute(i.attribute),s=e[o];a!=null&&(i.value=i.parse?qu(a):a),s!=null&&(i.value=Array.isArray(s)?s.slice(0):s),i.reflect&&Wu(e,i.attribute,i.value,!!i.parse),Object.defineProperty(e,o,{get(){return i.value},set(c){let l=i.value;i.value=c,i.reflect&&Wu(this,i.attribute,i.value,!!i.parse);for(let u=0,f=this.__propertyChangedCallbacks.length;u<f;u++)this.__propertyChangedCallbacks[u](o,c,l)},enumerable:!0,configurable:!0})}),n}function qu(e){if(e)try{return JSON.parse(e)}catch{return e}}function Wu(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 Xv(e){return e.replace(/\.?([A-Z]+)/g,(t,n)=>"-"+n.toLowerCase()).replace("_","-").replace(/^-/,"")}function Ku(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function Zv(e){return Object.prototype.toString.call(e)==="[object Function]"}function Jv(e){return typeof e=="function"&&e.toString().indexOf("class")===0}var dl;function Qv(e,t){let 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=Yv(this,t);let o=Kv(this.props),i=this.Component,a=dl;try{dl=this,this.__initialized=!0,Jv(i)?new i(o,{element:this}):i(o,{element:this})}finally{dl=a}}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,a){if(this.__initialized&&!this.__updating[o]&&(o=this.lookupProp(o),o in t)){if(a==null&&!this[o])return;this[o]=t[o].parse?qu(a):a}}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)}}}var S1=Symbol("element-context");function Yu(e,t={},n={}){let{BaseElement:r=HTMLElement,extension:o,customElements:i=window.customElements}=n;return a=>{if(!e)throw new Error("tag is required to register a Component");let s=i.get(e);return s?(s.prototype.Component=a,s):(s=Qv(r,qv(t)),s.prototype.Component=a,s.prototype.registeredTag=e,i.define(e,s,o),s)}}var ve={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Xu(this.context.count)},getNextContextId(){return Xu(this.context.count++)}};function Xu(e){let t=String(e),n=t.length-1;return ve.context.id+(n?String.fromCharCode(96+n):"")+t}function pl(e){ve.context=e}function ew(){return{...ve.context,id:ve.getNextContextId(),count:0}}var tw=(e,t)=>e===t,kt=Symbol("solid-proxy"),nd=typeof Proxy=="function",sa=Symbol("solid-track"),C1=Symbol("solid-dev-component"),ia={equals:tw},Zu=null,rd=ud,Et=1,$o=2,od={owned:null,cleanups:null,context:null,owner:null};var be=null,V=null,Fo=null,Ur=null,Oe=null,qe=null,it=null,la=0;function tr(e,t){let n=Oe,r=be,o=e.length===0,i=t===void 0?r:t,a=o?od:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=o?e:()=>e(()=>ze(()=>Rn(a)));be=a,Oe=null;try{return Bt(s,!0)}finally{Oe=n,be=r}}function O(e,t){t=t?Object.assign({},ia,t):ia;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(V&&V.running&&V.sources.has(n)?o=o(n.tValue):o=o(n.value)),cd(n,o));return[ld.bind(n),r]}function A(e,t,n){let r=yl(e,t,!1,Et);Fo&&V&&V.running?qe.push(r):Uo(r)}function ge(e,t,n){rd=iw;let r=yl(e,t,!1,Et),o=ml&&bl(ml);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),it?it.push(r):Uo(r)}function B(e,t,n){n=n?Object.assign({},ia,n):ia;let r=yl(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Fo&&V&&V.running?(r.tState=Et,qe.push(r)):Uo(r),ld.bind(r)}function id(e){return Bt(e,!1)}function ze(e){if(!Ur&&Oe===null)return e();let t=Oe;Oe=null;try{return Ur?Ur.untrack(e):e()}finally{Oe=t}}function ne(e){ge(()=>ze(e))}function se(e){return be===null||(be.cleanups===null?be.cleanups=[e]:be.cleanups.push(e)),e}function ca(){return Oe}function jr(){return be}function ad(e,t){let n=be,r=Oe;be=e,Oe=null;try{return Bt(t,!0)}catch(o){da(o)}finally{be=n,Oe=r}}function nw(e){if(V&&V.running)return e(),V.done;let t=Oe,n=be;return Promise.resolve().then(()=>{Oe=t,be=n;let r;return(Fo||ml)&&(r=V||(V={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),Bt(e,!1),Oe=be=null,r?r.done:void 0})}var[_1,Ju]=O(!1);function sd(e,t){let n=Symbol("context");return{id:n,Provider:sw(n),defaultValue:e}}function bl(e){let t;return be&&be.context&&(t=be.context[e.id])!==void 0?t:e.defaultValue}function ua(e){let t=B(e),n=B(()=>gl(t()));return n.toArray=()=>{let r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}var ml;function ld(){let e=V&&V.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===Et)Uo(this);else{let t=qe;qe=null,Bt(()=>aa(this),!1),qe=t}if(Oe){let t=this.observers?this.observers.length:0;Oe.sources?(Oe.sources.push(this),Oe.sourceSlots.push(t)):(Oe.sources=[this],Oe.sourceSlots=[t]),this.observers?(this.observers.push(Oe),this.observerSlots.push(Oe.sources.length-1)):(this.observers=[Oe],this.observerSlots=[Oe.sources.length-1])}return e&&V.sources.has(this)?this.tValue:this.value}function cd(e,t,n){let r=V&&V.running&&V.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(V){let o=V.running;(o||!n&&V.sources.has(e))&&(V.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Bt(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],a=V&&V.running;a&&V.disposed.has(i)||((a?!i.tState:!i.state)&&(i.pure?qe.push(i):it.push(i),i.observers&&dd(i)),a?i.tState=Et:i.state=Et)}if(qe.length>1e6)throw qe=[],new Error},!1)}return t}function Uo(e){if(!e.fn)return;Rn(e);let t=la;Qu(e,V&&V.running&&V.sources.has(e)?e.tValue:e.value,t),V&&!V.running&&V.sources.has(e)&&queueMicrotask(()=>{Bt(()=>{V&&(V.running=!0),Oe=be=e,Qu(e,e.tValue,t),Oe=be=null},!1)})}function Qu(e,t,n){let r,o=be,i=Oe;Oe=be=e;try{r=e.fn(t)}catch(a){return e.pure&&(V&&V.running?(e.tState=Et,e.tOwned&&e.tOwned.forEach(Rn),e.tOwned=void 0):(e.state=Et,e.owned&&e.owned.forEach(Rn),e.owned=null)),e.updatedAt=n+1,da(a)}finally{Oe=i,be=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?cd(e,r,!0):V&&V.running&&e.pure?(V.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function yl(e,t,n,r=Et,o){let i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:be,context:be?be.context:null,pure:n};if(V&&V.running&&(i.state=0,i.tState=r),be===null||be!==od&&(V&&V.running&&be.pure?be.tOwned?be.tOwned.push(i):be.tOwned=[i]:be.owned?be.owned.push(i):be.owned=[i]),Ur&&i.fn){let[a,s]=O(void 0,{equals:!1}),c=Ur.factory(i.fn,s);se(()=>c.dispose());let l=()=>nw(s).then(()=>u.dispose()),u=Ur.factory(i.fn,l);i.fn=f=>(a(),V&&V.running?u.track(f):c.track(f))}return i}function Bo(e){let t=V&&V.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===$o)return aa(e);if(e.suspense&&ze(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<la);){if(t&&V.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,i=n[r+1];for(;(o=o.owner)&&o!==i;)if(V.disposed.has(o))return}if((t?e.tState:e.state)===Et)Uo(e);else if((t?e.tState:e.state)===$o){let o=qe;qe=null,Bt(()=>aa(e,n[0]),!1),qe=o}}}function Bt(e,t){if(qe)return e();let n=!1;t||(qe=[]),it?n=!0:it=[],la++;try{let r=e();return rw(n),r}catch(r){n||(it=null),qe=null,da(r)}}function rw(e){if(qe&&(Fo&&V&&V.running?ow(qe):ud(qe),qe=null),e)return;let t;if(V){if(!V.promises.size&&!V.queue.size){let r=V.sources,o=V.disposed;it.push.apply(it,V.effects),t=V.resolve;for(let i of it)"tState"in i&&(i.state=i.tState),delete i.tState;V=null,Bt(()=>{for(let i of o)Rn(i);for(let i of r){if(i.value=i.tValue,i.owned)for(let a=0,s=i.owned.length;a<s;a++)Rn(i.owned[a]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}Ju(!1)},!1)}else if(V.running){V.running=!1,V.effects.push.apply(V.effects,it),it=null,Ju(!0);return}}let n=it;it=null,n.length&&Bt(()=>rd(n),!1),t&&t()}function ud(e){for(let t=0;t<e.length;t++)Bo(e[t])}function ow(e){for(let t=0;t<e.length;t++){let n=e[t],r=V.queue;r.has(n)||(r.add(n),Fo(()=>{r.delete(n),Bt(()=>{V.running=!0,Bo(n)},!1),V&&(V.running=!1)}))}}function iw(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:Bo(r)}if(ve.context){if(ve.count){ve.effects||(ve.effects=[]),ve.effects.push(...e.slice(0,n));return}pl()}for(ve.effects&&(ve.done||!ve.count)&&(e=[...ve.effects,...e],n+=ve.effects.length,delete ve.effects),t=0;t<n;t++)Bo(e[t])}function aa(e,t){let n=V&&V.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let o=e.sources[r];if(o.sources){let i=n?o.tState:o.state;i===Et?o!==t&&(!o.updatedAt||o.updatedAt<la)&&Bo(o):i===$o&&aa(o,t)}}}function dd(e){let t=V&&V.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=$o:r.state=$o,r.pure?qe.push(r):it.push(r),r.observers&&dd(r))}}function Rn(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){let i=o.pop(),a=n.observerSlots.pop();r<o.length&&(i.sourceSlots[a]=r,o[r]=i,n.observerSlots[r]=a)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Rn(e.tOwned[t]);delete e.tOwned}if(V&&V.running&&e.pure)fd(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Rn(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}V&&V.running?e.tState=0:e.state=0}function fd(e,t){if(t||(e.tState=0,V.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)fd(e.owned[n])}function aw(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ed(e,t,n){try{for(let r of t)r(e)}catch(r){da(r,n&&n.owner||null)}}function da(e,t=be){let n=Zu&&t&&t.context&&t.context[Zu],r=aw(e);if(!n)throw r;it?it.push({fn(){ed(r,n,t)},state:Et}):ed(r,n,t)}function gl(e){if(typeof e=="function"&&!e.length)return gl(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=gl(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function sw(e,t){return function(r){let o;return A(()=>o=ze(()=>(be.context={...be.context,[e]:r.value},ua(()=>r.children))),void 0),o}}var lw=Symbol("fallback");function td(e){for(let t=0;t<e.length;t++)e[t]()}function cw(e,t,n={}){let r=[],o=[],i=[],a=0,s=t.length>1?[]:null;return se(()=>td(i)),()=>{let c=e()||[],l=c.length,u,f;return c[sa],ze(()=>{let p,h,g,v,y,T,C,E,I;if(l===0)a!==0&&(td(i),i=[],r=[],o=[],a=0,s&&(s=[])),n.fallback&&(r=[lw],o[0]=tr(U=>(i[0]=U,n.fallback())),a=1);else if(a===0){for(o=new Array(l),f=0;f<l;f++)r[f]=c[f],o[f]=tr(d);a=l}else{for(g=new Array(l),v=new Array(l),s&&(y=new Array(l)),T=0,C=Math.min(a,l);T<C&&r[T]===c[T];T++);for(C=a-1,E=l-1;C>=T&&E>=T&&r[C]===c[E];C--,E--)g[E]=o[C],v[E]=i[C],s&&(y[E]=s[C]);for(p=new Map,h=new Array(E+1),f=E;f>=T;f--)I=c[f],u=p.get(I),h[f]=u===void 0?-1:u,p.set(I,f);for(u=T;u<=C;u++)I=r[u],f=p.get(I),f!==void 0&&f!==-1?(g[f]=o[u],v[f]=i[u],s&&(y[f]=s[u]),f=h[f],p.set(I,f)):i[u]();for(f=T;f<l;f++)f in g?(o[f]=g[f],i[f]=v[f],s&&(s[f]=y[f],s[f](f))):o[f]=tr(d);o=o.slice(0,a=l),r=c.slice(0)}return o});function d(p){if(i[f]=p,s){let[h,g]=O(f);return s[f]=g,t(c[f],h)}return t(c[f])}}}var uw=!1;function m(e,t){if(uw&&ve.context){let n=ve.context;pl(ew());let r=ze(()=>e(t||{}));return pl(n),r}return ze(()=>e(t||{}))}function oa(){return!0}var hl={get(e,t,n){return t===kt?n:e.get(t)},has(e,t){return t===kt?!0:e.has(t)},set:oa,deleteProperty:oa,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:oa,deleteProperty:oa}},ownKeys(e){return e.keys()}};function fl(e){return(e=typeof e=="function"?e():e)?e:{}}function dw(){for(let e=0,t=this.length;e<t;++e){let n=this[e]();if(n!==void 0)return n}}function Se(...e){let t=!1;for(let a=0;a<e.length;a++){let s=e[a];t=t||!!s&&kt in s,e[a]=typeof s=="function"?(t=!0,B(s)):s}if(nd&&t)return new Proxy({get(a){for(let s=e.length-1;s>=0;s--){let c=fl(e[s])[a];if(c!==void 0)return c}},has(a){for(let s=e.length-1;s>=0;s--)if(a in fl(e[s]))return!0;return!1},keys(){let a=[];for(let s=0;s<e.length;s++)a.push(...Object.keys(fl(e[s])));return[...new Set(a)]}},hl);let n={},r=Object.create(null);for(let a=e.length-1;a>=0;a--){let s=e[a];if(!s)continue;let c=Object.getOwnPropertyNames(s);for(let l=c.length-1;l>=0;l--){let u=c[l];if(u==="__proto__"||u==="constructor")continue;let f=Object.getOwnPropertyDescriptor(s,u);if(!r[u])r[u]=f.get?{enumerable:!0,configurable:!0,get:dw.bind(n[u]=[f.get.bind(s)])}:f.value!==void 0?f:void 0;else{let d=n[u];d&&(f.get?d.push(f.get.bind(s)):f.value!==void 0&&d.push(()=>f.value))}}}let o={},i=Object.keys(r);for(let a=i.length-1;a>=0;a--){let s=i[a],c=r[s];c&&c.get?Object.defineProperty(o,s,c):o[s]=c?c.value:void 0}return o}function Be(e,...t){if(nd&&kt in e){let o=new Set(t.length>1?t.flat():t[0]),i=t.map(a=>new Proxy({get(s){return a.includes(s)?e[s]:void 0},has(s){return a.includes(s)&&s in e},keys(){return a.filter(s=>s in e)}},hl));return i.push(new Proxy({get(a){return o.has(a)?void 0:e[a]},has(a){return o.has(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.has(a))}},hl)),i}let n={},r=t.map(()=>({}));for(let o of Object.getOwnPropertyNames(e)){let i=Object.getOwnPropertyDescriptor(e,o),a=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable,s=!1,c=0;for(let l of t)l.includes(o)&&(s=!0,a?r[c][o]=i.value:Object.defineProperty(r[c],o,i)),++c;s||(a?n[o]=i.value:Object.defineProperty(n,o,i))}return[...r,n]}var fw=0;function Jt(){return ve.context?ve.getNextContextId():`cl-${fw++}`}var pd=e=>`Stale read from <${e}>.`;function he(e){let t="fallback"in e&&{fallback:()=>e.fallback};return B(cw(()=>e.each,e.children,t||void 0))}function N(e){let t=e.keyed,n=B(()=>e.when,void 0,{equals:(r,o)=>t?r===o:!r==!o});return B(()=>{let r=n();if(r){let o=e.children;return typeof o=="function"&&o.length>0?ze(()=>o(t?r:()=>{if(!ze(n))throw pd("Show");return e.when})):o}return e.fallback},void 0,void 0)}function Ee(e){let t=!1,n=(i,a)=>(t?i[1]===a[1]:!i[1]==!a[1])&&i[2]===a[2],r=ua(()=>e.children),o=B(()=>{let i=r();Array.isArray(i)||(i=[i]);for(let a=0;a<i.length;a++){let s=i[a].when;if(s)return t=!!i[a].keyed,[a,s,i[a]]}return[-1]},void 0,{equals:n});return B(()=>{let[i,a,s]=o();if(i<0)return e.fallback;let c=s.children;return typeof c=="function"&&c.length>0?ze(()=>c(t?a:()=>{if(ze(o)[0]!==i)throw pd("Match");return s.when})):c},void 0,void 0)}function q(e){return e}var pw=["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"],mw=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...pw]),gw=new Set(["innerHTML","textContent","innerText","children"]),hw=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),bw=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 yw(e,t){let n=bw[e];return typeof n=="object"?n[t]?n.$:void 0:n}var xw=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),vw=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"]),ww={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Sw(e,t,n){let r=n.length,o=t.length,i=r,a=0,s=0,c=t[o-1].nextSibling,l=null;for(;a<o||s<i;){if(t[a]===n[s]){a++,s++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===a){let u=i<r?s?n[s-1].nextSibling:n[i-s]:c;for(;s<i;)e.insertBefore(n[s++],u)}else if(i===s)for(;a<o;)(!l||!l.has(t[a]))&&t[a].remove(),a++;else if(t[a]===n[i-1]&&n[s]===t[o-1]){let u=t[--o].nextSibling;e.insertBefore(n[s++],t[a++].nextSibling),e.insertBefore(n[--i],u),t[o]=n[i]}else{if(!l){l=new Map;let f=s;for(;f<i;)l.set(n[f],f++)}let u=l.get(t[a]);if(u!=null)if(s<u&&u<i){let f=a,d=1,p;for(;++f<o&&f<i&&!((p=l.get(t[f]))==null||p!==u+d);)d++;if(d>u-s){let h=t[a];for(;s<u;)e.insertBefore(n[s++],h)}else e.replaceChild(n[s++],t[a++])}else a++;else t[a++].remove()}}}var md="_$DX_DELEGATE";function S(e,t,n){let r,o=()=>{let a=document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:a.content.firstChild},i=t?()=>ze(()=>document.importNode(r||(r=o()),!0)):()=>(r||(r=o())).cloneNode(!0);return i.cloneNode=i,i}function Me(e,t=window.document){let n=t[md]||(t[md]=new Set);for(let r=0,o=e.length;r<o;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Iw))}}function j(e,t,n){nr(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Tw(e,t,n,r){nr(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Cw(e,t,n){nr(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function $(e,t){nr(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Fe(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)){let 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 _w(e,t,n={}){let r=Object.keys(t||{}),o=Object.keys(n),i,a;for(i=0,a=o.length;i<a;i++){let s=o[i];!s||s==="undefined"||t[s]||(gd(e,s,!1),delete n[s])}for(i=0,a=r.length;i<a;i++){let s=r[i],c=!!t[s];!s||s==="undefined"||n[s]===c||!c||(gd(e,s,!0),n[s]=c)}return n}function vl(e,t,n){if(!t)return n?j(e,"style"):t;let 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 Te(e,t={},n,r){let o={};return r||A(()=>o.children=Hr(e,t.children,o.children)),A(()=>typeof t.ref=="function"&&de(t.ref,e)),A(()=>kw(e,t,n,!0,o,!0)),o}function de(e,t,n){return ze(()=>e(t,n))}function x(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Hr(e,t,r,n);A(o=>Hr(e,t(),o,n),r)}function kw(e,t,n,r,o={},i=!1){t||(t={});for(let a in o)if(!(a in t)){if(a==="children")continue;o[a]=hd(e,a,null,o[a],n,i,t)}for(let a in t){if(a==="children"){r||Hr(e,t.children);continue}let s=t[a];o[a]=hd(e,a,s,o[a],n,i,t)}}function Ew(e){let t,n;return!nr()||!(t=ve.registry.get(n=Aw()))?e():(ve.completed&&ve.completed.add(t),ve.registry.delete(n),t)}function nr(e){return!!ve.context&&!ve.done&&(!e||e.isConnected)}function Pw(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function gd(e,t,n){let r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function hd(e,t,n,r,o,i,a){let s,c,l,u,f;if(t==="style")return vl(e,n,r);if(t==="classList")return _w(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){let d=t.slice(3);r&&e.removeEventListener(d,r,typeof r!="function"&&r),n&&e.addEventListener(d,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){let d=t.slice(10);r&&e.removeEventListener(d,r,!0),n&&e.addEventListener(d,n,!0)}else if(t.slice(0,2)==="on"){let d=t.slice(2).toLowerCase(),p=xw.has(d);if(!p&&r){let h=Array.isArray(r)?r[0]:r;e.removeEventListener(d,h)}(p||n)&&(Fe(e,d,n,p),p&&Me([d]))}else if(t.slice(0,5)==="attr:")j(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Cw(e,t.slice(5),n);else if((f=t.slice(0,5)==="prop:")||(l=gw.has(t))||!o&&((u=yw(t,e.tagName))||(c=mw.has(t)))||(s=e.nodeName.includes("-")||"is"in a)){if(f)t=t.slice(5),c=!0;else if(nr(e))return n;t==="class"||t==="className"?$(e,n):s&&!c&&!l?e[Pw(t)]=n:e[u||t]=n}else{let d=o&&t.indexOf(":")>-1&&ww[t.split(":")[0]];d?Tw(e,d,t,n):j(e,hw[t]||t,n)}return n}function Iw(e){if(ve.registry&&ve.events&&ve.events.find(([c,l])=>l===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=c=>Object.defineProperty(e,"target",{configurable:!0,value:c}),a=()=>{let c=t[n];if(c&&!t.disabled){let l=t[`${n}Data`];if(l!==void 0?c.call(t,l,e):c.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},s=()=>{for(;a()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),ve.registry&&!ve.done&&(ve.done=_$HY.done=!0),e.composedPath){let c=e.composedPath();i(c[0]);for(let l=0;l<c.length-2&&(t=c[l],!!a());l++){if(t._$host){t=t._$host,s();break}if(t.parentNode===o)break}}else s();i(r)}function Hr(e,t,n,r,o){let i=nr(e);if(i){!n&&(n=[...e.childNodes]);let c=[];for(let l=0;l<n.length;l++){let u=n[l];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():c.push(u)}n=c}for(;typeof n=="function";)n=n();if(t===n)return n;let a=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,a==="string"||a==="number"){if(i||a==="number"&&(t=t.toString(),t===n))return n;if(s){let c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=Vr(e,n,r,c)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||a==="boolean"){if(i)return n;n=Vr(e,n,r)}else{if(a==="function")return A(()=>{let c=t();for(;typeof c=="function";)c=c();n=Hr(e,c,n,r)}),()=>n;if(Array.isArray(t)){let c=[],l=n&&Array.isArray(n);if(xl(c,t,n,o))return A(()=>n=Hr(e,c,n,r,!0)),()=>n;if(i){if(!c.length)return n;if(r===void 0)return n=[...e.childNodes];let u=c[0];if(u.parentNode!==e)return n;let f=[u];for(;(u=u.nextSibling)!==r;)f.push(u);return n=f}if(c.length===0){if(n=Vr(e,n,r),s)return n}else l?n.length===0?bd(e,c,r):Sw(e,n,c):(n&&Vr(e),bd(e,c));n=c}else if(t.nodeType){if(i&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Vr(e,n,r,t);Vr(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function xl(e,t,n,r){let o=!1;for(let i=0,a=t.length;i<a;i++){let s=t[i],c=n&&n[e.length],l;if(!(s==null||s===!0||s===!1))if((l=typeof s)=="object"&&s.nodeType)e.push(s);else if(Array.isArray(s))o=xl(e,s,c)||o;else if(l==="function")if(r){for(;typeof s=="function";)s=s();o=xl(e,Array.isArray(s)?s:[s],Array.isArray(c)?c:[c])||o}else e.push(s),o=!0;else{let u=String(s);c&&c.nodeType===3&&c.data===u?e.push(c):e.push(document.createTextNode(u))}}return o}function bd(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Vr(e,t,n,r){if(n===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let i=!1;for(let a=t.length-1;a>=0;a--){let s=t[a];if(o!==s){let c=s.parentNode===e;!i&&!a?c?e.replaceChild(o,s):e.insertBefore(o,n):c&&s.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function Aw(){return ve.getNextContextId()}var M1=Symbol();var Ow="http://www.w3.org/2000/svg";function yd(e,t=!1){return t?document.createElementNS(Ow,e):document.createElement(e)}function xd(e){let{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=jr(),i,a=!!ve.context;return ge(()=>{a&&(jr().user=a=!1),i||(i=ad(o,()=>B(()=>e.children)));let s=r();if(s instanceof HTMLHeadElement){let[c,l]=O(!1),u=()=>l(!0);tr(f=>x(s,()=>c()?f():i(),null)),se(u)}else{let c=yd(e.isSVG?"g":"div",e.isSVG),l=t&&c.attachShadow?c.attachShadow({mode:"open"}):c;Object.defineProperty(c,"_$host",{get(){return n.parentNode},configurable:!0}),x(l,i),s.appendChild(c),e.ref&&e.ref(c),se(()=>s.removeChild(c))}},void 0,{render:!a}),n}function vd(e){let[t,n]=Be(e,["component"]),r=B(()=>t.component);return B(()=>{let o=r();switch(typeof o){case"function":return ze(()=>o(n));case"string":let i=vw.has(o),a=ve.context?Ew():yd(o,i);return Te(a,n,i),a}})}function Rw(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let[o,i]=O(e[t[r]]);Object.defineProperty(n,t[r],{get:o,set(a){i(()=>a)}})}return n}function Mw(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 Dw(e){return(t,n)=>{let{element:r}=n;return tr(o=>{let i=Rw(t);r.addPropertyChangedCallback((s,c)=>i[s]=c),r.addReleaseCallback(()=>{r.renderRoot.textContent="",o()});let a=e(i,n);return x(r.renderRoot,a)},Mw(r))}}function fa(e,t,n){return arguments.length===2&&(n=t,t={}),Yu(e,t)(Dw(n))}var pa={id:void 0,agent:void 0,onNewInputBlock:void 0,onAnswer:void 0,onEnd:void 0,onInit:void 0,onNewLogs:void 0,onChatStatePersisted:void 0,onScriptExecutionSuccess:void 0,font:void 0,progressBarRef:void 0,isPreview:void 0,startFrom:void 0,prefilledVariables:void 0,apiHost:void 0,resultId:void 0,sessionId:void 0},wd={...pa,onClose:void 0,onOpen:void 0,theme:void 0,autoShowDelay:void 0,isOpen:void 0,defaultOpen:void 0},Sd={...pa,onClose:void 0,onOpen:void 0,theme:void 0,previewMessage:void 0,onPreviewMessageClick:void 0,onPreviewMessageDismissed:void 0,autoShowDelay:void 0};var Td=e=>{sessionStorage.setItem("agentPaymentInProgress",JSON.stringify(e))},zr=()=>sessionStorage.getItem("agentPaymentInProgress"),ma=()=>{sessionStorage.removeItem("agentPaymentInProgress")};var Gr=class extends Error{constructor(t){super("This agent can only be executed on "+t)}};var Qt=(e,t)=>{if(typeof window<"u")return window.__ENV?window.__ENV[e]??t:void 0;if(!(typeof process>"u"))return process.env[e]??t};var Lw="https://r0.ar",bt=({ignoreChatApiUrl:e}={ignoreChatApiUrl:!1})=>{let t=Qt("NEXT_PUBLIC_CHAT_API_URL"),n=Qt("NEXT_PUBLIC_USE_EXPERIMENTAL_CHAT_API_ON")?.split(",");if(!e&&t&&(!n||n.some(i=>i===window.location.href)))return t;let r=Qt("NEXT_PUBLIC_VIEWER_URL")?.split(",");return r?.find(i=>window.location.href.startsWith(i))??r?.[0]??Lw};function Cd(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=Cd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pt(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Cd(e))&&(r&&(r+=" "),r+=t);return r}var pe=Pt;var Tl="-",Nw=e=>{let t=Bw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{let s=a.split(Tl);return s[0]===""&&s.length!==1&&s.shift(),Ed(s,t)||$w(a)},getConflictingClassGroupIds:(a,s)=>{let c=n[a]||[];return s&&r[a]?[...c,...r[a]]:c}}},Ed=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],r=t.nextPart.get(n),o=r?Ed(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;let i=e.join(Tl);return t.validators.find(({validator:a})=>a(i))?.classGroupId},_d=/^\[(.+)\]$/,$w=e=>{if(_d.test(e)){let t=_d.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Bw=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Uw(Object.entries(e.classGroups),n).forEach(([i,a])=>{Sl(a,r,i,t)}),r},Sl=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){let i=o===""?t:kd(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Fw(o)){Sl(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Sl(a,kd(t,i),n,r)})})},kd=(e,t)=>{let n=e;return t.split(Tl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Fw=e=>e.isThemeGetter,Uw=(e,t)=>t?e.map(([n,r])=>{let o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[n,o]}):e,jw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map,o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},Pd="!",Vw=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=s=>{let c=[],l=0,u=0,f;for(let v=0;v<s.length;v++){let y=s[v];if(l===0){if(y===o&&(r||s.slice(v,v+i)===t)){c.push(s.slice(u,v)),u=v+i;continue}if(y==="/"){f=v;continue}}y==="["?l++:y==="]"&&l--}let d=c.length===0?s:s.substring(u),p=d.startsWith(Pd),h=p?d.substring(1):d,g=f&&f>u?f-u:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:g}};return n?s=>n({className:s,parseClassName:a}):a},Hw=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},zw=e=>({cache:jw(e.cacheSize),parseClassName:Vw(e),...Nw(e)}),Gw=/\s+/,Ww=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(Gw),s="";for(let c=a.length-1;c>=0;c-=1){let l=a[c],{modifiers:u,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:p}=n(l),h=!!p,g=r(h?d.substring(0,p):d);if(!g){if(!h){s=l+(s.length>0?" "+s:s);continue}if(g=r(d),!g){s=l+(s.length>0?" "+s:s);continue}h=!1}let v=Hw(u).join(":"),y=f?v+Pd:v,T=y+g;if(i.includes(T))continue;i.push(T);let C=o(g,h);for(let E=0;E<C.length;++E){let I=C[E];i.push(y+I)}s=l+(s.length>0?" "+s:s)}return s};function qw(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Id(t))&&(r&&(r+=" "),r+=n);return r}var Id=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Id(e[r]))&&(n&&(n+=" "),n+=t);return n};function Kw(e,...t){let n,r,o,i=a;function a(c){let l=t.reduce((u,f)=>f(u),e());return n=zw(l),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){let l=r(c);if(l)return l;let u=Ww(c,n);return o(c,u),u}return function(){return i(qw.apply(null,arguments))}}var De=e=>{let t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ad=/^\[(?:([a-z-]+):)?(.+)\]$/i,Yw=/^\d+\/\d+$/,Xw=new Set(["px","full","screen"]),Zw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jw=/\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$/,Qw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,e0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hn=e=>Wr(e)||Xw.has(e)||Yw.test(e),Mn=e=>qr(e,"length",c0),Wr=e=>!!e&&!Number.isNaN(Number(e)),wl=e=>qr(e,"number",Wr),jo=e=>!!e&&Number.isInteger(Number(e)),n0=e=>e.endsWith("%")&&Wr(e.slice(0,-1)),me=e=>Ad.test(e),Dn=e=>Zw.test(e),r0=new Set(["length","size","percentage"]),o0=e=>qr(e,r0,Od),i0=e=>qr(e,"position",Od),a0=new Set(["image","url"]),s0=e=>qr(e,a0,d0),l0=e=>qr(e,"",u0),Vo=()=>!0,qr=(e,t,n)=>{let r=Ad.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},c0=e=>Jw.test(e)&&!Qw.test(e),Od=()=>!1,u0=e=>e0.test(e),d0=e=>t0.test(e);var f0=()=>{let e=De("colors"),t=De("spacing"),n=De("blur"),r=De("brightness"),o=De("borderColor"),i=De("borderRadius"),a=De("borderSpacing"),s=De("borderWidth"),c=De("contrast"),l=De("grayscale"),u=De("hueRotate"),f=De("invert"),d=De("gap"),p=De("gradientColorStops"),h=De("gradientColorStopPositions"),g=De("inset"),v=De("margin"),y=De("opacity"),T=De("padding"),C=De("saturate"),E=De("scale"),I=De("sepia"),U=De("skew"),R=De("space"),oe=De("translate"),H=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",me,t],P=()=>[me,t],_=()=>["",hn,Mn],w=()=>["auto",Wr,me],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>["start","end","center","between","around","evenly","stretch"],le=()=>["","0",me],xe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],we=()=>[Wr,me];return{cacheSize:500,separator:":",theme:{colors:[Vo],spacing:[hn,Mn],blur:["none","",Dn,me],brightness:we(),borderColor:[e],borderRadius:["none","","full",Dn,me],borderSpacing:P(),borderWidth:_(),contrast:we(),grayscale:le(),hueRotate:we(),invert:le(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[n0,Mn],inset:L(),margin:L(),opacity:we(),padding:P(),saturate:we(),scale:we(),sepia:le(),skew:we(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",me]}],container:["container"],columns:[{columns:[Dn]}],"break-after":[{"break-after":xe()}],"break-before":[{"break-before":xe()}],"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:[...M(),me]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],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",jo,me]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",me]}],grow:[{grow:le()}],shrink:[{shrink:le()}],order:[{order:["first","last","none",jo,me]}],"grid-cols":[{"grid-cols":[Vo]}],"col-start-end":[{col:["auto",{span:["full",jo,me]},me]}],"col-start":[{"col-start":w()}],"col-end":[{"col-end":w()}],"grid-rows":[{"grid-rows":[Vo]}],"row-start-end":[{row:["auto",{span:[jo,me]},me]}],"row-start":[{"row-start":w()}],"row-end":[{"row-end":w()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",me]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...ue()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ue(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ue(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",me,t]}],"min-w":[{"min-w":[me,t,"min","max","fit"]}],"max-w":[{"max-w":[me,t,"none","full","min","max","fit","prose",{screen:[Dn]},Dn]}],h:[{h:[me,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[me,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[me,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[me,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Dn,Mn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wl]}],"font-family":[{font:[Vo]}],"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",me]}],"line-clamp":[{"line-clamp":["none",Wr,wl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",hn,me]}],"list-image":[{"list-image":["none",me]}],"list-style-type":[{list:["none","disc","decimal",me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",hn,Mn]}],"underline-offset":[{"underline-offset":["auto",hn,me]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me]}],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",me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),i0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",o0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},s0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:D()}],"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:["",...D()]}],"outline-offset":[{"outline-offset":[hn,me]}],"outline-w":[{outline:[hn,Mn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[hn,Mn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Dn,l0]}],"shadow-color":[{shadow:[Vo]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...J(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":J()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Dn,me]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[C]}],sepia:[{sepia:[I]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",me]}],duration:[{duration:we()}],ease:[{ease:["linear","in","out","in-out",me]}],delay:[{delay:we()}],animate:[{animate:["none","spin","ping","pulse","bounce",me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[jo,me]}],"translate-x":[{"translate-x":[oe]}],"translate-y":[{"translate-y":[oe]}],"skew-x":[{"skew-x":[U]}],"skew-y":[{"skew-y":[U]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me]}],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",me]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",me]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[hn,Mn,wl]}],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"]}}};var Rd=Kw(f0);var eS=Fr(Pf(),1),tS=Fr(Af(),1);var tA=String.fromCharCode;var Of=async e=>{let t;try{let n=typeof e=="string"?e:e.url;t=await fetch(n,{method:typeof e=="string"?"GET":e.method,mode:"cors",headers:typeof e!="string"&&re(e.body)?{"Content-Type":"application/json"}:void 0,body:typeof e!="string"&&re(e.body)?JSON.stringify(e.body):void 0});let r=await t.json();if(!t.ok)throw typeof r=="object"&&r!==null&&"error"in r?r.error:r;return{data:r,response:t}}catch(n){return console.error(n),{error:n,response:t}}},re=e=>e!=null,Ge=e=>e==null,$e=e=>e==null||e==="",Ce=e=>e!=null&&e!=="";var Rf=e=>{e.split("</noscript>").forEach(n=>{let[r,o]=n.split("<noscript>"),i=document.createRange().createContextualFragment(r??"");if(document.head.append(i),Ge(o))return;let a=document.createElement("noscript"),s=document.createRange().createContextualFragment(o);a.append(s),document.head.append(a)})};var Ft=e=>e?.startsWith("data:image/svg")||e?.endsWith(".svg");var en=class extends Error{constructor(t,n,r){let o=t.status||t.status===0?t.status:"",i=t.statusText||"",a=`${o} ${i}`.trim(),s=a?`status code ${a}`:"an unknown error";super(`Request failed with ${s}`),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="HTTPError",this.response=t,this.request=n,this.options=r}};var Qr=class extends Error{constructor(t){super("Request timed out"),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.request=t}};var Ko=e=>e!==null&&typeof e=="object";var Yo=(...e)=>{for(let t of e)if((!Ko(t)||Array.isArray(t))&&t!==void 0)throw new TypeError("The `options` argument must be an object");return xa({},...e)},Ol=(e={},t={})=>{let n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(let[i,a]of o.entries())r&&a==="undefined"||a===void 0?n.delete(i):n.set(i,a);return n},xa=(...e)=>{let t={},n={};for(let r of e)if(Array.isArray(r))Array.isArray(t)||(t=[]),t=[...t,...r];else if(Ko(r)){for(let[o,i]of Object.entries(r))Ko(i)&&o in t&&(i=xa(t[o],i)),t={...t,[o]:i};Ko(r.headers)&&(n=Ol(n,r.headers),t.headers=n)}return t};var Mf=(()=>{let e=!1,t=!1,n=typeof globalThis.ReadableStream=="function",r=typeof globalThis.Request=="function";return n&&r&&(t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")),e&&!t})(),Df=typeof globalThis.AbortController=="function",Lf=typeof globalThis.ReadableStream=="function",Nf=typeof globalThis.FormData=="function",va=["get","post","put","patch","head","delete"],nS=()=>{};nS();var $f={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},wa=2147483647,Sa=Symbol("stop"),Bf={json:!0,parseJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,fetch:!0},Ff={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0};var jf=e=>va.includes(e)?e.toUpperCase():e,rS=["get","put","head","delete","options","trace"],oS=[408,413,429,500,502,503,504],Vf=[413,429,503],Uf={limit:2,methods:rS,statusCodes:oS,afterStatusCodes:Vf,maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},Hf=(e={})=>{if(typeof e=="number")return{...Uf,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...Uf,...e,afterStatusCodes:Vf}};async function Rl(e,t,n,r){return new Promise((o,i)=>{let a=setTimeout(()=>{n&&n.abort(),i(new Qr(e))},r.timeout);r.fetch(e,t).then(o).catch(i).then(()=>{clearTimeout(a)})})}async function Ml(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));function o(){clearTimeout(i),r(t.reason)}let i=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e)})}var zf=(e,t)=>{let n={};for(let r in t)!(r in Ff)&&!(r in Bf)&&!(r in e)&&(n[r]=t[r]);return n};var Xo=class e{static create(t,n){let r=new e(t,n),o=async()=>{if(typeof r._options.timeout=="number"&&r._options.timeout>wa)throw new RangeError(`The \`timeout\` option cannot be greater than ${wa}`);await Promise.resolve();let s=await r._fetch();for(let c of r._options.hooks.afterResponse){let l=await c(r.request,r._options,r._decorateResponse(s.clone()));l instanceof globalThis.Response&&(s=l)}if(r._decorateResponse(s),!s.ok&&r._options.throwHttpErrors){let c=new en(s,r.request,r._options);for(let l of r._options.hooks.beforeError)c=await l(c);throw c}if(r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!Lf)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return r._stream(s.clone(),r._options.onDownloadProgress)}return s},a=r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(o):o();for(let[s,c]of Object.entries($f))a[s]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||c);let u=(await a).clone();if(s==="json"){if(u.status===204||(await u.clone().arrayBuffer()).byteLength===0)return"";if(n.parseJson)return n.parseJson(await u.text())}return u[s]()};return a}constructor(t,n={}){Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"abortController",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_retryCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._input=t;let r=this._input instanceof Request&&"credentials"in Request.prototype?this._input.credentials:void 0;if(this._options={...r&&{credentials:r},...n,headers:Ol(this._input.headers,n.headers),hooks:xa({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:jf(n.method??this._input.method),prefixUrl:String(n.prefixUrl||""),retry:Hf(n.retry),throwHttpErrors:n.throwHttpErrors!==!1,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(Df){if(this.abortController=new globalThis.AbortController,this._options.signal){let o=this._options.signal;this._options.signal.addEventListener("abort",()=>{this.abortController.abort(o.reason)})}this._options.signal=this.abortController.signal}if(Mf&&(this._options.duplex="half"),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let i="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),a=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,i);(Nf&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(a,{...this.request}),this._options)}this._options.json!==void 0&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type",this._options.headers.get("content-type")??"application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}))}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<=this._options.retry.limit&&!(t instanceof Qr)){if(t instanceof en){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;let r=t.response.headers.get("Retry-After");if(r&&this._options.retry.afterStatusCodes.includes(t.response.status)){let o=Number(r);return Number.isNaN(o)?o=Date.parse(r)-Date.now():o*=1e3,this._options.retry.maxRetryAfter!==void 0&&o>this._options.retry.maxRetryAfter?0:o}if(t.response.status===413)return 0}let n=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,n)}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(n){let r=Math.min(this._calculateRetryDelay(n),wa);if(r!==0&&this._retryCount>0){await Ml(r,{signal:this._options.signal});for(let o of this._options.hooks.beforeRetry)if(await o({request:this.request,options:this._options,error:n,retryCount:this._retryCount})===Sa)return;return this._retry(t)}throw n}}async _fetch(){for(let n of this._options.hooks.beforeRequest){let r=await n(this.request,this._options);if(r instanceof Request){this.request=r;break}if(r instanceof Response)return r}let t=zf(this.request,this._options);return this._options.timeout===!1?this._options.fetch(this.request.clone(),t):Rl(this.request.clone(),t,this.abortController,this._options)}_stream(t,n){let r=Number(t.headers.get("content-length"))||0,o=0;return t.status===204?(n&&n({percent:1,totalBytes:r,transferredBytes:o},new Uint8Array),new globalThis.Response(null,{status:t.status,statusText:t.statusText,headers:t.headers})):new globalThis.Response(new globalThis.ReadableStream({async start(i){let a=t.body.getReader();n&&n({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array);async function s(){let{done:c,value:l}=await a.read();if(c){i.close();return}if(n){o+=l.byteLength;let u=r===0?0:o/r;n({percent:u,transferredBytes:o,totalBytes:r},l)}i.enqueue(l),await s()}await s()}}),{status:t.status,statusText:t.statusText,headers:t.headers})}};var Dl=e=>{let t=(n,r)=>Xo.create(n,Yo(e,r));for(let n of va)t[n]=(r,o)=>Xo.create(r,Yo(e,o,{method:n}));return t.create=n=>Dl(Yo(n)),t.extend=n=>Dl(Yo(e,n)),t.stop=Sa,t},iS=Dl(),$n=iS;async function Gf({agent:e,isPreview:t,apiHost:n,prefilledVariables:r,resultId:o,stripeRedirectStatus:i,startFrom:a,sessionId:s}){if(Ge(e))throw new Error("Agent is required to start the chat");let c=zr()??void 0,l=c?JSON.parse(c):void 0;if(l)return aS({apiHost:n,stripeRedirectStatus:i,paymentInProgressState:l});let u=typeof e=="string"?e:e.id;if(t)return sS({apiHost:n,agentId:u,startFrom:a,agent:e,prefilledVariables:r,sessionId:s});try{let f=parent!==window&&Ce(document.referrer)?new URL(document.referrer).origin:void 0,d=await $n.post(`${Ll(n)}/api/v1/agents/${u}/startChat`,{headers:{"x-agent-iframe-referrer-origin":f},json:{isStreamEnabled:!0,prefilledVariables:r,resultId:o,isOnlyRegistering:!1},timeout:!1}),p=d.headers.get("access-control-allow-origin");if(f&&p&&p!=="*"&&!f.includes(p))throw new Gr(p);return{data:await d.json()}}catch(f){return{error:f}}}var aS=async({apiHost:e,stripeRedirectStatus:t,paymentInProgressState:n})=>{ma();try{return{data:{...await $n.post(`${Ll(e)}/api/v1/sessions/${n.sessionId}/continueChat`,{json:{message:t==="failed"?"fail":"Success"},timeout:!1}).json(),...n}}}catch(r){return{error:r}}},sS=async({apiHost:e,agentId:t,startFrom:n,agent:r,prefilledVariables:o,sessionId:i})=>{try{return{data:await $n.post(`${Ll(e)}/api/v1/agents/${t}/preview/startChat`,{json:{isStreamEnabled:!0,startFrom:n,agent:r,prefilledVariables:o,sessionId:i},timeout:!1}).json()}}catch(a){return{error:a}}},Ll=e=>Ce(e)?e:bt();var[Wf,qf]=O("100%");var[YA,Kf]=O();var Ta="#303235",Ca="#FFFFFF",Yf="Google",eo="Open Sans",to="Color",Zo="#ffffff";var Xf="#000",Zf="#000",Jf=2,_a="absolute",Qf="Top",or="medium",dt=1,ep=0,tp="800px",np="100%",Jo="transparent";var no="#F7F8FF",rp=Ta,op="#FF8E21",ip=Ca,Qo="#0042DA",ap=Ca,sp=1;var lp="#FFFFFF",ei=Ta,cp="#9095A0",up="md";var ro=!0,ti=!1;var lS="https://fonts.bunny.net/css2",ka="agent-font",Nl=e=>{let t=document.getElementById(ka);if(typeof e=="string"||e.type==="Google"){let n=(typeof e=="string"?e:e.family)??eo;if(t?.getAttribute("href")?.includes(n))return;t?.remove();let r=document.createElement("link");r.href=`${lS}?family=${n}:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap`,r.rel="stylesheet",r.id=ka,document.head.appendChild(r);return}if(e.type==="Custom"){if(Ce(e.css)){if(t?.innerHTML===e.css)return;t?.remove();let n=document.createElement("style");n.innerHTML=e.css,n.id=ka,document.head.appendChild(n)}if(Ce(e.url)){if(t?.getAttribute("href")===e.url)return;t?.remove();let n=document.createElement("link");n.href=e.url,n.rel="stylesheet",n.id=ka,document.head.appendChild(n)}}};var[K,dp]=O();var Je={general:{isInputPrefillEnabled:!1,isHideQueryParamsEnabled:!0,isNewResultOnRefreshEnabled:!0,rememberUser:{isEnabled:!1,storage:"session"},isBrandingEnabled:!1,isTypingEmulationEnabled:!0},typingEmulation:{enabled:!0,speed:400,maxDelay:3,delayBetweenBubbles:0,isDisabledOnFirstMessage:!0},metadata:{description:"Automate customer interactions with Release0. Build AI agents that respond, collect data, and integrate seamlessly\u2014without writing code.",favIconUrl:e=>e+"/favicon.png",imageUrl:e=>e+"/site-preview.png"}};var $l=Symbol("store-raw"),io=Symbol("store-node"),yn=Symbol("store-has"),fp=Symbol("store-self");function pp(e){let t=e[kt];if(!t&&(Object.defineProperty(e,kt,{value:t=new Proxy(e,dS)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,i=n.length;o<i;o++){let a=n[o];r[a].get&&Object.defineProperty(e,a,{enumerable:r[a].enumerable,get:r[a].get.bind(t)})}}return t}function Bn(e){let t;return e!=null&&typeof e=="object"&&(e[kt]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function ao(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[$l])return n;if(!Bn(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let a=0,s=e.length;a<s;a++)o=e[a],(r=ao(o,t))!==o&&(e[a]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let a=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let c=0,l=a.length;c<l;c++)i=a[c],!s[i].get&&(o=e[i],(r=ao(o,t))!==o&&(e[i]=r))}return e}function Ea(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function ri(e,t,n){if(e[t])return e[t];let[r,o]=O(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function cS(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===kt||t===io||(delete n.value,delete n.writable,n.get=()=>e[kt][t]),n}function mp(e){ca()&&ri(Ea(e,io),fp)()}function uS(e){return mp(e),Reflect.ownKeys(e)}var dS={get(e,t,n){if(t===$l)return e;if(t===kt)return n;if(t===sa)return mp(e),n;let r=Ea(e,io),o=r[t],i=o?o():e[t];if(t===io||t===yn||t==="__proto__")return i;if(!o){let a=Object.getOwnPropertyDescriptor(e,t);ca()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(a&&a.get)&&(i=ri(r,t,i)())}return Bn(i)?pp(i):i},has(e,t){return t===$l||t===kt||t===sa||t===io||t===yn||t==="__proto__"?!0:(ca()&&ri(Ea(e,yn),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:uS,getOwnPropertyDescriptor:cS};function It(e,t,n,r=!1){if(!r&&e[t]===n)return;let o=e[t],i=e.length;n===void 0?(delete e[t],e[yn]&&e[yn][t]&&o!==void 0&&e[yn][t].$()):(e[t]=n,e[yn]&&e[yn][t]&&o===void 0&&e[yn][t].$());let a=Ea(e,io),s;if((s=ri(a,t,o))&&s.$(()=>n),Array.isArray(e)&&e.length!==i){for(let c=e.length;c<i;c++)(s=a[c])&&s.$();(s=ri(a,"length",i))&&s.$(e.length)}(s=a[fp])&&s.$()}function gp(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let o=n[r];It(e,o,t[o])}}function fS(e,t){if(typeof t=="function"&&(t=t(e)),t=ao(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let o=t[n];e[n]!==o&&It(e,n,o)}It(e,"length",r)}else gp(e,t)}function ni(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();let a=typeof r,s=Array.isArray(e);if(Array.isArray(r)){for(let c=0;c<r.length;c++)ni(e,[r[c]].concat(t),n);return}else if(s&&a==="function"){for(let c=0;c<e.length;c++)r(e[c],c)&&ni(e,[c].concat(t),n);return}else if(s&&a==="object"){let{from:c=0,to:l=e.length-1,by:u=1}=r;for(let f=c;f<=l;f+=u)ni(e,[f].concat(t),n);return}else if(t.length>1){ni(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=ao(i),r===void 0||Bn(o)&&Bn(i)&&!Array.isArray(i)?gp(o,i):It(e,r,i))}function hp(...[e,t]){let n=ao(e||{}),r=Array.isArray(n),o=pp(n);function i(...a){id(()=>{r&&a.length===1?fS(n,a[0]):ni(n,a)})}return[o,i]}var Bl=Symbol("store-root");function oo(e,t,n,r,o){let i=t[n];if(e===i)return;let a=Array.isArray(e);if(n!==Bl&&(!Bn(e)||!Bn(i)||a!==Array.isArray(i)||o&&e[o]!==i[o])){It(t,n,e);return}if(a){if(e.length&&i.length&&(!r||o&&e[0]&&e[0][o]!=null)){let l,u,f,d,p,h,g,v;for(f=0,d=Math.min(i.length,e.length);f<d&&(i[f]===e[f]||o&&i[f]&&e[f]&&i[f][o]===e[f][o]);f++)oo(e[f],i,f,r,o);let y=new Array(e.length),T=new Map;for(d=i.length-1,p=e.length-1;d>=f&&p>=f&&(i[d]===e[p]||o&&i[f]&&e[f]&&i[d][o]===e[p][o]);d--,p--)y[p]=i[d];if(f>p||f>d){for(u=f;u<=p;u++)It(i,u,e[u]);for(;u<e.length;u++)It(i,u,y[u]),oo(e[u],i,u,r,o);i.length>e.length&&It(i,"length",e.length);return}for(g=new Array(p+1),u=p;u>=f;u--)h=e[u],v=o&&h?h[o]:h,l=T.get(v),g[u]=l===void 0?-1:l,T.set(v,u);for(l=f;l<=d;l++)h=i[l],v=o&&h?h[o]:h,u=T.get(v),u!==void 0&&u!==-1&&(y[u]=i[l],u=g[u],T.set(v,u));for(u=f;u<e.length;u++)u in y?(It(i,u,y[u]),oo(e[u],i,u,r,o)):It(i,u,e[u])}else for(let l=0,u=e.length;l<u;l++)oo(e[l],i,l,r,o);i.length>e.length&&It(i,"length",e.length);return}let s=Object.keys(e);for(let l=0,u=s.length;l<u;l++)oo(e[s[l]],i,s[l],r,o);let c=Object.keys(i);for(let l=0,u=c.length;l<u;l++)e[c[l]]===void 0&&It(i,c[l],void 0)}function Pa(e,t={}){let{merge:n,key:r="id"}=t,o=ao(e);return i=>{if(!Bn(i)||!Bn(o))return o;let a=oo(o,{[Bl]:i},Bl,n,r);return a===void 0?i:a}}function tn(e,t){if(!t.storage)return[...e];let n=pS(t.storage||Je.general.rememberUser.storage),r=s=>{let c=JSON.parse(JSON.stringify(s));return typeof c!="object"||("blobUrl"in c&&(c.blobUrl=void 0),"attachments"in c&&Array.isArray(c.attachments)&&c.attachments.forEach(l=>{l&&"blobUrl"in l&&(l.blobUrl=void 0)})),JSON.stringify(c)},o=JSON.parse.bind(JSON),i=n.getItem(t.key),a=typeof e[0]=="function"?s=>e[1](()=>o(s)):s=>e[1](Pa(o(s)));return i&&(a(i),t.onRecovered?.()),[e[0],typeof e[0]=="function"?s=>{let c=e[1](s);return s?n.setItem(t.key,r(c)):n.removeItem(t.key),c}:(...s)=>{e[1](...s);let c=r(ze(()=>e[0]));n.setItem(t.key,c)}]}var pS=e=>(e??Je.general.rememberUser.storage)==="session"?sessionStorage:localStorage;var Ke=e=>{let t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,(r,o,i,a)=>o+o+i+i+a+a);let n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?[Number.parseInt(n[1]??"",16),Number.parseInt(n[2]??"",16),Number.parseInt(n[3]??"",16)]:[0,0,0]},xn=e=>(([t,n,r])=>(t*299+n*587+r*114)/1e3>155)(Ke(e));var bp=({chatContainer:e,generalBackground:t})=>{let n=e?.backgroundColor??Jo;if((e?.opacity??dt)<=.3||n==="transparent"||$e(n)){let o=t?.type??to,i=o==="Image"?"#000000":o==="Color"&&Ce(t?.content)?t.content:"#ffffff";return xn(i)}return xn(e?.backgroundColor??Zo)};var W={general:{bgImage:"--agent-container-bg-image",bgColor:"--agent-container-bg-color",fontFamily:"--agent-container-font-family",progressBar:{position:"--agent-progress-bar-position",color:"--agent-progress-bar-color",colorRgb:"--agent-progress-bar-bg-rgb",height:"--agent-progress-bar-height",top:"--agent-progress-bar-top",bottom:"--agent-progress-bar-bottom"}},chat:{container:{maxWidth:"--agent-chat-container-max-width",maxHeight:"--agent-chat-container-max-height",bgColor:"--agent-chat-container-bg-rgb",color:"--agent-chat-container-color",borderRadius:"--agent-chat-container-border-radius",borderWidth:"--agent-chat-container-border-width",borderColor:"--agent-chat-container-border-rgb",borderOpacity:"--agent-chat-container-border-opacity",opacity:"--agent-chat-container-opacity",blur:"--agent-chat-container-blur",boxShadow:"--agent-chat-container-box-shadow"},hostBubbles:{bgColor:"--agent-host-bubble-bg-rgb",color:"--agent-host-bubble-color",borderRadius:"--agent-host-bubble-border-radius",borderWidth:"--agent-host-bubble-border-width",borderColor:"--agent-host-bubble-border-rgb",borderOpacity:"--agent-host-bubble-border-opacity",opacity:"--agent-host-bubble-opacity",blur:"--agent-host-bubble-blur",boxShadow:"--agent-host-bubble-box-shadow"},guestBubbles:{bgColor:"--agent-guest-bubble-bg-rgb",color:"--agent-guest-bubble-color",borderRadius:"--agent-guest-bubble-border-radius",borderWidth:"--agent-guest-bubble-border-width",borderColor:"--agent-guest-bubble-border-rgb",borderOpacity:"--agent-guest-bubble-border-opacity",opacity:"--agent-guest-bubble-opacity",blur:"--agent-guest-bubble-blur",boxShadow:"--agent-guest-bubble-box-shadow"},inputs:{bgColor:"--agent-input-bg-rgb",color:"--agent-input-color",placeholderColor:"--agent-input-placeholder-color",borderRadius:"--agent-input-border-radius",borderWidth:"--agent-input-border-width",borderColor:"--agent-input-border-rgb",borderOpacity:"--agent-input-border-opacity",opacity:"--agent-input-opacity",blur:"--agent-input-blur",boxShadow:"--agent-input-box-shadow"},buttons:{bgRgb:"--agent-button-bg-rgb",color:"--agent-button-color",borderRadius:"--agent-button-border-radius",borderWidth:"--agent-button-border-width",borderColor:"--agent-button-border-rgb",borderOpacity:"--agent-button-border-opacity",opacity:"--agent-button-opacity",blur:"--agent-button-blur",boxShadow:"--agent-button-box-shadow"},checkbox:{bgRgb:"--agent-checkbox-bg-rgb",alphaRatio:"--selectable-alpha-ratio"}}},yp=(e,t,n)=>{if(!e)return;let r=t?.style;r&&(gS(e.general,r,n),bS(e.chat,e.general?.background,r))},gS=(e,t,n)=>{CS(e?.background,t),t.setProperty(W.general.fontFamily,(typeof e?.font=="string"?e.font:e?.font?.family)??eo),hS(e?.progressBar,t,n)},hS=(e,t,n)=>{let r=e?.position??_a;t.setProperty(W.general.progressBar.position,r==="fixed"?n?"absolute":"fixed":r),t.setProperty(W.general.progressBar.color,e?.color??Xf),t.setProperty(W.general.progressBar.colorRgb,Ke(e?.backgroundColor??Zf).join(", ")),t.setProperty(W.general.progressBar.height,`${e?.thickness??Jf}px`);let o=e?.placement??Qf;t.setProperty(W.general.progressBar.top,o==="Top"?"0":"auto"),t.setProperty(W.general.progressBar.bottom,o==="Bottom"?"0":"auto")},bS=(e,t,n)=>{yS(e?.container,t,n,e?.roundness),xS(e?.hostBubbles,n,e?.roundness),vS(e?.guestBubbles,n,e?.roundness),wS(e?.buttons,n,e?.roundness),SS(e?.inputs,n,e?.roundness),TS(e?.container,t,n)},yS=(e,t,n,r)=>{let o=e?.backgroundColor??Jo,i=o==="transparent"||$e(o);n.setProperty(W.chat.container.bgColor,i?"0, 0, 0":Ke(o).join(", ")),n.setProperty(W.chat.container.color,Ke(e?.color??(bp({chatContainer:e,generalBackground:t})?Ta:Ca)).join(", ")),n.setProperty(W.chat.container.maxWidth,e?.maxWidth??tp),n.setProperty(W.chat.container.maxHeight,e?.maxHeight??np);let a=i?"1":(e?.opacity??dt).toString();n.setProperty(W.chat.container.opacity,i?"0":(e?.opacity??dt).toString()),n.setProperty(W.chat.container.blur,a==="1"||i?"0xp":`${e?.blur??ep}px`),ii(e?.shadow,n,W.chat.container.boxShadow),oi(e?.border??{roundeness:r??or},n,W.chat.container.borderRadius),n.setProperty(W.chat.container.borderWidth,re(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),n.setProperty(W.chat.container.borderOpacity,re(e?.border?.opacity)?e.border.opacity.toString():dt.toString()),n.setProperty(W.chat.container.borderColor,Ke(e?.border?.color??"").join(", "))},xS=(e,t,n)=>{t.setProperty(W.chat.hostBubbles.bgColor,Ke(e?.backgroundColor??no).join(", ")),t.setProperty(W.chat.hostBubbles.color,e?.color??rp),oi(e?.border??{roundeness:n??or},t,W.chat.hostBubbles.borderRadius),t.setProperty(W.chat.hostBubbles.borderWidth,re(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),t.setProperty(W.chat.hostBubbles.borderColor,Ke(e?.border?.color??"").join(", ")),t.setProperty(W.chat.hostBubbles.opacity,e?.backgroundColor==="transparent"?"0":re(e?.opacity)?e.opacity.toString():dt.toString()),t.setProperty(W.chat.hostBubbles.borderOpacity,re(e?.border?.opacity)?e.border.opacity.toString():dt.toString()),t.setProperty(W.chat.hostBubbles.blur,re(e?.blur)?`${e.blur??0}px`:"none"),ii(e?.shadow,t,W.chat.hostBubbles.boxShadow)},vS=(e,t,n)=>{t.setProperty(W.chat.guestBubbles.bgColor,Ke(e?.backgroundColor??op).join(", ")),t.setProperty(W.chat.guestBubbles.color,e?.color??ip),oi(e?.border??{roundeness:n??or},t,W.chat.guestBubbles.borderRadius),t.setProperty(W.chat.guestBubbles.borderWidth,re(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),t.setProperty(W.chat.guestBubbles.borderColor,Ke(e?.border?.color??"").join(", ")),t.setProperty(W.chat.guestBubbles.borderOpacity,re(e?.border?.opacity)?e.border.opacity.toString():dt.toString()),t.setProperty(W.chat.guestBubbles.opacity,e?.backgroundColor==="transparent"?"0":re(e?.opacity)?e.opacity.toString():dt.toString()),t.setProperty(W.chat.guestBubbles.blur,re(e?.blur)?`${e.blur??0}px`:"none"),ii(e?.shadow,t,W.chat.guestBubbles.boxShadow)},wS=(e,t,n)=>{let r=e?.backgroundColor??Qo;t.setProperty(W.chat.buttons.bgRgb,Ke(r).join(", ")),t.setProperty(W.chat.buttons.bgRgb,Ke(r).join(", ")),t.setProperty(W.chat.buttons.color,e?.color??ap),oi(e?.border??{roundeness:n??or},t,W.chat.buttons.borderRadius),t.setProperty(W.chat.buttons.borderWidth,re(e?.border?.thickness)?`${e?.border?.thickness}px`:`${sp}px`),t.setProperty(W.chat.buttons.borderColor,Ke(e?.border?.color??e?.backgroundColor??Qo).join(", ")),t.setProperty(W.chat.buttons.borderOpacity,re(e?.border?.opacity)?e.border.opacity.toString():dt.toString()),t.setProperty(W.chat.buttons.opacity,e?.backgroundColor==="transparent"?"0":re(e?.opacity)?e.opacity.toString():dt.toString()),t.setProperty(W.chat.buttons.blur,re(e?.blur)?`${e.blur??0}px`:"none"),ii(e?.shadow,t,W.chat.buttons.boxShadow)},SS=(e,t,n)=>{t.setProperty(W.chat.inputs.bgColor,Ke(e?.backgroundColor??lp).join(", ")),t.setProperty(W.chat.inputs.color,e?.color??ei),t.setProperty(W.chat.inputs.placeholderColor,e?.placeholderColor??cp),oi(e?.border??{roundeness:n??or},t,W.chat.inputs.borderRadius),t.setProperty(W.chat.inputs.borderWidth,re(e?.border?.thickness)?`${e?.border?.thickness}px`:"0"),t.setProperty(W.chat.inputs.borderColor,Ke(e?.border?.color??"").join(", ")),t.setProperty(W.chat.inputs.borderOpacity,re(e?.border?.opacity)?e.border.opacity.toString():dt.toString()),t.setProperty(W.chat.inputs.opacity,e?.backgroundColor==="transparent"?"0":re(e?.opacity)?e.opacity.toString():dt.toString()),t.setProperty(W.chat.inputs.blur,re(e?.blur)?`${e.blur??0}px`:"none"),ii(e?.shadow??up,t,W.chat.inputs.boxShadow)},TS=(e,t,n)=>{let r=e?.backgroundColor??Jo;if(r==="transparent"||$e(r)||(e?.opacity??dt)<=.2){let i=t?.type??to;n.setProperty(W.chat.checkbox.bgRgb,i==="Image"?"rgba(255, 255, 255, 0.75)":Ke((i==="Color"?t?.content:"#ffffff")??"#ffffff").join(", ")),i==="Image"?n.setProperty(W.chat.checkbox.alphaRatio,"3"):n.setProperty(W.chat.checkbox.alphaRatio,t?.content&&xn(t?.content)?"1":"2")}else n.setProperty(W.chat.checkbox.bgRgb,Ke(r).concat(e?.opacity??1).join(", ")),n.setProperty(W.chat.checkbox.alphaRatio,xn(r)?"1":"2")},CS=(e,t)=>{t.setProperty(W.general.bgImage,null),t.setProperty(W.general.bgColor,null),t.setProperty((e?.type??to)==="Image"?W.general.bgImage:W.general.bgColor,_S({type:e?.type??to,content:e?.content??Zo}))},_S=({type:e,content:t}={})=>{switch(e){case"None":return"transparent";case void 0:case"Color":return t??Zo;case"Image":return`url(${t})`}},oi=(e,t,n)=>{switch(e?.roundeness??or){case"none":{t.setProperty(n,"0");break}case"medium":{t.setProperty(n,"6px");break}case"large":{t.setProperty(n,"20px");break}case"custom":{t.setProperty(n,`${e.customRoundeness??6}px`);break}}},ii=(e,t,n)=>{if(e===void 0){t.setProperty(n,"0 0 #0000");return}switch(e){case"none":t.setProperty(n,"0 0 #0000");break;case"sm":t.setProperty(n,"0 1px 2px 0 rgb(0 0 0 / 0.05)");break;case"md":t.setProperty(n,"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)");break;case"lg":t.setProperty(n,"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)");break;case"xl":t.setProperty(n,"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)");break;case"2xl":t.setProperty(n,"0 25px 50px -12px rgb(0 0 0 / 0.25)");break}};var Fl="resultId",xp=e=>{if(e)try{return sessionStorage.getItem(`${Fl}-${e}`)??localStorage.getItem(`${Fl}-${e}`)??void 0}catch{}},vp=(e="session")=>(t,n)=>{try{Sp(e).setItem(`${Fl}-${t}`,n)}catch{}},wp=e=>{if(e)try{let t=sessionStorage.getItem(`agent-${e}-initialChatReply`)??localStorage.getItem(`agent-${e}-initialChatReply`);return t?JSON.parse(t):void 0}catch{}},Ul=(e,{agentId:t,storage:n})=>{try{let r=JSON.stringify(e);Sp(n).setItem(`agent-${t}-initialChatReply`,r)}catch{}},Ia=()=>{try{sessionStorage.setItem("agent-typeOpened","true")}catch{}},Aa=()=>{try{sessionStorage.removeItem("agent-typeOpened")}catch{}},Oa=()=>{try{return sessionStorage.getItem("agent-typeOpened")==="true"}catch{return!1}},Sp=e=>(e??Je.general.rememberUser.storage)==="session"?sessionStorage:localStorage,Ra=e=>{Object.keys(localStorage).forEach(t=>{t.startsWith(`agent-${e}`)&&localStorage.removeItem(t)}),Object.keys(sessionStorage).forEach(t=>{t.startsWith(`agent-${e}`)&&sessionStorage.removeItem(t)})};var et=()=>(e,t)=>Be(e,t);function kS(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ve(e={}){let{strict:t=!0,hookName:n="useContext",providerName:r="Provider",errorMessage:o,defaultValue:i}=e,a=sd(i);function s(){let c=bl(a);if(!c&&t){let l=new Error(o??kS(n,r));throw l.name="ContextError",Error.captureStackTrace?.(l,s),l}return c}return[a.Provider,s,a]}var[jl,Tp]=Ve({hookName:"useRenderStrategyContext",providerName:"<RenderStrategyProvider />"}),ai=e=>et()(e,["lazyMount","unmountOnExit"]);var IO=Symbol(),ES=Symbol();var Cp=Object.getPrototypeOf,Vl=new WeakMap,PS=e=>e&&(Vl.has(e)?Vl.get(e):Cp(e)===Object.prototype||Cp(e)===Array.prototype);var _p=e=>PS(e)&&e[ES]||null,Hl=(e,t=!0)=>{Vl.set(e,t)};function IS(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function kp(e,t){let n=IS();return n?(n[e]||(n[e]=t()),n[e]):t()}var Ma=()=>!1,zl=e=>typeof e=="object"&&e!==null,ir=kp("__zag__proxyStateMap",()=>new WeakMap),si=kp("__zag__refSet",()=>new WeakSet),AS=e=>typeof e=="object"&&e!==null&&"$$typeof"in e,OS=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,RS=e=>typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeName=="string",MS=e=>AS(e)||OS(e)||RS(e),DS=(e=Object.is,t=(l,u)=>new Proxy(l,u),n=l=>zl(l)&&!si.has(l)&&(Array.isArray(l)||!(Symbol.iterator in l))&&!MS(l)&&!(l instanceof WeakMap)&&!(l instanceof WeakSet)&&!(l instanceof Error)&&!(l instanceof Number)&&!(l instanceof Date)&&!(l instanceof String)&&!(l instanceof RegExp)&&!(l instanceof ArrayBuffer),r=l=>{switch(l.status){case"fulfilled":return l.value;case"rejected":throw l.reason;default:throw l}},o=new WeakMap,i=(l,u,f=r)=>{let d=o.get(l);if(d?.[0]===u)return d[1];let p=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l));return Hl(p,!0),o.set(l,[u,p]),Reflect.ownKeys(l).forEach(h=>{let g=Reflect.get(l,h);si.has(g)?(Hl(g,!1),p[h]=g):g instanceof Promise?Object.defineProperty(p,h,{get(){return f(g)}}):ir.has(g)?p[h]=Fn(g,f):p[h]=g}),Object.freeze(p)},a=new WeakMap,s=[1,1],c=l=>{if(!zl(l))throw new Error("object required");let u=a.get(l);if(u)return u;let f=s[0],d=new Set,p=(H,G=++s[0])=>{f!==G&&(f=G,d.forEach(L=>L(H,G)))},h=s[1],g=(H=++s[1])=>(h!==H&&!d.size&&(h=H,y.forEach(([G])=>{let L=G[1](H);L>f&&(f=L)})),f),v=H=>(G,L)=>{let P=[...G];P[1]=[H,...P[1]],p(P,L)},y=new Map,T=(H,G)=>{if(Ma()&&y.has(H))throw new Error("prop listener already exists");if(d.size){let L=G[3](v(H));y.set(H,[G,L])}else y.set(H,[G])},C=H=>{let G=y.get(H);G&&(y.delete(H),G[1]?.())},E=H=>(d.add(H),d.size===1&&y.forEach(([L,P],_)=>{if(Ma()&&P)throw new Error("remove already exists");let w=L[3](v(_));y.set(_,[L,w])}),()=>{d.delete(H),d.size===0&&y.forEach(([L,P],_)=>{P&&(P(),y.set(_,[L]))})}),I=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l)),R=t(I,{deleteProperty(H,G){let L=Reflect.get(H,G);C(G);let P=Reflect.deleteProperty(H,G);return P&&p(["delete",[G],L]),P},set(H,G,L,P){let _=Reflect.has(H,G),w=Reflect.get(H,G,P);if(_&&(e(w,L)||a.has(L)&&e(w,a.get(L))))return!0;C(G),zl(L)&&(L=_p(L)||L);let M=L;if(!Object.getOwnPropertyDescriptor(H,G)?.set)if(L instanceof Promise)L.then(D=>{Object.assign(L,{status:"fulfilled",value:D}),p(["resolve",[G],D])}).catch(D=>{Object.assign(L,{status:"rejected",reason:D}),p(["reject",[G],D])});else{!ir.has(L)&&n(L)&&(M=li(L));let D=!si.has(M)&&ir.get(M);D&&T(G,D)}return Reflect.set(H,G,M,P),p(["set",[G],L,w]),!0}});a.set(l,R);let oe=[I,g,i,E];return ir.set(R,oe),Reflect.ownKeys(l).forEach(H=>{let G=Object.getOwnPropertyDescriptor(l,H);G.get||G.set?Object.defineProperty(I,H,G):R[H]=l[H]}),R})=>[c,ir,si,e,t,n,r,o,i,a,s],[LS]=DS();function li(e={}){return LS(e)}function so(e,t,n){let r=ir.get(e);Ma()&&!r&&console.warn("Please use proxy object");let o,i=[],a=r[3],s=!1,l=a(u=>{if(i.push(u),n){t(i.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,s&&t(i.splice(0))}))});return s=!0,()=>{s=!1,l()}}function Fn(e,t){let n=ir.get(e);Ma()&&!n&&console.warn("Please use proxy object");let[r,o,i]=n;return i(r,o(),t)}function Tt(e){return si.add(e),e}function Ep(e,t){Object.keys(t).forEach(o=>{if(Object.getOwnPropertyDescriptor(e,o))throw new Error("object property already defined");let i=t[o],{get:a,set:s}=typeof i=="function"?{get:i}:i,c={};c.get=()=>a(Fn(r)),s&&(c.set=l=>s(r,l)),Object.defineProperty(e,o,c)});let r=li(e);return r}var Ip=e=>e[0],Ap=e=>e[e.length-1];function Op(e){for(;e.length>0;)e.pop();return e}var Pp=e=>e?.constructor.name==="Array",NS=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Da(e[n],t[n]))return!1;return!0},Da=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Pp(e)&&Pp(t))return NS(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let o=0;o<r;o++)if(!Reflect.has(e,n[o]))return!1;for(let o=0;o<r;o++){let i=n[o];if(!Da(e[i],t[i]))return!1}return!0},vn=(e,...t)=>(typeof e=="function"?e(...t):e)??void 0,At=e=>e,La=()=>{},ci=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})},ui=(()=>{let e=0;return()=>(e++,e.toString(36))})();var Rp=()=>!1,di=e=>Array.isArray(e);var Mp=e=>e!=null&&typeof e=="object",fi=e=>Mp(e)&&!di(e),pi=e=>typeof e=="number"&&!Number.isNaN(e),yt=e=>typeof e=="string",Un=e=>typeof e=="function",Dp=e=>e==null,Gl=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),$S=e=>Object.prototype.toString.call(e),Lp=Function.prototype.toString,BS=Lp.call(Object),Np=e=>{if(!Mp(e)||$S(e)!="[object Object]")return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Gl(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Lp.call(n)==BS};function FS(e,t){let n={},r={},o=new Set(t);for(let i in e)o.has(i)?r[i]=e[i]:n[i]=e[i];return[r,n]}var nn=e=>function(n){return FS(n,e)};function st(e){if(!US(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(let r of t){let o=e[r];o!==void 0&&(n[r]=st(o))}return n}var US=e=>e&&typeof e=="object"&&e.constructor===Object;function wn(...e){let t=e.length===1?e[0]:e[1],n=e.length===2?e[0]:!0}function mi(...e){let t=e.length===1?e[0]:e[1],n=e.length===2?e[0]:!0}function $p(e,t,n){typeof n.value=="object"&&(n.value=ar(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function ar(e){if(typeof e!="object")return e;var t=0,n,r,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(ar(a))})):i==="[object Map]"?(o=new Map,e.forEach(function(a,s){o.set(ar(s),ar(a))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(ar(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(r=Object.getOwnPropertySymbols(e);t<r.length;t++)$p(o,r[t],Object.getOwnPropertyDescriptor(e,r[t]));for(t=0,r=Object.getOwnPropertyNames(e);t<r.length;t++)Object.hasOwnProperty.call(o,n=r[t])&&o[n]===e[n]||$p(o,n,Object.getOwnPropertyDescriptor(e,n))}return o||e}var jS=Object.defineProperty,VS=(e,t,n)=>t in e?jS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X=(e,t,n)=>VS(e,typeof t!="symbol"?t+"":t,n);function Up(e,...t){for(let n of t){let r=st(n);for(let o in r)Np(n[o])?(e[o]||(e[o]={}),Up(e[o],n[o])):e[o]=n[o]}return e}function Bp(e){return ar(e)}function Ut(e){return yt(e)?{type:e}:e}function jn(e){return e?di(e)?e.slice():[e]:[]}function jp(e){return fi(e)&&e.predicate!=null}var HS=()=>!0;function ql(e,t,n,r){return o=>yt(o)?!!e[o]?.(t,n,r):Un(o)?o(t,n,r):o.predicate(e)(t,n,r)}function zS(...e){return{predicate:t=>(n,r,o)=>e.map(ql(t,n,r,o)).some(Boolean)}}function GS(...e){return{predicate:t=>(n,r,o)=>e.map(ql(t,n,r,o)).every(Boolean)}}function WS(e){return{predicate:t=>(n,r,o)=>!ql(t,n,r,o)(e)}}function qS(...e){return(t,n,r)=>r.state.matches(...e)}var Na={or:zS,and:GS,not:WS,stateIn:qS};function Vp(e,t){return e=e??HS,(n,r,o)=>{if(yt(e)){let i=t[e];return Un(i)?i(n,r,o):i}return jp(e)?e.predicate(t)(n,r,o):e?.(n,r,o)}}function Wl(e,t){return(n,r,o)=>jp(e)?e.predicate(t)(n,r,o):e}function KS(e){let t=e.computed??At({}),n=e.context??At({}),r=e.initial?e.states?.[e.initial]?.tags:[],o=li({value:e.initial??"",previousValue:"",event:At({}),previousEvent:At({}),context:Ep(n,t),done:!1,tags:r??[],hasTag(i){return this.tags.includes(i)},matches(...i){return i.includes(this.value)},can(i){return At(this).nextEvents.includes(i)},get nextEvents(){let i=e.states?.[this.value]?.on??{},a=e?.on??{};return Object.keys({...i,...a})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return At(o)}function gi(e,t){return(n,r)=>{if(pi(e))return e;if(Un(e))return e(n,r);if(yt(e)){let o=Number.parseFloat(e);if(!Number.isNaN(o))return o;if(t){let i=t?.[e];return mi(i==null,`[@zag-js/core > determine-delay] Cannot determine delay for \`${e}\`. It doesn't exist in \`options.delays\``),Un(i)?i(n,r):i}}}}function YS(e){return yt(e)?{target:e}:e}function XS(e,t){return(n,r,o)=>jn(e).map(YS).find(i=>Vp(i.guard,t)(n,r,o)??i.target??i.actions)}var Hp=class{constructor(e,t){X(this,"status","Not Started"),X(this,"state"),X(this,"initialState"),X(this,"initialContext"),X(this,"id"),X(this,"type","machine"),X(this,"activityEvents",new Map),X(this,"delayedEvents",new Map),X(this,"stateListeners",new Set),X(this,"doneListeners",new Set),X(this,"contextWatchers",new Set),X(this,"removeStateListener",La),X(this,"parent"),X(this,"children",new Map),X(this,"guardMap"),X(this,"actionMap"),X(this,"delayMap"),X(this,"activityMap"),X(this,"sync"),X(this,"options"),X(this,"config"),X(this,"_created",()=>{let n=Ut("machine.created");this.executeActions(this.config?.created,n)}),X(this,"start",n=>{if(this.state.value="",this.state.tags=[],this.status==="Running")return this;this.status="Running",this.removeStateListener=so(this.state,()=>{this.stateListeners.forEach(c=>{c(this.stateSnapshot)})},this.sync),this.setupContextWatchers(),this.executeActivities(Ut("machine.start"),jn(this.config.activities),"machine.start"),this.executeActions(this.config.entry,Ut("machine.start"));let r=Ut("machine.init"),o=fi(n)?n.value:n,i=fi(n)?n.context:void 0;i&&this.setContext(i);let a={target:o??this.config.initial},s=this.getNextStateInfo(a,r);return this.initialState=s,this.performStateChangeEffects(this.state.value,s,r),this}),X(this,"setupContextWatchers",()=>{let{watch:n}=this.config;if(!n)return;let r=Fn(this.state.context),o=so(this.state.context,()=>{let i=Fn(this.state.context);for(let[a,s]of Object.entries(n))(this.options.compareFns?.[a]??Object.is)(r[a],i[a])||this.executeActions(s,this.state.event);r=i});this.contextWatchers.add(o)}),X(this,"stop",()=>{if(this.status!=="Stopped")return this.performExitEffects(this.state.value,Ut("machine.stop")),this.executeActions(this.config.exit,Ut("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.status="Stopped",this}),X(this,"stopStateListeners",()=>{this.removeStateListener(),this.stateListeners.clear()}),X(this,"stopContextWatchers",()=>{this.contextWatchers.forEach(n=>n()),this.contextWatchers.clear()}),X(this,"stopDelayedEvents",()=>{this.delayedEvents.forEach(n=>{n.forEach(r=>r())}),this.delayedEvents.clear()}),X(this,"stopActivities",n=>{n?(this.activityEvents.get(n)?.forEach(r=>r()),this.activityEvents.get(n)?.clear(),this.activityEvents.delete(n)):(this.activityEvents.forEach(r=>{r.forEach(o=>o()),r.clear()}),this.activityEvents.clear())}),X(this,"sendChild",(n,r)=>{let o=Ut(n),i=vn(r,this.contextSnapshot),a=this.children.get(i);a||mi(`[@zag-js/core] Cannot send '${o.type}' event to unknown child`),a.send(o)}),X(this,"stopChild",n=>{this.children.has(n)||mi(`[@zag-js/core > stop-child] Cannot stop unknown child ${n}`),this.children.get(n).stop(),this.children.delete(n)}),X(this,"removeChild",n=>{this.children.delete(n)}),X(this,"stopChildren",()=>{this.children.forEach(n=>n.stop()),this.children.clear()}),X(this,"setParent",n=>{this.parent=n}),X(this,"spawn",(n,r)=>{let o=vn(n);return r&&(o.id=r),o.type="machine.actor",o.setParent(this),this.children.set(o.id,At(o)),o.onDone(()=>{this.removeChild(o.id)}).start(),At(Tt(o))}),X(this,"stopActivity",n=>{if(!this.state.value)return;let r=this.activityEvents.get(this.state.value);r?.get(n)?.(),r?.delete(n)}),X(this,"addActivityCleanup",(n,r,o)=>{n&&(this.activityEvents.has(n)?this.activityEvents.get(n)?.set(r,o):this.activityEvents.set(n,new Map([[r,o]])))}),X(this,"setState",n=>{this.state.previousValue=this.state.value,this.state.value=n;let r=this.getStateNode(n);n==null?Op(this.state.tags):this.state.tags=jn(r?.tags)}),X(this,"setContext",n=>{n&&Up(this.state.context,st(n))}),X(this,"setOptions",n=>{let r=st(n);this.actionMap={...this.actionMap,...r.actions},this.delayMap={...this.delayMap,...r.delays},this.activityMap={...this.activityMap,...r.activities},this.guardMap={...this.guardMap,...r.guards}}),X(this,"getStateNode",n=>{if(n)return this.config.states?.[n]}),X(this,"getNextStateInfo",(n,r)=>{let o=this.determineTransition(n,r),i=!o?.target,a=o?.target??this.state.value,s=this.state.value!==a,c=this.getStateNode(a),u={reenter:!i&&!s&&!o?.internal,transition:o,stateNode:c,target:a,changed:s};return this.log("NextState:",`[${r.type}]`,this.state.value,"---->",u.target),u}),X(this,"getAfterActions",(n,r)=>{let o,i=this.state.value;return{entry:()=>{o=globalThis.setTimeout(()=>{let a=this.getNextStateInfo(n,this.state.event);this.performStateChangeEffects(i,a,this.state.event)},r)},exit:()=>{globalThis.clearTimeout(o)}}}),X(this,"getDelayedEventActions",n=>{let r=this.getStateNode(n),o=this.state.event;if(!r||!r.after)return;let i=[],a=[];if(di(r.after)){let s=this.determineTransition(r.after,o);if(!s)return;if(!Gl(s,"delay"))throw new Error(`[@zag-js/core > after] Delay is required for after transition: ${JSON.stringify(s)}`);let l=gi(s.delay,this.delayMap)(this.contextSnapshot,o),u=this.getAfterActions(s,l);return i.push(u.entry),a.push(u.exit),{entries:i,exits:a}}if(fi(r.after))for(let s in r.after){let c=r.after[s],u=gi(s,this.delayMap)(this.contextSnapshot,o),f=this.getAfterActions(c,u);i.push(f.entry),a.push(f.exit)}return{entries:i,exits:a}}),X(this,"executeActions",(n,r)=>{let o=Wl(n,this.guardMap)(this.contextSnapshot,r,this.guardMeta);for(let i of jn(o)){let a=yt(i)?this.actionMap?.[i]:i;wn(yt(i)&&!a,`[@zag-js/core > execute-actions] No implementation found for action: \`${i}\``),a?.(this.state.context,r,this.meta)}}),X(this,"executeActivities",(n,r,o)=>{for(let i of r){let a=yt(i)?this.activityMap?.[i]:i;if(!a){wn(`[@zag-js/core > execute-activity] No implementation found for activity: \`${i}\``);continue}let s=a(this.state.context,n,this.meta);if(s){let c=yt(i)?i:i.name||ui();this.addActivityCleanup(o??this.state.value,c,s)}}}),X(this,"createEveryActivities",(n,r)=>{if(n)if(di(n)){let o=jn(n).find(c=>{let l=c.delay,f=gi(l,this.delayMap)(this.contextSnapshot,this.state.event);return Vp(c.guard,this.guardMap)(this.contextSnapshot,this.state.event,this.guardMeta)??f!=null});if(!o)return;let a=gi(o.delay,this.delayMap)(this.contextSnapshot,this.state.event);r(()=>{let c=globalThis.setInterval(()=>{this.executeActions(o.actions,this.state.event)},a);return()=>{globalThis.clearInterval(c)}})}else for(let o in n){let i=n?.[o],s=gi(o,this.delayMap)(this.contextSnapshot,this.state.event);r(()=>{let l=globalThis.setInterval(()=>{this.executeActions(i,this.state.event)},s);return()=>{globalThis.clearInterval(l)}})}}),X(this,"setEvent",n=>{this.state.previousEvent=this.state.event,this.state.event=Tt(Ut(n))}),X(this,"performExitEffects",(n,r)=>{let o=this.state.value;if(o==="")return;let i=n?this.getStateNode(n):void 0;this.stopActivities(o);let a=Wl(i?.exit,this.guardMap)(this.contextSnapshot,r,this.guardMeta),s=jn(a),c=this.delayedEvents.get(o);c&&s.push(...c),this.executeActions(s,r),this.delayedEvents.delete(o)}),X(this,"performEntryEffects",(n,r)=>{let o=this.getStateNode(n),i=jn(o?.activities);this.createEveryActivities(o?.every,l=>{i.unshift(l)}),i.length>0&&this.executeActivities(r,i);let a=Wl(o?.entry,this.guardMap)(this.contextSnapshot,r,this.guardMeta),s=jn(a),c=this.getDelayedEventActions(n);o?.after&&c&&(this.delayedEvents.set(n,c?.exits),s.push(...c.entries)),this.executeActions(s,r),o?.type==="final"&&(this.state.done=!0,this.doneListeners.forEach(l=>{l(this.stateSnapshot)}),this.stop())}),X(this,"performTransitionEffects",(n,r)=>{let o=this.determineTransition(n,r);this.executeActions(o?.actions,r)}),X(this,"performStateChangeEffects",(n,r,o)=>{this.setEvent(o);let i=r.changed||r.reenter;i&&this.performExitEffects(n,o),this.performTransitionEffects(r.transition,o),this.setState(r.target),i&&this.performEntryEffects(r.target,o)}),X(this,"determineTransition",(n,r)=>XS(n,this.guardMap)?.(this.contextSnapshot,r,this.guardMeta)),X(this,"sendParent",n=>{this.parent||mi("[@zag-js/core > send-parent] Cannot send event to an unknown parent");let r=Ut(n);this.parent?.send(r)}),X(this,"log",(...n)=>{Rp()&&this.options.debug&&console.log(...n)}),X(this,"send",n=>{let r=Ut(n);this.transition(this.state.value,r)}),X(this,"transition",(n,r)=>{let o=yt(n)?this.getStateNode(n):n?.stateNode,i=Ut(r);if(!o&&!this.config.on){let c=this.status==="Stopped"?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${n}, \`event\`: ${i.type}`;wn(c);return}let a=o?.on?.[i.type]??this.config.on?.[i.type],s=this.getNextStateInfo(a,i);return this.performStateChangeEffects(this.state.value,s,i),s.stateNode}),X(this,"subscribe",n=>(this.stateListeners.add(n),this.status==="Running"&&n(this.stateSnapshot),()=>{this.stateListeners.delete(n)})),X(this,"onDone",n=>(this.doneListeners.add(n),this)),X(this,"onTransition",n=>(this.stateListeners.add(n),this.status==="Running"&&n(this.stateSnapshot),this)),this.config=Bp(e),this.options=Bp(t??{}),this.id=this.config.id??`machine-${ui()}`,this.guardMap=this.options?.guards??{},this.actionMap=this.options?.actions??{},this.delayMap=this.options?.delays??{},this.activityMap=this.options?.activities??{},this.sync=this.options?.sync??!1,this.state=KS(this.config),this.initialContext=Fn(this.state.context)}get stateSnapshot(){return At(Fn(this.state))}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){let e=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),stopActivity:this.stopActivity.bind(this),get state(){return e.stateSnapshot},get initialContext(){return e.initialContext},get initialState(){return e.initialState?.target??""}}}get meta(){return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:this.initialState?.target??"",getState:()=>this.stateSnapshot,getAction:e=>this.actionMap[e],getGuard:e=>this.guardMap[e]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}getHydrationState(){let e=this.getState();return{value:e.value,tags:e.tags}}},jt=(e,t)=>new Hp(e,t),zp=e=>e instanceof Hp||e?.type==="machine",ZS=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),JS=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Fp=e=>{let t={},n;for(;n=JS.exec(e);)t[n[1]]=n[2];return t},QS=(e,t)=>{if(yt(e)){if(yt(t))return`${e};${t}`;e=Fp(e)}else yt(t)&&(t=Fp(t));return Object.assign({},e??{},t??{})};function $a(...e){let t={};for(let n of e){for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=ci(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=ZS(t[r],n[r]);continue}if(r==="style"){t[r]=QS(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r])}return t}function Gp(e){return new Proxy({},{get(){return e}})}var Ot=()=>e=>Array.from(new Set(e));function ee(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r=="function"&&(r=r()),r){let o=Object.getOwnPropertyDescriptors(r);for(let i in o)i in t||Object.defineProperty(t,i,{enumerable:!0,get(){let a={};if(i==="style"||i==="class"||i==="className"||i.startsWith("on")){for(let s=0;s<e.length;s++){let c=e[s];typeof c=="function"&&(c=c()),a=$a(a,{[i]:(c||{})[i]})}return a[i]}for(let s=e.length-1;s>=0;s--){let c,l=e[s];if(typeof l=="function"&&(l=l()),c=(l||{})[i],c!==void 0)return c}}})}}return t}var eT=e=>Array.isArray(e),tT=e=>e!=null&&typeof e=="object",nT=e=>tT(e)&&!eT(e),rT=e=>typeof e=="number"&&!Number.isNaN(e),qp=e=>typeof e=="string",oT=Function.prototype.toString;oT.call(Object);var Wp={onFocus:"onFocusIn",onBlur:"onFocusOut",onDoubleClick:"onDblClick",onChange:"onInput",defaultChecked:"checked",defaultValue:"value",htmlFor:"for",className:"class"},iT=e=>e.startsWith("--")?e:dT(e);function aT(e){return e in Wp?Wp[e]:e}var Rt=Gp(e=>{let t={};for(let n in e){let r=e[n];if(!(n==="readOnly"&&r===!1)){if(n==="style"&&nT(r)){t.style=sT(r);continue}if(n==="children"){qp(r)&&(t.textContent=r);continue}t[aT(n)]=r}}return t});function sT(e){let t={};for(let n in e){let r=e[n];!qp(r)&&!rT(r)||(t[iT(n)]=r)}return t}var lT=/[A-Z]/g,cT=/^ms-/;function uT(e){return"-"+e.toLowerCase()}var Kl={};function dT(e){if(Kl.hasOwnProperty(e))return Kl[e];var t=e.replace(lT,uT);return Kl[e]=cT.test(t)?"-"+t:t}function Kp(e,t){let{actions:n,context:r}=t??{},[o,i]=hp(e.getState());return ne(()=>{let a=e.subscribe(s=>{i(Pa(s))});se(()=>{a()})}),ge(()=>{let a=typeof r=="function"?r():r;e.setContext(a)}),ge(()=>{e.setOptions({actions:n})}),o}function Yp(e){return[Kp(e),e.send]}function fT(e,t){let{state:n,context:r}=t??{},o=(()=>{let i=typeof e=="function"?e():e,a=typeof r=="function"?r():r;return a&&i.setContext(a),i._created(),i})();return ne(()=>{o.start(n),se(()=>{o.stop()})}),o}function rn(e,t){let n=fT(e,t);return[Kp(n,t),n.send,n]}var Yl=e=>n=>{let[r,o]=Be(n,["asChild"]);if(r.asChild){let i=a=>{let[,s]=Be(o,["ref"]);return ee(s,a)};return r.asChild(i)}return m(vd,Se({component:e},o))};function pT(){let e=new Map;return new Proxy(Yl,{apply(t,n,r){return Yl(r[0])},get(t,n){let r=n;return e.has(r)||e.set(r,Yl(r)),e.get(r)}})}var fe=pT();function Xp(e,t,n){let r=e.matches("mounted","unmountSuspended");return{skip:!e.context.initial&&r,present:r,setNode(o){o&&t({type:"NODE.SET",node:o})},unmount(){t({type:"UNMOUNT"})}}}function Ba(e){return e?.animationName||"none"}function Zp(e){return jt({initial:e.present?"mounted":"unmounted",context:{node:null,styles:null,unmountAnimationName:null,prevAnimationName:null,present:!1,initial:!1,...e},exit:["clearInitial"],watch:{present:["setInitial","syncPresence"]},on:{"NODE.SET":{actions:["setNode","setStyles"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["invokeOnExitComplete"]},"UNMOUNT.SUSPEND":"unmountSuspended"}},unmountSuspended:{activities:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},"ANIMATION.END":{target:"unmounted",actions:["invokeOnExitComplete"]},UNMOUNT:{target:"unmounted",actions:["invokeOnExitComplete"]}}},unmounted:{entry:["clearPrevAnimationName"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}}},{actions:{setInitial(t){t.initial=!0},clearInitial(t){t.initial=!1},invokeOnExitComplete(t){t.onExitComplete?.()},setNode(t,n){t.node=Tt(n.node)},setStyles(t,n){let r=n.node.ownerDocument.defaultView||window;t.styles=Tt(r.getComputedStyle(n.node))},syncPresence(t,n,{send:r}){if(t.present){r({type:"MOUNT",src:"presence.changed"});return}let o=Ba(t.styles);(t.immediate?queueMicrotask:requestAnimationFrame)(()=>{t.unmountAnimationName=o,o==="none"||o===t.prevAnimationName||t.styles?.display==="none"||t.styles?.animationDuration==="0s"?r({type:"UNMOUNT",src:"presence.changed"}):r({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName(t){(t.immediate?queueMicrotask:requestAnimationFrame)(()=>{t.prevAnimationName=Ba(t.styles)})},clearPrevAnimationName(t){t.prevAnimationName=null}},activities:{trackAnimationEvents(t,n,{send:r}){let o=t.node;if(!o)return;let i=s=>{(s.composedPath?.()?.[0]??s.target)===o&&(t.prevAnimationName=Ba(t.styles))},a=s=>{let c=Ba(t.styles);(s.composedPath?.()?.[0]??s.target)===o&&c===t.unmountAnimationName&&r({type:"UNMOUNT",src:"animationend"})};return o.addEventListener("animationstart",i),o.addEventListener("animationcancel",a),o.addEventListener("animationend",a),()=>{o.removeEventListener("animationstart",i),o.removeEventListener("animationcancel",a),o.removeEventListener("animationend",a)}}}})}var QO=Ot()(["onExitComplete","present","immediate"]);var lo=e=>et()(e,["immediate","lazyMount","onExitComplete","present","unmountOnExit"]),sr=e=>{let[t,n]=ai(e),[r,o]=O(!1),[i,a]=rn(Zp(n),{context:n}),s=B(()=>Xp(i,a,Rt));return ge(()=>{s().present&&o(!0)}),B(()=>({unmounted:!s().present&&!r()&&t.lazyMount||t.unmountOnExit&&!s().present&&r(),present:s().present,presenceProps:{ref:s().setNode,hidden:!s().present,"data-state":n.present?"open":"closed"}}))};var[co,Vn]=Ve({hookName:"usePresenceContext",providerName:"<PresenceProvider />"});var xt=e=>e?"":void 0;var Qp=2147483647,gT=1,hT=9,bT=11,Fa=e=>typeof e=="object"&&e!==null,tt=e=>Fa(e)&&e.nodeType===gT&&typeof e.nodeName=="string",em=e=>Fa(e)&&e.nodeType===hT,yT=e=>Fa(e)&&e===e.window;var tm=e=>tt(e)?e.localName||"":"#document";function xT(e){return["html","body","#document"].includes(tm(e))}var vT=e=>Fa(e)&&e.nodeType!==void 0,Zl=e=>vT(e)&&e.nodeType===bT&&"host"in e;function Mt(e,t){return!e||!t||!tt(e)||!tt(t)?!1:e===t||e.contains(t)}function Vt(e){return em(e)?e:yT(e)?e.document:e?.ownerDocument??document}function wT(e){return Vt(e).documentElement}function on(e){return Zl(e)?on(e.host):em(e)?e.defaultView??window:tt(e)?e.ownerDocument?.defaultView??window:window}function ST(e){let t=e.activeElement;for(;t?.shadowRoot;){let n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}var nm=()=>typeof document<"u";function TT(){return navigator.userAgentData?.platform??navigator.platform}var Jl=e=>nm()&&e.test(TT()),CT=e=>nm()&&e.test(navigator.userAgent);var rm=()=>Jl(/^Mac/);var om=()=>CT(/firefox\//i),_T=()=>Jl(/mac|iphone|ipad|ipod/i),im=()=>Jl(/iP(hone|ad|od)|iOS/);function kT(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function an(e){return kT(e)?.[0]??e.target}var am=e=>Mt(e.currentTarget,an(e));function Ql(e){let t=e.currentTarget;if(!t)return!1;let n=_T();if(n&&!e.metaKey||!n&&!e.ctrlKey)return!1;let r=t.localName;return r==="a"||r==="button"&&t.type==="submit"||r==="input"&&t.type==="submit"}function ec(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n==="a"||n==="button"&&t.type==="submit"||n==="input"&&t.type==="submit":!1}var tc=e=>e.id;function ET(e,t,n=tc){return e.find(r=>n(r)===t)}function nc(e,t,n=tc){let r=ET(e,t,n);return r?e.indexOf(r):-1}function sm(e,t,n=!0){let r=nc(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function lm(e,t,n=!0){let r=nc(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}var PT=e=>e.split("").map(t=>{let n=t.charCodeAt(0);return n>0&&n<128?t:n>=128&&n<=255?`/x${n.toString(16)}`.replace("/","\\"):""}).join("").trim(),IT=e=>PT(e.dataset.valuetext??e.textContent??""),AT=(e,t)=>e.trim().toLowerCase().startsWith(t.toLowerCase()),OT=(e,t)=>e.map((n,r)=>e[(Math.max(t,0)+r)%e.length]);function RT(e,t,n,r=tc){let o=n?nc(e,n,r):-1,i=n?OT(e,o):e;return t.length===1&&(i=i.filter(s=>r(s)!==n)),i.find(s=>AT(IT(s),t))}function MT(e,t){let{state:n,activeId:r,key:o,timeout:i=350,itemToId:a}=t,s=n.keysSoFar+o,l=s.length>1&&Array.from(s).every(h=>h===s[0])?s[0]:s,u=e.slice(),f=RT(u,l,r,a);function d(){clearTimeout(n.timer),n.timer=-1}function p(h){n.keysSoFar=h,d(),h!==""&&(n.timer=+setTimeout(()=>{p(""),d()},i))}return p(s),f}var rc=Object.assign(MT,{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:DT});function DT(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}function LT(e){if(tm(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Zl(e)&&e.host||wT(e);return Zl(t)?t.host:t}var cm=e=>typeof e=="object"&&e!==null&&e.nodeType===1,NT=e=>cm(e)&&e.tagName==="IFRAME";function $T(e){return cm(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1}function BT(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}var um="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";function Ua(e){return!e||e.closest("[inert]")?!1:e.matches(um)&&$T(e)}function oc(e,t){if(!e)return[];let n=Array.from(e.querySelectorAll(um)),r=n.filter(Jp);return t&&Jp(e)&&r.unshift(e),r.forEach((o,i)=>{if(NT(o)&&o.contentDocument){let a=o.contentDocument.body,s=oc(a);r.splice(i,1,...s)}}),!r.length&&t?n:r}function Jp(e){return e!=null&&e.tabIndex>0?!0:Ua(e)&&!BT(e)}function FT(e,t){let n=oc(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function dm(e){let{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let i=null;if(i||(i=typeof n=="function"?n():n),i||(i=t?.querySelector("[data-autofocus],[autofocus]")),!i){let a=oc(t);i=r?a.filter(r)[0]:a[0]}return i||t||void 0}function fm(e){let t=e.currentTarget;if(!t)return!1;let[n,r]=FT(t),o=t.ownerDocument||document;return!(o.activeElement===n&&e.shiftKey||o.activeElement===r&&!e.shiftKey||!n&&!r)}function ic(e){if(e==null||!tt(e))return!1;try{let t=on(e);return e instanceof t.HTMLInputElement&&e.selectionStart!=null||/(textarea|select)/.test(e.localName)||e.isContentEditable}catch{return!1}}var UT=/auto|scroll|overlay|hidden|clip/;function pm(e){let t=on(e),{overflow:n,overflowX:r,overflowY:o,display:i}=t.getComputedStyle(e);return UT.test(n+o+r)&&!["inline","contents"].includes(i)}function mm(e){let t=new Set;function n(r){let o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function He(e){let t=globalThis.requestAnimationFrame(e);return()=>{globalThis.cancelAnimationFrame(t)}}function jT(e,t){if(!e)return;let{attributes:n,callback:r}=t,o=e.ownerDocument.defaultView||window,i=new o.MutationObserver(a=>{for(let s of a)s.type==="attributes"&&s.attributeName&&n.includes(s.attributeName)&&r(s)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function gm(e,t){let{defer:n}=t,r=n?He:i=>i(),o=[];return o.push(r(()=>{let i=typeof e=="function"?e():e;o.push(jT(i,t))})),()=>{o.forEach(i=>i?.())}}function ac(e){let t=LT(e);return xT(t)?Vt(t).body:tt(t)&&pm(t)?t:ac(t)}function ja(e,t){return Array.from(e?.querySelectorAll(t)??[])}function Hn(e){let t={getRootNode:n=>n.getRootNode?.()??document,getDoc:n=>Vt(t.getRootNode(n)),getWin:n=>t.getDoc(n).defaultView??window,getActiveElement:n=>ST(t.getRootNode(n)),isActiveElement:(n,r)=>r===t.getActiveElement(n),getById:(n,r)=>t.getRootNode(n).getElementById(r),setValue:(n,r)=>{if(n==null||r==null)return;let o=r.toString();n.value!==o&&(n.value=r.toString())}};return{...t,...e}}function VT(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function hm(e,t){let{rootEl:n,...r}=t||{};!e||!n||!pm(n)||!VT(n)||e.scrollIntoView(r)}var Xl=new WeakMap;function HT(e,t,n){Xl.has(e)||Xl.set(e,new Map);let r=Xl.get(e),o=r.get(t);if(!o)return r.set(t,n()),()=>{r.get(t)?.(),r.delete(t)};let i=n(),a=()=>{i(),o(),r.delete(t)};return r.set(t,a),()=>{r.get(t)===a&&(i(),r.set(t,o))}}function bm(e,t){return e?HT(e,"style",()=>{let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}):()=>{}}var zT=1e3/60;function GT(e,t){let n=e();if(tt(n)&&n.isConnected)return t(n),()=>{};{let r=setInterval(()=>{let o=e();tt(o)&&o.isConnected&&(t(o),clearInterval(r))},zT);return()=>clearInterval(r)}}function ym(e,t){let n=[];return e?.forEach(r=>{let o=GT(r,t);n.push(o)}),()=>{n.forEach(r=>r())}}var[lR,uo]=Ve({hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:()=>({dir:"ltr",locale:"en-US"})});var WT=e=>typeof e=="function",xm=(e,...t)=>WT(e)?e(...t):e;var[qT,lr]=Ve({hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})}),KT=S("<span hidden>"),cr=e=>{let[t,n]=O(),r=()=>xm(e.value)??t()?.ownerDocument??document,o=B(()=>({getRootNode:r,getDocument:()=>Vt(r()),getWindow:()=>on(r())}));return m(qT,{value:o,get children(){return[B(()=>e.children),m(N,{get when(){return!e.value},get children(){var i=KT();return de(n,i),i}})]}})};var YT=Object.defineProperty,zn=(e,t)=>{for(var n in t)YT(e,n,{get:t[n],enumerable:!0})};var Ht=(e,t=[])=>({parts:(...n)=>{if(XT(t))return Ht(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Ht(e,[...t,...n]),rename:n=>Ht(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${fo(e)}"][data-part="${fo(r)}"]`,`& [data-scope="${fo(e)}"][data-part="${fo(r)}"]`].join(", "),attrs:{"data-scope":fo(e),"data-part":fo(r)}}}),{})}),fo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),XT=e=>e.length===0;var vm=["top","right","bottom","left"];var sn=Math.min,ft=Math.max,bi=Math.round,yi=Math.floor,Sn=e=>({x:e,y:e}),ZT={left:"right",right:"left",bottom:"top",top:"bottom"},JT={start:"end",end:"start"};function Ha(e,t,n){return ft(e,sn(t,n))}function ln(e,t){return typeof e=="function"?e(t):e}function cn(e){return e.split("-")[0]}function ur(e){return e.split("-")[1]}function za(e){return e==="x"?"y":"x"}function Ga(e){return e==="y"?"height":"width"}function un(e){return["top","bottom"].includes(cn(e))?"y":"x"}function Wa(e){return za(un(e))}function wm(e,t,n){n===void 0&&(n=!1);let r=ur(e),o=Wa(e),i=Ga(o),a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=hi(a)),[a,hi(a)]}function Sm(e){let t=hi(e);return[Va(e),t,Va(t)]}function Va(e){return e.replace(/start|end/g,t=>JT[t])}function QT(e,t,n){let r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function Tm(e,t,n,r){let o=ur(e),i=QT(cn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Va)))),i}function hi(e){return e.replace(/left|right|bottom|top/g,t=>ZT[t])}function eC(e){return{top:0,right:0,bottom:0,left:0,...e}}function sc(e){return typeof e!="number"?eC(e):{top:e,right:e,bottom:e,left:e}}function dr(e){let{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 Cm(e,t,n){let{reference:r,floating:o}=e,i=un(t),a=Wa(t),s=Ga(a),c=cn(t),l=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[s]/2-o[s]/2,p;switch(c){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(ur(t)){case"start":p[a]-=d*(n&&l?-1:1);break;case"end":p[a]+=d*(n&&l?-1:1);break}return p}var Em=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t)),l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Cm(l,r,c),d=r,p={},h=0;for(let g=0;g<s.length;g++){let{name:v,fn:y}=s[g],{x:T,y:C,data:E,reset:I}=await y({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});u=T??u,f=C??f,p={...p,[v]:{...p[v],...E}},I&&h<=50&&(h++,typeof I=="object"&&(I.placement&&(d=I.placement),I.rects&&(l=I.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:u,y:f}=Cm(l,d,c)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}};async function po(e,t){var n;t===void 0&&(t={});let{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=ln(t,e),h=sc(p),v=s[d?f==="floating"?"reference":"floating":f],y=dr(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),T=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},I=dr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:T,offsetParent:C,strategy:c}):T);return{top:(y.top-I.top+h.top)/E.y,bottom:(I.bottom-y.bottom+h.bottom)/E.y,left:(y.left-I.left+h.left)/E.x,right:(I.right-y.right+h.right)/E.x}}var Pm=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ln(e,t)||{};if(l==null)return{};let f=sc(u),d={x:n,y:r},p=Wa(o),h=Ga(p),g=await a.getDimensions(l),v=p==="y",y=v?"top":"left",T=v?"bottom":"right",C=v?"clientHeight":"clientWidth",E=i.reference[h]+i.reference[p]-d[p]-i.floating[h],I=d[p]-i.reference[p],U=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l)),R=U?U[C]:0;(!R||!await(a.isElement==null?void 0:a.isElement(U)))&&(R=s.floating[C]||i.floating[h]);let oe=E/2-I/2,H=R/2-g[h]/2-1,G=sn(f[y],H),L=sn(f[T],H),P=G,_=R-g[h]-L,w=R/2-g[h]/2+oe,M=Ha(P,w,_),D=!c.arrow&&ur(o)!=null&&w!==M&&i.reference[h]/2-(w<P?G:L)-g[h]/2<0,J=D?w<P?w-P:w-_:0;return{[p]:d[p]+J,data:{[p]:M,centerOffset:w-M-J,...D&&{alignmentOffset:J}},reset:D}}});var Im=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=ln(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let y=cn(o),T=un(s),C=cn(s)===s,E=await(c.isRTL==null?void 0:c.isRTL(l.floating)),I=d||(C||!g?[hi(s)]:Sm(s)),U=h!=="none";!d&&U&&I.push(...Tm(s,g,h,E));let R=[s,...I],oe=await po(t,v),H=[],G=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&H.push(oe[y]),f){let M=wm(o,a,E);H.push(oe[M[0]],oe[M[1]])}if(G=[...G,{placement:o,overflows:H}],!H.every(M=>M<=0)){var L,P;let M=(((L=i.flip)==null?void 0:L.index)||0)+1,D=R[M];if(D){var _;let ue=f==="alignment"?T!==un(D):!1,le=((_=G[0])==null?void 0:_.overflows[0])>0;if(!ue||le)return{data:{index:M,overflows:G},reset:{placement:D}}}let J=(P=G.filter(ue=>ue.overflows[0]<=0).sort((ue,le)=>ue.overflows[1]-le.overflows[1])[0])==null?void 0:P.placement;if(!J)switch(p){case"bestFit":{var w;let ue=(w=G.filter(le=>{if(U){let xe=un(le.placement);return xe===T||xe==="y"}return!0}).map(le=>[le.placement,le.overflows.filter(xe=>xe>0).reduce((xe,we)=>xe+we,0)]).sort((le,xe)=>le[1]-xe[1])[0])==null?void 0:w[0];ue&&(J=ue);break}case"initialPlacement":J=s;break}if(o!==J)return{reset:{placement:J}}}return{}}}};function _m(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function km(e){return vm.some(t=>e[t]>=0)}var Am=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=ln(e,t);switch(r){case"referenceHidden":{let i=await po(t,{...o,elementContext:"reference"}),a=_m(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:km(a)}}}case"escaped":{let i=await po(t,{...o,altBoundary:!0}),a=_m(i,n.floating);return{data:{escapedOffsets:a,escaped:km(a)}}}default:return{}}}}};async function tC(e,t){let{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=cn(n),s=ur(n),c=un(n)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,f=ln(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),c?{x:p*u,y:d*l}:{x:d*l,y:p*u}}var Om=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:a,middlewareData:s}=t,c=await tC(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},Rm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:y,y:T}=v;return{x:y,y:T}}},...c}=ln(e,t),l={x:n,y:r},u=await po(t,c),f=un(cn(o)),d=za(f),p=l[d],h=l[f];if(i){let v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",T=p+u[v],C=p-u[y];p=Ha(T,p,C)}if(a){let v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",T=h+u[v],C=h-u[y];h=Ha(T,h,C)}let g=s.fn({...t,[d]:p,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[d]:i,[f]:a}}}}}},Mm=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ln(e,t),u={x:n,y:r},f=un(o),d=za(f),p=u[d],h=u[f],g=ln(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){let C=d==="y"?"height":"width",E=i.reference[d]-i.floating[C]+v.mainAxis,I=i.reference[d]+i.reference[C]-v.mainAxis;p<E?p=E:p>I&&(p=I)}if(l){var y,T;let C=d==="y"?"width":"height",E=["top","left"].includes(cn(o)),I=i.reference[f]-i.floating[C]+(E&&((y=a.offset)==null?void 0:y[f])||0)+(E?0:v.crossAxis),U=i.reference[f]+i.reference[C]+(E?0:((T=a.offset)==null?void 0:T[f])||0)-(E?v.crossAxis:0);h<I?h=I:h>U&&(h=U)}return{[d]:p,[f]:h}}}},Dm=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;let{placement:o,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...l}=ln(e,t),u=await po(t,l),f=cn(o),d=ur(o),p=un(o)==="y",{width:h,height:g}=i.floating,v,y;f==="top"||f==="bottom"?(v=f,y=d===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,v=d==="end"?"top":"bottom");let T=g-u.top-u.bottom,C=h-u.left-u.right,E=sn(g-u[v],T),I=sn(h-u[y],C),U=!t.middlewareData.shift,R=E,oe=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(oe=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=T),U&&!d){let G=ft(u.left,0),L=ft(u.right,0),P=ft(u.top,0),_=ft(u.bottom,0);p?oe=h-2*(G!==0||L!==0?G+L:ft(u.left,u.right)):R=g-2*(P!==0||_!==0?P+_:ft(u.top,u.bottom))}await c({...t,availableWidth:oe,availableHeight:R});let H=await a.getDimensions(s.floating);return h!==H.width||g!==H.height?{reset:{rects:!0}}:{}}}};function qa(){return typeof window<"u"}function fr(e){return Nm(e)?(e.nodeName||"").toLowerCase():"#document"}function vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zt(e){var t;return(t=(Nm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nm(e){return qa()?e instanceof Node||e instanceof vt(e).Node:!1}function Dt(e){return qa()?e instanceof Element||e instanceof vt(e).Element:!1}function Gt(e){return qa()?e instanceof HTMLElement||e instanceof vt(e).HTMLElement:!1}function Lm(e){return!qa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vt(e).ShadowRoot}function go(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Lt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $m(e){return["table","td","th"].includes(fr(e))}function xi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ka(e){let t=Ya(),n=Dt(e)?Lt(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 Bm(e){let t=Tn(e);for(;Gt(t)&&!pr(t);){if(Ka(t))return t;if(xi(t))return null;t=Tn(t)}return null}function Ya(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pr(e){return["html","body","#document"].includes(fr(e))}function Lt(e){return vt(e).getComputedStyle(e)}function vi(e){return Dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if(fr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Lm(e)&&e.host||zt(e);return Lm(t)?t.host:t}function Fm(e){let t=Tn(e);return pr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gt(t)&&go(t)?t:Fm(t)}function mo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=Fm(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=vt(o);if(i){let s=Xa(a);return t.concat(a,a.visualViewport||[],go(o)?o:[],s&&n?mo(s):[])}return t.concat(o,mo(o,[],n))}function Xa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vm(e){let t=Lt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Gt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=bi(n)!==i||bi(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function uc(e){return Dt(e)?e:e.contextElement}function ho(e){let t=uc(e);if(!Gt(t))return Sn(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vm(t),a=(i?bi(n.width):n.width)/r,s=(i?bi(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var nC=Sn(0);function Hm(e){let t=vt(e);return!Ya()||!t.visualViewport?nC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rC(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vt(e)?!1:t}function mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=uc(e),a=Sn(1);t&&(r?Dt(r)&&(a=ho(r)):a=ho(e));let s=rC(i,n,r)?Hm(i):Sn(0),c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){let d=vt(i),p=r&&Dt(r)?vt(r):r,h=d,g=Xa(h);for(;g&&r&&p!==h;){let v=ho(g),y=g.getBoundingClientRect(),T=Lt(g),C=y.left+(g.clientLeft+parseFloat(T.paddingLeft))*v.x,E=y.top+(g.clientTop+parseFloat(T.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,f*=v.y,c+=C,l+=E,h=vt(g),g=Xa(h)}}return dr({width:u,height:f,x:c,y:l})}function oC(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",a=zt(r),s=t?xi(t.floating):!1;if(r===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},l=Sn(1),u=Sn(0),f=Gt(r);if((f||!f&&!i)&&((fr(r)!=="body"||go(a))&&(c=vi(r)),Gt(r))){let d=mr(r);l=ho(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function iC(e){return Array.from(e.getClientRects())}function cc(e,t){let n=vi(e).scrollLeft;return t?t.left+n:mr(zt(e)).left+n}function aC(e){let t=zt(e),n=vi(e),r=e.ownerDocument.body,o=ft(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ft(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+cc(e),s=-n.scrollTop;return Lt(r).direction==="rtl"&&(a+=ft(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function sC(e,t){let n=vt(e),r=zt(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;let l=Ya();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function lC(e,t){let n=mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Gt(e)?ho(e):Sn(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function Um(e,t,n){let r;if(t==="viewport")r=sC(e,n);else if(t==="document")r=aC(zt(e));else if(Dt(t))r=lC(t,n);else{let o=Hm(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return dr(r)}function zm(e,t){let n=Tn(e);return n===t||!Dt(n)||pr(n)?!1:Lt(n).position==="fixed"||zm(n,t)}function cC(e,t){let n=t.get(e);if(n)return n;let r=mo(e,[],!1).filter(s=>Dt(s)&&fr(s)!=="body"),o=null,i=Lt(e).position==="fixed",a=i?Tn(e):e;for(;Dt(a)&&!pr(a);){let s=Lt(a),c=Ka(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||go(a)&&!c&&zm(e,a))?r=r.filter(u=>u!==a):o=s,a=Tn(a)}return t.set(e,r),r}function uC(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,a=[...n==="clippingAncestors"?xi(t)?[]:cC(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((l,u)=>{let f=Um(t,u,o);return l.top=ft(f.top,l.top),l.right=sn(f.right,l.right),l.bottom=sn(f.bottom,l.bottom),l.left=ft(f.left,l.left),l},Um(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function dC(e){let{width:t,height:n}=Vm(e);return{width:t,height:n}}function fC(e,t,n){let r=Gt(t),o=zt(t),i=n==="fixed",a=mr(e,!0,i,t),s={scrollLeft:0,scrollTop:0},c=Sn(0);if(r||!r&&!i)if((fr(t)!=="body"||go(o))&&(s=vi(t)),r){let p=mr(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&(c.x=cc(o));let l=0,u=0;if(o&&!r&&!i){let p=o.getBoundingClientRect();u=p.top+s.scrollTop,l=p.left+s.scrollLeft-cc(o,p)}let f=a.left+s.scrollLeft-c.x-l,d=a.top+s.scrollTop-c.y-u;return{x:f,y:d,width:a.width,height:a.height}}function lc(e){return Lt(e).position==="static"}function jm(e,t){if(!Gt(e)||Lt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zt(e)===n&&(n=n.ownerDocument.body),n}function Gm(e,t){let n=vt(e);if(xi(e))return n;if(!Gt(e)){let o=Tn(e);for(;o&&!pr(o);){if(Dt(o)&&!lc(o))return o;o=Tn(o)}return n}let r=jm(e,t);for(;r&&$m(r)&&lc(r);)r=jm(r,t);return r&&pr(r)&&lc(r)&&!Ka(r)?n:r||Bm(e)||n}var pC=async function(e){let t=this.getOffsetParent||Gm,n=this.getDimensions,r=await n(e.floating);return{reference:fC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mC(e){return Lt(e).direction==="rtl"}var gC={convertOffsetParentRelativeRectToViewportRelativeRect:oC,getDocumentElement:zt,getClippingRect:uC,getOffsetParent:Gm,getElementRects:pC,getClientRects:iC,getDimensions:dC,getScale:ho,isElement:Dt,isRTL:mC};function hC(e,t){let n=null,r,o=zt(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();let{left:l,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;let p=yi(u),h=yi(o.clientWidth-(l+f)),g=yi(o.clientHeight-(u+d)),v=yi(l),T={rootMargin:-p+"px "+-h+"px "+-g+"px "+-v+"px",threshold:ft(0,sn(1,c))||1},C=!0;function E(I){let U=I[0].intersectionRatio;if(U!==c){if(!C)return a();U?a(!1,U):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(E,{...T,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,T)}n.observe(e)}return a(!0),i}function Wm(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=uc(e),u=o||i?[...l?mo(l):[],...mo(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});let f=l&&s?hC(l,n):null,d=-1,p=null;a&&(p=new ResizeObserver(y=>{let[T]=y;T&&T.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let h,g=c?mr(e):null;c&&v();function v(){let y=mr(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,h=requestAnimationFrame(v)}return n(),()=>{var y;u.forEach(T=>{o&&T.removeEventListener("scroll",n),i&&T.removeEventListener("resize",n)}),f?.(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(h)}}var qm=Om;var Km=Rm,Ym=Im,Xm=Dm,Zm=Am,Jm=Pm;var Qm=Mm,eg=(e,t,n)=>{let r=new Map,o={platform:gC,...n},i={...o.platform,_c:r};return Em(e,t,{...o,platform:i})};function tg(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);let o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...o,toJSON:()=>o}}function bC(e){if(!e)return tg();let{x:t,y:n,width:r,height:o}=e;return tg(t,n,r,o)}function yC(e,t){return{contextElement:tt(e)?e:void 0,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?bC(r):n.getBoundingClientRect()}}}var wi=e=>({variable:e,reference:`var(${e})`}),Cn={arrowSize:wi("--arrow-size"),arrowSizeHalf:wi("--arrow-size-half"),arrowBg:wi("--arrow-background"),transformOrigin:wi("--transform-origin"),arrowOffset:wi("--arrow-offset")},xC=e=>({top:"bottom center","top-start":e?`${e.x}px bottom`:"left bottom","top-end":e?`${e.x}px bottom`:"right bottom",bottom:"top center","bottom-start":e?`${e.x}px top`:"top left","bottom-end":e?`${e.x}px top`:"top right",left:"right center","left-start":e?`right ${e.y}px`:"right top","left-end":e?`right ${e.y}px`:"right bottom",right:"left center","right-start":e?`left ${e.y}px`:"left top","right-end":e?`left ${e.y}px`:"left bottom"}),vC={name:"transformOrigin",fn({placement:e,elements:t,middlewareData:n}){let{arrow:r}=n,o=xC(r)[e],{floating:i}=t;return i.style.setProperty(Cn.transformOrigin.variable,o),{data:{transformOrigin:o}}}},wC={name:"rects",fn({rects:e}){return{data:e}}},SC=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:o}=n.arrow,i=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[i]:`calc(100% + ${Cn.arrowOffset.reference})`}),{}}}};function TC(e){let[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}function rg(e){return e.split("-")[0]}var CC={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function ng(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function og(e){return vn(e.boundary)}function _C(e,t){if(e)return Jm({element:e,padding:t.arrowPadding})}function kC(e,t){if(!Dp(t.offset??t.gutter))return qm(({placement:n})=>{let r=(e?.clientHeight||0)/2,o=t.offset?.mainAxis??t.gutter,i=typeof o=="number"?o+r:o??r,{hasAlign:a}=TC(n),s=a?void 0:t.shift,c=t.offset?.crossAxis??s;return st({crossAxis:c,mainAxis:i,alignmentAxis:t.shift})})}function EC(e){if(e.flip)return Ym({boundary:og(e),padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function PC(e){if(!(!e.slide&&!e.overlap))return Km({boundary:og(e),mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Qm()})}function IC(e){return Xm({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){let i=t.floating,a=Math.round(n.reference.width);o=Math.floor(o),r=Math.floor(r),i.style.setProperty("--reference-width",`${a}px`),i.style.setProperty("--available-width",`${o}px`),i.style.setProperty("--available-height",`${r}px`)}})}function AC(e){if(e.hideWhenDetached)return Zm({strategy:"referenceHidden",boundary:e.boundary?.()??"clippingAncestors"})}function OC(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function RC(e,t,n={}){let r=yC(e,n.getAnchorRect);if(!t||!r)return;let o=Object.assign({},CC,n),i=t.querySelector("[data-part=arrow]"),a=[kC(i,o),EC(o),PC(o),_C(i,o),SC(i),vC,IC(o),AC(o),wC],{placement:s,strategy:c,onComplete:l,onPositioned:u}=o,f=async()=>{if(!r||!t)return;let g=await eg(r,t,{placement:s,middleware:a,strategy:c});l?.(g),u?.({placed:!0});let v=on(t),y=ng(v,g.x),T=ng(v,g.y);t.style.setProperty("--x",`${y}px`),t.style.setProperty("--y",`${T}px`),o.hideWhenDetached&&g.middlewareData.hide?.referenceHidden&&t.style.setProperty("visibility","hidden");let C=t.firstElementChild;if(C){let E=v.getComputedStyle(C).zIndex;t.style.setProperty("--z-index",E)}},d=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:f}),u?.({placed:!0})):await f()},p=OC(o.listeners),h=o.listeners?Wm(r,t,d,p):La;return d(),()=>{h?.(),u?.({placed:!1})}}function dc(e,t,n={}){let{defer:r,...o}=n,i=r?He:s=>s(),a=[];return a.push(i(()=>{let s=typeof e=="function"?e():e,c=typeof t=="function"?t():t;a.push(RC(s,c,o))})),()=>{a.forEach(s=>s?.())}}var MC={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function ig(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Cn.arrowSize.reference,height:Cn.arrowSize.reference,[Cn.arrowSizeHalf.variable]:`calc(${Cn.arrowSize.reference} / 2)`,[Cn.arrowOffset.variable]:`calc(${Cn.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?MC[t.split("-")[0]]:void 0,background:Cn.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Wt=(e,t,n,r)=>{let o=typeof e=="function"?e():e;return o?.addEventListener(t,n,r),()=>{o?.removeEventListener(t,n,r)}};function sg(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}var Za=e=>e.button===2||rm()&&e.ctrlKey&&e.button===0,lg=e=>e.ctrlKey||e.altKey||e.metaKey;function DC(e,t,n){let o=(a=>{let s=requestAnimationFrame(a);return()=>cancelAnimationFrame(s)})(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{o(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),o}function LC(e){return e?.matches("a[href]")??!1}function cg(e){if(!LC(e))return;let t=()=>e.click();om()?DC(e,"keyup",t):queueMicrotask(t)}function fc(e,t,n){if(!e)return;let r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}var NC={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},ag={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function pc(e,t={}){let{dir:n="ltr",orientation:r="horizontal"}=t,{key:o}=e;return o=NC[o]??o,n==="rtl"&&r==="horizontal"&&o in ag&&(o=ag[o]),o}function $C(e,t="client"){let n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function BC(e,t="client"){return{x:e[`${t}X`],y:e[`${t}Y`]}}var FC=e=>"touches"in e&&e.touches.length>0;function Ja(e,t="client"){return FC(e)?$C(e,t):BC(e,t)}function UC(e){let t={each(n){for(let r=0;r<e.frames?.length;r+=1){let o=e.frames[r];o&&n(o)}},addEventListener(n,r,o){return t.each(i=>{try{i.document.addEventListener(n,r,o)}catch{}}),()=>{try{t.removeEventListener(n,r,o)}catch{}}},removeEventListener(n,r,o){t.each(i=>{try{i.document.removeEventListener(n,r,o)}catch{}})}};return t}function jC(e){let t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t?.addEventListener(n,r,o)}catch{}return()=>{try{t?.removeEventListener(n,r,o)}catch{}}},removeEventListener:(n,r,o)=>{try{t?.removeEventListener(n,r,o)}catch{}}}}var ug="pointerdown.outside",dg="focus.outside";function VC(e){for(let t of e)if(tt(t)&&Ua(t))return!0;return!1}var pg=e=>"clientY"in e;function HC(e,t){if(!pg(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function fg(e,t){if(!t||!pg(e))return!1;let r=t.scrollHeight>t.clientHeight&&e.clientX>t.clientWidth,i=t.scrollWidth>t.clientWidth&&e.clientY>t.clientHeight;return r||i}function zC(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:i,defer:a}=t;if(!e)return;let s=Vt(e),c=on(e),l=UC(c),u=jC(c);function f(y){let T=an(y);if(!tt(T)||Mt(e,T)||HC(e,y)||fg(y,T))return!1;let C=ac(e);return fg(y,C)?!1:!n?.(T)}let d=new Set;function p(y){function T(){let C=a?He:I=>I(),E=y.composedPath?.()??[y.target];C(()=>{if(!(!e||!f(y))){if(o||i){let I=ci(o,i);e.addEventListener(ug,I,{once:!0})}fc(e,ug,{bubbles:!1,cancelable:!0,detail:{originalEvent:y,contextmenu:Za(y),focusable:VC(E)}})}})}y.pointerType==="touch"?(d.forEach(C=>C()),d.add(Wt(s,"click",T,{once:!0})),d.add(u.addEventListener("click",T,{once:!0})),d.add(l.addEventListener("click",T,{once:!0}))):T()}let h=new Set,g=setTimeout(()=>{h.add(Wt(s,"pointerdown",p,!0)),h.add(u.addEventListener("pointerdown",p,!0)),h.add(l.addEventListener("pointerdown",p,!0))},0);function v(y){(a?He:C=>C())(()=>{if(!(!e||!f(y))){if(r||i){let C=ci(r,i);e.addEventListener(dg,C,{once:!0})}fc(e,dg,{bubbles:!1,cancelable:!0,detail:{originalEvent:y,contextmenu:!1,focusable:Ua(an(y))}})}})}return h.add(Wt(s,"focusin",v,!0)),h.add(u.addEventListener("focusin",v,!0)),h.add(l.addEventListener("focusin",v,!0)),()=>{clearTimeout(g),d.forEach(y=>y()),h.forEach(y=>y())}}function mg(e,t){let{defer:n}=t,r=n?He:i=>i(),o=[];return o.push(r(()=>{let i=typeof e=="function"?e():e;o.push(zC(i,t))})),()=>{o.forEach(i=>i?.())}}function GC(e,t){let n=r=>{r.key==="Escape"&&(r.isComposing||t?.(r))};return Wt(Vt(e),"keydown",n,{capture:!0})}var Ct={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){let t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1;return t<n},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>Mt(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Mt(t,e))},add(e){let t=this.layers.push(e);e.node.style.setProperty("--layer-index",`${t}`)},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>r.dismiss()),this.layers.splice(t,1),e.style.removeProperty("--layer-index"))},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e){this.layers[this.indexOf(e)]?.dismiss()},clear(){this.remove(this.layers[0].node)}},gg;function hg(){Ct.layers.forEach(({node:e})=>{e.style.pointerEvents=Ct.isBelowPointerBlockingLayer(e)?"none":"auto"})}function WC(e){e.style.pointerEvents=""}function qC(e,t){let n=Vt(e),r=[];if(Ct.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(gg=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t){let o=ym(t,i=>{r.push(bm(i,{pointerEvents:"auto"}))});r.push(o)}return()=>{Ct.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=gg,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function KC(e,t){if(!e){wn("[@zag-js/dismissable] node is `null` or `undefined`");return}let{onDismiss:n,pointerBlocking:r,exclude:o,debug:i}=t,a={dismiss:n,node:e,pointerBlocking:r};Ct.add(a),hg();function s(d){let p=an(d.detail.originalEvent);Ct.isBelowPointerBlockingLayer(e)||Ct.isInBranch(p)||(t.onPointerDownOutside?.(d),t.onInteractOutside?.(d),!d.defaultPrevented&&(i&&console.log("onPointerDownOutside:",d.detail.originalEvent),n?.()))}function c(d){let p=an(d.detail.originalEvent);Ct.isInBranch(p)||(t.onFocusOutside?.(d),t.onInteractOutside?.(d),!d.defaultPrevented&&(i&&console.log("onFocusOutside:",d.detail.originalEvent),n?.()))}function l(d){Ct.isTopMost(e)&&(t.onEscapeKeyDown?.(d),!d.defaultPrevented&&n&&(d.preventDefault(),n()))}function u(d){if(!e)return!1;let p=typeof o=="function"?o():o,h=Array.isArray(p)?p:[p],g=t.persistentElements?.map(v=>v()).filter(tt);return g&&h.push(...g),h.some(v=>Mt(v,d))||Ct.isInNestedLayer(e,d)}let f=[r?qC(e,t.persistentElements):void 0,GC(e,l),mg(e,{exclude:u,onFocusOutside:c,onPointerDownOutside:s,defer:t.defer})];return()=>{Ct.remove(e),hg(),WC(e),f.forEach(d=>d?.())}}function Qa(e,t){let{defer:n}=t,r=n?He:i=>i(),o=[];return o.push(r(()=>{let i=Un(e)?e():e;o.push(KC(i,t))})),()=>{o.forEach(i=>i?.())}}function bg(e,t={}){let{defer:n}=t,r=n?He:i=>i(),o=[];return o.push(r(()=>{let i=Un(e)?e():e;if(!i){wn("[@zag-js/dismissable] branch node is `null` or `undefined`");return}Ct.addBranch(i),o.push(()=>{Ct.removeBranch(i)})})),()=>{o.forEach(i=>i?.())}}var vg=Ht("toast").parts("group","root","title","description","actionTrigger","closeTrigger"),bo=vg.build(),lt=Hn({getRegionId:e=>`toast-group:${e}`,getRegionEl:(e,t)=>lt.getById(e,`toast-group:${t}`),getRootId:e=>`toast:${e.id}`,getRootEl:e=>lt.getById(e,lt.getRootId(e)),getTitleId:e=>`toast:${e.id}:title`,getDescriptionId:e=>`toast:${e.id}:description`,getCloseTriggerId:e=>`toast${e.id}:close`});function mc(e,t){return e.filter(n=>n.state.context.placement===t)}var yg={info:5e3,error:5e3,success:2e3,loading:1/0,DEFAULT:5e3};function xg(e,t){return e??yg[t]??yg.DEFAULT}function YC(e,t){let n=e.offsets,r=typeof n=="string"?{left:n,right:n,bottom:n,top:n}:n,o=e.dir==="rtl",i=t.replace("-start",o?"-right":"-left").replace("-end",o?"-left":"-right"),a=i.includes("right"),s=i.includes("left"),c={position:"fixed",pointerEvents:e.count>0?void 0:"none",display:"flex",flexDirection:"column","--gap":`${e.gap}px`,"--first-height":`${e.heights[0]?.height||0}px`,zIndex:Qp},l="center";if(a&&(l="flex-end"),s&&(l="flex-start"),c.alignItems=l,i.includes("top")){let u=r.top;c.top=`max(env(safe-area-inset-top, 0px), ${u})`}if(i.includes("bottom")){let u=r.bottom;c.bottom=`max(env(safe-area-inset-bottom, 0px), ${u})`}if(!i.includes("left")){let u=r.right;c.insetInlineEnd=`calc(env(safe-area-inset-right, 0px) + ${u})`}if(!i.includes("right")){let u=r.left;c.insetInlineStart=`calc(env(safe-area-inset-left, 0px) + ${u})`}return c}function XC(e,t){let[n]=e.placement.split("-"),r=!e.frontmost,o=!e.stacked,i={position:"absolute",pointerEvents:"auto","--opacity":"0","--remove-delay":`${e.removeDelay}ms`,"--duration":`${e.type==="loading"?Number.MAX_SAFE_INTEGER:e.duration}ms`,"--initial-height":`${e.height}px`,"--offset":`${e.offset}px`,"--index":e.index,"--z-index":e.zIndex,"--lift-amount":"calc(var(--lift) * var(--gap))","--y":"100%","--x":"0"},a=s=>Object.assign(i,s);return n==="top"?a({top:"0","--sign":"-1","--y":"-100%","--lift":"1"}):n==="bottom"&&a({bottom:"0","--sign":"1","--y":"100%","--lift":"-1"}),e.mounted&&(a({"--y":"0","--opacity":"1"}),e.stacked&&a({"--y":"calc(var(--lift) * var(--offset))","--height":"var(--initial-height)"})),t||a({"--opacity":"0",pointerEvents:"none"}),r&&o&&(a({"--base-scale":"var(--index) * 0.05 + 1","--y":"calc(var(--lift-amount) * var(--index))","--scale":"calc(-1 * var(--base-scale))","--height":"var(--first-height)"}),t||a({"--y":"calc(var(--sign) * 40%)"})),r&&e.stacked&&!t&&a({"--y":"calc(var(--lift) * var(--offset) + var(--lift) * -100%)"}),e.frontmost&&!t&&a({"--y":"calc(var(--lift) * -100%)"}),i}function ZC(e,t){let n={position:"absolute",inset:"0",scale:"1 2",pointerEvents:t?"none":"auto"},r=o=>Object.assign(n,o);return e.frontmost&&!t&&r({height:"calc(var(--initial-height) + 80%)"}),n}function JC(e,t){return{position:"absolute",left:"0",height:"calc(var(--gap) + 2px)",bottom:"100%",width:"100%"}}function QC(e,t,n){function r(){return zp(e)?e.getState():e}function o(u){return mc(r().context.toasts,u)}function i(u){let f=r().context.toasts;return f.length?!!f.find(d=>d.id==u):!1}function a(u){let f=`toast:${ui()}`,d=u.id?u.id:f;return i(d)||t({type:"ADD_TOAST",toast:{...u,id:d}}),d}function s(u,f){return i(u)&&t({type:"UPDATE_TOAST",id:u,toast:f}),u}function c(u){let{id:f}=u;return(f?i(f):!1)&&f!=null?s(f,u):a(u)}function l(u){u==null?t("DISMISS_ALL"):i(u)&&t({type:"DISMISS_TOAST",id:u})}return{getCount(){return r().context.count},getPlacements(){let f=r().context.toasts.map(d=>d.state.context.placement);return Array.from(new Set(f))},getToastsByPlacement:o,isVisible:i,create:a,update:s,upsert:c,dismiss:l,remove(u){u==null?t("REMOVE_ALL"):i(u)&&t({type:"REMOVE_TOAST",id:u})},dismissByPlacement(u){o(u).forEach(d=>l(d.id))},loading(u){return c({...u,type:"loading"})},success(u){return c({...u,type:"success"})},error(u){return c({...u,type:"error"})},promise(u,f,d={}){let p=c({...d,...f.loading,type:"loading"});return vn(u).then(h=>{let g=vn(f.success,h);c({...d,...g,id:p,type:"success"})}).catch(h=>{let g=vn(f.error,h);c({...d,...g,id:p,type:"error"})}).finally(()=>{f.finally?.()}),p},pause(u){u==null?t("PAUSE_ALL"):i(u)&&t({type:"PAUSE_TOAST",id:u})},resume(u){u==null?t("RESUME_ALL"):i(u)&&t({type:"RESUME_TOAST",id:u})},getGroupProps(u){let{placement:f,label:d="Notifications"}=u,p=r(),h=p.context.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),[g,v="center"]=f.split("-");return n.element({...bo.group.attrs,dir:p.context.dir,tabIndex:-1,"aria-label":`${f} ${d} ${h}`,id:lt.getRegionId(f),"data-placement":f,"data-side":g,"data-align":v,"aria-live":"polite",role:"region",style:YC(p.context,f),onMouseMove(){t({type:"REGION.POINTER_ENTER",placement:f})},onMouseLeave(){t({type:"REGION.POINTER_LEAVE",placement:f})},onFocus(y){t({type:"REGION.FOCUS",target:y.relatedTarget})},onBlur(y){p.context.isFocusWithin&&!Mt(y.currentTarget,y.relatedTarget)&&t({type:"REGION.BLUR"})}})},subscribe(u){let f=r();return so(f.context.toasts,()=>{let p=o(f.context.placement).map(h=>h.getState().context);u(p)})}}}var{not:e_,and:t_,or:n_}=Na;function r_(e){let{type:t="info",duration:n,id:r="1",placement:o="bottom",removeDelay:i=200,...a}=e,s=st(a),c=xg(n,t);return jt({id:r,context:{id:r,type:t,remaining:c,duration:c,removeDelay:i,createdAt:Date.now(),placement:o,...s,height:0,offset:0,frontmost:!1,mounted:!1,index:-1,zIndex:0},initial:t==="loading"?"visible:persist":"visible",on:{UPDATE:[{guard:t_("hasTypeChanged","isChangingToLoading"),target:"visible:persist",actions:["setContext"]},{guard:n_("hasDurationChanged","hasTypeChanged"),target:"visible:updating",actions:["setContext"]},{actions:["setContext"]}],MEASURE:{actions:["measureHeight"]}},entry:["invokeOnVisible"],activities:["trackHeight"],states:{"visible:updating":{tags:["visible","updating"],after:{0:"visible"}},"visible:persist":{tags:["visible","paused"],on:{RESUME:{guard:e_("isLoadingType"),target:"visible",actions:["setCreatedAt"]},DISMISS:"dismissing"}},visible:{tags:["visible"],after:{VISIBLE_DURATION:"dismissing"},on:{DISMISS:"dismissing",PAUSE:{target:"visible:persist",actions:"setRemainingDuration"}}},dismissing:{entry:"invokeOnDismiss",after:{REMOVE_DELAY:{target:"unmounted",actions:"notifyParentToRemove"}}},unmounted:{entry:"invokeOnUnmount",type:"final"}}},{activities:{trackHeight(l,u,{self:f}){let d;return He(()=>{let p=lt.getRootEl(l);if(!p)return;l.mounted=!0;let h=ja(p,"[data-ghost]");wn(h.length!==2,"[toast] No ghost element found in toast. Render the `ghostBefore` and `ghostAfter` elements");let g=()=>{let T=p.style.height;p.style.height="auto";let C=p.getBoundingClientRect().height;p.style.height=T,l.height=C,f.sendParent({type:"UPDATE_HEIGHT",id:f.id,height:C,placement:l.placement})};g();let v=lt.getWin(l),y=new v.MutationObserver(g);y.observe(p,{childList:!0,subtree:!0,characterData:!0}),d=()=>y.disconnect()}),()=>d?.()}},guards:{isChangingToLoading:(l,u)=>u.toast?.type==="loading",isLoadingType:l=>l.type==="loading",hasTypeChanged:(l,u)=>u.toast?.type!=null&&u.toast.type!==l.type,hasDurationChanged:(l,u)=>u.toast?.duration!=null&&u.toast.duration!==l.duration},delays:{VISIBLE_DURATION:l=>l.remaining,REMOVE_DELAY:l=>l.removeDelay},actions:{measureHeight(l,u,{self:f}){He(()=>{let d=lt.getRootEl(l);if(!d)return;l.mounted=!0;let p=d.style.height;d.style.height="auto";let h=d.getBoundingClientRect().height;d.style.height=p,l.height=h,f.sendParent({type:"UPDATE_HEIGHT",id:f.id,height:h,placement:l.placement})})},setRemainingDuration(l){l.remaining-=Date.now()-l.createdAt},setCreatedAt(l){l.createdAt=Date.now()},notifyParentToRemove(l,u,{self:f}){f.sendParent({type:"REMOVE_TOAST",id:f.id})},invokeOnDismiss(l){l.onStatusChange?.({status:"dismissing"})},invokeOnUnmount(l){l.onStatusChange?.({status:"unmounted"})},invokeOnVisible(l){l.onStatusChange?.({status:"visible"})},setContext(l,u){let f=u.toast?.duration,d=u.toast?.type??l.type,p=xg(f,d);Object.assign(l,{...u.toast,duration:p,remaining:p})}}})}function o_(e){let t=st(e);return jt({id:"toaster",initial:t.overlap?"overlap":"stack",context:{dir:"ltr",max:Number.MAX_SAFE_INTEGER,gap:16,pauseOnPageIdle:!1,hotkey:["altKey","KeyT"],offsets:"1rem",placement:"bottom",removeDelay:200,...t,toasts:[],lastFocusedEl:null,isFocusWithin:!1,heights:[]},computed:{count:n=>n.toasts.length},activities:["trackDocumentVisibility","trackHotKeyPress"],watch:{toasts:["collapsedIfEmpty","setDismissableBranch"]},exit:["removeToasts","clearDismissableBranch","clearLastFocusedEl"],on:{PAUSE_TOAST:{actions:["pauseToast"]},PAUSE_ALL:{actions:["pauseToasts"]},RESUME_TOAST:{actions:["resumeToast"]},RESUME_ALL:{actions:["resumeToasts"]},ADD_TOAST:{guard:"isWithinRange",actions:["createToast","syncToastIndex"]},UPDATE_TOAST:{actions:["updateToast"]},DISMISS_TOAST:{actions:["dismissToast"]},DISMISS_ALL:{actions:["dismissToasts"]},REMOVE_TOAST:{actions:["removeToast","syncToastIndex","syncToastOffset"]},REMOVE_ALL:{actions:["removeToasts"]},UPDATE_HEIGHT:{actions:["syncHeights","syncToastOffset"]},"DOC.HOTKEY":{actions:["focusRegionEl"]},"REGION.BLUR":[{guard:"isOverlapping",target:"overlap",actions:["resumeToasts","restoreLastFocusedEl"]},{actions:["resumeToasts","restoreLastFocusedEl"]}]},states:{stack:{entry:["expandToasts"],on:{"REGION.POINTER_LEAVE":[{guard:"isOverlapping",target:"overlap",actions:["resumeToasts"]},{actions:["resumeToasts"]}],"REGION.OVERLAP":{target:"overlap"},"REGION.FOCUS":{actions:["setLastFocusedEl","pauseToasts"]},"REGION.POINTER_ENTER":{actions:["pauseToasts"]}}},overlap:{entry:["collapseToasts"],on:{"REGION.STACK":{target:"stack"},"REGION.POINTER_ENTER":{target:"stack",actions:["pauseToasts"]},"REGION.FOCUS":{target:"stack",actions:["setLastFocusedEl","pauseToasts"]}}}}},{guards:{isWithinRange:n=>n.toasts.length<n.max,isOverlapping:n=>!!n.overlap},activities:{trackHotKeyPress(n,r,{send:o}){return Wt(document,"keydown",a=>{n.hotkey.every(c=>a[c]||a.code===c)&&o({type:"DOC.HOTKEY"})},{capture:!0})},trackDocumentVisibility(n,r,{send:o}){if(!n.pauseOnPageIdle)return;let i=lt.getDoc(n);return Wt(i,"visibilitychange",()=>{o(i.visibilityState==="hidden"?"PAUSE_ALL":"RESUME_ALL")})}},actions:{setDismissableBranch(n){let o=mc(n.toasts,n.placement).length>0;if(!o){n._cleanup?.();return}if(o&&n._cleanup)return;let i=()=>lt.getRegionEl(n,n.placement);n._cleanup=bg(i,{defer:!0})},clearDismissableBranch(n){n._cleanup?.()},focusRegionEl(n){queueMicrotask(()=>{lt.getRegionEl(n,n.placement)?.focus()})},expandToasts(n){es(n,r=>{r.state.context.stacked=!0})},collapseToasts(n){es(n,r=>{r.state.context.stacked=!1})},collapsedIfEmpty(n,r,{send:o}){!n.overlap||n.toasts.length>1||o("REGION.OVERLAP")},pauseToast(n,r,{self:o}){o.sendChild("PAUSE",r.id)},pauseToasts(n){n.toasts.forEach(r=>r.send("PAUSE"))},resumeToast(n,r,{self:o}){o.sendChild("RESUME",r.id)},resumeToasts(n){n.toasts.forEach(r=>r.send("RESUME"))},measureToasts(n){n.toasts.forEach(r=>r.send("MEASURE"))},createToast(n,r,{self:o,getState:i}){let a={placement:n.placement,duration:n.duration,removeDelay:n.removeDelay,...r.toast,dir:n.dir,getRootNode:n.getRootNode,stacked:i().matches("stack")},s=r_(a),c=o.spawn(s);n.toasts=[c,...n.toasts]},updateToast(n,r,{self:o}){o.sendChild({type:"UPDATE",toast:r.toast},r.id)},dismissToast(n,r,{self:o}){o.sendChild("DISMISS",r.id)},dismissToasts(n){n.toasts.forEach(r=>r.send("DISMISS"))},removeToast(n,r,{self:o}){o.stopChild(r.id),n.toasts=n.toasts.filter(i=>i.id!==r.id),n.heights=n.heights.filter(i=>i.id!==r.id)},removeToasts(n,r,{self:o}){n.toasts.forEach(i=>o.stopChild(i.id)),n.toasts=[],n.heights=[]},syncHeights(n,r){let o=n.heights.find(i=>i.id===r.id);if(o)o.height=r.height,o.placement=r.placement;else{let i={id:r.id,height:r.height,placement:r.placement};n.heights=[i,...n.heights]}},syncToastIndex(n){es(n,(r,o,i)=>{r.state.context.index=o,r.state.context.frontmost=o===0,r.state.context.zIndex=i.length-o})},syncToastOffset(n,r){let o=r.placement??n.placement;es({...n,placement:o},i=>{let a=Math.max(n.heights.findIndex(c=>c.id===i.id),0),s=n.heights.reduce((c,l,u)=>u>=a?c:c+l.height,0);i.state.context.offset=a*n.gap+s})},setLastFocusedEl(n,r){n.isFocusWithin||!r.target||(n.isFocusWithin=!0,n.lastFocusedEl=Tt(r.target))},restoreLastFocusedEl(n){n.isFocusWithin=!1,n.lastFocusedEl&&(n.lastFocusedEl.focus({preventScroll:!0}),n.lastFocusedEl=null)},clearLastFocusedEl(n){n.lastFocusedEl&&(n.lastFocusedEl.focus({preventScroll:!0}),n.lastFocusedEl=null,n.isFocusWithin=!1)}}})}function es(e,t){mc(e.toasts,e.placement).forEach(t)}function wg(e,t,n){let r=e.hasTag("visible"),o=e.hasTag("paused"),i=e.context.placement,a=e.context.type,[s,c="center"]=i.split("-");return{type:a,title:e.context.title,description:e.context.description,placement:i,visible:r,paused:o,pause(){t("PAUSE")},resume(){t("RESUME")},dismiss(){t("DISMISS")},getRootProps(){return n.element({...bo.root.attrs,dir:e.context.dir,id:lt.getRootId(e.context),"data-state":r?"open":"closed","data-type":a,"data-placement":i,"data-align":c,"data-side":s,"data-mounted":xt(e.context.mounted),"data-paused":xt(o),"data-first":xt(e.context.frontmost),"data-sibling":xt(!e.context.frontmost),"data-stack":xt(e.context.stacked),"data-overlap":xt(!e.context.stacked),role:"status","aria-atomic":"true","aria-describedby":e.context.description?lt.getDescriptionId(e.context):void 0,"aria-labelledby":e.context.title?lt.getTitleId(e.context):void 0,tabIndex:0,style:XC(e.context,r),onKeyDown(l){l.defaultPrevented||l.key=="Escape"&&(t("DISMISS"),l.preventDefault())}})},getGhostBeforeProps(){return n.element({"data-ghost":"before",style:ZC(e.context,r)})},getGhostAfterProps(){return n.element({"data-ghost":"after",style:JC()})},getTitleProps(){return n.element({...bo.title.attrs,id:lt.getTitleId(e.context)})},getDescriptionProps(){return n.element({...bo.description.attrs,id:lt.getDescriptionId(e.context)})},getActionTriggerProps(){return n.button({...bo.actionTrigger.attrs,type:"button",onClick(l){l.defaultPrevented||(e.context.action?.onClick?.(),t("DISMISS"))}})},getCloseTriggerProps(){return n.button({id:lt.getCloseTriggerId(e.context),...bo.closeTrigger.attrs,type:"button","aria-label":"Dismiss notification",onClick(l){l.defaultPrevented||t("DISMISS")}})}}}var ts={connect:QC,machine:o_};var gc=e=>{let t=ts.machine({id:"1",...e});return{...ts.connect(t,t.send,Rt),machine:t}},[a_,gr]=Ve({hookName:"useToastContext",providerName:"<ToastProvider />"}),Sg=e=>{let t=gr(),n=ee(()=>t().getActionTriggerProps(),e);return m(fe.button,n)},Tg=e=>{let t=gr(),n=ee(()=>t().getCloseTriggerProps(),e);return m(fe.button,n)},Cg=e=>e.children(gr()),_g=e=>{let t=gr(),n=ee(()=>t().getDescriptionProps(),e);return m(fe.div,n)},s_=S("<div><div></div><div>"),kg=e=>{let t=gr(),n=ee(()=>t().getRootProps(),e);return(()=>{var r=s_(),o=r.firstChild,i=o.nextSibling;return Te(r,n,!1,!0),Te(o,Se(()=>t().getGhostBeforeProps()),!1,!1),x(r,()=>e.children,i),Te(i,Se(()=>t().getGhostAfterProps()),!1,!1),r})()},Eg=e=>{let t=gr(),n=ee(()=>t().getTitleProps(),e);return m(fe.div,n)},hc=e=>{let[t,n]=Be(e,["toaster","children"]),[r,o]=rn(t.toaster.machine),i=r.context.placement,a=B(()=>ts.connect(r,o,Rt)),s=B(()=>a().getToastsByPlacement(i)),c=ee(a().getGroupProps({placement:i}),n);return m(fe.div,Se(c,{get children(){return m(he,{get each(){return s()},children:l=>m(l_,{value:l,children:u=>t.children(u)})})}}))},l_=e=>{let[t,n]=Yp(e.value),r=B(()=>wg(t,n,Rt)),o=B(()=>t.context);return m(a_,{value:r,get children(){return e.children(o)}})},hr={};zn(hr,{ActionTrigger:()=>Sg,CloseTrigger:()=>Tg,Context:()=>Cg,Description:()=>_g,Root:()=>kg,Title:()=>Eg});var Si=(e,t)=>({x:e,y:t});function c_(e){let{x:t,y:n,width:r,height:o}=e,i=t+r/2,a=n+o/2;return{x:t,y:n,width:r,height:o,minX:t,minY:n,maxX:t+r,maxY:n+o,midX:i,midY:a,center:Si(i,a)}}function u_(e){let t=Si(e.minX,e.minY),n=Si(e.maxX,e.minY),r=Si(e.maxX,e.maxY),o=Si(e.minX,e.maxY);return{top:t,right:n,bottom:r,left:o}}var{min:iM,max:aM}=Math;function Pg(e,t){let n=c_(e),{top:r,right:o,left:i,bottom:a}=u_(n),[s]=t.split("-");return{top:[i,r,o,a],right:[r,o,a,i],bottom:[r,i,a,o],left:[o,r,i,a]}[s]}function Ig(e,t){let{x:n,y:r}=t,o=!1;for(let i=0,a=e.length-1;i<e.length;a=i++){let s=e[i].x,c=e[i].y,l=e[a].x,u=e[a].y;c>r!=u>r&&n<(l-s)*(r-c)/(u-c)+s&&(o=!o)}return o}var{sign:sM,abs:lM,min:cM}=Math;var Og=Ht("menu").parts("arrow","arrowTip","content","contextTrigger","indicator","item","itemGroup","itemGroupLabel","itemIndicator","itemText","positioner","separator","trigger","triggerItem"),pt=Og.build(),Z=Hn({getTriggerId:e=>e.ids?.trigger??`menu:${e.id}:trigger`,getContextTriggerId:e=>e.ids?.contextTrigger??`menu:${e.id}:ctx-trigger`,getContentId:e=>e.ids?.content??`menu:${e.id}:content`,getArrowId:e=>e.ids?.arrow??`menu:${e.id}:arrow`,getPositionerId:e=>e.ids?.positioner??`menu:${e.id}:popper`,getGroupId:(e,t)=>e.ids?.group?.(t)??`menu:${e.id}:group:${t}`,getGroupLabelId:(e,t)=>e.ids?.groupLabel?.(t)??`menu:${e.id}:group-label:${t}`,getContentEl:e=>Z.getById(e,Z.getContentId(e)),getPositionerEl:e=>Z.getById(e,Z.getPositionerId(e)),getTriggerEl:e=>Z.getById(e,Z.getTriggerId(e)),getHighlightedItemEl:e=>e.highlightedValue?Z.getById(e,e.highlightedValue):null,getArrowEl:e=>Z.getById(e,Z.getArrowId(e)),getElements:e=>{let n=`[role^="menuitem"][data-ownedby=${CSS.escape(Z.getContentId(e))}]:not([data-disabled])`;return ja(Z.getContentEl(e),n)},getFirstEl:e=>Ip(Z.getElements(e)),getLastEl:e=>Ap(Z.getElements(e)),getNextEl:(e,t)=>sm(Z.getElements(e),e.highlightedValue,t??e.loopFocus),getPrevEl:(e,t)=>lm(Z.getElements(e),e.highlightedValue,t??e.loopFocus),getElemByKey:(e,t)=>rc(Z.getElements(e),{state:e.typeaheadState,key:t,activeId:e.highlightedValue}),isTargetDisabled:e=>tt(e)&&(e.dataset.disabled===""||e.hasAttribute("disabled")),isTriggerItem:e=>!!e?.getAttribute("role")?.startsWith("menuitem")&&!!e?.hasAttribute("aria-controls"),getOptionFromItemEl(e){return{id:e.id,name:e.dataset.name,value:e.dataset.value,valueText:e.dataset.valueText,type:e.dataset.type}}});function Rg(e,t,n){let r=e.context.isSubmenu,o=e.context.isTypingAhead,i=e.context.composite,a=e.hasTag("open"),s=ig({...e.context.positioning,placement:e.context.anchorPoint?"bottom":e.context.currentPlacement});function c(d){return{disabled:!!d.disabled,highlighted:e.context.highlightedValue===d.value}}function l(d){let p=d.valueText??d.value;return{...d,id:d.value,valueText:p}}function u(d){return{...c(l(d)),checked:!!d.checked}}function f(d){let{value:p,closeOnSelect:h,valueText:g}=d,v=c(d);return n.element({...pt.item.attrs,id:p,role:"menuitem","aria-disabled":v.disabled,"data-disabled":xt(v.disabled),"data-ownedby":Z.getContentId(e.context),"data-highlighted":xt(v.highlighted),"data-valuetext":g,onDragStart(y){y.currentTarget.matches("a[href]")&&y.preventDefault()},onPointerMove(y){if(v.disabled||y.pointerType!=="mouse")return;let T=y.currentTarget;v.highlighted||t({type:"ITEM_POINTERMOVE",id:p,target:T,closeOnSelect:h})},onPointerLeave(y){if(v.disabled||y.pointerType!=="mouse"||!e.previousEvent.type.includes("POINTER"))return;let C=y.currentTarget;t({type:"ITEM_POINTERLEAVE",id:p,target:C,closeOnSelect:h})},onPointerDown(y){if(v.disabled)return;let T=y.currentTarget;t({type:"ITEM_POINTERDOWN",target:T,id:p,closeOnSelect:h})},onClick(y){if(ec(y)||Ql(y)||v.disabled)return;let T=y.currentTarget;t({type:"ITEM_CLICK",target:T,id:p,closeOnSelect:h})}})}return{highlightedValue:e.context.highlightedValue,open:a,setOpen(d){d!==a&&t(d?"OPEN":"CLOSE")},setHighlightedValue(d){t({type:"HIGHLIGHTED.SET",id:d})},setParent(d){t({type:"PARENT.SET",value:d,id:d.state.context.id})},setChild(d){t({type:"CHILD.SET",value:d,id:d.state.context.id})},reposition(d={}){t({type:"POSITIONING.SET",options:d})},getContextTriggerProps(){return n.element({...pt.contextTrigger.attrs,dir:e.context.dir,id:Z.getContextTriggerId(e.context),onPointerDown(d){if(d.pointerType==="mouse")return;let p=Ja(d);t({type:"CONTEXT_MENU_START",point:p})},onPointerCancel(d){d.pointerType!=="mouse"&&t("CONTEXT_MENU_CANCEL")},onPointerMove(d){d.pointerType!=="mouse"&&t("CONTEXT_MENU_CANCEL")},onPointerUp(d){d.pointerType!=="mouse"&&t("CONTEXT_MENU_CANCEL")},onContextMenu(d){let p=Ja(d);t({type:"CONTEXT_MENU",point:p}),d.preventDefault()},style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none"}})},getTriggerItemProps(d){return $a(f({value:d.getTriggerProps().id}),d.getTriggerProps())},getTriggerProps(){return n.button({...r?pt.triggerItem.attrs:pt.trigger.attrs,"data-placement":e.context.currentPlacement,type:"button",dir:e.context.dir,id:Z.getTriggerId(e.context),"data-uid":e.context.id,"aria-haspopup":i?"menu":"dialog","aria-controls":Z.getContentId(e.context),"aria-expanded":a||void 0,"data-state":a?"open":"closed",onPointerMove(d){d.pointerType!=="mouse"||Z.isTargetDisabled(d.currentTarget)||!r||t({type:"TRIGGER_POINTERMOVE",target:d.currentTarget})},onPointerLeave(d){if(Z.isTargetDisabled(d.currentTarget)||d.pointerType!=="mouse"||!r)return;let p=Ja(d);t({type:"TRIGGER_POINTERLEAVE",target:d.currentTarget,point:p})},onPointerDown(d){Z.isTargetDisabled(d.currentTarget)||Za(d)||d.preventDefault()},onClick(d){d.defaultPrevented||Z.isTargetDisabled(d.currentTarget)||t({type:"TRIGGER_CLICK",target:d.currentTarget})},onBlur(){t("TRIGGER_BLUR")},onFocus(){t("TRIGGER_FOCUS")},onKeyDown(d){if(d.defaultPrevented)return;let p={ArrowDown(){t("ARROW_DOWN")},ArrowUp(){t("ARROW_UP")},Enter(){t({type:"ARROW_DOWN",src:"enter"})},Space(){t({type:"ARROW_DOWN",src:"space"})}},h=pc(d,e.context),g=p[h];g&&(d.preventDefault(),g(d))}})},getIndicatorProps(){return n.element({...pt.indicator.attrs,dir:e.context.dir,"data-state":a?"open":"closed"})},getPositionerProps(){return n.element({...pt.positioner.attrs,dir:e.context.dir,id:Z.getPositionerId(e.context),style:s.floating})},getArrowProps(){return n.element({id:Z.getArrowId(e.context),...pt.arrow.attrs,dir:e.context.dir,style:s.arrow})},getArrowTipProps(){return n.element({...pt.arrowTip.attrs,dir:e.context.dir,style:s.arrowTip})},getContentProps(){return n.element({...pt.content.attrs,id:Z.getContentId(e.context),"aria-label":e.context["aria-label"],hidden:!a,"data-state":a?"open":"closed",role:i?"menu":"dialog",tabIndex:0,dir:e.context.dir,"aria-activedescendant":e.context.highlightedValue??void 0,"aria-labelledby":Z.getTriggerId(e.context),"data-placement":e.context.currentPlacement,onPointerEnter(d){d.pointerType==="mouse"&&t("MENU_POINTERENTER")},onKeyDown(d){if(d.defaultPrevented||!am(d))return;let p=an(d);if(!(p?.closest("[role=menu]")===d.currentTarget||p===d.currentTarget))return;if(d.key==="Tab"&&!fm(d)){d.preventDefault();return}let g=Z.getHighlightedItemEl(e.context),v={ArrowDown(){t("ARROW_DOWN")},ArrowUp(){t("ARROW_UP")},ArrowLeft(){t("ARROW_LEFT")},ArrowRight(){t("ARROW_RIGHT")},Enter(){t("ENTER"),cg(g)},Space(C){o?t({type:"TYPEAHEAD",key:C.key}):v.Enter?.(C)},Home(){t("HOME")},End(){t("END")}},y=pc(d,{dir:e.context.dir}),T=v[y];if(T){T(d),d.stopPropagation(),d.preventDefault();return}e.context.typeahead&&sg(d)&&(lg(d)||ic(p)||(t({type:"TYPEAHEAD",key:d.key}),d.preventDefault()))}})},getSeparatorProps(){return n.element({...pt.separator.attrs,role:"separator",dir:e.context.dir,"aria-orientation":"horizontal"})},getItemState:c,getItemProps:f,getOptionItemState:u,getOptionItemProps(d){let{type:p,disabled:h,onCheckedChange:g,closeOnSelect:v}=d,y=l(d),T=u(d);return{...f(y),...n.element({"data-type":p,...pt.item.attrs,dir:e.context.dir,"data-value":y.value,role:`menuitem${p}`,"aria-checked":!!T.checked,"data-state":T.checked?"checked":"unchecked",onClick(C){if(h||ec(C)||Ql(C))return;let E=C.currentTarget;t({type:"ITEM_CLICK",target:E,option:y,closeOnSelect:v}),g?.(!T.checked)}})}},getItemIndicatorProps(d){let p=u(d);return n.element({...pt.itemIndicator.attrs,dir:e.context.dir,"data-disabled":xt(p.disabled),"data-highlighted":xt(p.highlighted),"data-state":p.checked?"checked":"unchecked",hidden:!p.checked})},getItemTextProps(d){let p=u(d);return n.element({...pt.itemText.attrs,dir:e.context.dir,"data-disabled":xt(p.disabled),"data-highlighted":xt(p.highlighted),"data-state":p.checked?"checked":"unchecked"})},getItemGroupLabelProps(d){return n.element({id:Z.getGroupLabelId(e.context,d.htmlFor),dir:e.context.dir,...pt.itemGroupLabel.attrs})},getItemGroupProps(d){return n.element({id:Z.getGroupId(e.context,d.id),...pt.itemGroup.attrs,dir:e.context.dir,"aria-labelledby":Z.getGroupLabelId(e.context,d.id),role:"group"})}}}var{not:Nt,and:yo,or:d_}=Na;function Mg(e){let t=st(e);return jt({id:"menu",initial:t.open?"open":"idle",context:{highlightedValue:null,loopFocus:!1,anchorPoint:null,closeOnSelect:!0,typeahead:!0,composite:!0,...t,positioning:{placement:"bottom-start",gutter:8,...t.positioning},intentPolygon:null,parent:null,lastHighlightedValue:null,children:At(Tt({})),suspendPointer:!1,restoreFocus:!0,typeaheadState:rc.defaultOptions},computed:{isSubmenu:n=>n.parent!==null,isRtl:n=>n.dir==="rtl",isTypingAhead:n=>n.typeaheadState.keysSoFar!==""},watch:{isSubmenu:"setSubmenuPlacement",anchorPoint:"reposition",open:"toggleVisibility"},on:{"PARENT.SET":{actions:"setParentMenu"},"CHILD.SET":{actions:"setChildMenu"},OPEN:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}],OPEN_AUTOFOCUS:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{internal:!0,target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],CLOSE:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}],"HIGHLIGHTED.RESTORE":{actions:"restoreHighlightedItem"},"HIGHLIGHTED.SET":{actions:"setHighlightedItem"}},states:{idle:{tags:["closed"],on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":"closed",CONTEXT_MENU_START:{target:"opening:contextmenu",actions:"setAnchorPoint"},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}],TRIGGER_FOCUS:{guard:Nt("isSubmenu"),target:"closed"},TRIGGER_POINTERMOVE:{guard:"isSubmenu",target:"opening"}}},"opening:contextmenu":{tags:["closed"],after:{LONG_PRESS_DELAY:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}]},on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":"closed",CONTEXT_MENU_CANCEL:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}]}},opening:{tags:["closed"],after:{SUBMENU_OPEN_DELAY:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}]},on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":"closed",BLUR:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}],TRIGGER_POINTERLEAVE:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:"invokeOnClose"}]}},closing:{tags:["open"],activities:["trackPointerMove","trackInteractOutside"],after:{SUBMENU_CLOSE_DELAY:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["focusParentMenu","restoreParentHiglightedItem","invokeOnClose"]}]},on:{"CONTROLLED.OPEN":"open","CONTROLLED.CLOSE":{target:"closed",actions:["focusParentMenu","restoreParentHiglightedItem"]},MENU_POINTERENTER:{target:"open",actions:"clearIntentPolygon"},POINTER_MOVED_AWAY_FROM_SUBMENU:[{guard:"isOpenControlled",actions:"invokeOnClose"},{target:"closed",actions:["focusParentMenu","restoreParentHiglightedItem"]}]}},closed:{tags:["closed"],entry:["clearHighlightedItem","focusTrigger","resumePointer"],on:{"CONTROLLED.OPEN":[{guard:d_("isOpenAutoFocusEvent","isArrowDownEvent"),target:"open",actions:"highlightFirstItem"},{guard:"isArrowUpEvent",target:"open",actions:"highlightLastItem"},{target:"open"}],CONTEXT_MENU_START:{target:"opening:contextmenu",actions:"setAnchorPoint"},CONTEXT_MENU:[{guard:"isOpenControlled",actions:["setAnchorPoint","invokeOnOpen"]},{target:"open",actions:["setAnchorPoint","invokeOnOpen"]}],TRIGGER_CLICK:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:"invokeOnOpen"}],TRIGGER_POINTERMOVE:{guard:"isTriggerItem",target:"opening"},TRIGGER_BLUR:"idle",ARROW_DOWN:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:["highlightFirstItem","invokeOnOpen"]}],ARROW_UP:[{guard:"isOpenControlled",actions:"invokeOnOpen"},{target:"open",actions:["highlightLastItem","invokeOnOpen"]}]}},open:{tags:["open"],activities:["trackInteractOutside","trackPositioning","scrollToHighlightedItem"],entry:["focusMenu","resumePointer"],on:{"CONTROLLED.CLOSE":[{target:"closed",guard:"isArrowLeftEvent",actions:["focusParentMenu"]},{target:"closed"}],TRIGGER_CLICK:[{guard:yo(Nt("isTriggerItem"),"isOpenControlled"),actions:"invokeOnClose"},{guard:Nt("isTriggerItem"),target:"closed",actions:"invokeOnClose"}],ARROW_UP:{actions:["highlightPrevItem","focusMenu"]},ARROW_DOWN:{actions:["highlightNextItem","focusMenu"]},ARROW_LEFT:[{guard:yo("isSubmenu","isOpenControlled"),actions:"invokeOnClose"},{guard:"isSubmenu",target:"closed",actions:["focusParentMenu","invokeOnClose"]}],HOME:{actions:["highlightFirstItem","focusMenu"]},END:{actions:["highlightLastItem","focusMenu"]},ARROW_RIGHT:{guard:"isTriggerItemHighlighted",actions:"openSubmenu"},ENTER:[{guard:"isTriggerItemHighlighted",actions:"openSubmenu"},{actions:"clickHighlightedItem"}],ITEM_POINTERMOVE:[{guard:Nt("suspendPointer"),actions:["setHighlightedItem","focusMenu"]},{actions:"setLastHighlightedItem"}],ITEM_POINTERLEAVE:{guard:yo(Nt("suspendPointer"),Nt("isTriggerItem")),actions:"clearHighlightedItem"},ITEM_CLICK:[{guard:yo(Nt("isTriggerItemHighlighted"),Nt("isHighlightedItemEditable"),"closeOnSelect","isOpenControlled"),actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:yo(Nt("isTriggerItemHighlighted"),Nt("isHighlightedItemEditable"),"closeOnSelect"),target:"closed",actions:["invokeOnSelect","setOptionState","closeRootMenu","invokeOnClose"]},{guard:yo(Nt("isTriggerItemHighlighted"),Nt("isHighlightedItemEditable")),actions:["invokeOnSelect","setOptionState"]},{actions:"setHighlightedItem"}],TRIGGER_POINTERLEAVE:{target:"closing",actions:"setIntentPolygon"},ITEM_POINTERDOWN:{actions:"setHighlightedItem"},TYPEAHEAD:{actions:"highlightMatchedItem"},FOCUS_MENU:{actions:"focusMenu"},"POSITIONING.SET":{actions:"reposition"}}}}},{delays:{LONG_PRESS_DELAY:700,SUBMENU_OPEN_DELAY:100,SUBMENU_CLOSE_DELAY:100},guards:{closeOnSelect:(n,r)=>!!(r?.closeOnSelect??n.closeOnSelect),isTriggerItem:(n,r)=>Z.isTriggerItem(r.target),isTriggerItemHighlighted:(n,r)=>!!(r.target??Z.getHighlightedItemEl(n))?.hasAttribute("aria-controls"),isSubmenu:n=>n.isSubmenu,suspendPointer:n=>n.suspendPointer,isHighlightedItemEditable:n=>ic(Z.getHighlightedItemEl(n)),isWithinPolygon:(n,r)=>n.intentPolygon?Ig(n.intentPolygon,r.point):!1,isOpenControlled:n=>!!n["open.controlled"],isArrowLeftEvent:(n,r)=>r.previousEvent?.type==="ARROW_LEFT",isArrowUpEvent:(n,r)=>r.previousEvent?.type==="ARROW_UP",isArrowDownEvent:(n,r)=>r.previousEvent?.type==="ARROW_DOWN",isOpenAutoFocusEvent:(n,r)=>r.previousEvent?.type==="OPEN_AUTOFOCUS"},activities:{trackPositioning(n){if(n.anchorPoint)return;n.currentPlacement=n.positioning.placement;let r=()=>Z.getPositionerEl(n);return dc(Z.getTriggerEl(n),r,{...n.positioning,defer:!0,onComplete(o){n.currentPlacement=o.placement}})},trackInteractOutside(n,r,{send:o}){return Qa(()=>Z.getContentEl(n),{defer:!0,exclude:[Z.getTriggerEl(n)],onInteractOutside:n.onInteractOutside,onFocusOutside:n.onFocusOutside,onEscapeKeyDown(a){n.onEscapeKeyDown?.(a),n.isSubmenu&&a.preventDefault(),Ag(n)},onPointerDownOutside(a){n.restoreFocus=!a.detail.focusable,n.onPointerDownOutside?.(a)},onDismiss(){o({type:"CLOSE",src:"interact-outside"})}})},trackPointerMove(n,r,{guards:o,send:i}){let{isWithinPolygon:a}=o;n.parent.state.context.suspendPointer=!0;let s=Z.getDoc(n);return Wt(s,"pointermove",c=>{let l={x:c.clientX,y:c.clientY};a(n,{point:l})||(i("POINTER_MOVED_AWAY_FROM_SUBMENU"),n.parent.state.context.suspendPointer=!1)})},scrollToHighlightedItem(n,r,{getState:o}){let i=()=>{if(o().event.type.startsWith("ITEM_POINTER"))return;let c=Z.getHighlightedItemEl(n),l=Z.getContentEl(n);hm(c,{rootEl:l,block:"nearest"})};return He(()=>i()),gm(()=>Z.getContentEl(n),{defer:!0,attributes:["aria-activedescendant"],callback:i})}},actions:{setAnchorPoint(n,r){n.anchorPoint=r.point},setSubmenuPlacement(n){n.isSubmenu&&(n.positioning.placement=n.isRtl?"left-start":"right-start",n.positioning.gutter=0)},reposition(n,r){let o=()=>Z.getPositionerEl(n),i=n.anchorPoint?()=>({width:0,height:0,...n.anchorPoint}):void 0;dc(Z.getTriggerEl(n),o,{...n.positioning,defer:!0,getAnchorRect:i,...r.options??{},listeners:!1,onComplete(a){n.currentPlacement=a.placement}})},setOptionState(n,r){if(!r.option)return;let{checked:o,onCheckedChange:i,type:a}=r.option;a==="radio"?i?.(!0):a==="checkbox"&&i?.(!o)},clickHighlightedItem(n,r){let o=Z.getHighlightedItemEl(n);!o||o.dataset.disabled||queueMicrotask(()=>o.click())},setIntentPolygon(n,r){let o=Z.getContentEl(n),i=n.currentPlacement;if(!o||!i)return;let a=o.getBoundingClientRect(),s=Pg(a,i);if(!s)return;let l=rg(i)==="right"?-5:5;n.intentPolygon=[{...r.point,x:r.point.x+l},...s]},clearIntentPolygon(n){n.intentPolygon=null},resumePointer(n){n.parent&&(n.parent.state.context.suspendPointer=!1)},setHighlightedItem(n,r){Gn.highlighted(n,r.id)},clearHighlightedItem(n){Gn.highlighted(n,null)},focusMenu(n){He(()=>{let r=Z.getContentEl(n);dm({root:r,enabled:!Mt(r,Z.getActiveElement(n)),filter(i){return!i.role?.startsWith("menuitem")}})?.focus({preventScroll:!0})})},highlightFirstItem(n){(Z.getContentEl(n)?queueMicrotask:He)(()=>{let o=Z.getFirstEl(n);o&&Gn.highlighted(n,o.id)})},highlightLastItem(n){(Z.getContentEl(n)?queueMicrotask:He)(()=>{let o=Z.getLastEl(n);o&&Gn.highlighted(n,o.id)})},highlightNextItem(n,r){let o=Z.getNextEl(n,r.loop);Gn.highlighted(n,o?.id??null)},highlightPrevItem(n,r){let o=Z.getPrevEl(n,r.loop);Gn.highlighted(n,o?.id??null)},invokeOnSelect(n){n.highlightedValue&&n.onSelect?.({value:n.highlightedValue})},focusTrigger(n){n.isSubmenu||n.anchorPoint||!n.restoreFocus||queueMicrotask(()=>Z.getTriggerEl(n)?.focus({preventScroll:!0}))},highlightMatchedItem(n,r){let o=Z.getElemByKey(n,r.key);o&&Gn.highlighted(n,o.id)},setParentMenu(n,r){n.parent=Tt(r.value)},setChildMenu(n,r){n.children[r.id]=Tt(r.value)},closeRootMenu(n){Ag(n)},openSubmenu(n){let o=Z.getHighlightedItemEl(n)?.getAttribute("data-uid");(o?n.children[o]:null)?.send("OPEN_AUTOFOCUS")},focusParentMenu(n){n.parent?.send("FOCUS_MENU")},setLastHighlightedItem(n,r){n.lastHighlightedValue=r.id},restoreHighlightedItem(n){n.lastHighlightedValue&&(Gn.highlighted(n,n.lastHighlightedValue),n.lastHighlightedValue=null)},restoreParentHiglightedItem(n){n.parent?.send("HIGHLIGHTED.RESTORE")},invokeOnOpen(n){n.onOpenChange?.({open:!0})},invokeOnClose(n){n.onOpenChange?.({open:!1})},toggleVisibility(n,r,{send:o}){o({type:n.open?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:r})}}})}function Ag(e){let t=e.parent;for(;t&&t.state.context.isSubmenu;)t=t.state.context.parent;t?.send("CLOSE")}var Gn={highlighted(e,t){Da(e.highlightedValue,t)||(e.highlightedValue=t,e.onHighlightChange?.({highlightedValue:t}))}},f_=Ot()(["anchorPoint","aria-label","closeOnSelect","dir","getRootNode","highlightedValue","id","ids","loopFocus","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onEscapeKeyDown","onSelect","onHighlightChange","open","open.controlled","positioning","typeahead","composite"]),vM=nn(f_),p_=Ot()(["closeOnSelect","disabled","value","valueText"]),wM=nn(p_),m_=Ot()(["htmlFor"]),SM=nn(m_),g_=Ot()(["id"]),TM=nn(g_),h_=Ot()(["disabled","valueText","closeOnSelect","type","value","checked","onCheckedChange"]),CM=nn(h_);var[Dg,We]=Ve({hookName:"useMenuContext",providerName:"<MenuProvider />",strict:!1}),Lg=e=>{let t=We(),n=ee(()=>t().getArrowProps(),e);return m(fe.div,n)},Ng=e=>{let t=We(),n=ee(()=>t().getArrowTipProps(),e);return m(fe.div,n)},[bc,$g]=Ve({hookName:"useMenuItemContext",providerName:"<MenuItemProvider />"}),[Bg,Fg]=Ve({hookName:"useMenuOptionItemPropsContext",providerName:"<MenuOptionItemPropsProvider />"}),Ug=e=>{let[t,n]=et()(e,["checked","closeOnSelect","disabled","onCheckedChange","value","valueText"]),r=ee(t,{type:"checkbox"}),o=We(),i=ee(()=>o().getOptionItemProps(r),n),a=B(()=>o().getItemState(r));return m(Bg,{value:r,get children(){return m(bc,{value:a,get children(){return m(fe.div,i)}})}})},jg=e=>{let t=We(),n=Vn(),r=ee(()=>t().getContentProps(),()=>n().presenceProps,e);return m(N,{get when(){return!n().unmounted},get children(){return m(fe.div,r)}})},Vg=e=>e.children(We()),Hg=e=>{let t=We(),n=ee(()=>t().getContextTriggerProps(),e);return m(fe.button,n)},zg=e=>{let t=We(),n=ee(()=>t().getIndicatorProps(),e);return m(fe.div,n)},Gg=e=>{let[t,n]=et()(e,["closeOnSelect","disabled","value","valueText"]),r=We(),o=ee(()=>r().getItemProps(t),n),i=B(()=>r().getItemState(t));return m(bc,{value:i,get children(){return m(fe.div,o)}})},Wg=e=>e.children($g()),[qg,Kg]=Ve({hookName:"useMenuItemGroupContext",providerName:"<MenuItemGroupProvider />"}),Yg=e=>{let[t,n]=et()(e,["id"]),r=ee({id:Jt()},t),o=We(),i=ee(()=>o().getItemGroupProps(r),n);return m(qg,{value:r,get children(){return m(fe.div,i)}})},Xg=e=>{let t=We(),n=Kg(),r=ee(t().getItemGroupLabelProps({htmlFor:n.id}),e);return m(fe.div,r)},Zg=e=>{let t=We(),n=Fg(),r=ee(()=>t().getItemIndicatorProps(n),e);return m(fe.div,r)},Jg=e=>{let t=We(),n=Fg(),r=ee(()=>t().getItemTextProps(n),e);return m(fe.div,r)},Qg=e=>{let t=We(),n=Vn(),r=ee(()=>t().getPositionerProps(),e);return m(N,{get when(){return!n().unmounted},get children(){return m(fe.div,r)}})},eh=e=>{let[t,n]=et()(e,["closeOnSelect","disabled","value","valueText"]),r=We(),o=Kg(),i=ee(t,()=>({type:"radio",checked:o.value===t.value,onCheckedChange:()=>o.onValueChange?.({value:t.value})})),a=ee(()=>r().getOptionItemProps(i),n),s=B(()=>r().getOptionItemState(i));return m(Bg,{value:i,get children(){return m(bc,{value:s,get children(){return m(fe.div,a)}})}})},th=e=>{let[t,n]=et()(e,["id","onValueChange","value"]),r=We(),o=ee({id:Jt()},t),i=ee(()=>r().getItemGroupProps(o),n);return m(qg,{value:o,get children(){return m(fe.div,i)}})},nh=e=>{let t=uo(),n=lr(),r=Jt(),o=B(()=>({id:r,dir:t().dir,getRootNode:n().getRootNode,open:e.defaultOpen,"open.controlled":e.open!==void 0,...e})),[i,a,s]=rn(Mg(o()),{context:o});return{api:B(()=>Rg(i,a,Rt)),machine:s}},[rh,oh]=Ve({hookName:"useMenuMachineContext",providerName:"<MenuMachineProvider />",strict:!1}),[ih,y_]=Ve({hookName:"useMenuMachineContext",providerName:"<MenuMachineProvider />",strict:!1}),ah=e=>{let[t,n]=lo(e),[r,o]=et()(n,["anchorPoint","aria-label","closeOnSelect","composite","defaultOpen","highlightedValue","id","ids","loopFocus","onEscapeKeyDown","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","onSelect","open","positioning","typeahead"]),i=We(),a=oh(),s=nh(r),c=sr(ee(t,()=>({present:s.api().open})));return ge(()=>{a&&(i?.().setChild(s.machine),s.api().setParent(a))}),m(ih,{value:()=>i?.().getTriggerItemProps(s.api()),get children(){return m(rh,{get value(){return s.machine},get children(){return m(Dg,{get value(){return s.api},get children(){return m(co,{value:c,get children(){return o.children}})}})}})}})},sh=e=>{let t=We(),n=oh(),[r,o]=lo(e),i=sr(ee(r,()=>({present:o.value.api().open})));return ge(()=>{n&&(t?.().setChild(o.value.machine),o.value.api().setParent(n))}),m(ih,{value:()=>t?.().getTriggerItemProps(o.value.api()),get children(){return m(rh,{get value(){return o.value.machine},get children(){return m(Dg,{get value(){return o.value.api},get children(){return m(co,{value:i,get children(){return o.children}})}})}})}})},lh=e=>{let t=We(),n=ee(()=>t().getSeparatorProps(),e);return m(fe.hr,n)},ch=e=>{let t=We(),n=Vn(),r=ee(()=>t().getTriggerProps(),()=>({"aria-controls":n().unmounted&&null}),e);return m(fe.button,r)},uh=e=>{let t=y_(),n=ee(()=>t?.(),e);return m(fe.div,n)},_n={};zn(_n,{Arrow:()=>Lg,ArrowTip:()=>Ng,CheckboxItem:()=>Ug,Content:()=>jg,Context:()=>Vg,ContextTrigger:()=>Hg,Indicator:()=>zg,Item:()=>Gg,ItemContext:()=>Wg,ItemGroup:()=>Yg,ItemGroupLabel:()=>Xg,ItemIndicator:()=>Zg,ItemText:()=>Jg,Positioner:()=>Qg,RadioItem:()=>eh,RadioItemGroup:()=>th,Root:()=>ah,RootProvider:()=>sh,Separator:()=>lh,Trigger:()=>ch,TriggerItem:()=>uh});var dh=Ht("progress").parts("root","label","track","range","valueText","view","circle","circleTrack","circleRange"),kn=dh.build(),ns=Hn({getRootId:e=>e.ids?.root??`progress-${e.id}`,getTrackId:e=>e.ids?.track??`progress-${e.id}-track`,getLabelId:e=>e.ids?.label??`progress-${e.id}-label`,getCircleId:e=>e.ids?.circle??`progress-${e.id}-circle`});function fh(e,t,n){let r=e.context.percent,o=e.context.isIndeterminate?"":`${r}%`,i=e.context.max,a=e.context.min,s=e.context.orientation,c=e.context.translations,l=e.context.isIndeterminate,u=e.context.value,f=c.value({value:u,max:i,percent:r,min:a}),d=x_(u,i),p={role:"progressbar","aria-label":f,"data-max":i,"aria-valuemin":a,"aria-valuemax":i,"aria-valuenow":u??void 0,"data-orientation":s,"data-state":d},h=v_(e.context);return{value:u,valueAsString:f,min:a,max:i,percent:r,percentAsString:o,indeterminate:l,setValue(g){t({type:"VALUE.SET",value:g})},setToMax(){t({type:"VALUE.SET",value:i})},setToMin(){t({type:"VALUE.SET",value:a})},getRootProps(){return n.element({dir:e.context.dir,...kn.root.attrs,id:ns.getRootId(e.context),"data-max":i,"data-value":u??void 0,"data-state":d,"data-orientation":s,style:{"--percent":l?void 0:r}})},getLabelProps(){return n.element({dir:e.context.dir,id:ns.getLabelId(e.context),...kn.label.attrs,"data-orientation":s})},getValueTextProps(){return n.element({dir:e.context.dir,"aria-live":"polite",...kn.valueText.attrs})},getTrackProps(){return n.element({dir:e.context.dir,id:ns.getTrackId(e.context),...kn.track.attrs,...p})},getRangeProps(){return n.element({dir:e.context.dir,...kn.range.attrs,"data-orientation":s,"data-state":d,style:{[e.context.isHorizontal?"width":"height"]:l?void 0:`${r}%`}})},getCircleProps(){return n.element({dir:e.context.dir,id:ns.getCircleId(e.context),...kn.circle.attrs,...p,...h.root})},getCircleTrackProps(){return n.element({dir:e.context.dir,"data-orientation":s,...kn.circleTrack.attrs,...h.track})},getCircleRangeProps(){return n.element({dir:e.context.dir,...kn.circleRange.attrs,...h.range,"data-state":d})},getViewProps(g){return n.element({dir:e.context.dir,...kn.view.attrs,"data-state":g.state,hidden:g.state!==d})}}}function x_(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function v_(e){let t={style:{"--radius":"calc(var(--size) / 2 - var(--thickness) / 2)",cx:"calc(var(--size) / 2)",cy:"calc(var(--size) / 2)",r:"var(--radius)",fill:"transparent",strokeWidth:"var(--thickness)"}};return{root:{style:{width:"var(--size)",height:"var(--size)"}},track:t,range:{opacity:e.value===0?0:void 0,style:{...t.style,"--percent":e.percent,"--circumference":"calc(2 * 3.14159 * var(--radius))","--offset":"calc(var(--circumference) * (100 - var(--percent)) / 100)",strokeDashoffset:"calc(var(--circumference) * ((100 - var(--percent)) / 100))",strokeDasharray:e.isIndeterminate?void 0:"var(--circumference)",transformOrigin:"center",transform:"rotate(-90deg)"}}}}function w_(e,t){return e+(t-e)/2}function ph(e){let t=st(e);return jt({id:"progress",initial:"idle",context:{max:t.max??100,min:t.min??0,value:w_(t.min??0,t.max??100),orientation:"horizontal",translations:{value:({percent:n})=>n===-1?"loading...":`${n} percent`,...t.translations},...t},created:["validateContext"],computed:{isIndeterminate:n=>n.value===null,percent(n){return pi(n.value)?Math.round((n.value-n.min)/(n.max-n.min)*100):-1},isAtMax:n=>n.value===n.max,isHorizontal:n=>n.orientation==="horizontal",isRtl:n=>n.dir==="rtl"},states:{idle:{on:{"VALUE.SET":{actions:["setValue"]}}}}},{actions:{setValue:(n,r)=>{n.value=r.value===null?null:Math.max(0,Math.min(r.value,n.max))},validateContext:n=>{if(n.value!=null){if(!yc(n.max))throw new Error(`[progress] The max value passed \`${n.max}\` is not a valid number`);if(!S_(n.value,n.max))throw new Error(`[progress] The value passed \`${n.value}\` exceeds the max value \`${n.max}\``);if(!T_(n.value,n.min))throw new Error(`[progress] The value passed \`${n.value}\` exceeds the min value \`${n.min}\``)}}}})}function yc(e){return pi(e)&&!isNaN(e)}function S_(e,t){return yc(e)&&e<=t}function T_(e,t){return yc(e)&&e>=t}var C_=Ot()(["dir","getRootNode","id","ids","max","min","orientation","translations","value"]),jM=nn(C_);var[mh,dn]=Ve({hookName:"useProgressContext",providerName:"<ProgressProvider />"}),gh=e=>{let t=dn(),n=ee(()=>t().getCircleProps(),e);return m(fe.svg,n)},hh=e=>{let t=dn(),n=ee(()=>t().getCircleRangeProps(),e);return m(fe.circle,n)},bh=e=>{let t=dn(),n=ee(()=>t().getCircleTrackProps(),e);return m(fe.circle,n)},yh=e=>e.children(dn()),xh=e=>{let t=dn(),n=ee(()=>t().getLabelProps(),e);return m(fe.label,n)},vh=e=>{let t=dn(),n=ee(()=>t().getRangeProps(),e);return m(fe.div,n)},wh=e=>{let t=uo(),n=lr(),r=Jt(),o=B(()=>({id:r,dir:t().dir,getRootNode:n().getRootNode,...e})),[i,a]=rn(ph(o()),{context:o});return B(()=>fh(i,a,Rt))},Sh=e=>{let[t,n]=et()(e,["id","ids","max","min","orientation","translations","value"]),r=wh(t),o=ee(()=>r().getRootProps(),n);return m(mh,{value:r,get children(){return m(fe.div,o)}})},Th=e=>{let[{value:t},n]=et()(e,["value"]),r=ee(()=>t().getRootProps(),n);return m(mh,{value:t,get children(){return m(fe.div,r)}})},Ch=e=>{let t=dn(),n=ee(()=>t().getTrackProps(),e);return m(fe.div,n)},_h=e=>{let t=dn(),n=ee(()=>t().getValueTextProps(),e);return m(fe.span,Se(n,{get children(){return e.children||t().percentAsString}}))},kh=e=>{let[t,n]=et()(e,["state"]),r=dn(),o=ee(()=>r().getViewProps(t),n);return m(fe.span,o)},br={};zn(br,{Circle:()=>gh,CircleRange:()=>hh,CircleTrack:()=>bh,Context:()=>yh,Label:()=>xh,Range:()=>vh,Root:()=>Sh,RootProvider:()=>Th,Track:()=>Ch,ValueText:()=>_h,View:()=>kh});var k_=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xo=new WeakMap,rs=new WeakMap,os={},xc=0,Eh=function(e){return e&&(e.host||Eh(e.parentNode))},E_=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Eh(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},P_=function(e,t,n,r){var o=E_(t,Array.isArray(e)?e:[e]);os[n]||(os[n]=new WeakMap);var i=os[n],a=[],s=new Set,c=new Set(o),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};o.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))u(d);else try{var p=d.getAttribute(r),h=p!==null&&p!=="false",g=(xo.get(d)||0)+1,v=(i.get(d)||0)+1;xo.set(d,g),i.set(d,v),a.push(d),g===1&&h&&rs.set(d,!0),v===1&&d.setAttribute(n,"true"),h||d.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return u(t),s.clear(),xc++,function(){a.forEach(function(f){var d=xo.get(f)-1,p=i.get(f)-1;xo.set(f,d),i.set(f,p),d||(rs.has(f)||f.removeAttribute(r),rs.delete(f)),p||f.removeAttribute(n)}),xc--,xc||(xo=new WeakMap,xo=new WeakMap,rs=new WeakMap,os={})}},Ph=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||k_(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),P_(r,o,n,"aria-hidden")):function(){return null}};var I_=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Ih(e,t={}){let{defer:n=!0}=t,r=n?I_:i=>i(),o=[];return o.push(r(()=>{let a=(typeof e=="function"?e():e).filter(Boolean);o.push(Ph(a))})),()=>{o.forEach(i=>i?.())}}var vc="data-scroll-lock";function Ah(e,t){if(!e)return;let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function A_(e,t,n){if(!e)return;let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{r?e.style.setProperty(t,r):e.style.removeProperty(t)}}function O_(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function Oh(e){let t=e??document,n=t.defaultView??window,{documentElement:r,body:o}=t;if(o.hasAttribute(vc))return;o.setAttribute(vc,"");let a=n.innerWidth-r.clientWidth,s=()=>A_(r,"--scrollbar-width",`${a}px`),c=O_(r),l=()=>Ah(o,{overflow:"hidden",[c]:`${a}px`}),u=()=>{let{scrollX:d,scrollY:p,visualViewport:h}=n,g=h?.offsetLeft??0,v=h?.offsetTop??0,y=Ah(o,{position:"fixed",overflow:"hidden",top:`${-(p-Math.floor(v))}px`,left:`${-(d-Math.floor(g))}px`,right:"0",[c]:`${a}px`});return()=>{y?.(),n.scrollTo({left:d,top:p,behavior:"instant"})}},f=[s(),im()?u():l()];return()=>{f.forEach(d=>d?.()),o.removeAttribute(vc)}}var Mh=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],is=Mh.join(","),Dh=typeof Element>"u",yr=Dh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,as=!Dh&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ss=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},R_=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Lh=function(t,n,r){if(ss(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(is));return n&&yr.call(t,is)&&o.unshift(t),o=o.filter(r),o},Nh=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!ss(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,l=e(c,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{var u=yr.call(a,is);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),d=!ss(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&d){var p=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},$h=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Wn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||R_(t))&&!$h(t)?0:t.tabIndex},M_=function(t,n){var r=Wn(t);return r<0&&n&&!$h(t)?0:r},D_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Bh=function(t){return t.tagName==="INPUT"},L_=function(t){return Bh(t)&&t.type==="hidden"},N_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},$_=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},B_=function(t){if(!t.name)return!0;var n=t.form||as(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=$_(o,t.form);return!i||i===t},F_=function(t){return Bh(t)&&t.type==="radio"},U_=function(t){return F_(t)&&!B_(t)},j_=function(t){var n,r=t&&as(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,f;r=as(o),o=(l=r)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},Rh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},V_=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=yr.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(yr.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,l=as(t);if(c&&!c.shadowRoot&&o(c)===!0)return Rh(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(j_(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Rh(t);return!1},H_=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return yr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},ls=function(t,n){return!(n.disabled||ss(n)||L_(n)||V_(n,t)||N_(n)||H_(n))},wc=function(t,n){return!(U_(n)||Wn(n)<0||!ls(t,n))},z_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},G_=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=M_(s,a),l=a?e(o.candidates):s;c===0?a?n.push.apply(n,l):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:l})}),r.sort(D_).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Fh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Nh([t],n.includeContainer,{filter:wc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:z_}):r=Lh(t,n.includeContainer,wc.bind(null,n)),G_(r)},Uh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Nh([t],n.includeContainer,{filter:ls.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Lh(t,n.includeContainer,ls.bind(null,n)),r},xr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yr.call(t,is)===!1?!1:wc(n,t)},W_=Mh.concat("iframe").join(","),cs=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yr.call(t,W_)===!1?!1:ls(n,t)};function q_(e,t,n){return(t=Y_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Vh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jh(Object(n),!0).forEach(function(r){q_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K_(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Y_(e){var t=K_(e,"string");return typeof t=="symbol"?t:t+""}var Hh={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},X_=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},Z_=function(t){return t?.key==="Escape"||t?.key==="Esc"||t?.keyCode===27},Ci=function(t){return t?.key==="Tab"||t?.keyCode===9},J_=function(t){return Ci(t)&&!t.shiftKey},Q_=function(t){return Ci(t)&&t.shiftKey},zh=function(t){return setTimeout(t,0)},Gh=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Ti=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},us=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},ek=[],Wh=function(t,n){var r=n?.document||document,o=n?.trapStack||ek,i=Vh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:J_,isKeyBackward:Q_},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(_,w,M){return _&&_[w]!==void 0?_[w]:i[M||w]},l=function(_,w){var M=typeof w?.composedPath=="function"?w.composedPath():void 0;return a.containerGroups.findIndex(function(D){var J=D.container,ue=D.tabbableNodes;return J.contains(_)||M?.includes(J)||ue.find(function(le){return le===_})})},u=function(_){var w=i[_];if(typeof w=="function"){for(var M=arguments.length,D=new Array(M>1?M-1:0),J=1;J<M;J++)D[J-1]=arguments[J];w=w.apply(void 0,D)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(_,"` was specified but was not a node, or did not return a node"))}var ue=w;if(typeof w=="string"&&(ue=r.querySelector(w),!ue))throw new Error("`".concat(_,"` as selector refers to no known node"));return ue},f=function(){var _=u("initialFocus");if(_===!1)return!1;if(_===void 0||!cs(_,i.tabbableOptions))if(l(r.activeElement)>=0)_=r.activeElement;else{var w=a.tabbableGroups[0],M=w&&w.firstTabbableNode;_=M||u("fallbackFocus")}if(!_)throw new Error("Your focus-trap needs to have at least one focusable element");return _},d=function(){if(a.containerGroups=a.containers.map(function(_){var w=Fh(_,i.tabbableOptions),M=Uh(_,i.tabbableOptions),D=w.length>0?w[0]:void 0,J=w.length>0?w[w.length-1]:void 0,ue=M.find(function(we){return xr(we)}),le=M.slice().reverse().find(function(we){return xr(we)}),xe=!!w.find(function(we){return Wn(we)>0});return{container:_,tabbableNodes:w,focusableNodes:M,posTabIndexesFound:xe,firstTabbableNode:D,lastTabbableNode:J,firstDomTabbableNode:ue,lastDomTabbableNode:le,nextTabbableNode:function(St){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,mt=w.indexOf(St);return mt<0?$t?M.slice(M.indexOf(St)+1).find(function(Xt){return xr(Xt)}):M.slice(0,M.indexOf(St)).reverse().find(function(Xt){return xr(Xt)}):w[mt+($t?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(_){return _.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(_){return _.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function(_){var w=_.activeElement;if(w)return w.shadowRoot&&w.shadowRoot.activeElement!==null?p(w.shadowRoot):w},h=function(_){if(_!==!1&&_!==p(document)){if(!_||!_.focus){h(f());return}_.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=_,X_(_)&&_.select()}},g=function(_){var w=u("setReturnFocus",_);return w||(w===!1?!1:_)},v=function(_){var w=_.target,M=_.event,D=_.isBackward,J=D===void 0?!1:D;w=w||us(M),d();var ue=null;if(a.tabbableGroups.length>0){var le=l(w,M),xe=le>=0?a.containerGroups[le]:void 0;if(le<0)J?ue=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:ue=a.tabbableGroups[0].firstTabbableNode;else if(J){var we=Gh(a.tabbableGroups,function(Oo){var Ro=Oo.firstTabbableNode;return w===Ro});if(we<0&&(xe.container===w||cs(w,i.tabbableOptions)&&!xr(w,i.tabbableOptions)&&!xe.nextTabbableNode(w,!1))&&(we=le),we>=0){var St=we===0?a.tabbableGroups.length-1:we-1,$t=a.tabbableGroups[St];ue=Wn(w)>=0?$t.lastTabbableNode:$t.lastDomTabbableNode}else Ci(M)||(ue=xe.nextTabbableNode(w,!1))}else{var mt=Gh(a.tabbableGroups,function(Oo){var Ro=Oo.lastTabbableNode;return w===Ro});if(mt<0&&(xe.container===w||cs(w,i.tabbableOptions)&&!xr(w,i.tabbableOptions)&&!xe.nextTabbableNode(w))&&(mt=le),mt>=0){var Xt=mt===a.tabbableGroups.length-1?0:mt+1,Ao=a.tabbableGroups[Xt];ue=Wn(w)>=0?Ao.firstTabbableNode:Ao.firstDomTabbableNode}else Ci(M)||(ue=xe.nextTabbableNode(w))}}else ue=u("fallbackFocus");return ue},y=function(_){var w=us(_);if(!(l(w,_)>=0)){if(Ti(i.clickOutsideDeactivates,_)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Ti(i.allowOutsideClick,_)||_.preventDefault()}},T=function(_){var w=us(_),M=l(w,_)>=0;if(M||w instanceof Document)M&&(a.mostRecentlyFocusedNode=w);else{_.stopImmediatePropagation();var D,J=!0;if(a.mostRecentlyFocusedNode)if(Wn(a.mostRecentlyFocusedNode)>0){var ue=l(a.mostRecentlyFocusedNode),le=a.containerGroups[ue].tabbableNodes;if(le.length>0){var xe=le.findIndex(function(we){return we===a.mostRecentlyFocusedNode});xe>=0&&(i.isKeyForward(a.recentNavEvent)?xe+1<le.length&&(D=le[xe+1],J=!1):xe-1>=0&&(D=le[xe-1],J=!1))}}else a.containerGroups.some(function(we){return we.tabbableNodes.some(function(St){return Wn(St)>0})})||(J=!1);else J=!1;J&&(D=v({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h(D||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},C=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=_;var M=v({event:_,isBackward:w});M&&(Ci(_)&&_.preventDefault(),h(M))},E=function(_){(i.isKeyForward(_)||i.isKeyBackward(_))&&C(_,i.isKeyBackward(_))},I=function(_){Z_(_)&&Ti(i.escapeDeactivates,_)!==!1&&(_.preventDefault(),s.deactivate())},U=function(_){var w=us(_);l(w,_)>=0||Ti(i.clickOutsideDeactivates,_)||Ti(i.allowOutsideClick,_)||(_.preventDefault(),_.stopImmediatePropagation())},R=function(){if(a.active)return Hh.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?zh(function(){h(f())}):h(f()),r.addEventListener("focusin",T,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",U,{capture:!0,passive:!1}),r.addEventListener("keydown",E,{capture:!0,passive:!1}),r.addEventListener("keydown",I),s},oe=function(){if(a.active)return r.removeEventListener("focusin",T,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",U,!0),r.removeEventListener("keydown",E,!0),r.removeEventListener("keydown",I),s},H=function(_){var w=_.some(function(M){var D=Array.from(M.removedNodes);return D.some(function(J){return J===a.mostRecentlyFocusedNode})});w&&h(f())},G=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(H):void 0,L=function(){G&&(G.disconnect(),a.active&&!a.paused&&a.containers.map(function(_){G.observe(_,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(_){if(a.active)return this;var w=c(_,"onActivate"),M=c(_,"onPostActivate"),D=c(_,"checkCanFocusTrap");D||d(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,w?.();var J=function(){D&&d(),R(),L(),M?.()};return D?(D(a.containers.concat()).then(J,J),this):(J(),this)},deactivate:function(_){if(!a.active)return this;var w=Vh({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},_);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,oe(),a.active=!1,a.paused=!1,L(),Hh.deactivateTrap(o,s);var M=c(w,"onDeactivate"),D=c(w,"onPostDeactivate"),J=c(w,"checkCanReturnFocus"),ue=c(w,"returnFocus","returnFocusOnDeactivate");M?.();var le=function(){zh(function(){ue&&h(g(a.nodeFocusedBeforeActivation)),D?.()})};return ue&&J?(J(g(a.nodeFocusedBeforeActivation)).then(le,le),this):(le(),this)},pause:function(_){if(a.paused||!a.active)return this;var w=c(_,"onPause"),M=c(_,"onPostPause");return a.paused=!0,w?.(),oe(),L(),M?.(),this},unpause:function(_){if(!a.paused||!a.active)return this;var w=c(_,"onUnpause"),M=c(_,"onPostUnpause");return a.paused=!1,w?.(),d(),R(),L(),M?.(),this},updateContainerElements:function(_){var w=[].concat(_).filter(Boolean);return a.containers=w.map(function(M){return typeof M=="string"?r.querySelector(M):M}),a.active&&d(),L(),this}},s.updateContainerElements(t),s};var qh=Ht("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),vr=qh.build(),ye=Hn({getPositionerId:e=>e.ids?.positioner??`dialog:${e.id}:positioner`,getBackdropId:e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,getContentId:e=>e.ids?.content??`dialog:${e.id}:content`,getTriggerId:e=>e.ids?.trigger??`dialog:${e.id}:trigger`,getTitleId:e=>e.ids?.title??`dialog:${e.id}:title`,getDescriptionId:e=>e.ids?.description??`dialog:${e.id}:description`,getCloseTriggerId:e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,getContentEl:e=>ye.getById(e,ye.getContentId(e)),getPositionerEl:e=>ye.getById(e,ye.getPositionerId(e)),getBackdropEl:e=>ye.getById(e,ye.getBackdropId(e)),getTriggerEl:e=>ye.getById(e,ye.getTriggerId(e)),getTitleEl:e=>ye.getById(e,ye.getTitleId(e)),getDescriptionEl:e=>ye.getById(e,ye.getDescriptionId(e)),getCloseTriggerEl:e=>ye.getById(e,ye.getCloseTriggerId(e))});function Kh(e,t,n){let r=e.context["aria-label"],o=e.matches("open"),i=e.context.renderedElements;return{open:o,setOpen(a){a!==o&&t(a?"OPEN":"CLOSE")},getTriggerProps(){return n.button({...vr.trigger.attrs,dir:e.context.dir,id:ye.getTriggerId(e.context),"aria-haspopup":"dialog",type:"button","aria-expanded":o,"data-state":o?"open":"closed","aria-controls":ye.getContentId(e.context),onClick(a){a.defaultPrevented||t("TOGGLE")}})},getBackdropProps(){return n.element({...vr.backdrop.attrs,dir:e.context.dir,hidden:!o,id:ye.getBackdropId(e.context),"data-state":o?"open":"closed"})},getPositionerProps(){return n.element({...vr.positioner.attrs,dir:e.context.dir,id:ye.getPositionerId(e.context),style:{pointerEvents:o?void 0:"none"}})},getContentProps(){return n.element({...vr.content.attrs,dir:e.context.dir,role:e.context.role,hidden:!o,id:ye.getContentId(e.context),tabIndex:-1,"data-state":o?"open":"closed","aria-modal":!0,"aria-label":r||void 0,"aria-labelledby":r||!i.title?void 0:ye.getTitleId(e.context),"aria-describedby":i.description?ye.getDescriptionId(e.context):void 0})},getTitleProps(){return n.element({...vr.title.attrs,dir:e.context.dir,id:ye.getTitleId(e.context)})},getDescriptionProps(){return n.element({...vr.description.attrs,dir:e.context.dir,id:ye.getDescriptionId(e.context)})},getCloseTriggerProps(){return n.button({...vr.closeTrigger.attrs,dir:e.context.dir,id:ye.getCloseTriggerId(e.context),type:"button",onClick(a){a.defaultPrevented||(a.stopPropagation(),t("CLOSE"))}})}}}function Yh(e){let t=st(e);return jt({id:"dialog",initial:t.open?"open":"closed",context:{role:"dialog",renderedElements:{title:!0,description:!0},modal:!0,trapFocus:!0,preventScroll:!0,closeOnInteractOutside:!0,closeOnEscape:!0,restoreFocus:!0,...t},created:["setAlertDialogProps"],watch:{open:["toggleVisibility"]},states:{open:{entry:["checkRenderedElements","syncZIndex"],activities:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}}},{guards:{isOpenControlled:n=>!!n["open.controlled"]},activities:{trackDismissableElement(n,r,{send:o}){return Qa(()=>ye.getContentEl(n),{defer:!0,pointerBlocking:n.modal,exclude:[ye.getTriggerEl(n)],onInteractOutside(a){n.onInteractOutside?.(a),n.closeOnInteractOutside||a.preventDefault()},persistentElements:n.persistentElements,onFocusOutside:n.onFocusOutside,onPointerDownOutside:n.onPointerDownOutside,onEscapeKeyDown(a){n.onEscapeKeyDown?.(a),n.closeOnEscape||a.preventDefault()},onDismiss(){o({type:"CLOSE",src:"interact-outside"})}})},preventScroll(n){if(n.preventScroll)return Oh(ye.getDoc(n))},trapFocus(n){if(!n.trapFocus||!n.modal)return;let r,o=mm(()=>{let i=ye.getContentEl(n);if(i){r=Wh(i,{document:ye.getDoc(n),escapeDeactivates:!1,preventScroll:!0,fallbackFocus:i,returnFocusOnDeactivate:n.restoreFocus,allowOutsideClick:!0,initialFocus:n.initialFocusEl?.()??void 0,setReturnFocus(a){return n.finalFocusEl?.()??a}});try{r.activate()}catch{}}});return()=>{r?.deactivate(),o()}},hideContentBelow(n){return n.modal?Ih(()=>[ye.getContentEl(n)],{defer:!0}):void 0}},actions:{setAlertDialogProps(n){n.role==="alertdialog"&&(n.initialFocusEl||(n.initialFocusEl=()=>ye.getCloseTriggerEl(n)),n.closeOnInteractOutside=!1)},checkRenderedElements(n){He(()=>{n.renderedElements.title=!!ye.getTitleEl(n),n.renderedElements.description=!!ye.getDescriptionEl(n)})},syncZIndex(n){He(()=>{let r=ye.getContentEl(n);if(!r)return;let i=ye.getWin(n).getComputedStyle(r);[ye.getPositionerEl(n),ye.getBackdropEl(n)].forEach(s=>{s?.style.setProperty("--z-index",i.zIndex)})})},invokeOnClose(n){n.onOpenChange?.({open:!1})},invokeOnOpen(n){n.onOpenChange?.({open:!0})},toggleVisibility(n,r,{send:o}){o({type:n.open?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:r})}}})}var tk=Ot()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","open.controlled","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),g2=nn(tk);var[Xh,En]=Ve({hookName:"useDialogContext",providerName:"<DialogProvider />"}),Zh=e=>{let t=En(),n=Tp(),r=sr(ee(n,()=>({present:t().open}))),o=ee(()=>t().getBackdropProps(),()=>r().presenceProps,e);return m(N,{get when(){return!r().unmounted},get children(){return m(fe.div,o)}})},Jh=e=>{let t=En(),n=ee(()=>t().getCloseTriggerProps(),e);return m(fe.button,n)},Qh=e=>{let t=En(),n=Vn(),r=ee(()=>t().getContentProps(),()=>n().presenceProps,e);return m(N,{get when(){return!n().unmounted},get children(){return m(fe.div,r)}})},eb=e=>e.children(En()),tb=e=>{let t=En(),n=ee(()=>t().getDescriptionProps(),e);return m(fe.div,n)},nb=e=>{let t=En(),n=Vn(),r=ee(()=>t().getPositionerProps(),e);return m(N,{get when(){return!n().unmounted},get children(){return m(fe.div,r)}})},rb=e=>{let t=uo(),n=lr(),r=Jt(),o=B(()=>({id:r,dir:t().dir,getRootNode:n().getRootNode,open:e.defaultOpen,"open.controlled":e.open!==void 0,...e})),[i,a]=rn(Yh(o()),{context:o});return B(()=>Kh(i,a,Rt))},ob=e=>{let[t,n]=lo(e),[r]=ai(t),[o,i]=et()(n,["aria-label","closeOnEscape","closeOnInteractOutside","defaultOpen","finalFocusEl","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]),a=rb(o),s=sr(ee(t,()=>({present:a().open})));return m(Xh,{value:a,get children(){return m(jl,{value:r,get children(){return m(co,{value:s,get children(){return i.children}})}})}})},ib=e=>{let[t,n]=lo(e),[r]=ai(t),o=sr(ee(t,()=>({present:n.value().open})));return m(Xh,{get value(){return n.value},get children(){return m(jl,{value:r,get children(){return m(co,{value:o,get children(){return n.children}})}})}})},ab=e=>{let t=En(),n=ee(()=>t().getTitleProps(),e);return m(fe.h2,n)},sb=e=>{let t=En(),n=Vn(),r=ee(()=>t().getTriggerProps(),()=>({"aria-controls":n().unmounted&&null}),e);return m(fe.button,r)},qn={};zn(qn,{Backdrop:()=>Zh,CloseTrigger:()=>Jh,Content:()=>Qh,Context:()=>eb,Description:()=>tb,Positioner:()=>nb,Root:()=>ob,RootProvider:()=>ib,Title:()=>ab,Trigger:()=>sb});var Kn=gc({placement:"bottom-end",gap:24});var lb=`#brand-mark {
|
|
27
11
|
position: absolute !important;
|
|
28
12
|
padding: 5px 10px !important;
|
|
29
13
|
background-color: rgb(194, 194, 198) !important;
|
|
@@ -54,13 +38,13 @@ but received
|
|
|
54
38
|
color: white !important;
|
|
55
39
|
border-color: rgb(40, 40, 40) !important;
|
|
56
40
|
}
|
|
57
|
-
`;var
|
|
41
|
+
`;var cb=async({apiHost:e,message:t,sessionId:n})=>{try{return{data:await $n.post(`${Ce(e)?e:bt()}/api/v1/sessions/${n}/continueChat`,{json:{message:t},timeout:!1}).json()}}catch(r){return{error:r}}};var Sc=async({apiHost:e,sessionId:t,clientLogs:n})=>{try{await $n.post(`${Ce(e)?e:bt()}/api/v1/sessions/${t}/clientLogs`,{json:{clientLogs:n}})}catch(r){console.log(r)}};var ds=e=>typeof e=="string"?e:e instanceof Error?e.name+": "+e.message:JSON.stringify(e);var ub=Object.getPrototypeOf(async()=>{}).constructor,fs=async({content:e,args:t})=>{try{let r=await ub(...t.map(o=>o.id),ok(e))(...t.map(o=>o.value));if(r&&typeof r=="string")return{scriptCallbackMessage:r}}catch(n){return console.log(n),{logs:[{status:"error",description:"Script block failed to execute",details:ds(n)}]}}},ok=e=>e.replace(/<script>/g,"").replace(/<\/script>/g,""),_i=async({args:e,content:t})=>{try{let r=await ub(...Object.keys(e),t)(...Object.keys(e).map(o=>e[o]));if(r&&typeof r=="string")return{scriptCallbackMessage:r}}catch(n){console.warn("Script threw an error:",n)}};var vo="Chatwoot Web Widget Opened";var db=e=>(fs(e.scriptToExecute),{scriptCallbackMessage:vo});var fb=e=>re(window.gtag)?Promise.resolve():new Promise(t=>{let n=document.getElementById("gtag");if(!n){let r=document.createElement("script");r.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,r.id="gtag";let o=document.createElement("script");o.innerHTML=`window.dataLayer = window.dataLayer || [];
|
|
58
42
|
function gtag(){dataLayer.push(arguments);}
|
|
59
43
|
gtag('js', new Date());
|
|
60
44
|
|
|
61
45
|
gtag('config', '${e}');
|
|
62
|
-
`,document.body.appendChild(r),document.body.appendChild(o),r.onload=()=>{t()}}n&&t()}),
|
|
63
|
-
`).filter(c=>c!=="").map(
|
|
46
|
+
`,document.body.appendChild(r),document.body.appendChild(o),r.onload=()=>{t()}}n&&t()}),pb=e=>{if(e){if(!window.gtag){console.error("Google Analytics was not properly initialized");return}window.gtag("event",e.action,{event_category:$e(e.category)?void 0:e.category,event_label:$e(e.label)?void 0:e.label,value:e.value,send_to:$e(e.sendTo)?void 0:e.sendTo})}};var mb=async e=>{e?.trackingId&&pb(e)};var gb=async e=>{let{url:t,method:n,body:r,headers:o}=e;try{let i=await fetch(t,{method:n,body:n!=="GET"&&r?JSON.stringify(r):void 0,headers:o}),a=i.status,s=await i.json();return JSON.stringify({statusCode:a,data:s})}catch(i){return console.error(i),JSON.stringify({statusCode:500,data:"An error occured while executing the webhook on the client"})}};var uk=Fr(vb(),1);var sk=Symbol("Let zodToJsonSchema decide on which parser to use");var Ei={code:"0",name:"text",parse:e=>{if(typeof e!="string")throw new Error('"text" parts expect a string value.');return{type:"text",value:e}}},Pi={code:"1",name:"function_call",parse:e=>{if(e==null||typeof e!="object"||!("function_call"in e)||typeof e.function_call!="object"||e.function_call==null||!("name"in e.function_call)||!("arguments"in e.function_call)||typeof e.function_call.name!="string"||typeof e.function_call.arguments!="string")throw new Error('"function_call" parts expect an object with a "function_call" property.');return{type:"function_call",value:e}}},Ii={code:"2",name:"data",parse:e=>{if(!Array.isArray(e))throw new Error('"data" parts expect an array value.');return{type:"data",value:e}}},Ai={code:"3",name:"error",parse:e=>{if(typeof e!="string")throw new Error('"error" parts expect a string value.');return{type:"error",value:e}}},Oi={code:"4",name:"assistant_message",parse:e=>{if(e==null||typeof e!="object"||!("id"in e)||!("role"in e)||!("content"in e)||typeof e.id!="string"||typeof e.role!="string"||e.role!=="assistant"||!Array.isArray(e.content)||!e.content.every(t=>t!=null&&typeof t=="object"&&"type"in t&&t.type==="text"&&"text"in t&&t.text!=null&&typeof t.text=="object"&&"value"in t.text&&typeof t.text.value=="string"))throw new Error('"assistant_message" parts expect an object with an "id", "role", and "content" property.');return{type:"assistant_message",value:e}}},Ri={code:"5",name:"assistant_control_data",parse:e=>{if(e==null||typeof e!="object"||!("threadId"in e)||!("messageId"in e)||typeof e.threadId!="string"||typeof e.messageId!="string")throw new Error('"assistant_control_data" parts expect an object with a "threadId" and "messageId" property.');return{type:"assistant_control_data",value:{threadId:e.threadId,messageId:e.messageId}}}},Mi={code:"6",name:"data_message",parse:e=>{if(e==null||typeof e!="object"||!("role"in e)||!("data"in e)||typeof e.role!="string"||e.role!=="data")throw new Error('"data_message" parts expect an object with a "role" and "data" property.');return{type:"data_message",value:e}}},Di={code:"7",name:"tool_calls",parse:e=>{if(e==null||typeof e!="object"||!("tool_calls"in e)||typeof e.tool_calls!="object"||e.tool_calls==null||!Array.isArray(e.tool_calls)||e.tool_calls.some(t=>t==null||typeof t!="object"||!("id"in t)||typeof t.id!="string"||!("type"in t)||typeof t.type!="string"||!("function"in t)||t.function==null||typeof t.function!="object"||!("arguments"in t.function)||typeof t.function.name!="string"||typeof t.function.arguments!="string"))throw new Error('"tool_calls" parts expect an object with a ToolCallPayload.');return{type:"tool_calls",value:e}}},Li={code:"8",name:"message_annotations",parse:e=>{if(!Array.isArray(e))throw new Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:e}}},Ni={code:"9",name:"tool_call",parse:e=>{if(e==null||typeof e!="object"||!("toolCallId"in e)||typeof e.toolCallId!="string"||!("toolName"in e)||typeof e.toolName!="string"||!("args"in e)||typeof e.args!="object")throw new Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:e}}},$i={code:"a",name:"tool_result",parse:e=>{if(e==null||typeof e!="object"||!("toolCallId"in e)||typeof e.toolCallId!="string"||!("result"in e))throw new Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:e}}},Bi={code:"b",name:"tool_call_streaming_start",parse:e=>{if(e==null||typeof e!="object"||!("toolCallId"in e)||typeof e.toolCallId!="string"||!("toolName"in e)||typeof e.toolName!="string")throw new Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:e}}},Fi={code:"c",name:"tool_call_delta",parse:e=>{if(e==null||typeof e!="object"||!("toolCallId"in e)||typeof e.toolCallId!="string"||!("argsTextDelta"in e)||typeof e.argsTextDelta!="string")throw new Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:e}}},Ui={code:"d",name:"finish_message",parse:e=>{if(e==null||typeof e!="object"||!("finishReason"in e)||typeof e.finishReason!="string")throw new Error('"finish_message" parts expect an object with a "finishReason" property.');let t={finishReason:e.finishReason};return"usage"in e&&e.usage!=null&&typeof e.usage=="object"&&"promptTokens"in e.usage&&"completionTokens"in e.usage&&(t.usage={promptTokens:typeof e.usage.promptTokens=="number"?e.usage.promptTokens:Number.NaN,completionTokens:typeof e.usage.completionTokens=="number"?e.usage.completionTokens:Number.NaN}),{type:"finish_message",value:t}}},ji={code:"e",name:"finish_step",parse:e=>{if(e==null||typeof e!="object"||!("finishReason"in e)||typeof e.finishReason!="string")throw new Error('"finish_step" parts expect an object with a "finishReason" property.');let t={finishReason:e.finishReason,isContinued:!1};return"usage"in e&&e.usage!=null&&typeof e.usage=="object"&&"promptTokens"in e.usage&&"completionTokens"in e.usage&&(t.usage={promptTokens:typeof e.usage.promptTokens=="number"?e.usage.promptTokens:Number.NaN,completionTokens:typeof e.usage.completionTokens=="number"?e.usage.completionTokens:Number.NaN}),"isContinued"in e&&typeof e.isContinued=="boolean"&&(t.isContinued=e.isContinued),{type:"finish_step",value:t}}},dk=[Ei,Pi,Ii,Ai,Oi,Ri,Mi,Di,Li,Ni,$i,Bi,Fi,Ui,ji],fk={[Ei.code]:Ei,[Pi.code]:Pi,[Ii.code]:Ii,[Ai.code]:Ai,[Oi.code]:Oi,[Ri.code]:Ri,[Mi.code]:Mi,[Di.code]:Di,[Li.code]:Li,[Ni.code]:Ni,[$i.code]:$i,[Bi.code]:Bi,[Fi.code]:Fi,[Ui.code]:Ui,[ji.code]:ji},l$={[Ei.name]:Ei.code,[Pi.name]:Pi.code,[Ii.name]:Ii.code,[Ai.name]:Ai.code,[Oi.name]:Oi.code,[Ri.name]:Ri.code,[Mi.name]:Mi.code,[Di.name]:Di.code,[Li.name]:Li.code,[Ni.name]:Ni.code,[$i.name]:$i.code,[Bi.name]:Bi.code,[Fi.name]:Fi.code,[Ui.name]:Ui.code,[ji.name]:ji.code},pk=dk.map(e=>e.code),mk=e=>{let t=e.indexOf(":");if(t===-1)throw new Error("Failed to parse stream string. No separator found.");let n=e.slice(0,t);if(!pk.includes(n))throw new Error(`Failed to parse stream string. Invalid code ${n}.`);let r=n,o=e.slice(t+1),i=JSON.parse(o);return fk[r].parse(i)};var gk=10;function hk(e,t){let n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return e.length=0,n}async function*wb(e,{isAborted:t}={}){let n=new TextDecoder,r=[],o=0;for(;;){let{value:i}=await e.read();if(i&&(r.push(i),o+=i.length,i[i.length-1]!==gk))continue;if(r.length===0)break;let a=hk(r,o);o=0;let s=n.decode(a,{stream:!0}).split(`
|
|
47
|
+
`).filter(c=>c!=="").map(mk);for(let c of s)yield c;if(t?.()){e.cancel();break}}}var u$=Symbol.for("vercel.ai.schema");var Vi=null,bk=3,yk=1,Cc=e=>async({messages:t,onMessageStream:n})=>{try{Vi=new AbortController;let r=e.apiHost,o=await fetch((Ce(r)?r:bt())+`/api/v2/sessions/${e.sessionId}/streamMessage`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:t}),signal:Vi.signal});if(!o.ok)return(e.retryAttempt??0)<yk&&(o.status===403||o.status===500||o.status===503)?(await new Promise(c=>setTimeout(c,bk*1e3)),Cc({...e,retryAttempt:(e.retryAttempt??0)+1})({messages:t,onMessageStream:n})):{error:await o.json()||"Failed to fetch the chat response."};if(!o.body)throw new Error("The response body is empty.");let i="",a=o.body.getReader(),s=Jt();for await(let{type:c,value:l}of wb(a,{isAborted:()=>Vi===null}))c==="text"&&(i+=l,n&&n({id:s,message:i}));return Vi=null,{message:i}}catch(r){return console.error(r),r.name==="AbortError"?(Vi=null,{error:{message:"Request aborted"}}):r instanceof Error?{error:{message:r.message}}:{error:{message:"Failed to fetch the chat response."}}}};var Sb=e=>{let t=document.createElement("script");t.innerHTML=`!function(f,b,e,v,n,t,s)
|
|
64
48
|
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
|
65
49
|
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
|
66
50
|
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
|
@@ -70,7 +54,7 @@ but received
|
|
|
70
54
|
'https://connect.facebook.net/en_US/fbevents.js');
|
|
71
55
|
${e.map(n=>`fbq('init', '${n}');`).join(`
|
|
72
56
|
`)}
|
|
73
|
-
fbq('track', 'PageView');`,document.head.appendChild(t)},
|
|
57
|
+
fbq('track', 'PageView');`,document.head.appendChild(t)},Tb=e=>{if(!e?.eventType||!e.pixelId)return;if(!window.fbq){console.error("Facebook Pixel was not properly initialized");return}let t=e.params?.length?e.params.reduce((n,r)=>!r.key||!r.value?n:{...n,[r.key]:r.value},{}):void 0;if(e.eventType==="Custom"){if(!e.name)return;window.fbq("trackSingleCustom",e.pixelId,e.name,t)}window.fbq("trackSingle",e.pixelId,e.eventType,t)};var Cb=async e=>{$e(e?.pixelId)||Tb(e)};var _b=({url:e,isNewTab:t}={})=>{if(!e)return;if(!window.open(e,t?"_blank":"_top"))return{blockedPopupUrl:e}};var _c=e=>{if(Ge(e))return null;if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return console.warn("Failed to safely stringify variable value",e),null}};var xk=Object.getPrototypeOf(async()=>{}).constructor,kb=async({content:e,args:t,isCode:n})=>{try{if(!isNaN(e)&&/0[^.].+/.test(e))return{replyToSend:e};let o=await xk(...t.map(i=>i.id),e.includes("return ")?e:`return ${e}`)(...t.map(i=>i.value));return{replyToSend:_c(o)??void 0}}catch(r){return console.error(r),{replyToSend:_c(e)??void 0,logs:n?[{status:"error",description:"Failed to execute Set Variable code",details:ds(r)}]:void 0}}};var Eb=async({secondsToWaitFor:e})=>{await new Promise(t=>setTimeout(t,e*1e3))};(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
|
|
74
58
|
PartySocket requires a global 'EventTarget' class to be available!
|
|
75
59
|
You can polyfill this global by adding this to your code before any partysocket imports:
|
|
76
60
|
|
|
@@ -78,7 +62,7 @@ but received
|
|
|
78
62
|
import 'partysocket/event-target-polyfill';
|
|
79
63
|
\`\`\`
|
|
80
64
|
Please file an issue at https://github.com/partykit/partykit if you're still having trouble.
|
|
81
|
-
`);var
|
|
65
|
+
`);var Ib=class extends Event{message;error;constructor(e,t){super("error",t),this.message=e.message,this.error=e}},Ab=class extends Event{code;reason;wasClean=!0;constructor(e=1e3,t="",n){super("close",n),this.code=e,this.reason=t}},kc={Event,ErrorEvent:Ib,CloseEvent:Ab};function vk(e,t){if(!e)throw new Error(t)}function wk(e){return new e.constructor(e.type,e)}function Sk(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new Ab(e.code||1999,e.reason||"unknown reason",e):"error"in e?new Ib(e.error,e):new Event(e.type,e)}var Tk=typeof process<"u"&&typeof process.versions?.node<"u"&&typeof document>"u",ps=Tk?Sk:wk,wr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},Pb=!1,Ec=class Sr extends EventTarget{_ws;_retryCount=-1;_uptimeTimeout;_connectTimeout;_shouldReconnect=!0;_connectLock=!1;_binaryType="blob";_closeCalled=!1;_messageQueue=[];_debugLogger=console.log.bind(console);_url;_protocols;_options;constructor(t,n,r={}){super(),this._url=t,this._protocols=n,this._options=r,this._options.startClosed&&(this._shouldReconnect=!1),this._options.debugLogger&&(this._debugLogger=this._options.debugLogger),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Sr.CONNECTING}get OPEN(){return Sr.OPEN}get CLOSING(){return Sr.CLOSING}get CLOSED(){return Sr.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(t){this._binaryType=t,this._ws&&(this._ws.binaryType=t)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((n,r)=>(typeof r=="string"?n+=r.length:r instanceof Blob?n+=r.size:n+=r.byteLength,n),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Sr.CLOSED:Sr.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}onclose=null;onerror=null;onmessage=null;onopen=null;close(t=1e3,n){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(t,n)}reconnect(t,n){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(t,n),this._connect())}send(t){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",t),this._ws.send(t);else{let{maxEnqueuedMessages:n=wr.maxEnqueuedMessages}=this._options;this._messageQueue.length<n&&(this._debug("enqueue",t),this._messageQueue.push(t))}}_debug(...t){this._options.debug&&this._debugLogger("RWS>",...t)}_getNextDelay(){let{reconnectionDelayGrowFactor:t=wr.reconnectionDelayGrowFactor,minReconnectionDelay:n=wr.minReconnectionDelay,maxReconnectionDelay:r=wr.maxReconnectionDelay}=this._options,o=0;return this._retryCount>0&&(o=n*Math.pow(t,this._retryCount-1),o>r&&(o=r)),this._debug("next delay",o),o}_wait(){return new Promise(t=>{setTimeout(t,this._getNextDelay())})}_getNextProtocols(t){if(!t)return Promise.resolve(null);if(typeof t=="string"||Array.isArray(t))return Promise.resolve(t);if(typeof t=="function"){let n=t();if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(n.then)return n}throw Error("Invalid protocols")}_getNextUrl(t){if(typeof t=="string")return Promise.resolve(t);if(typeof t=="function"){let n=t();if(typeof n=="string")return Promise.resolve(n);if(n.then)return n}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;let{maxRetries:t=wr.maxRetries,connectionTimeout:n=wr.connectionTimeout}=this._options;if(this._retryCount>=t){this._debug("max retries reached",this._retryCount,">=",t);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([r,o])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Pb&&(console.error(`\u203C\uFE0F No WebSocket implementation available. You should define options.WebSocket.
|
|
82
66
|
|
|
83
67
|
For example, if you're using node.js, run \`npm install ws\`, and then in your code:
|
|
84
68
|
|
|
@@ -91,10 +75,10 @@ const partysocket = new PartySocket({
|
|
|
91
75
|
WebSocket: WS
|
|
92
76
|
});
|
|
93
77
|
|
|
94
|
-
`),Ty=!0);let a=this._options.WebSocket||WebSocket;this._debug("connect",{url:r,protocols:o}),this._ws=o?new a(r,o):new a(r),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),n)}).catch(r=>{this._connectLock=!1,this._handleError(new cu.ErrorEvent(Error(r.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new cu.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(t=1e3,n){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(t,n),this._handleClose(new cu.CloseEvent(t,n,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_handleOpen=t=>{this._debug("open event");let{minUptime:n=Fr.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),n),iA(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(r=>this._ws?.send(r)),this._messageQueue=[],this.onopen&&this.onopen(t),this.dispatchEvent(Fs(t))};_handleMessage=t=>{this._debug("message event"),this.onmessage&&this.onmessage(t),this.dispatchEvent(Fs(t))};_handleError=t=>{this._debug("error event",t.message),this._disconnect(void 0,t.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(t),this._debug("exec error listeners"),this.dispatchEvent(Fs(t)),this._connect()};_handleClose=t=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(t),this.dispatchEvent(Fs(t))};_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};var uA=e=>e[1]!==null&&e[1]!==void 0;function dA(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),(n==="x"?r:r&3|8).toString(16)})}function Ay(e,t,n={}){let{host:r,path:o,protocol:a,room:i,party:s,prefix:c,query:l}=e,u=r.replace(/^(http|https|ws|wss):\/\//,"");if(u.endsWith("/")&&(u=u.slice(0,-1)),o&&o.startsWith("/"))throw new Error("path must not start with a slash");let f=s??"main",d=o?`/${o}`:"",p=a||(u.startsWith("localhost:")||u.startsWith("127.0.0.1:")||u.startsWith("192.168.")||u.startsWith("10.")||u.startsWith("172.")&&u.split(".")[1]>="16"&&u.split(".")[1]<="31"||u.startsWith("[::ffff:7f00:1]:")?t:t+"s"),h=`${p}://${u}/${c||`parties/${f}/${i}`}${d}`,g=(b={})=>`${h}?${new URLSearchParams([...Object.entries(n),...Object.entries(b).filter(uA)])}`,x=typeof l=="function"?async()=>g(await l()):g(l);return{host:u,path:d,room:i,name:f,protocol:p,partyUrl:h,urlProvider:x}}var du=class extends uu{constructor(e){let t=ky(e);super(t.urlProvider,t.protocols,t.socketOptions),this.partySocketOptions=e,this.setWSProperties(t)}_pk;_pkurl;name;room;host;path;updateProperties(e){let t=ky({...this.partySocketOptions,...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path});this._url=t.urlProvider,this._protocols=t.protocols,this._options=t.socketOptions,this.setWSProperties(t)}setWSProperties(e){let{_pk:t,_pkurl:n,name:r,room:o,host:a,path:i}=e;this._pk=t,this._pkurl=n,this.name=r,this.room=o,this.host=a,this.path=i}reconnect(e,t){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(e,t)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,t){let n=Ay(e,"http"),r=typeof n.urlProvider=="string"?n.urlProvider:await n.urlProvider();return(e.fetch??fetch)(r,t)}};function ky(e){let{id:t,host:n,path:r,party:o,room:a,protocol:i,query:s,protocols:c,...l}=e,u=t||dA(),f=Ay(e,"ws",{_pk:u});return{_pk:u,_pkurl:f.partyUrl,name:f.name,room:f.room,host:f.host,path:f.path,protocols:c,socketOptions:l,urlProvider:f.urlProvider}}var Py=({sessionId:e,resultId:t})=>{let n=cn("NEXT_PUBLIC_PARTYKIT_HOST");if(!n)return;let r=new du({host:n,room:fA({sessionId:e,resultId:t})});return new Promise(o=>{r.addEventListener("message",a=>{r.close(),o({replyToSend:a.data})}),r.addEventListener("error",a=>{o({logs:[{status:"error",description:"Websocket returned an error",details:JSON.stringify(a,null,2)}],replyToSend:void 0})})})},fA=({sessionId:e,resultId:t})=>{if(t)return`${t}/webhooks`;let[n,r]=e.split("-");return`${r}/${n}/webhooks`};var Iy=e=>{if(document.getElementById("gtm-noscript"))return"";let t=document.createElement("noscript");t.id="gtm-noscript";let n=document.createElement("iframe");return n.src=`https://www.googletagmanager.com/ns.html?id=${e}`,n.height="0",n.width="0",n.style.display="none",n.style.visibility="hidden",t.appendChild(n),t};var _y=async e=>{let t=e.customHeadCode;Ee(t)&&Ap(t);let n=e.gtmId;Ee(n)&&document.body.prepend(Iy(n));let r=e.googleAnalyticsId;Ee(r)&&await sy(r);let o=e.pixelIds;te(o)&&by(o)};var My=async({clientSideAction:e,context:t,onMessageStream:n})=>{if("chatwoot"in e)return iy(e.chatwoot);if("googleAnalytics"in e)return cy(e.googleAnalytics);if("scriptToExecute"in e)return Us(e.scriptToExecute);if("redirect"in e)return xy(e.redirect);if("wait"in e)return await wy(e.wait),e.expectsDedicatedReply?{replyToSend:void 0}:void 0;if("setVariable"in e)return Sy(e.setVariable.scriptToExecute);if("streamOpenAiChatCompletion"in e||"stream"in e){let{error:r,message:o}=await su(t)({messages:"streamOpenAiChatCompletion"in e?e.streamOpenAiChatCompletion?.messages:void 0,onMessageStream:n});return r?{replyToSend:void 0,logs:[{status:"error",description:"Message streaming returned an error",details:JSON.stringify(r,null,2)}]}:{replyToSend:o}}if("httpRequestToExecute"in e)return{replyToSend:await uy(e.httpRequestToExecute)};if("startPropsToInject"in e)return _y(e.startPropsToInject);if("pixel"in e)return vy(e.pixel);if("codeToExecute"in e)return Ka(e.codeToExecute);if(e.type==="listenForWebhook")return Py({sessionId:t.sessionId,resultId:t.resultId})};var[$s,fu]=M([]);var Ry=e=>e.type==="text"?e.label??e.value:e.url;var[pu,mu]=M();var pA=w('<svg><circle class=opacity-25 cx=12 cy=12 r=10 stroke=currentColor stroke-width=4></circle><path class=opacity-75 fill=currentColor d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">'),Gs=e=>(()=>{var t=pA();return Ce(t,Te(e,{get class(){return"animate-spin h-6 w-6 "+e.class},xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loading-spinner"}),!0,!0),t})();var mA=w("<button>"),nn=e=>{let t=Pi(()=>e.children),[n,r]=Ke(e,["variant","isDisabled","isLoading"]);return(()=>{var o=mA();return Ce(o,Te(r,{get disabled(){return n.isDisabled||n.isLoading},get class(){return he("py-2 px-4 font-semibold focus:outline-none filter hover:brightness-90 active:brightness-75 disabled:opacity-50 disabled:cursor-not-allowed disabled:brightness-100 flex justify-center flex-shrink-0",n.variant==="secondary"?" secondary-button":" agent-button",r.class)}}),!1,!0),v(o,m(B,{get when(){return!n.isLoading},get fallback(){return m(Gs,{})},get children(){return t()}})),o})()};var gA=w('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2px stroke-linecap=round stroke-linejoin=round><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>'),Sn=e=>(()=>{var t=gA();return Ce(t,e,!0,!0),t})();var hA=w('<button class="w-5 h-5">'),bA=w('<div class="flex justify-between items-center gap-2 w-full pr-4"><input class="focus:outline-none bg-transparent px-4 py-4 flex-1 w-full text-input"type=text>'),cr=e=>{let[t,n]=M(""),[r,o]=Ke(e,["onInput","ref"]),a=s=>{n(s),r.onInput(s)},i=()=>{n(""),e.onClear()};return(()=>{var s=bA(),c=s.firstChild;c.$$input=u=>a(u.currentTarget.value);var l=e.ref;return typeof l=="function"?pe(l,c):e.ref=c,Ce(c,Te({get value(){return t()}},o),!1,!1),v(s,m(B,{get when(){return t().length>0},get children(){var u=hA();return Ve(u,"click",i),v(u,m(Sn,{})),u}}),null),s})()};$e(["input"]);var it="Send";var si={buttonLabel:it,searchInputPlaceholder:"Filter the options...",isMultipleChoice:!1,isSearchable:!1,areInitialSearchButtonsVisible:!0};var yA=w('<div class="flex items-end agent-input w-full">'),vA=w('<div class="flex flex-col gap-2 w-full"><div>'),xA=w("<span>"),SA=w('<span class="flex h-3 w-3 absolute top-0 right-0 -mt-1 -mr-1 ping"><span class="animate-ping absolute inline-flex h-full w-full rounded-full brightness-200 opacity-75"></span><span class="relative inline-flex rounded-full h-3 w-3 brightness-150">'),Ny=e=>{let t,[n,r]=M(e.options?.isSearchable&&!e.options?.areInitialSearchButtonsVisible?[]:e.defaultItems);ae(()=>{!Y()&&t&&t.focus({preventScroll:!0})});let o=i=>e.onSubmit({type:"text",value:n()[i]?.content??""}),a=i=>{if(i===""||i.trim().length===0){r(e.options?.areInitialSearchButtonsVisible?e.defaultItems:[]);return}r(e.defaultItems.filter(s=>s.content?.toLowerCase().includes(i.toLowerCase())))};return(()=>{var i=vA(),s=i.firstChild;return v(i,m(B,{get when(){return e.options?.isSearchable},get children(){var c=yA();return v(c,m(cr,{ref(l){var u=t;typeof u=="function"?u(l):t=l},onInput:a,get placeholder(){return e.options?.searchInputPlaceholder??si.searchInputPlaceholder},onClear:()=>r(e.options?.areInitialSearchButtonsVisible?e.defaultItems:[])})),c}}),s),v(s,m(ye,{get each(){return n()},children:(c,l)=>(()=>{var u=xA();return v(u,m(nn,{"on:click":()=>o(l()),get"data-itemid"(){return c.id},class:"w-full",get children(){return c.content}}),null),v(u,(()=>{var f=F(()=>e.chunkIndex===0&&e.defaultItems.length===1);return()=>f()&&SA()})(),null),_(()=>U(u,"relative"+(Y()?" w-full":""))),u})()})),_(()=>U(s,"flex flex-wrap justify-end gap-2"+(e.options?.isSearchable?" overflow-y-scroll max-h-80 rounded-md":""))),i})()};var wA=w('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 512 512"width=19px color=white><path d="M476.59 227.05l-.16-.07L49.35 49.84A23.56 23.56 0 0027.14 52 24.65 24.65 0 0016 72.59v113.29a24 24 0 0019.52 23.57l232.93 43.07a4 4 0 010 7.86L35.53 303.45A24 24 0 0016 327v113.31A23.57 23.57 0 0026.59 460a23.94 23.94 0 0013.22 4 24.55 24.55 0 009.52-1.93L476.4 285.94l.19-.09a32 32 0 000-58.8z">'),Oy=e=>(()=>{var t=wA();return Ce(t,e,!0,!0),t})();var je=e=>{let[t,n]=Ke(e,["isDisabled","isLoading","disableIcon"]),r=Y()&&!t.disableIcon||!n.children||typeof n.children=="string"&&He(n.children);return m(nn,Te(n,{type:"submit",get class(){return he(n.class,"flex items-center")},"aria-label":r?"Send":void 0,get children(){return m(Ie,{get children(){return[m(Z,{when:r,get children(){return m(Oy,{get class(){return"send-icon flex w-6 h-6 "+(t.disableIcon?"hidden":"")}})}}),m(Z,{when:!r,get children(){return e.children}})]}})}}))};var TA=w('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3px stroke-linecap=round stroke-linejoin=round><polyline points="20 6 9 17 4 12">'),Ly=e=>(()=>{var t=TA();return Ce(t,e,!0,!0),t})();var CA=w("<div>"),$o=e=>(()=>{var t=CA();return v(t,m(B,{get when(){return e.isChecked},get children(){return m(Ly,{})}})),_(()=>U(t,"w-4 h-4 agent-checkbox"+(e.isChecked?" checked":"")+(e.class?` ${e.class}`:""))),t})();var EA=w('<div class="flex items-end agent-input w-full">'),kA=w('<form class="flex flex-col items-end gap-2 w-full"><div>'),AA=w('<span><div role=checkbox><div class="flex items-center gap-2"><span>'),PA=w('<span><div role=checkbox aria-checked class="w-full py-2 px-4 font-semibold focus:outline-none cursor-pointer select-none agent-selectable selected"><div class="flex items-center gap-2"><span>'),Dy=e=>{let t,[n,r]=M(e.options?.isSearchable&&!e.options?.areInitialSearchButtonsVisible?[]:e.defaultItems),[o,a]=M([]);ae(()=>{!Y()&&t&&t.focus({preventScroll:!0})});let i=u=>{s(u)},s=u=>{let f=o().indexOf(u);a(f!==-1?d=>d.filter(p=>p!==u):d=>[...d,u])},c=()=>e.onSubmit({type:"text",value:o().map(u=>e.defaultItems.find(f=>f.id===u)?.content).join(", ")}),l=u=>{if(u===""||u.trim().length===0){r(e.options?.areInitialSearchButtonsVisible?e.defaultItems:[]);return}r(e.defaultItems.filter(f=>f.content?.toLowerCase().includes(u.toLowerCase())))};return(()=>{var u=kA(),f=u.firstChild;return u.addEventListener("submit",c),v(u,m(B,{get when(){return e.options?.isSearchable},get children(){var d=EA();return v(d,m(cr,{ref(p){var h=t;typeof h=="function"?h(p):t=p},onInput:l,get placeholder(){return e.options?.searchInputPlaceholder??si.searchInputPlaceholder},onClear:()=>r(e.options?.areInitialSearchButtonsVisible?e.defaultItems:[])})),d}}),f),v(f,m(ye,{get each(){return n()},children:d=>(()=>{var p=AA(),h=p.firstChild,g=h.firstChild,x=g.firstChild;return Ve(h,"click",()=>i(d.id)),v(g,m($o,{get isChecked(){return o().some(b=>b===d.id)},class:"flex-shrink-0"}),x),v(x,()=>d.content),_(b=>{var E="relative"+(Y()?" w-full":""),S=o().some(G=>G===d.id),k="w-full py-2 px-4 font-semibold focus:outline-none cursor-pointer select-none agent-selectable"+(o().some(G=>G===d.id)?" selected":""),I=d.id;return E!==b.e&&U(p,b.e=E),S!==b.t&&H(h,"aria-checked",b.t=S),k!==b.a&&U(h,b.a=k),I!==b.o&&H(h,"data-itemid",b.o=I),b},{e:void 0,t:void 0,a:void 0,o:void 0}),p})()}),null),v(f,m(ye,{get each(){return o().filter(d=>n().every(p=>p.id!==d))},children:d=>(()=>{var p=PA(),h=p.firstChild,g=h.firstChild,x=g.firstChild;return Ve(h,"click",()=>i(d)),H(h,"data-itemid",d),v(g,m($o,{isChecked:!0}),x),v(x,()=>e.defaultItems.find(b=>b.id===d)?.content),_(()=>U(p,"relative"+(Y()?" w-full":""))),p})()}),null),v(u,(()=>{var d=F(()=>o().length>0);return()=>d()&&m(je,{disableIcon:!0,get children(){return e.options?.buttonLabel??si.buttonLabel}})})(),null),_(()=>U(f,"flex flex-wrap justify-end gap-2"+(e.options?.isSearchable?" overflow-y-scroll max-h-80 rounded-md":""))),u})()};var gu={hasTime:!1,isRange:!1,labels:{button:it,from:"From:",to:"To:"},format:"dd/MM/yyyy",formatWithTime:"dd/MM/yyyy HH:mm"};var IA=w('<div class="agent-input-form flex gap-2 items-end"><form><div class="flex flex-col"><div><input class="focus:outline-none flex-1 w-full text-input agent-date-input"data-testid=from-date>'),By=w("<p class=font-semibold>"),_A=w('<div class="flex items-center p-4"><input class="focus:outline-none flex-1 w-full text-input ml-2 agent-date-input"data-testid=to-date>'),Uy=e=>{let[t,n]=M(MA(e.defaultValue??"")),r=()=>{t().from===""&&t().to===""||e.onSubmit({type:"text",value:`${t().from}${e.options?.isRange?` to ${t().to}`:""}`})};return(()=>{var o=IA(),a=o.firstChild,i=a.firstChild,s=i.firstChild,c=s.firstChild;return a.addEventListener("submit",l=>{l.preventDefault(),r()}),v(s,(()=>{var l=F(()=>!!e.options?.isRange);return()=>l()&&(()=>{var u=By();return v(u,()=>e.options.labels?.from??gu.labels.from),u})()})(),c),c.addEventListener("change",l=>n({...t(),from:l.currentTarget.value})),c.style.setProperty("min-height","32px"),c.style.setProperty("min-width","100px"),c.style.setProperty("font-size","16px"),v(i,(()=>{var l=F(()=>!!e.options?.isRange);return()=>l()&&(()=>{var u=_A(),f=u.firstChild;return v(u,(()=>{var d=F(()=>!!e.options.isRange);return()=>d()&&(()=>{var p=By();return v(p,()=>e.options.labels?.to??gu.labels.to),p})()})(),f),f.addEventListener("change",d=>n({...t(),to:d.currentTarget.value})),f.style.setProperty("min-height","32px"),f.style.setProperty("min-width","100px"),f.style.setProperty("font-size","16px"),_(d=>{var p=e.options.hasTime?"datetime-local":"date",h=e.options?.min,g=e.options?.max;return p!==d.e&&H(f,"type",d.e=p),h!==d.t&&H(f,"min",d.t=h),g!==d.a&&H(f,"max",d.a=g),d},{e:void 0,t:void 0,a:void 0}),_(()=>f.value=t().to),u})()})(),null),v(o,m(je,{class:"h-[56px]","on:click":r,get children(){return e.options?.labels?.button}}),null),_(l=>{var u=he("flex agent-input",e.options?.isRange?"items-end":"items-center"),f="flex items-center p-4 "+(e.options?.isRange?"pb-0 gap-2":""),d=e.options?.hasTime?"datetime-local":"date",p=e.options?.min,h=e.options?.max;return u!==l.e&&U(a,l.e=u),f!==l.t&&U(s,l.t=f),d!==l.a&&H(c,"type",l.a=d),p!==l.o&&H(c,"min",l.o=p),h!==l.i&&H(c,"max",l.i=h),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),_(()=>c.value=t().from),o})()},MA=e=>{if(!e.includes("to"))return{from:e,to:""};let[t,n]=e.split(" to ");return{from:t,to:n}};var RA=w('<input class="focus:outline-none bg-transparent px-4 py-4 flex-1 w-full text-input"type=text>'),ur=e=>{let[t,n]=Ke(e,["ref","onInput"]);return(()=>{var r=RA();r.$$input=a=>t.onInput(a.currentTarget.value);var o=e.ref;return typeof o=="function"?pe(o,r):e.ref=r,Ce(r,n,!1,!1),r})()};$e(["input"]);var Fy={labels:{button:it,placeholder:"Type your email..."},retryMessageContent:"This email doesn't seem to be valid. Can you type it again?"};var NA=w('<div class="agent-input-form flex w-full gap-2 items-end max-w-[350px]"><div class="flex agent-input w-full">'),$y=e=>{let[t,n]=M(e.defaultValue??""),r,o=l=>n(l),a=()=>r?.value!==""&&r?.reportValidity(),i=()=>{a()?e.onSubmit({type:"text",value:r?.value??t()}):r?.focus()},s=l=>{l.key==="Enter"&&i()};ae(()=>{!Y()&&r&&r.focus({preventScroll:!0}),window.addEventListener("message",c)}),ue(()=>{window.removeEventListener("message",c)});let c=l=>{let{data:u}=l;u.isFromAgent&&u.command==="setInputValue"&&n(u.value)};return(()=>{var l=NA(),u=l.firstChild;return l.$$keydown=s,v(u,m(ur,{ref(f){var d=r;typeof d=="function"?d(f):r=f},get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??Fy.labels.placeholder},onInput:o,type:"email",autocomplete:"email"})),v(l,m(je,{type:"button",class:"h-[56px]","on:click":i,get children(){return e.block.options?.labels?.button}}),null),l})()};$e(["keydown"]);var rn={isRequired:!0,isMultipleAllowed:!1,visibility:"Auto",labels:{placeholder:`<strong>
|
|
78
|
+
`),Pb=!0);let i=this._options.WebSocket||WebSocket;this._debug("connect",{url:r,protocols:o}),this._ws=o?new i(r,o):new i(r),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),n)}).catch(r=>{this._connectLock=!1,this._handleError(new kc.ErrorEvent(Error(r.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new kc.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(t=1e3,n){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(t,n),this._handleClose(new kc.CloseEvent(t,n,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_handleOpen=t=>{this._debug("open event");let{minUptime:n=wr.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),n),vk(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(r=>this._ws?.send(r)),this._messageQueue=[],this.onopen&&this.onopen(t),this.dispatchEvent(ps(t))};_handleMessage=t=>{this._debug("message event"),this.onmessage&&this.onmessage(t),this.dispatchEvent(ps(t))};_handleError=t=>{this._debug("error event",t.message),this._disconnect(void 0,t.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(t),this._debug("exec error listeners"),this.dispatchEvent(ps(t)),this._connect()};_handleClose=t=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(t),this.dispatchEvent(ps(t))};_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};var Ck=e=>e[1]!==null&&e[1]!==void 0;function _k(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),(n==="x"?r:r&3|8).toString(16)})}function Rb(e,t,n={}){let{host:r,path:o,protocol:i,room:a,party:s,prefix:c,query:l}=e,u=r.replace(/^(http|https|ws|wss):\/\//,"");if(u.endsWith("/")&&(u=u.slice(0,-1)),o&&o.startsWith("/"))throw new Error("path must not start with a slash");let f=s??"main",d=o?`/${o}`:"",p=i||(u.startsWith("localhost:")||u.startsWith("127.0.0.1:")||u.startsWith("192.168.")||u.startsWith("10.")||u.startsWith("172.")&&u.split(".")[1]>="16"&&u.split(".")[1]<="31"||u.startsWith("[::ffff:7f00:1]:")?t:t+"s"),h=`${p}://${u}/${c||`parties/${f}/${a}`}${d}`,g=(y={})=>`${h}?${new URLSearchParams([...Object.entries(n),...Object.entries(y).filter(Ck)])}`,v=typeof l=="function"?async()=>g(await l()):g(l);return{host:u,path:d,room:a,name:f,protocol:p,partyUrl:h,urlProvider:v}}var Pc=class extends Ec{constructor(e){let t=Ob(e);super(t.urlProvider,t.protocols,t.socketOptions),this.partySocketOptions=e,this.setWSProperties(t)}_pk;_pkurl;name;room;host;path;updateProperties(e){let t=Ob({...this.partySocketOptions,...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path});this._url=t.urlProvider,this._protocols=t.protocols,this._options=t.socketOptions,this.setWSProperties(t)}setWSProperties(e){let{_pk:t,_pkurl:n,name:r,room:o,host:i,path:a}=e;this._pk=t,this._pkurl=n,this.name=r,this.room=o,this.host=i,this.path=a}reconnect(e,t){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(e,t)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,t){let n=Rb(e,"http"),r=typeof n.urlProvider=="string"?n.urlProvider:await n.urlProvider();return(e.fetch??fetch)(r,t)}};function Ob(e){let{id:t,host:n,path:r,party:o,room:i,protocol:a,query:s,protocols:c,...l}=e,u=t||_k(),f=Rb(e,"ws",{_pk:u});return{_pk:u,_pkurl:f.partyUrl,name:f.name,room:f.room,host:f.host,path:f.path,protocols:c,socketOptions:l,urlProvider:f.urlProvider}}var Mb=({sessionId:e,resultId:t})=>{let n=Qt("NEXT_PUBLIC_PARTYKIT_HOST");if(!n)return;let r=new Pc({host:n,room:kk({sessionId:e,resultId:t})});return new Promise(o=>{r.addEventListener("message",i=>{r.close(),o({replyToSend:i.data})}),r.addEventListener("error",i=>{o({logs:[{status:"error",description:"Websocket returned an error",details:JSON.stringify(i,null,2)}],replyToSend:void 0})})})},kk=({sessionId:e,resultId:t})=>{if(t)return`${t}/webhooks`;let[n,r]=e.split("-");return`${r}/${n}/webhooks`};var Db=e=>{if(document.getElementById("gtm-noscript"))return"";let t=document.createElement("noscript");t.id="gtm-noscript";let n=document.createElement("iframe");return n.src=`https://www.googletagmanager.com/ns.html?id=${e}`,n.height="0",n.width="0",n.style.display="none",n.style.visibility="hidden",t.appendChild(n),t};var Lb=async e=>{let t=e.customHeadCode;Ce(t)&&Rf(t);let n=e.gtmId;Ce(n)&&document.body.prepend(Db(n));let r=e.googleAnalyticsId;Ce(r)&&await fb(r);let o=e.pixelIds;re(o)&&Sb(o)};var Nb=async({clientSideAction:e,context:t,onMessageStream:n})=>{if("chatwoot"in e)return db(e.chatwoot);if("googleAnalytics"in e)return mb(e.googleAnalytics);if("scriptToExecute"in e)return fs(e.scriptToExecute);if("redirect"in e)return _b(e.redirect);if("wait"in e)return await Eb(e.wait),e.expectsDedicatedReply?{replyToSend:void 0}:void 0;if("setVariable"in e)return kb(e.setVariable.scriptToExecute);if("streamOpenAiChatCompletion"in e||"stream"in e){let{error:r,message:o}=await Cc(t)({messages:"streamOpenAiChatCompletion"in e?e.streamOpenAiChatCompletion?.messages:void 0,onMessageStream:n});return r?{replyToSend:void 0,logs:[{status:"error",description:"Message streaming returned an error",details:JSON.stringify(r,null,2)}]}:{replyToSend:o}}if("httpRequestToExecute"in e)return{replyToSend:await gb(e.httpRequestToExecute)};if("startPropsToInject"in e)return Lb(e.startPropsToInject);if("pixel"in e)return Cb(e.pixel);if("codeToExecute"in e)return _i(e.codeToExecute);if(e.type==="listenForWebhook")return Mb({sessionId:t.sessionId,resultId:t.resultId})};var[ms,Ic]=O([]);var $b=e=>e.type==="text"?e.label??e.value:e.url;var[Ac,Oc]=O();var Ek=S('<svg><circle class=opacity-25 cx=12 cy=12 r=10 stroke=currentColor stroke-width=4></circle><path class=opacity-75 fill=currentColor d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">'),gs=e=>(()=>{var t=Ek();return Te(t,Se(e,{get class(){return"animate-spin h-6 w-6 "+e.class},xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loading-spinner"}),!0,!0),t})();var Pk=S("<button>"),qt=e=>{let t=ua(()=>e.children),[n,r]=Be(e,["variant","isDisabled","isLoading"]);return(()=>{var o=Pk();return Te(o,Se(r,{get disabled(){return n.isDisabled||n.isLoading},get class(){return pe("py-2 px-4 font-semibold focus:outline-none filter hover:brightness-90 active:brightness-75 disabled:opacity-50 disabled:cursor-not-allowed disabled:brightness-100 flex justify-center flex-shrink-0",n.variant==="secondary"?" secondary-button":" agent-button",r.class)}}),!1,!0),x(o,m(N,{get when(){return!n.isLoading},get fallback(){return m(gs,{})},get children(){return t()}})),o})()};var Ik=S('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2px stroke-linecap=round stroke-linejoin=round><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>'),fn=e=>(()=>{var t=Ik();return Te(t,e,!0,!0),t})();var Ak=S('<button class="w-5 h-5">'),Ok=S('<div class="flex justify-between items-center gap-2 w-full pr-4"><input class="focus:outline-none bg-transparent px-4 py-4 flex-1 w-full text-input"type=text>'),Yn=e=>{let[t,n]=O(""),[r,o]=Be(e,["onInput","ref"]),i=s=>{n(s),r.onInput(s)},a=()=>{n(""),e.onClear()};return(()=>{var s=Ok(),c=s.firstChild;c.$$input=u=>i(u.currentTarget.value);var l=e.ref;return typeof l=="function"?de(l,c):e.ref=c,Te(c,Se({get value(){return t()}},o),!1,!1),x(s,m(N,{get when(){return t().length>0},get children(){var u=Ak();return Fe(u,"click",a),x(u,m(fn,{})),u}}),null),s})()};Me(["input"]);var Qe="Send";var Hi={buttonLabel:Qe,searchInputPlaceholder:"Filter the options...",isMultipleChoice:!1,isSearchable:!1,areInitialSearchButtonsVisible:!0};var Rk=S('<div class="flex items-end agent-input w-full">'),Mk=S('<div class="flex flex-col gap-2 w-full"><div>'),Dk=S("<span>"),Lk=S('<span class="flex h-3 w-3 absolute top-0 right-0 -mt-1 -mr-1 ping"><span class="animate-ping absolute inline-flex h-full w-full rounded-full brightness-200 opacity-75"></span><span class="relative inline-flex rounded-full h-3 w-3 brightness-150">'),Bb=e=>{let t,[n,r]=O(e.options?.isSearchable&&!e.options?.areInitialSearchButtonsVisible?[]:e.defaultItems);ne(()=>{!K()&&t&&t.focus({preventScroll:!0})});let o=a=>e.onSubmit({type:"text",value:n()[a]?.content??""}),i=a=>{if(a===""||a.trim().length===0){r(e.options?.areInitialSearchButtonsVisible?e.defaultItems:[]);return}r(e.defaultItems.filter(s=>s.content?.toLowerCase().includes(a.toLowerCase())))};return(()=>{var a=Mk(),s=a.firstChild;return x(a,m(N,{get when(){return e.options?.isSearchable},get children(){var c=Rk();return x(c,m(Yn,{ref(l){var u=t;typeof u=="function"?u(l):t=l},onInput:i,get placeholder(){return e.options?.searchInputPlaceholder??Hi.searchInputPlaceholder},onClear:()=>r(e.options?.areInitialSearchButtonsVisible?e.defaultItems:[])})),c}}),s),x(s,m(he,{get each(){return n()},children:(c,l)=>(()=>{var u=Dk();return x(u,m(qt,{"on:click":()=>o(l()),get"data-itemid"(){return c.id},class:"w-full",get children(){return c.content}}),null),x(u,(()=>{var f=B(()=>e.chunkIndex===0&&e.defaultItems.length===1);return()=>f()&&Lk()})(),null),A(()=>$(u,"relative"+(K()?" w-full":""))),u})()})),A(()=>$(s,"flex flex-wrap justify-end gap-2"+(e.options?.isSearchable?" overflow-y-scroll max-h-80 rounded-md":""))),a})()};var Nk=S('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 512 512"width=19px color=white><path d="M476.59 227.05l-.16-.07L49.35 49.84A23.56 23.56 0 0027.14 52 24.65 24.65 0 0016 72.59v113.29a24 24 0 0019.52 23.57l232.93 43.07a4 4 0 010 7.86L35.53 303.45A24 24 0 0016 327v113.31A23.57 23.57 0 0026.59 460a23.94 23.94 0 0013.22 4 24.55 24.55 0 009.52-1.93L476.4 285.94l.19-.09a32 32 0 000-58.8z">'),Fb=e=>(()=>{var t=Nk();return Te(t,e,!0,!0),t})();var Ue=e=>{let[t,n]=Be(e,["isDisabled","isLoading","disableIcon"]),r=K()&&!t.disableIcon||!n.children||typeof n.children=="string"&&$e(n.children);return m(qt,Se(n,{type:"submit",get class(){return pe(n.class,"flex items-center")},"aria-label":r?"Send":void 0,get children(){return m(Ee,{get children(){return[m(q,{when:r,get children(){return m(Fb,{get class(){return"send-icon flex w-6 h-6 "+(t.disableIcon?"hidden":"")}})}}),m(q,{when:!r,get children(){return e.children}})]}})}}))};var $k=S('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3px stroke-linecap=round stroke-linejoin=round><polyline points="20 6 9 17 4 12">'),Ub=e=>(()=>{var t=$k();return Te(t,e,!0,!0),t})();var Bk=S("<div>"),So=e=>(()=>{var t=Bk();return x(t,m(N,{get when(){return e.isChecked},get children(){return m(Ub,{})}})),A(()=>$(t,"w-4 h-4 agent-checkbox"+(e.isChecked?" checked":"")+(e.class?` ${e.class}`:""))),t})();var Fk=S('<div class="flex items-end agent-input w-full">'),Uk=S('<form class="flex flex-col items-end gap-2 w-full"><div>'),jk=S('<span><div role=checkbox><div class="flex items-center gap-2"><span>'),Vk=S('<span><div role=checkbox aria-checked class="w-full py-2 px-4 font-semibold focus:outline-none cursor-pointer select-none agent-selectable selected"><div class="flex items-center gap-2"><span>'),jb=e=>{let t,[n,r]=O(e.options?.isSearchable&&!e.options?.areInitialSearchButtonsVisible?[]:e.defaultItems),[o,i]=O([]);ne(()=>{!K()&&t&&t.focus({preventScroll:!0})});let a=u=>{s(u)},s=u=>{let f=o().indexOf(u);i(f!==-1?d=>d.filter(p=>p!==u):d=>[...d,u])},c=()=>e.onSubmit({type:"text",value:o().map(u=>e.defaultItems.find(f=>f.id===u)?.content).join(", ")}),l=u=>{if(u===""||u.trim().length===0){r(e.options?.areInitialSearchButtonsVisible?e.defaultItems:[]);return}r(e.defaultItems.filter(f=>f.content?.toLowerCase().includes(u.toLowerCase())))};return(()=>{var u=Uk(),f=u.firstChild;return u.addEventListener("submit",c),x(u,m(N,{get when(){return e.options?.isSearchable},get children(){var d=Fk();return x(d,m(Yn,{ref(p){var h=t;typeof h=="function"?h(p):t=p},onInput:l,get placeholder(){return e.options?.searchInputPlaceholder??Hi.searchInputPlaceholder},onClear:()=>r(e.options?.areInitialSearchButtonsVisible?e.defaultItems:[])})),d}}),f),x(f,m(he,{get each(){return n()},children:d=>(()=>{var p=jk(),h=p.firstChild,g=h.firstChild,v=g.firstChild;return Fe(h,"click",()=>a(d.id)),x(g,m(So,{get isChecked(){return o().some(y=>y===d.id)},class:"flex-shrink-0"}),v),x(v,()=>d.content),A(y=>{var T="relative"+(K()?" w-full":""),C=o().some(U=>U===d.id),E="w-full py-2 px-4 font-semibold focus:outline-none cursor-pointer select-none agent-selectable"+(o().some(U=>U===d.id)?" selected":""),I=d.id;return T!==y.e&&$(p,y.e=T),C!==y.t&&j(h,"aria-checked",y.t=C),E!==y.a&&$(h,y.a=E),I!==y.o&&j(h,"data-itemid",y.o=I),y},{e:void 0,t:void 0,a:void 0,o:void 0}),p})()}),null),x(f,m(he,{get each(){return o().filter(d=>n().every(p=>p.id!==d))},children:d=>(()=>{var p=Vk(),h=p.firstChild,g=h.firstChild,v=g.firstChild;return Fe(h,"click",()=>a(d)),j(h,"data-itemid",d),x(g,m(So,{isChecked:!0}),v),x(v,()=>e.defaultItems.find(y=>y.id===d)?.content),A(()=>$(p,"relative"+(K()?" w-full":""))),p})()}),null),x(u,(()=>{var d=B(()=>o().length>0);return()=>d()&&m(Ue,{disableIcon:!0,get children(){return e.options?.buttonLabel??Hi.buttonLabel}})})(),null),A(()=>$(f,"flex flex-wrap justify-end gap-2"+(e.options?.isSearchable?" overflow-y-scroll max-h-80 rounded-md":""))),u})()};var Rc={hasTime:!1,isRange:!1,labels:{button:Qe,from:"From:",to:"To:"},format:"dd/MM/yyyy",formatWithTime:"dd/MM/yyyy HH:mm"};var Hk=S('<div class="agent-input-form flex gap-2 items-end"><form><div class="flex flex-col"><div><input class="focus:outline-none flex-1 w-full text-input agent-date-input"data-testid=from-date>'),Vb=S("<p class=font-semibold>"),zk=S('<div class="flex items-center p-4"><input class="focus:outline-none flex-1 w-full text-input ml-2 agent-date-input"data-testid=to-date>'),Hb=e=>{let[t,n]=O(Gk(e.defaultValue??"")),r=()=>{t().from===""&&t().to===""||e.onSubmit({type:"text",value:`${t().from}${e.options?.isRange?` to ${t().to}`:""}`})};return(()=>{var o=Hk(),i=o.firstChild,a=i.firstChild,s=a.firstChild,c=s.firstChild;return i.addEventListener("submit",l=>{l.preventDefault(),r()}),x(s,(()=>{var l=B(()=>!!e.options?.isRange);return()=>l()&&(()=>{var u=Vb();return x(u,()=>e.options.labels?.from??Rc.labels.from),u})()})(),c),c.addEventListener("change",l=>n({...t(),from:l.currentTarget.value})),c.style.setProperty("min-height","32px"),c.style.setProperty("min-width","100px"),c.style.setProperty("font-size","16px"),x(a,(()=>{var l=B(()=>!!e.options?.isRange);return()=>l()&&(()=>{var u=zk(),f=u.firstChild;return x(u,(()=>{var d=B(()=>!!e.options.isRange);return()=>d()&&(()=>{var p=Vb();return x(p,()=>e.options.labels?.to??Rc.labels.to),p})()})(),f),f.addEventListener("change",d=>n({...t(),to:d.currentTarget.value})),f.style.setProperty("min-height","32px"),f.style.setProperty("min-width","100px"),f.style.setProperty("font-size","16px"),A(d=>{var p=e.options.hasTime?"datetime-local":"date",h=e.options?.min,g=e.options?.max;return p!==d.e&&j(f,"type",d.e=p),h!==d.t&&j(f,"min",d.t=h),g!==d.a&&j(f,"max",d.a=g),d},{e:void 0,t:void 0,a:void 0}),A(()=>f.value=t().to),u})()})(),null),x(o,m(Ue,{class:"h-[56px]","on:click":r,get children(){return e.options?.labels?.button}}),null),A(l=>{var u=pe("flex agent-input",e.options?.isRange?"items-end":"items-center"),f="flex items-center p-4 "+(e.options?.isRange?"pb-0 gap-2":""),d=e.options?.hasTime?"datetime-local":"date",p=e.options?.min,h=e.options?.max;return u!==l.e&&$(i,l.e=u),f!==l.t&&$(s,l.t=f),d!==l.a&&j(c,"type",l.a=d),p!==l.o&&j(c,"min",l.o=p),h!==l.i&&j(c,"max",l.i=h),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),A(()=>c.value=t().from),o})()},Gk=e=>{if(!e.includes("to"))return{from:e,to:""};let[t,n]=e.split(" to ");return{from:t,to:n}};var Wk=S('<input class="focus:outline-none bg-transparent px-4 py-4 flex-1 w-full text-input"type=text>'),Xn=e=>{let[t,n]=Be(e,["ref","onInput"]);return(()=>{var r=Wk();r.$$input=i=>t.onInput(i.currentTarget.value);var o=e.ref;return typeof o=="function"?de(o,r):e.ref=r,Te(r,n,!1,!1),r})()};Me(["input"]);var zb={labels:{button:Qe,placeholder:"Type your email..."},retryMessageContent:"This email doesn't seem to be valid. Can you type it again?"};var qk=S('<div class="agent-input-form flex w-full gap-2 items-end max-w-[350px]"><div class="flex agent-input w-full">'),Gb=e=>{let[t,n]=O(e.defaultValue??""),r,o=l=>n(l),i=()=>r?.value!==""&&r?.reportValidity(),a=()=>{i()?e.onSubmit({type:"text",value:r?.value??t()}):r?.focus()},s=l=>{l.key==="Enter"&&a()};ne(()=>{!K()&&r&&r.focus({preventScroll:!0}),window.addEventListener("message",c)}),se(()=>{window.removeEventListener("message",c)});let c=l=>{let{data:u}=l;u.isFromAgent&&u.command==="setInputValue"&&n(u.value)};return(()=>{var l=qk(),u=l.firstChild;return l.$$keydown=s,x(u,m(Xn,{ref(f){var d=r;typeof d=="function"?d(f):r=f},get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??zb.labels.placeholder},onInput:o,type:"email",autocomplete:"email"})),x(l,m(Ue,{type:"button",class:"h-[56px]","on:click":a,get children(){return e.block.options?.labels?.button}}),null),l})()};Me(["keydown"]);var Kt={isRequired:!0,isMultipleAllowed:!1,visibility:"Auto",labels:{placeholder:`<strong>
|
|
95
79
|
Click to upload
|
|
96
|
-
</strong> or drag and drop<br>
|
|
97
|
-
(size limit: 10MB)`,button:"Upload",clear:"Clear",skip:"Skip",success:{single:"File uploaded",multiple:"{total} files uploaded"}}};var Hs=({newFile:e,existingFiles:t,params:n,onError:r})=>{let o=n.sizeLimit??cn("NEXT_PUBLIC_AGENT_FILE_UPLOAD_MAX_SIZE");if(o&&e.size>o*1024*1024){r({title:"File too large",description:`${e.name} is larger than ${o}MB`});return}if(t.length===0)return e;let a=e.name,i=1;for(;t.some(s=>s.name===a);){let s=e.name.lastIndexOf("."),c=s!==-1?e.name.slice(s):"";a=`${e.name.slice(0,s)}(${i})${c}`,i++}return new File([e],a,{type:e.type})};var Go=async({apiHost:e,files:t,onUploadProgress:n})=>{let r=[],o=0;for(let{input:a,file:i}of t){n&&n({progress:o/t.length*100,fileIndex:o}),o+=1;let{data:s}=await kp({method:"POST",url:`${e}/api/v3/generate-upload-url`,body:{fileName:a.fileName,sessionId:a.sessionId,fileType:i.type,blockId:a.blockId}});if(s?.presignedUrl){console.log("iniciando puuuttt",i),console.log(s.presignedUrl);let c=new FormData;if(Object.entries(s.formData).forEach(([u,f])=>{c.append(u,f)}),c.append("file",i),!(await fetch(s.presignedUrl,{method:"PUT",body:i,headers:{"Content-Type":i.type}})).ok)continue;r.push({url:s.fileUrl,type:i.type})}else continue}return r};var OA=w('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2px stroke-linecap=round stroke-linejoin=round><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4">'),Ks=e=>(()=>{var t=OA();return Ce(t,e,!0,!0),t})();var LA=w('<div class="flex items-center gap-4 border bg-white border-gray-200 rounded-md p-2 text-gray-900 min-w-[250px]"><div></div><div class="flex flex-col"><span class="text-md font-semibold text-sm"></span><span class="text-gray-500 text-xs">'),Vs=e=>{let t=BA(e.file);return(()=>{var n=LA(),r=n.firstChild,o=r.nextSibling,a=o.firstChild,i=a.nextSibling;return v(r,m(Ks,{class:"w-6 h-6"})),v(a,()=>e.file.name),v(i,()=>DA(e.file)),_(()=>U(r,he("rounded-md text-white p-2 flex items-center",t==="pink"&&"bg-pink-400",t==="blue"&&"bg-blue-400",t==="green"&&"bg-green-400",t==="gray"&&"bg-gray-400",t==="orange"&&"bg-orange-400"))),n})()},DA=e=>{switch(e.name.split(".").pop()){case"pdf":return"PDF";case"doc":case"docx":return"Word";case"xls":case"xlsx":case"csv":return"Sheet";case"json":return"JSON";case"md":return"Markdown";default:return"DOCUMENT"}},BA=e=>{let t=e.name.split(".").pop();if(!t)return"gray";switch(t){case"pdf":return"pink";case"doc":case"docx":return"blue";case"xls":case"xlsx":case"csv":return"green";case"json":return"orange";default:return"gray"}};var UA=w('<img class="rounded-md object-cover w-[58px] h-[58px]">'),FA=w('<div class="relative group flex-shrink-0"><button class="absolute -right-2 p-0.5 -top-2 rounded-full bg-gray-200 text-black border border-gray-400 opacity-1 sm:opacity-0 group-hover:opacity-100 transition-opacity"aria-label="Remove attachment">'),$A=w('<div class="absolute w-full h-full inset-0 bg-black/20 rounded-md">'),js=e=>(()=>{var t=FA(),n=t.firstChild;return v(t,m(Ie,{get children(){return[m(Z,{get when(){return e.file.type.startsWith("image")},get children(){var r=UA();return _(o=>{var a=URL.createObjectURL(e.file),i=e.file.name;return a!==o.e&&H(r,"src",o.e=a),i!==o.t&&H(r,"alt",o.t=i),o},{e:void 0,t:void 0}),r}}),m(Z,{when:!0,get children(){return m(Vs,{get file(){return e.file}})}})]}}),n),Ve(n,"click",e.onRemoveClick),v(n,m(Sn,{class:"w-4"})),v(t,m(B,{get when(){return te(e.uploadProgressPercent)&&e.uploadProgressPercent!==100},get children(){return m(GA,{get progressPercent(){return e.uploadProgressPercent}})}}),null),t})(),GA=e=>{let[t,n]=M(e.progressPercent??0),r;return be(()=>{e.progressPercent===20&&(r=setInterval(()=>{t()<100&&n(a=>a+(Math.floor(Math.random()*10)+1))},1e3))}),ue(()=>{clearInterval(r)}),(()=>{var o=$A();return v(o,m(Lr.Root,{get value(){return t()},class:"flex items-center justify-center",get children(){return m(Lr.Circle,{get children(){return[m(Lr.CircleTrack,{}),m(Lr.CircleRange,{})]}})}})),o})()};var HA=w('<div class="w-full bg-gray-200 rounded-full h-2.5"><div class="upload-progress-bar h-2.5 rounded-full">'),KA=w('<div class="p-4 flex gap-2 border-gray-200 border overflow-auto bg-white rounded-md w-full">'),VA=w('<div class="flex flex-col justify-center items-center gap-4 max-w-[90%]"><p class="text-sm text-gray-500 text-center">'),jA=w("<input id=dropzone-file type=file class=hidden>"),WA=w('<div class="flex justify-end">'),zA=w('<div class="flex justify-end"><div class="flex gap-2">'),ZA=w('<form class="flex flex-col w-full gap-2"><label for=dropzone-file>'),YA=w('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=text-gray-500><polyline points="16 16 12 12 8 16"></polyline><line x1=12 y1=12 x2=12 y2=21></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16">'),Hy=e=>{let[t,n]=M([]),[r,o]=M(!1),[a,i]=M(0),[s,c]=M(!1),l=S=>{let k=Array.from(S).map(I=>Hs({existingFiles:t(),newFile:I,params:{sizeLimit:e.block.options&&"sizeLimit"in e.block.options?e.block.options.sizeLimit:void 0},onError:({description:G,title:D})=>lr.create({title:D,description:G})})).filter(te);if(k.length!==0){if(!e.block.options?.isMultipleAllowed)return f(k[0]);n([...t(),...k])}},u=async S=>{S.preventDefault(),t().length!==0&&d(t())},f=async S=>{o(!0);let k=await Go({apiHost:e.context.apiHost??Ct({ignoreChatApiUrl:!0}),files:[{file:S,input:{sessionId:e.context.sessionId,blockId:e.block.id,fileName:S.name}}]});if(o(!1),k.length&&k[0])return e.onSubmit({type:"text",label:e.block.options?.labels?.success?.single??rn.labels.success.single,value:k[0]?Gy(k[0].url):"",attachments:[{type:S.type,url:k[0].url,blobUrl:URL.createObjectURL(S)}]});lr.create({description:"An error occured while uploading the file"})},d=async S=>{o(!0);let k=await Go({apiHost:e.context.apiHost??Ct({ignoreChatApiUrl:!0}),files:S.map(I=>({file:I,input:{sessionId:e.context.sessionId,blockId:e.block.id,fileName:I.name}})),onUploadProgress:i});if(o(!1),i(0),k.length!==S.length)return lr.create({description:"An error occured while uploading the files"});e.onSubmit({type:"text",label:k.length>1?(e.block.options?.labels?.success?.multiple??rn.labels.success.multiple).replaceAll("{total}",k.length.toString()):e.block.options?.labels?.success?.single??rn.labels.success.single,value:k.filter(te).map(({url:I})=>Gy(I)).join(", "),attachments:k.map((I,G)=>I?{...I,blobUrl:URL.createObjectURL(t()[G])}:null).filter(te)})},p=S=>{S.preventDefault(),c(!0)},h=()=>c(!1),g=S=>{S.preventDefault(),S.stopPropagation(),S.dataTransfer?.files&&l(S.dataTransfer.files)},x=()=>n([]),b=()=>e.onSkip(e.block.options?.labels?.skip??rn.labels.skip),E=S=>{n(k=>k.filter((I,G)=>G!==S))};return(()=>{var S=ZA(),k=S.firstChild;return S.addEventListener("submit",u),k.addEventListener("drop",g),k.addEventListener("dragleave",h),k.addEventListener("dragover",p),v(k,m(Ie,{get children(){return[m(Z,{get when(){return r()},get children(){return m(B,{get when(){return t().length>1},get fallback(){return m(Gs,{})},get children(){var I=HA(),G=I.firstChild;return G.style.setProperty("transition","width 150ms cubic-bezier(0.4, 0, 0.2, 1)"),_(D=>(D=`${a()>0?a:10}%`)!=null?G.style.setProperty("width",D):G.style.removeProperty("width")),I}})}}),m(Z,{get when(){return!r()},get children(){return[(()=>{var I=VA(),G=I.firstChild;return v(I,m(B,{get when(){return t().length},get fallback(){return m(qA,{})},get children(){var D=KA();return Ve(D,"click",ie=>{ie.preventDefault(),ie.stopPropagation()}),v(D,m(ye,{get each(){return t()},children:(ie,V)=>m(js,{file:ie,onRemoveClick:()=>E(V())})})),D}}),G),_(()=>G.innerHTML=e.block.options?.labels?.placeholder??rn.labels.placeholder),I})(),(()=>{var I=jA();return I.addEventListener("change",G=>{G.currentTarget.files&&l(G.currentTarget.files)}),_(()=>I.multiple=e.block.options?.isMultipleAllowed??rn.isMultipleAllowed),I})()]}})]}})),v(S,m(B,{get when(){return t().length===0&&e.block.options?.isRequired===!1},get children(){var I=WA();return v(I,m(nn,{"on:click":b,get children(){return e.block.options?.labels?.skip??rn.labels.skip}})),I}}),null),v(S,m(B,{get when(){return F(()=>!!(e.block.options?.isMultipleAllowed&&t().length>0))()&&!r()},get children(){var I=zA(),G=I.firstChild;return v(G,m(B,{get when(){return t().length},get children(){return m(nn,{variant:"secondary","on:click":x,get children(){return e.block.options?.labels?.clear??rn.labels.clear}})}}),null),v(G,m(je,{type:"submit",disableIcon:!0,get children(){return F(()=>(e.block.options?.labels?.button??rn.labels.button)===rn.labels.button)()?`Upload ${t().length} file${t().length>1?"s":""}`:e.block.options?.labels?.button}}),null),I}}),null),_(()=>U(k,"agent-upload-input py-6 flex flex-col justify-center items-center w-full bg-gray-50 border-2 border-gray-300 border-dashed cursor-pointer hover:bg-gray-100 px-8 "+(s()?"dragging-over":""))),S})()},qA=()=>YA(),Gy=e=>{let t=e.split("/").pop();if(!t)return e;let n=encodeURIComponent(t);return e.replace(t,n)};var Ky={labels:{button:it,placeholder:"Type a number..."}};var Vy=e=>{let t=r=>{be(()=>{let o=e();if(o==null){r.value=o;return}let a=r.value;(o===0&&a===""||o!==a)&&(r.value=o+"")})},n=r=>{if(r.validity.badInput)return e();if(r.value!=="")return r.valueAsNumber};return[qe(e),t,n]};var JA=w('<div class="agent-input-form flex w-full gap-2 items-end max-w-[350px]"><div class="flex agent-input w-full"><input class="focus:outline-none bg-transparent px-4 py-4 flex-1 w-full text-input"type=number>'),jy=e=>{let[t,n]=M(e.defaultValue??""),[r,o,a]=Vy(()=>t()),i,s=()=>i?.value!==""&&i?.reportValidity(),c=()=>{s()?e.onSubmit({type:"text",value:i?.value??t().toString()}):i?.focus()},l=f=>{f.key==="Enter"&&c()};ae(()=>{!Y()&&i&&i.focus({preventScroll:!0}),window.addEventListener("message",u)}),ue(()=>{window.removeEventListener("message",u)});let u=f=>{let{data:d}=f;d.isFromAgent&&d.command==="setInputValue"&&n(d.value)};return(()=>{var f=JA(),d=f.firstChild,p=d.firstChild;f.$$keydown=l,p.$$input=g=>{n(a(g.currentTarget))},pe(o,p,()=>!0);var h=i;return typeof h=="function"?pe(h,p):i=p,p.style.setProperty("font-size","16px"),p.style.setProperty("appearance","auto"),p.value=r,v(f,m(je,{type:"button",class:"h-[56px]","on:click":c,get children(){return e.block.options?.labels?.button}}),null),_(g=>{var x=e.block.options?.labels?.placeholder??Ky.labels.placeholder,b=e.block.options?.min,E=e.block.options?.max,S=e.block.options?.step??"any";return x!==g.e&&H(p,"placeholder",g.e=x),b!==g.t&&H(p,"min",g.t=b),E!==g.a&&H(p,"max",g.a=E),S!==g.o&&H(p,"step",g.o=S),g},{e:void 0,t:void 0,a:void 0,o:void 0}),f})()};$e(["keydown","input"]);var Qy=br(Xy(),1);var Ys={provider:"Stripe",labels:{button:"Pay",success:"Success"},retryMessageContent:"Payment failed. Please, try again.",currency:"USD"};var oP=w('<div class="agent-input-error-message mt-4 text-center animate-fade-in">'),aP=w('<form id=payment-form class="flex flex-col p-4 agent-input w-full items-center"><slot name=stripe-payment-form>'),iP="stripe-payment-form",yu,li=null,qs=null,e0=e=>{let[t,n]=M(),[r,o]=M(!1),[a,i]=M(!1);ae(async()=>{if(sP(yu),!e.options?.publicKey)return n("Missing Stripe public key");if(li=await(0,Qy.loadStripe)(e.options?.publicKey),!li)return;qs=li.elements({appearance:{theme:"stripe",variables:{colorPrimary:getComputedStyle(yu).getPropertyValue("--agent-button-bg-color")}},clientSecret:e.options.paymentIntentSecret}),qs.create("payment",{layout:"tabs"}).mount("#payment-element"),setTimeout(()=>{o(!0),e.onTransitionEnd()},1e3)});let s=async c=>{if(c.preventDefault(),!li||!qs)return;i(!0),sf({sessionId:e.context.sessionId,resultId:e.context.resultId,agent:e.context.agent});let{postalCode:l,...u}=e.options?.additionalInformation?.address??{},{error:f,paymentIntent:d}=await li.confirmPayment({elements:qs,confirmParams:{return_url:window.location.href,payment_method_data:{billing_details:{name:e.options?.additionalInformation?.name,email:e.options?.additionalInformation?.email,phone:e.options?.additionalInformation?.phoneNumber,address:{...u,postal_code:l}}}},redirect:"if_required"});if(Ri(),i(!1),f?.type!=="validation_error"){if(f?.type==="card_error")return n(f.message);if(!f&&d.status==="succeeded")return e.onSuccess()}};return(()=>{var c=aP(),l=c.firstChild;return c.addEventListener("submit",s),pe(u=>yu=u,l),l._$owner=ro(),v(c,m(B,{get when(){return r()},get children(){return m(je,{get isLoading(){return a()},class:"mt-4 w-full max-w-lg animate-fade-in",disableIcon:!0,get children(){return[F(()=>e.options?.labels?.button??Ys.labels.button)," ",F(()=>e.options?.amountLabel)]}})}}),null),v(c,m(B,{get when(){return t()},get children(){var u=oP();return v(u,t),u}}),null),c})()},sP=e=>{let n=e.getRootNode().host,r=document.createElement("div");r.style.width="100%",r.slot=iP,n.appendChild(r);let o=document.createElement("div");o.id="payment-element",r.appendChild(o)};var t0=e=>m(e0,{get onSuccess(){return e.onSuccess},get options(){return e.options},get context(){return e.context},get onTransitionEnd(){return e.onTransitionEnd}});var lP=w('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2px stroke-linecap=round stroke-linejoin=round><polyline points="6 9 12 15 18 9">'),n0=e=>(()=>{var t=lP();return Ce(t,e,!0,!0),t})();var r0={labels:{button:it,placeholder:"Type your phone number..."},retryMessageContent:"This phone number doesn't seem to be valid. Can you type it again?"};var Gr=[{name:"International",flag:"\u{1F310}",code:"INT",dial_code:""},{name:"Afghanistan",flag:"\u{1F1E6}\u{1F1EB}",code:"AF",dial_code:"+93"},{name:"\xC5land Islands",flag:"\u{1F1E6}\u{1F1FD}",code:"AX",dial_code:"+358"},{name:"Albania",flag:"\u{1F1E6}\u{1F1F1}",code:"AL",dial_code:"+355"},{name:"Algeria",flag:"\u{1F1E9}\u{1F1FF}",code:"DZ",dial_code:"+213"},{name:"American Samoa",flag:"\u{1F1E6}\u{1F1F8}",code:"AS",dial_code:"+1684"},{name:"Andorra",flag:"\u{1F1E6}\u{1F1E9}",code:"AD",dial_code:"+376"},{name:"Angola",flag:"\u{1F1E6}\u{1F1F4}",code:"AO",dial_code:"+244"},{name:"Anguilla",flag:"\u{1F1E6}\u{1F1EE}",code:"AI",dial_code:"+1264"},{name:"Antarctica",flag:"\u{1F1E6}\u{1F1F6}",code:"AQ",dial_code:"+672"},{name:"Antigua and Barbuda",flag:"\u{1F1E6}\u{1F1EC}",code:"AG",dial_code:"+1268"},{name:"Argentina",flag:"\u{1F1E6}\u{1F1F7}",code:"AR",dial_code:"+54"},{name:"Armenia",flag:"\u{1F1E6}\u{1F1F2}",code:"AM",dial_code:"+374"},{name:"Aruba",flag:"\u{1F1E6}\u{1F1FC}",code:"AW",dial_code:"+297"},{name:"Australia",flag:"\u{1F1E6}\u{1F1FA}",code:"AU",dial_code:"+61"},{name:"Austria",flag:"\u{1F1E6}\u{1F1F9}",code:"AT",dial_code:"+43"},{name:"Azerbaijan",flag:"\u{1F1E6}\u{1F1FF}",code:"AZ",dial_code:"+994"},{name:"Bahamas",flag:"\u{1F1E7}\u{1F1F8}",code:"BS",dial_code:"+1242"},{name:"Bahrain",flag:"\u{1F1E7}\u{1F1ED}",code:"BH",dial_code:"+973"},{name:"Bangladesh",flag:"\u{1F1E7}\u{1F1E9}",code:"BD",dial_code:"+880"},{name:"Barbados",flag:"\u{1F1E7}\u{1F1E7}",code:"BB",dial_code:"+1246"},{name:"Belarus",flag:"\u{1F1E7}\u{1F1FE}",code:"BY",dial_code:"+375"},{name:"Belgium",flag:"\u{1F1E7}\u{1F1EA}",code:"BE",dial_code:"+32"},{name:"Belize",flag:"\u{1F1E7}\u{1F1FF}",code:"BZ",dial_code:"+501"},{name:"Benin",flag:"\u{1F1E7}\u{1F1EF}",code:"BJ",dial_code:"+229"},{name:"Bermuda",flag:"\u{1F1E7}\u{1F1F2}",code:"BM",dial_code:"+1441"},{name:"Bhutan",flag:"\u{1F1E7}\u{1F1F9}",code:"BT",dial_code:"+975"},{name:"Bolivia, Plurinational State of bolivia",flag:"\u{1F1E7}\u{1F1F4}",code:"BO",dial_code:"+591"},{name:"Bosnia and Herzegovina",flag:"\u{1F1E7}\u{1F1E6}",code:"BA",dial_code:"+387"},{name:"Botswana",flag:"\u{1F1E7}\u{1F1FC}",code:"BW",dial_code:"+267"},{name:"Bouvet Island",flag:"\u{1F1E7}\u{1F1FB}",code:"BV",dial_code:"+47"},{name:"Brazil",flag:"\u{1F1E7}\u{1F1F7}",code:"BR",dial_code:"+55"},{name:"British Indian Ocean Territory",flag:"\u{1F1EE}\u{1F1F4}",code:"IO",dial_code:"+246"},{name:"Brunei Darussalam",flag:"\u{1F1E7}\u{1F1F3}",code:"BN",dial_code:"+673"},{name:"Bulgaria",flag:"\u{1F1E7}\u{1F1EC}",code:"BG",dial_code:"+359"},{name:"Burkina Faso",flag:"\u{1F1E7}\u{1F1EB}",code:"BF",dial_code:"+226"},{name:"Burundi",flag:"\u{1F1E7}\u{1F1EE}",code:"BI",dial_code:"+257"},{name:"Cambodia",flag:"\u{1F1F0}\u{1F1ED}",code:"KH",dial_code:"+855"},{name:"Cameroon",flag:"\u{1F1E8}\u{1F1F2}",code:"CM",dial_code:"+237"},{name:"Canada",flag:"\u{1F1E8}\u{1F1E6}",code:"CA",dial_code:"+1"},{name:"Cape Verde",flag:"\u{1F1E8}\u{1F1FB}",code:"CV",dial_code:"+238"},{name:"Cayman Islands",flag:"\u{1F1F0}\u{1F1FE}",code:"KY",dial_code:"+345"},{name:"Central African Republic",flag:"\u{1F1E8}\u{1F1EB}",code:"CF",dial_code:"+236"},{name:"Chad",flag:"\u{1F1F9}\u{1F1E9}",code:"TD",dial_code:"+235"},{name:"Chile",flag:"\u{1F1E8}\u{1F1F1}",code:"CL",dial_code:"+56"},{name:"China",flag:"\u{1F1E8}\u{1F1F3}",code:"CN",dial_code:"+86"},{name:"Christmas Island",flag:"\u{1F1E8}\u{1F1FD}",code:"CX",dial_code:"+61"},{name:"Cocos (Keeling) Islands",flag:"\u{1F1E8}\u{1F1E8}",code:"CC",dial_code:"+61"},{name:"Colombia",flag:"\u{1F1E8}\u{1F1F4}",code:"CO",dial_code:"+57"},{name:"Comoros",flag:"\u{1F1F0}\u{1F1F2}",code:"KM",dial_code:"+269"},{name:"Congo",flag:"\u{1F1E8}\u{1F1EC}",code:"CG",dial_code:"+242"},{name:"Congo, The Democratic Republic of the Congo",flag:"\u{1F1E8}\u{1F1E9}",code:"CD",dial_code:"+243"},{name:"Cook Islands",flag:"\u{1F1E8}\u{1F1F0}",code:"CK",dial_code:"+682"},{name:"Costa Rica",flag:"\u{1F1E8}\u{1F1F7}",code:"CR",dial_code:"+506"},{name:"Cote d'Ivoire",flag:"\u{1F1E8}\u{1F1EE}",code:"CI",dial_code:"+225"},{name:"Croatia",flag:"\u{1F1ED}\u{1F1F7}",code:"HR",dial_code:"+385"},{name:"Cuba",flag:"\u{1F1E8}\u{1F1FA}",code:"CU",dial_code:"+53"},{name:"Cyprus",flag:"\u{1F1E8}\u{1F1FE}",code:"CY",dial_code:"+357"},{name:"Czech Republic",flag:"\u{1F1E8}\u{1F1FF}",code:"CZ",dial_code:"+420"},{name:"Denmark",flag:"\u{1F1E9}\u{1F1F0}",code:"DK",dial_code:"+45"},{name:"Djibouti",flag:"\u{1F1E9}\u{1F1EF}",code:"DJ",dial_code:"+253"},{name:"Dominica",flag:"\u{1F1E9}\u{1F1F2}",code:"DM",dial_code:"+1767"},{name:"Dominican Republic",flag:"\u{1F1E9}\u{1F1F4}",code:"DO",dial_code:"+1849"},{name:"Dominican Republic",flag:"\u{1F1E9}\u{1F1F4}",code:"DO",dial_code:"+1829"},{name:"Dominican Republic",flag:"\u{1F1E9}\u{1F1F4}",code:"DO",dial_code:"+1809"},{name:"Ecuador",flag:"\u{1F1EA}\u{1F1E8}",code:"EC",dial_code:"+593"},{name:"Egypt",flag:"\u{1F1EA}\u{1F1EC}",code:"EG",dial_code:"+20"},{name:"El Salvador",flag:"\u{1F1F8}\u{1F1FB}",code:"SV",dial_code:"+503"},{name:"Equatorial Guinea",flag:"\u{1F1EC}\u{1F1F6}",code:"GQ",dial_code:"+240"},{name:"Eritrea",flag:"\u{1F1EA}\u{1F1F7}",code:"ER",dial_code:"+291"},{name:"Estonia",flag:"\u{1F1EA}\u{1F1EA}",code:"EE",dial_code:"+372"},{name:"Ethiopia",flag:"\u{1F1EA}\u{1F1F9}",code:"ET",dial_code:"+251"},{name:"Falkland Islands (Malvinas)",flag:"\u{1F1EB}\u{1F1F0}",code:"FK",dial_code:"+500"},{name:"Faroe Islands",flag:"\u{1F1EB}\u{1F1F4}",code:"FO",dial_code:"+298"},{name:"Fiji",flag:"\u{1F1EB}\u{1F1EF}",code:"FJ",dial_code:"+679"},{name:"Finland",flag:"\u{1F1EB}\u{1F1EE}",code:"FI",dial_code:"+358"},{name:"France",flag:"\u{1F1EB}\u{1F1F7}",code:"FR",dial_code:"+33"},{name:"French Guiana",flag:"\u{1F1EC}\u{1F1EB}",code:"GF",dial_code:"+594"},{name:"French Polynesia",flag:"\u{1F1F5}\u{1F1EB}",code:"PF",dial_code:"+689"},{name:"French Southern Territories",flag:"\u{1F1F9}\u{1F1EB}",code:"TF",dial_code:"+262"},{name:"Gabon",flag:"\u{1F1EC}\u{1F1E6}",code:"GA",dial_code:"+241"},{name:"Gambia",flag:"\u{1F1EC}\u{1F1F2}",code:"GM",dial_code:"+220"},{name:"Georgia",flag:"\u{1F1EC}\u{1F1EA}",code:"GE",dial_code:"+995"},{name:"Germany",flag:"\u{1F1E9}\u{1F1EA}",code:"DE",dial_code:"+49"},{name:"Ghana",flag:"\u{1F1EC}\u{1F1ED}",code:"GH",dial_code:"+233"},{name:"Gibraltar",flag:"\u{1F1EC}\u{1F1EE}",code:"GI",dial_code:"+350"},{name:"Greece",flag:"\u{1F1EC}\u{1F1F7}",code:"GR",dial_code:"+30"},{name:"Greenland",flag:"\u{1F1EC}\u{1F1F1}",code:"GL",dial_code:"+299"},{name:"Grenada",flag:"\u{1F1EC}\u{1F1E9}",code:"GD",dial_code:"+1473"},{name:"Guadeloupe",flag:"\u{1F1EC}\u{1F1F5}",code:"GP",dial_code:"+590"},{name:"Guam",flag:"\u{1F1EC}\u{1F1FA}",code:"GU",dial_code:"+1671"},{name:"Guatemala",flag:"\u{1F1EC}\u{1F1F9}",code:"GT",dial_code:"+502"},{name:"Guernsey",flag:"\u{1F1EC}\u{1F1EC}",code:"GG",dial_code:"+44"},{name:"Guinea",flag:"\u{1F1EC}\u{1F1F3}",code:"GN",dial_code:"+224"},{name:"Guinea-Bissau",flag:"\u{1F1EC}\u{1F1FC}",code:"GW",dial_code:"+245"},{name:"Guyana",flag:"\u{1F1EC}\u{1F1FE}",code:"GY",dial_code:"+592"},{name:"Haiti",flag:"\u{1F1ED}\u{1F1F9}",code:"HT",dial_code:"+509"},{name:"Heard Island and Mcdonald Islands",flag:"\u{1F1ED}\u{1F1F2}",code:"HM",dial_code:"+672"},{name:"Holy See (Vatican City State)",flag:"\u{1F1FB}\u{1F1E6}",code:"VA",dial_code:"+379"},{name:"Honduras",flag:"\u{1F1ED}\u{1F1F3}",code:"HN",dial_code:"+504"},{name:"Hong Kong",flag:"\u{1F1ED}\u{1F1F0}",code:"HK",dial_code:"+852"},{name:"Hungary",flag:"\u{1F1ED}\u{1F1FA}",code:"HU",dial_code:"+36"},{name:"Iceland",flag:"\u{1F1EE}\u{1F1F8}",code:"IS",dial_code:"+354"},{name:"India",flag:"\u{1F1EE}\u{1F1F3}",code:"IN",dial_code:"+91"},{name:"Indonesia",flag:"\u{1F1EE}\u{1F1E9}",code:"ID",dial_code:"+62"},{name:"Iran, Islamic Republic of Persian Gulf",flag:"\u{1F1EE}\u{1F1F7}",code:"IR",dial_code:"+98"},{name:"Iraq",flag:"\u{1F1EE}\u{1F1F6}",code:"IQ",dial_code:"+964"},{name:"Ireland",flag:"\u{1F1EE}\u{1F1EA}",code:"IE",dial_code:"+353"},{name:"Isle of Man",flag:"\u{1F1EE}\u{1F1F2}",code:"IM",dial_code:"+44"},{name:"Israel",flag:"\u{1F1EE}\u{1F1F1}",code:"IL",dial_code:"+972"},{name:"Italy",flag:"\u{1F1EE}\u{1F1F9}",code:"IT",dial_code:"+39"},{name:"Jamaica",flag:"\u{1F1EF}\u{1F1F2}",code:"JM",dial_code:"+1876"},{name:"Japan",flag:"\u{1F1EF}\u{1F1F5}",code:"JP",dial_code:"+81"},{name:"Jersey",flag:"\u{1F1EF}\u{1F1EA}",code:"JE",dial_code:"+44"},{name:"Jordan",flag:"\u{1F1EF}\u{1F1F4}",code:"JO",dial_code:"+962"},{name:"Kazakhstan",flag:"\u{1F1F0}\u{1F1FF}",code:"KZ",dial_code:"+7"},{name:"Kenya",flag:"\u{1F1F0}\u{1F1EA}",code:"KE",dial_code:"+254"},{name:"Kiribati",flag:"\u{1F1F0}\u{1F1EE}",code:"KI",dial_code:"+686"},{name:"Korea, Democratic People's Republic of Korea",flag:"\u{1F1F0}\u{1F1F5}",code:"KP",dial_code:"+850"},{name:"Korea, Republic of South Korea",flag:"\u{1F1F0}\u{1F1F7}",code:"KR",dial_code:"+82"},{name:"Kosovo",flag:"\u{1F1FD}\u{1F1F0}",code:"XK",dial_code:"+383"},{name:"Kuwait",flag:"\u{1F1F0}\u{1F1FC}",code:"KW",dial_code:"+965"},{name:"Kyrgyzstan",flag:"\u{1F1F0}\u{1F1EC}",code:"KG",dial_code:"+996"},{name:"Laos",flag:"\u{1F1F1}\u{1F1E6}",code:"LA",dial_code:"+856"},{name:"Latvia",flag:"\u{1F1F1}\u{1F1FB}",code:"LV",dial_code:"+371"},{name:"Lebanon",flag:"\u{1F1F1}\u{1F1E7}",code:"LB",dial_code:"+961"},{name:"Lesotho",flag:"\u{1F1F1}\u{1F1F8}",code:"LS",dial_code:"+266"},{name:"Liberia",flag:"\u{1F1F1}\u{1F1F7}",code:"LR",dial_code:"+231"},{name:"Libyan Arab Jamahiriya",flag:"\u{1F1F1}\u{1F1FE}",code:"LY",dial_code:"+218"},{name:"Liechtenstein",flag:"\u{1F1F1}\u{1F1EE}",code:"LI",dial_code:"+423"},{name:"Lithuania",flag:"\u{1F1F1}\u{1F1F9}",code:"LT",dial_code:"+370"},{name:"Luxembourg",flag:"\u{1F1F1}\u{1F1FA}",code:"LU",dial_code:"+352"},{name:"Macao",flag:"\u{1F1F2}\u{1F1F4}",code:"MO",dial_code:"+853"},{name:"Macedonia",flag:"\u{1F1F2}\u{1F1F0}",code:"MK",dial_code:"+389"},{name:"Madagascar",flag:"\u{1F1F2}\u{1F1EC}",code:"MG",dial_code:"+261"},{name:"Malawi",flag:"\u{1F1F2}\u{1F1FC}",code:"MW",dial_code:"+265"},{name:"Malaysia",flag:"\u{1F1F2}\u{1F1FE}",code:"MY",dial_code:"+60"},{name:"Maldives",flag:"\u{1F1F2}\u{1F1FB}",code:"MV",dial_code:"+960"},{name:"Mali",flag:"\u{1F1F2}\u{1F1F1}",code:"ML",dial_code:"+223"},{name:"Malta",flag:"\u{1F1F2}\u{1F1F9}",code:"MT",dial_code:"+356"},{name:"Marshall Islands",flag:"\u{1F1F2}\u{1F1ED}",code:"MH",dial_code:"+692"},{name:"Martinique",flag:"\u{1F1F2}\u{1F1F6}",code:"MQ",dial_code:"+596"},{name:"Mauritania",flag:"\u{1F1F2}\u{1F1F7}",code:"MR",dial_code:"+222"},{name:"Mauritius",flag:"\u{1F1F2}\u{1F1FA}",code:"MU",dial_code:"+230"},{name:"Mayotte",flag:"\u{1F1FE}\u{1F1F9}",code:"YT",dial_code:"+262"},{name:"Mexico",flag:"\u{1F1F2}\u{1F1FD}",code:"MX",dial_code:"+52"},{name:"Micronesia, Federated States of Micronesia",flag:"\u{1F1EB}\u{1F1F2}",code:"FM",dial_code:"+691"},{name:"Moldova",flag:"\u{1F1F2}\u{1F1E9}",code:"MD",dial_code:"+373"},{name:"Monaco",flag:"\u{1F1F2}\u{1F1E8}",code:"MC",dial_code:"+377"},{name:"Mongolia",flag:"\u{1F1F2}\u{1F1F3}",code:"MN",dial_code:"+976"},{name:"Montenegro",flag:"\u{1F1F2}\u{1F1EA}",code:"ME",dial_code:"+382"},{name:"Montserrat",flag:"\u{1F1F2}\u{1F1F8}",code:"MS",dial_code:"+1664"},{name:"Morocco",flag:"\u{1F1F2}\u{1F1E6}",code:"MA",dial_code:"+212"},{name:"Mozambique",flag:"\u{1F1F2}\u{1F1FF}",code:"MZ",dial_code:"+258"},{name:"Myanmar",flag:"\u{1F1F2}\u{1F1F2}",code:"MM",dial_code:"+95"},{name:"Namibia",flag:"\u{1F1F3}\u{1F1E6}",code:"NA",dial_code:"+264"},{name:"Nauru",flag:"\u{1F1F3}\u{1F1F7}",code:"NR",dial_code:"+674"},{name:"Nepal",flag:"\u{1F1F3}\u{1F1F5}",code:"NP",dial_code:"+977"},{name:"Netherlands",flag:"\u{1F1F3}\u{1F1F1}",code:"NL",dial_code:"+31"},{name:"Netherlands Antilles",flag:"",code:"AN",dial_code:"+599"},{name:"New Caledonia",flag:"\u{1F1F3}\u{1F1E8}",code:"NC",dial_code:"+687"},{name:"New Zealand",flag:"\u{1F1F3}\u{1F1FF}",code:"NZ",dial_code:"+64"},{name:"Nicaragua",flag:"\u{1F1F3}\u{1F1EE}",code:"NI",dial_code:"+505"},{name:"Niger",flag:"\u{1F1F3}\u{1F1EA}",code:"NE",dial_code:"+227"},{name:"Nigeria",flag:"\u{1F1F3}\u{1F1EC}",code:"NG",dial_code:"+234"},{name:"Niue",flag:"\u{1F1F3}\u{1F1FA}",code:"NU",dial_code:"+683"},{name:"Norfolk Island",flag:"\u{1F1F3}\u{1F1EB}",code:"NF",dial_code:"+672"},{name:"Northern Mariana Islands",flag:"\u{1F1F2}\u{1F1F5}",code:"MP",dial_code:"+1670"},{name:"Norway",flag:"\u{1F1F3}\u{1F1F4}",code:"NO",dial_code:"+47"},{name:"Oman",flag:"\u{1F1F4}\u{1F1F2}",code:"OM",dial_code:"+968"},{name:"Pakistan",flag:"\u{1F1F5}\u{1F1F0}",code:"PK",dial_code:"+92"},{name:"Palau",flag:"\u{1F1F5}\u{1F1FC}",code:"PW",dial_code:"+680"},{name:"Palestinian Territory, Occupied",flag:"\u{1F1F5}\u{1F1F8}",code:"PS",dial_code:"+970"},{name:"Panama",flag:"\u{1F1F5}\u{1F1E6}",code:"PA",dial_code:"+507"},{name:"Papua New Guinea",flag:"\u{1F1F5}\u{1F1EC}",code:"PG",dial_code:"+675"},{name:"Paraguay",flag:"\u{1F1F5}\u{1F1FE}",code:"PY",dial_code:"+595"},{name:"Peru",flag:"\u{1F1F5}\u{1F1EA}",code:"PE",dial_code:"+51"},{name:"Philippines",flag:"\u{1F1F5}\u{1F1ED}",code:"PH",dial_code:"+63"},{name:"Pitcairn",flag:"\u{1F1F5}\u{1F1F3}",code:"PN",dial_code:"+64"},{name:"Poland",flag:"\u{1F1F5}\u{1F1F1}",code:"PL",dial_code:"+48"},{name:"Portugal",flag:"\u{1F1F5}\u{1F1F9}",code:"PT",dial_code:"+351"},{name:"Puerto Rico",flag:"\u{1F1F5}\u{1F1F7}",code:"PR",dial_code:"+1939"},{name:"Qatar",flag:"\u{1F1F6}\u{1F1E6}",code:"QA",dial_code:"+974"},{name:"Romania",flag:"\u{1F1F7}\u{1F1F4}",code:"RO",dial_code:"+40"},{name:"Russia",flag:"\u{1F1F7}\u{1F1FA}",code:"RU",dial_code:"+7"},{name:"Rwanda",flag:"\u{1F1F7}\u{1F1FC}",code:"RW",dial_code:"+250"},{name:"Reunion",flag:"\u{1F1F7}\u{1F1EA}",code:"RE",dial_code:"+262"},{name:"Saint Barthelemy",flag:"\u{1F1E7}\u{1F1F1}",code:"BL",dial_code:"+590"},{name:"Saint Helena, Ascension and Tristan Da Cunha",flag:"\u{1F1F8}\u{1F1ED}",code:"SH",dial_code:"+290"},{name:"Saint Kitts and Nevis",flag:"\u{1F1F0}\u{1F1F3}",code:"KN",dial_code:"+1869"},{name:"Saint Lucia",flag:"\u{1F1F1}\u{1F1E8}",code:"LC",dial_code:"+1758"},{name:"Saint Martin",flag:"\u{1F1F2}\u{1F1EB}",code:"MF",dial_code:"+590"},{name:"Saint Pierre and Miquelon",flag:"\u{1F1F5}\u{1F1F2}",code:"PM",dial_code:"+508"},{name:"Saint Vincent and the Grenadines",flag:"\u{1F1FB}\u{1F1E8}",code:"VC",dial_code:"+1784"},{name:"Samoa",flag:"\u{1F1FC}\u{1F1F8}",code:"WS",dial_code:"+685"},{name:"San Marino",flag:"\u{1F1F8}\u{1F1F2}",code:"SM",dial_code:"+378"},{name:"Sao Tome and Principe",flag:"\u{1F1F8}\u{1F1F9}",code:"ST",dial_code:"+239"},{name:"Saudi Arabia",flag:"\u{1F1F8}\u{1F1E6}",code:"SA",dial_code:"+966"},{name:"Senegal",flag:"\u{1F1F8}\u{1F1F3}",code:"SN",dial_code:"+221"},{name:"Serbia",flag:"\u{1F1F7}\u{1F1F8}",code:"RS",dial_code:"+381"},{name:"Seychelles",flag:"\u{1F1F8}\u{1F1E8}",code:"SC",dial_code:"+248"},{name:"Sierra Leone",flag:"\u{1F1F8}\u{1F1F1}",code:"SL",dial_code:"+232"},{name:"Singapore",flag:"\u{1F1F8}\u{1F1EC}",code:"SG",dial_code:"+65"},{name:"Slovakia",flag:"\u{1F1F8}\u{1F1F0}",code:"SK",dial_code:"+421"},{name:"Slovenia",flag:"\u{1F1F8}\u{1F1EE}",code:"SI",dial_code:"+386"},{name:"Solomon Islands",flag:"\u{1F1F8}\u{1F1E7}",code:"SB",dial_code:"+677"},{name:"Somalia",flag:"\u{1F1F8}\u{1F1F4}",code:"SO",dial_code:"+252"},{name:"South Africa",flag:"\u{1F1FF}\u{1F1E6}",code:"ZA",dial_code:"+27"},{name:"South Sudan",flag:"\u{1F1F8}\u{1F1F8}",code:"SS",dial_code:"+211"},{name:"South Georgia and the South Sandwich Islands",flag:"\u{1F1EC}\u{1F1F8}",code:"GS",dial_code:"+500"},{name:"Spain",flag:"\u{1F1EA}\u{1F1F8}",code:"ES",dial_code:"+34"},{name:"Sri Lanka",flag:"\u{1F1F1}\u{1F1F0}",code:"LK",dial_code:"+94"},{name:"Sudan",flag:"\u{1F1F8}\u{1F1E9}",code:"SD",dial_code:"+249"},{name:"Suriname",flag:"\u{1F1F8}\u{1F1F7}",code:"SR",dial_code:"+597"},{name:"Svalbard and Jan Mayen",flag:"\u{1F1F8}\u{1F1EF}",code:"SJ",dial_code:"+47"},{name:"Swaziland",flag:"\u{1F1F8}\u{1F1FF}",code:"SZ",dial_code:"+268"},{name:"Sweden",flag:"\u{1F1F8}\u{1F1EA}",code:"SE",dial_code:"+46"},{name:"Switzerland",flag:"\u{1F1E8}\u{1F1ED}",code:"CH",dial_code:"+41"},{name:"Syrian Arab Republic",flag:"\u{1F1F8}\u{1F1FE}",code:"SY",dial_code:"+963"},{name:"Taiwan",flag:"\u{1F1F9}\u{1F1FC}",code:"TW",dial_code:"+886"},{name:"Tajikistan",flag:"\u{1F1F9}\u{1F1EF}",code:"TJ",dial_code:"+992"},{name:"Tanzania, United Republic of Tanzania",flag:"\u{1F1F9}\u{1F1FF}",code:"TZ",dial_code:"+255"},{name:"Thailand",flag:"\u{1F1F9}\u{1F1ED}",code:"TH",dial_code:"+66"},{name:"Timor-Leste",flag:"\u{1F1F9}\u{1F1F1}",code:"TL",dial_code:"+670"},{name:"Togo",flag:"\u{1F1F9}\u{1F1EC}",code:"TG",dial_code:"+228"},{name:"Tokelau",flag:"\u{1F1F9}\u{1F1F0}",code:"TK",dial_code:"+690"},{name:"Tonga",flag:"\u{1F1F9}\u{1F1F4}",code:"TO",dial_code:"+676"},{name:"Trinidad and Tobago",flag:"\u{1F1F9}\u{1F1F9}",code:"TT",dial_code:"+1868"},{name:"Tunisia",flag:"\u{1F1F9}\u{1F1F3}",code:"TN",dial_code:"+216"},{name:"Turkey",flag:"\u{1F1F9}\u{1F1F7}",code:"TR",dial_code:"+90"},{name:"Turkmenistan",flag:"\u{1F1F9}\u{1F1F2}",code:"TM",dial_code:"+993"},{name:"Turks and Caicos Islands",flag:"\u{1F1F9}\u{1F1E8}",code:"TC",dial_code:"+1649"},{name:"Tuvalu",flag:"\u{1F1F9}\u{1F1FB}",code:"TV",dial_code:"+688"},{name:"Uganda",flag:"\u{1F1FA}\u{1F1EC}",code:"UG",dial_code:"+256"},{name:"Ukraine",flag:"\u{1F1FA}\u{1F1E6}",code:"UA",dial_code:"+380"},{name:"United Arab Emirates",flag:"\u{1F1E6}\u{1F1EA}",code:"AE",dial_code:"+971"},{name:"United Kingdom",flag:"\u{1F1EC}\u{1F1E7}",code:"GB",dial_code:"+44"},{name:"United States",flag:"\u{1F1FA}\u{1F1F8}",code:"US",dial_code:"+1"},{name:"Uruguay",flag:"\u{1F1FA}\u{1F1FE}",code:"UY",dial_code:"+598"},{name:"Uzbekistan",flag:"\u{1F1FA}\u{1F1FF}",code:"UZ",dial_code:"+998"},{name:"Vanuatu",flag:"\u{1F1FB}\u{1F1FA}",code:"VU",dial_code:"+678"},{name:"Venezuela, Bolivarian Republic of Venezuela",flag:"\u{1F1FB}\u{1F1EA}",code:"VE",dial_code:"+58"},{name:"Vietnam",flag:"\u{1F1FB}\u{1F1F3}",code:"VN",dial_code:"+84"},{name:"Virgin Islands, British",flag:"\u{1F1FB}\u{1F1EC}",code:"VG",dial_code:"+1284"},{name:"Virgin Islands, U.S.",flag:"\u{1F1FB}\u{1F1EE}",code:"VI",dial_code:"+1340"},{name:"Wallis and Futuna",flag:"\u{1F1FC}\u{1F1EB}",code:"WF",dial_code:"+681"},{name:"Yemen",flag:"\u{1F1FE}\u{1F1EA}",code:"YE",dial_code:"+967"},{name:"Zambia",flag:"\u{1F1FF}\u{1F1F2}",code:"ZM",dial_code:"+260"},{name:"Zimbabwe",flag:"\u{1F1FF}\u{1F1FC}",code:"ZW",dial_code:"+263"}];var cP=w('<div class="agent-input-form flex w-full gap-2 items-end max-w-[350px]"><div class="flex agent-input w-full"><div class="relative agent-country-select flex justify-center items-center"><div class="pl-2 pr-1 flex items-center gap-2"><span></span></div><select class="absolute top-0 left-0 w-full h-full cursor-pointer opacity-0">'),uP=w("<option> "),o0=e=>{let[t,n]=M(He(e.defaultCountryCode)?"INT":e.defaultCountryCode),[r,o]=M(e.defaultValue??""),a,i=d=>{o(d),(d===""||d==="+")&&t()!=="INT"&&n("INT");let p=d?.startsWith("+")&&d.length>2&&Gr.reduce((h,g)=>!g?.dial_code||h!==null&&!h.dial_code?h:d?.startsWith(g.dial_code)&&g.dial_code.length>(h?.dial_code.length??0)?g:h,null);p&&n(p.code)},s=()=>a?.value!==""&&a?.reportValidity(),c=()=>{let d=Gr.find(p=>p.code===t())?.dial_code;if(s()){let p=a?.value??r();e.onSubmit({type:"text",value:p.startsWith("+")?p:`${d??""}${p}`})}else a?.focus()},l=d=>{d.key==="Enter"&&c()},u=d=>{let p=Gr.find(g=>g.code===d.currentTarget.value);if(!p)return;let h=Gr.find(g=>g.code===t());(r()===""||h&&r()===h.dial_code)&&o(p.dial_code),n(p.code),a?.focus()};ae(()=>{!Y()&&a&&a.focus({preventScroll:!0}),window.addEventListener("message",f)}),ue(()=>{window.removeEventListener("message",f)});let f=d=>{let{data:p}=d;p.isFromAgent&&p.command==="setInputValue"&&o(p.value)};return(()=>{var d=cP(),p=d.firstChild,h=p.firstChild,g=h.firstChild,x=g.firstChild,b=g.nextSibling;return d.$$keydown=l,v(x,()=>Gr.find(E=>t()===E.code)?.flag),v(g,m(n0,{class:"w-3"}),null),b.addEventListener("change",u),v(b,m(ye,{each:Gr,children:E=>(()=>{var S=uP(),k=S.firstChild;return v(S,()=>E.name,k),v(S,()=>E.dial_code?`(${E.dial_code})`:"",null),_(()=>S.selected=E.code===t()),_(()=>S.value=E.code),S})()})),v(p,m(ur,{type:"tel",ref(E){var S=a;typeof S=="function"?S(E):a=E},get value(){return r()},onInput:i,get placeholder(){return e.labels?.placeholder??r0.labels.placeholder},get autofocus(){return!Y()}}),null),v(d,m(je,{type:"button",class:"h-[56px]","on:click":c,get children(){return e.labels?.button}}),null),d})()};$e(["keydown"]);var vu={buttonLabel:it,searchInputPlaceholder:"Filter the options...",isMultipleChoice:!1,isSearchable:!1,dynamicItems:{isEnabled:!1}};var dP=w('<div class="flex items-end agent-input w-full">'),fP=w('<form class="flex flex-col gap-2 w-full items-end"><div>'),a0=w("<span class=font-semibold>"),i0=w('<span class="text-sm whitespace-pre-wrap text-left">'),s0=w('<div class="flex flex-col gap-1 ">'),pP=w("<div role=checkbox><img fetchpriority=high class=m-auto><div>"),mP=w('<div role=checkbox aria-checked class="flex flex-col focus:outline-none cursor-pointer select-none agent-selectable-picture selected"><img fetchpriority=high><div>'),l0=e=>{let t,[n,r]=M(e.defaultItems),[o,a]=M([]),[i,s]=M(0);ae(()=>{!Y()&&t&&t.focus({preventScroll:!0})});let c=p=>{l(p)},l=p=>{let h=o().indexOf(p);a(h!==-1?g=>g.filter(x=>x!==p):g=>[...g,p])},u=()=>e.onSubmit({type:"text",value:o().map(p=>{let h=e.defaultItems.find(g=>g.id===p);return Ee(h?.title)?h.title:h?.pictureSrc}).join(", ")}),f=p=>{r(e.defaultItems.filter(h=>h.title?.toLowerCase().includes((p??"").toLowerCase())||h.description?.toLowerCase().includes((p??"").toLowerCase())))};be(()=>{i()===e.defaultItems.filter(p=>te(p.pictureSrc)).length&&e.onTransitionEnd()});let d=()=>{s(p=>p+1)};return(()=>{var p=fP(),h=p.firstChild;return p.addEventListener("submit",u),v(p,m(B,{get when(){return e.options?.isSearchable},get children(){var g=dP();return v(g,m(cr,{ref(x){var b=t;typeof b=="function"?b(x):t=x},onInput:f,get placeholder(){return e.options?.searchInputPlaceholder??vu.searchInputPlaceholder},onClear:()=>r(e.defaultItems)})),g}}),h),v(h,m(ye,{get each(){return n()},children:(g,x)=>(()=>{var b=pP(),E=b.firstChild,S=E.nextSibling;return Ve(b,"click",()=>c(g.id)),E.addEventListener("load",d),v(S,m($o,{get isChecked(){return o().some(k=>k===g.id)},get class(){return"flex-shrink-0"+(g.title||g.description?" mt-1":void 0)}}),null),v(S,m(B,{get when(){return g.title||g.description},get children(){var k=s0();return v(k,m(B,{get when(){return g.title},get children(){var I=a0();return v(I,()=>g.title),I}}),null),v(k,m(B,{get when(){return g.description},get children(){var I=i0();return v(I,()=>g.description),I}}),null),k}}),null),_(k=>{var I=o().some(P=>P===g.id),G="flex flex-col focus:outline-none cursor-pointer select-none agent-selectable-picture"+(o().some(P=>P===g.id)?" selected":"")+(Zt(g.pictureSrc)?" has-svg":""),D=g.id,ie=g.pictureSrc,V=g.title??`Picture ${x()+1}`,W=`Picture choice ${x()+1}`,L="flex gap-3 py-2 flex-shrink-0"+(He(g.title)&&He(g.description)?" justify-center":" px-3");return I!==k.e&&H(b,"aria-checked",k.e=I),G!==k.t&&U(b,k.t=G),D!==k.a&&H(b,"data-itemid",k.a=D),ie!==k.o&&H(E,"src",k.o=ie),V!==k.i&&H(E,"alt",k.i=V),W!==k.n&&H(E,"elementtiming",k.n=W),L!==k.s&&U(S,k.s=L),k},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),b})()}),null),v(h,m(ye,{get each(){return o().filter(g=>n().every(x=>x.id!==g)).map(g=>e.defaultItems.find(x=>x.id===g)).filter(te)},children:(g,x)=>(()=>{var b=mP(),E=b.firstChild,S=E.nextSibling;return Ve(b,"click",()=>c(g.id)),v(S,m($o,{get isChecked(){return o().some(k=>k===g.id)},get class(){return"flex-shrink-0"+(g.title||g.description?" mt-1":void 0)}}),null),v(S,m(B,{get when(){return g.title||g.description},get children(){var k=s0();return v(k,m(B,{get when(){return g.title},get children(){var I=a0();return v(I,()=>g.title),I}}),null),v(k,m(B,{get when(){return g.description},get children(){var I=i0();return v(I,()=>g.description),I}}),null),k}}),null),_(k=>{var I=g.id,G=e.defaultItems.find(W=>W.id===g.id)?.pictureSrc,D=g.title??`Selected picture ${x()+1}`,ie=`Selected picture choice ${x()+1}`,V="flex gap-3 py-2 flex-shrink-0"+(He(g.title)&&He(g.description)?" justify-center":" pl-4");return I!==k.e&&H(b,"data-itemid",k.e=I),G!==k.t&&H(E,"src",k.t=G),D!==k.a&&H(E,"alt",k.a=D),ie!==k.o&&H(E,"elementtiming",k.o=ie),V!==k.i&&U(S,k.i=V),k},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),b})()}),null),v(p,(()=>{var g=F(()=>o().length>0);return()=>g()&&m(je,{disableIcon:!0,get children(){return e.options?.buttonLabel??vu.buttonLabel}})})(),null),_(()=>U(h,"flex flex-wrap justify-end gap-2"+(e.options?.isSearchable?" overflow-y-scroll max-h-[464px] rounded-md":""))),p})()};var gP=w('<div class="flex items-end agent-input w-full">'),hP=w('<div class="flex flex-col gap-2 w-full"><div>'),bP=w('<button><img fetchpriority=high class=m-auto><div><span class=font-semibold></span><span class="text-sm whitespace-pre-wrap text-left">'),c0=e=>{let t,[n,r]=M(e.defaultItems),[o,a]=M(0);ae(()=>{!Y()&&t&&t.focus({preventScroll:!0})});let i=l=>{let u=n()[l];if(u)return e.onSubmit({type:"text",label:Ee(u.title)?u.title:u.pictureSrc??u.id,value:u.id})},s=l=>{r(e.defaultItems.filter(u=>u.title?.toLowerCase().includes((l??"").toLowerCase())||u.description?.toLowerCase().includes((l??"").toLowerCase())))};be(()=>{o()===e.defaultItems.filter(l=>te(l.pictureSrc)).length&&e.onTransitionEnd()});let c=()=>{a(l=>l+1)};return(()=>{var l=hP(),u=l.firstChild;return v(l,m(B,{get when(){return e.options?.isSearchable},get children(){var f=gP();return v(f,m(cr,{ref(d){var p=t;typeof p=="function"?p(d):t=d},onInput:s,get placeholder(){return e.options?.searchInputPlaceholder??""},onClear:()=>r(e.defaultItems)})),f}}),u),v(u,m(ye,{get each(){return n()},children:(f,d)=>(()=>{var p=bP(),h=p.firstChild,g=h.nextSibling,x=g.firstChild,b=x.nextSibling;return Ve(p,"click",()=>i(d())),h.addEventListener("load",c),v(x,()=>f.title),v(b,()=>f.description),_(E=>{var S=f.id,k="flex flex-col agent-picture-button focus:outline-none filter hover:brightness-90 active:brightness-75 justify-between "+(Zt(f.pictureSrc)?"has-svg":""),I=f.pictureSrc,G=f.title??`Picture ${d()+1}`,D=`Picture choice ${d()+1}`,ie="flex flex-col gap-1 py-2 flex-shrink-0 px-4 w-full"+(f.description?" items-start":"");return S!==E.e&&H(p,"data-itemid",E.e=S),k!==E.t&&U(p,E.t=k),I!==E.a&&H(h,"src",E.a=I),G!==E.o&&H(h,"alt",E.o=G),D!==E.i&&H(h,"elementtiming",E.i=D),ie!==E.n&&U(g,E.n=ie),E},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),p})()})),_(()=>U(u,"gap-2 flex flex-wrap justify-end"+(e.options?.isSearchable?" overflow-y-scroll max-h-[464px] rounded-md":""))),l})()};var $n={buttonType:"Numbers",length:10,labels:{button:it},startsAt:0,customIcon:{isEnabled:!1},isOneClickSubmitEnabled:!1};var yP=w('<form class="flex flex-col gap-2"><div class="flex flex-wrap justify-center gap-2"></div><div class="flex justify-end">'),vP=w('<span class="text-sm w-full rating-label">'),xP=w('<span class="text-sm w-full text-right pr-2 rating-label">'),SP=w("<div role=checkbox>"),wP=w("<div>"),u0=e=>{let[t,n]=M(e.defaultValue?Number(e.defaultValue):void 0),r=a=>{a.preventDefault();let i=t();Je(i)||e.onSubmit({type:"text",value:i.toString()})},o=a=>{e.block.options?.isOneClickSubmitEnabled&&e.onSubmit({type:"text",value:a.toString()}),n(a)};return(()=>{var a=yP(),i=a.firstChild,s=i.nextSibling;return a.addEventListener("submit",r),v(a,(()=>{var c=F(()=>!!e.block.options?.labels?.left);return()=>c()&&(()=>{var l=vP();return v(l,()=>e.block.options.labels.left),l})()})(),i),v(i,m(ye,{get each(){return Array.from(Array((e.block.options?.length??$n.length)+((e.block.options?.buttonType??$n.buttonType)==="Numbers"?-((e.block.options?.startsAt??$n.startsAt)-1):0)))},children:(c,l)=>m(TP,Te(()=>e.block.options,{get rating(){return t()},get idx(){return l()+((e.block.options?.buttonType??$n.buttonType)==="Numbers"?e.block.options?.startsAt??$n.startsAt:1)},onClick:o}))})),v(a,(()=>{var c=F(()=>!!e.block.options?.labels?.right);return()=>c()&&(()=>{var l=xP();return v(l,()=>e.block.options.labels.right),l})()})(),s),v(s,(()=>{var c=F(()=>!!te(t()));return()=>c()&&m(je,{disableIcon:!0,get children(){return e.block.options?.labels?.button??$n.labels.button}})})()),a})()},TP=e=>{let t=n=>{n.preventDefault(),e.onClick(e.idx)};return m(Ie,{get children(){return[m(Z,{get when(){return(e.buttonType??$n.buttonType)==="Numbers"},get children(){return[m(B,{get when(){return e.isOneClickSubmitEnabled},get children(){return m(nn,{"on:click":t,get children(){return e.idx}})}}),m(B,{get when(){return!e.isOneClickSubmitEnabled},get children(){var n=SP();return Ve(n,"click",t),v(n,()=>e.idx),_(r=>{var o=te(e.rating)&&e.idx<=e.rating,a="py-2 px-4 font-semibold focus:outline-none cursor-pointer select-none agent-selectable"+(te(e.rating)&&e.idx<=e.rating?" selected":"");return o!==r.e&&H(n,"aria-checked",r.e=o),a!==r.t&&U(n,r.t=a),r},{e:void 0,t:void 0}),n}})]}}),m(Z,{get when(){return(e.buttonType??$n.buttonType)!=="Numbers"},get children(){var n=wP();return Ve(n,"click",()=>e.onClick(e.idx)),_(r=>{var o="flex justify-center items-center rating-icon-container cursor-pointer "+(te(e.rating)&&e.idx<=e.rating?"selected":""),a=e.customIcon?.isEnabled&&!He(e.customIcon.svg)?e.customIcon.svg:CP;return o!==r.e&&U(n,r.e=o),a!==r.t&&(n.innerHTML=r.t=a),r},{e:void 0,t:void 0}),n}})]}})},CP='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>';var EP=w('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48">'),xu=e=>(()=>{var t=EP();return Ce(t,e,!0,!0),t})();var kP=w('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2px stroke-linecap=round stroke-linejoin=round><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path><circle cx=10 cy=12 r=2></circle><path d="m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22">'),d0=e=>(()=>{var t=kP();return Ce(t,e,!0,!0),t})();var AP=w("<input type=file id=document-upload multiple class=hidden>"),PP=w('<input type=file id=photos-upload accept="image/*, video/*"multiple class=hidden>'),IP=w('<label aria-label="Add attachments"for=document-upload>'),_P=w("<label> Document"),MP=w("<label> Photos & videos"),f0=e=>[(()=>{var t=AP();return t.addEventListener("change",n=>{n.currentTarget.files&&e.onNewFiles(n.currentTarget.files)}),t})(),(()=>{var t=PP();return t.addEventListener("change",n=>{n.currentTarget.files&&e.onNewFiles(n.currentTarget.files)}),t})(),m(Ie,{get children(){return[m(Z,{get when(){return Y()},get children(){var t=IP();return v(t,m(xu,{class:"w-5"})),_(()=>U(t,he("filter data-[state=open]:backdrop-brightness-90 hover:backdrop-brightness-95 transition rounded-md p-2 focus:outline-none",e.class))),t}}),m(Z,{when:!0,get children(){return m(Bn.Root,{get children(){return[m(Bn.Trigger,{get class(){return he("filter data-[state=open]:backdrop-brightness-90 hover:backdrop-brightness-95 transition rounded-md p-2 focus:outline-none",e.class)},"aria-label":"Add attachments",get children(){return m(xu,{class:"w-5"})}}),m(Bn.Positioner,{get children(){return m(Bn.Content,{class:"p-3 gap-2 focus:outline-none",get children(){return[m(Bn.Item,{value:"document",asChild:t=>(()=>{var n=_P(),r=n.firstChild;return Ce(n,Te(t,{for:"document-upload",class:"p-2 filter hover:brightness-95 flex gap-3 items-center"}),!1,!0),v(n,m(Ks,{class:"w-4"}),r),n})()}),m(Bn.Item,{value:"photos",asChild:t=>(()=>{var n=MP(),r=n.firstChild;return Ce(n,Te(t,{for:"photos-upload",class:"p-2 filter hover:brightness-95 flex gap-3 items-center"}),!1,!0),v(n,m(d0,{class:"w-4"}),r),n})()})]}})}})]}})}})]}})];var RP=w('<svg viewBox="0 0 384 512"stroke=currentColor fill=currentColor><path d="M192 0C139 0 96 43 96 96l0 160c0 53 43 96 96 96s96-43 96-96l0-160c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c85.8-11.7 152-85.3 152-174.4l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40z">'),p0=e=>(()=>{var t=RP();return Ce(t,e,!0,!0),t})();var NP=w('<textarea class="focus:outline-none bg-transparent px-4 py-4 flex-1 w-full text-input"rows=6 data-testid=textarea required>'),m0=e=>{let[t,n]=Ke(e,["ref","onInput"]);return(()=>{var r=NP();r.$$input=a=>t.onInput(a.currentTarget.value);var o=t.ref;return typeof o=="function"?pe(o,r):t.ref=r,Ce(r,Te({get autofocus(){return!Y()}},n),!1,!1),r})()};$e(["input"]);var Q0=br(q0(),1);var pl={isLong:!1,labels:{button:it,placeholder:"Type your answer..."},audioClip:{isEnabled:!1,visibility:"Auto"},attachments:{isEnabled:!1,visibility:"Auto"}};var J0=`
|
|
80
|
+
</strong> or drag and drop here<br>
|
|
81
|
+
(max 10MB)`,button:"Upload",clear:"Clear",skip:"Skip",success:{single:"File uploaded",multiple:"{total} files uploaded"}}};var hs=({newFile:e,existingFiles:t,params:n,onError:r})=>{let o=n.sizeLimit??Qt("NEXT_PUBLIC_AGENT_FILE_UPLOAD_MAX_SIZE");if(o&&e.size>o*1024*1024){r({title:"File too large",description:`${e.name} is larger than ${o}MB`});return}if(t.length===0)return e;let i=e.name,a=1;for(;t.some(s=>s.name===i);){let s=e.name.lastIndexOf("."),c=s!==-1?e.name.slice(s):"";i=`${e.name.slice(0,s)}(${a})${c}`,a++}return new File([e],i,{type:e.type})};var To=async({apiHost:e,files:t,onUploadProgress:n})=>{let r=[],o=0;for(let{input:i,file:a}of t){n&&n({progress:o/t.length*100,fileIndex:o}),o+=1;let{data:s}=await Of({method:"POST",url:`${e}/api/v3/generate-upload-url`,body:{fileName:i.fileName,sessionId:i.sessionId,fileType:a.type,blockId:i.blockId}});if(s?.presignedUrl){console.log("iniciando puuuttt",a),console.log(s.presignedUrl);let c=new FormData;if(Object.entries(s.formData).forEach(([u,f])=>{c.append(u,f)}),c.append("file",a),!(await fetch(s.presignedUrl,{method:"PUT",body:a,headers:{"Content-Type":a.type}})).ok)continue;r.push({url:s.fileUrl,type:a.type})}else continue}return r};var Kk=S('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2px stroke-linecap=round stroke-linejoin=round><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4">'),bs=e=>(()=>{var t=Kk();return Te(t,e,!0,!0),t})();var Yk=S('<div class="flex items-center gap-4 border bg-white border-gray-200 rounded-md p-2 text-gray-900 min-w-[250px]"><div></div><div class="flex flex-col"><span class="text-md font-semibold text-sm"></span><span class="text-gray-500 text-xs">'),ys=e=>{let t=Zk(e.file);return(()=>{var n=Yk(),r=n.firstChild,o=r.nextSibling,i=o.firstChild,a=i.nextSibling;return x(r,m(bs,{class:"w-6 h-6"})),x(i,()=>e.file.name),x(a,()=>Xk(e.file)),A(()=>$(r,pe("rounded-md text-white p-2 flex items-center",t==="pink"&&"bg-pink-400",t==="blue"&&"bg-blue-400",t==="green"&&"bg-green-400",t==="gray"&&"bg-gray-400",t==="orange"&&"bg-orange-400"))),n})()},Xk=e=>{switch(e.name.split(".").pop()){case"pdf":return"PDF";case"doc":case"docx":return"Word";case"xls":case"xlsx":case"csv":return"Sheet";case"json":return"JSON";case"md":return"Markdown";default:return"DOCUMENT"}},Zk=e=>{let t=e.name.split(".").pop();if(!t)return"gray";switch(t){case"pdf":return"pink";case"doc":case"docx":return"blue";case"xls":case"xlsx":case"csv":return"green";case"json":return"orange";default:return"gray"}};var Jk=S('<img class="rounded-md object-cover w-[58px] h-[58px]">'),Qk=S('<div class="relative group flex-shrink-0"><button class="absolute -right-2 p-0.5 -top-2 rounded-full bg-gray-200 text-black border border-gray-400 opacity-1 sm:opacity-0 group-hover:opacity-100 transition-opacity"aria-label="Remove attachment">'),eE=S('<div class="absolute w-full h-full inset-0 bg-black/20 rounded-md">'),xs=e=>(()=>{var t=Qk(),n=t.firstChild;return x(t,m(Ee,{get children(){return[m(q,{get when(){return e.file.type.startsWith("image")},get children(){var r=Jk();return A(o=>{var i=URL.createObjectURL(e.file),a=e.file.name;return i!==o.e&&j(r,"src",o.e=i),a!==o.t&&j(r,"alt",o.t=a),o},{e:void 0,t:void 0}),r}}),m(q,{when:!0,get children(){return m(ys,{get file(){return e.file}})}})]}}),n),Fe(n,"click",e.onRemoveClick),x(n,m(fn,{class:"w-4"})),x(t,m(N,{get when(){return re(e.uploadProgressPercent)&&e.uploadProgressPercent!==100},get children(){return m(tE,{get progressPercent(){return e.uploadProgressPercent}})}}),null),t})(),tE=e=>{let[t,n]=O(e.progressPercent??0),r;return ge(()=>{e.progressPercent===20&&(r=setInterval(()=>{t()<100&&n(i=>i+(Math.floor(Math.random()*10)+1))},1e3))}),se(()=>{clearInterval(r)}),(()=>{var o=eE();return x(o,m(br.Root,{get value(){return t()},class:"flex items-center justify-center",get children(){return m(br.Circle,{get children(){return[m(br.CircleTrack,{}),m(br.CircleRange,{})]}})}})),o})()};var nE=S('<div class="w-full bg-gray-200 rounded-full h-2.5"><div class="upload-progress-bar h-2.5 rounded-full">'),rE=S('<div class="p-4 flex gap-2 border-gray-200 border overflow-auto bg-white rounded-md w-full">'),oE=S('<div class="flex flex-col justify-center items-center gap-4 max-w-[90%]"><p class="text-sm text-center">'),iE=S("<input id=dropzone-file type=file class=hidden>"),aE=S('<div class="flex justify-end">'),sE=S('<div class="flex justify-end"><div class="flex gap-2">'),lE=S('<form class="flex flex-col relative w-full gap-2 rounded-md agent-host-bubble upload"><span class="flex h-5 w-5 absolute top-0 right-0 -mt-1 -mr-1 ping"><span class="animate-ping absolute inline-flex h-full w-full rounded-full brightness-200 opacity-75"></span><span class="relative inline-flex rounded-full h-5 w-5 brightness-150"></span></span><label for=dropzone-file>'),cE=S('<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polyline points="16 16 12 12 8 16"></polyline><line x1=12 y1=12 x2=12 y2=21></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16">'),qb=e=>{let[t,n]=O([]),[r,o]=O(!1),[i,a]=O(0),[s,c]=O(!1),l=C=>{let E=Array.from(C).map(I=>hs({existingFiles:t(),newFile:I,params:{sizeLimit:e.block.options&&"sizeLimit"in e.block.options?e.block.options.sizeLimit:void 0},onError:({description:U,title:R})=>Kn.create({title:R,description:U})})).filter(re);if(E.length!==0){if(!e.block.options?.isMultipleAllowed)return f(E[0]);n([...t(),...E])}},u=async C=>{C.preventDefault(),t().length!==0&&d(t())},f=async C=>{o(!0);let E=await To({apiHost:e.context.apiHost??bt({ignoreChatApiUrl:!0}),files:[{file:C,input:{sessionId:e.context.sessionId,blockId:e.block.id,fileName:C.name}}]});if(o(!1),E.length&&E[0])return e.onSubmit({type:"text",label:e.block.options?.labels?.success?.single??Kt.labels.success.single,value:E[0]?Wb(E[0].url):"",attachments:[{type:C.type,url:E[0].url,blobUrl:URL.createObjectURL(C)}]});Kn.create({description:"An error occured while uploading the file"})},d=async C=>{o(!0);let E=await To({apiHost:e.context.apiHost??bt({ignoreChatApiUrl:!0}),files:C.map(I=>({file:I,input:{sessionId:e.context.sessionId,blockId:e.block.id,fileName:I.name}})),onUploadProgress:a});if(o(!1),a(0),E.length!==C.length)return Kn.create({description:"An error occured while uploading the files"});e.onSubmit({type:"text",label:E.length>1?(e.block.options?.labels?.success?.multiple??Kt.labels.success.multiple).replaceAll("{total}",E.length.toString()):e.block.options?.labels?.success?.single??Kt.labels.success.single,value:E.filter(re).map(({url:I})=>Wb(I)).join(", "),attachments:E.map((I,U)=>I?{...I,blobUrl:URL.createObjectURL(t()[U])}:null).filter(re)})},p=C=>{C.preventDefault(),c(!0)},h=()=>c(!1),g=C=>{C.preventDefault(),C.stopPropagation(),C.dataTransfer?.files&&l(C.dataTransfer.files)},v=()=>n([]),y=()=>e.onSkip(e.block.options?.labels?.skip??Kt.labels.skip),T=C=>{n(E=>E.filter((I,U)=>U!==C))};return(()=>{var C=lE(),E=C.firstChild,I=E.nextSibling;return C.addEventListener("submit",u),I.addEventListener("drop",g),I.addEventListener("dragleave",h),I.addEventListener("dragover",p),x(I,m(Ee,{get children(){return[m(q,{get when(){return r()},get children(){return m(N,{get when(){return t().length>1},get fallback(){return m(gs,{})},get children(){var U=nE(),R=U.firstChild;return R.style.setProperty("transition","width 150ms cubic-bezier(0.4, 0, 0.2, 1)"),A(oe=>(oe=`${i()>0?i:10}%`)!=null?R.style.setProperty("width",oe):R.style.removeProperty("width")),U}})}}),m(q,{get when(){return!r()},get children(){return[(()=>{var U=oE(),R=U.firstChild;return x(U,m(N,{get when(){return t().length},get fallback(){return m(uE,{})},get children(){var oe=rE();return Fe(oe,"click",H=>{H.preventDefault(),H.stopPropagation()}),x(oe,m(he,{get each(){return t()},children:(H,G)=>m(xs,{file:H,onRemoveClick:()=>T(G())})})),oe}}),R),A(()=>R.innerHTML=e.block.options?.labels?.placeholder??Kt.labels.placeholder),U})(),(()=>{var U=iE();return U.addEventListener("change",R=>{R.currentTarget.files&&l(R.currentTarget.files)}),A(()=>U.multiple=e.block.options?.isMultipleAllowed??Kt.isMultipleAllowed),U})()]}})]}})),x(C,m(N,{get when(){return t().length===0&&e.block.options?.isRequired===!1},get children(){var U=aE();return x(U,m(qt,{"on:click":y,get children(){return e.block.options?.labels?.skip??Kt.labels.skip}})),U}}),null),x(C,m(N,{get when(){return B(()=>!!(e.block.options?.isMultipleAllowed&&t().length>0))()&&!r()},get children(){var U=sE(),R=U.firstChild;return x(R,m(N,{get when(){return t().length},get children(){return m(qt,{variant:"secondary","on:click":v,get children(){return e.block.options?.labels?.clear??Kt.labels.clear}})}}),null),x(R,m(Ue,{type:"submit",disableIcon:!0,get children(){return B(()=>(e.block.options?.labels?.button??Kt.labels.button)===Kt.labels.button)()?`Upload ${t().length} file${t().length>1?"s":""}`:e.block.options?.labels?.button}}),null),U}}),null),A(()=>$(I,"agent-upload-input py-6 flex flex-col justify-center items-center w-full bubble-typing cursor-pointer px-8 "+(s()?"dragging-over":""))),C})()},uE=()=>cE(),Wb=e=>{let t=e.split("/").pop();if(!t)return e;let n=encodeURIComponent(t);return e.replace(t,n)};var Kb={labels:{button:Qe,placeholder:"Type a number..."}};var Yb=e=>{let t=r=>{ge(()=>{let o=e();if(o==null){r.value=o;return}let i=r.value;(o===0&&i===""||o!==i)&&(r.value=o+"")})},n=r=>{if(r.validity.badInput)return e();if(r.value!=="")return r.valueAsNumber};return[ze(e),t,n]};var dE=S('<div class="agent-input-form flex w-full gap-2 items-end max-w-[350px]"><div class="flex agent-input w-full"><input class="focus:outline-none bg-transparent px-4 py-4 flex-1 w-full text-input"type=number>'),Xb=e=>{let[t,n]=O(e.defaultValue??""),[r,o,i]=Yb(()=>t()),a,s=()=>a?.value!==""&&a?.reportValidity(),c=()=>{s()?e.onSubmit({type:"text",value:a?.value??t().toString()}):a?.focus()},l=f=>{f.key==="Enter"&&c()};ne(()=>{!K()&&a&&a.focus({preventScroll:!0}),window.addEventListener("message",u)}),se(()=>{window.removeEventListener("message",u)});let u=f=>{let{data:d}=f;d.isFromAgent&&d.command==="setInputValue"&&n(d.value)};return(()=>{var f=dE(),d=f.firstChild,p=d.firstChild;f.$$keydown=l,p.$$input=g=>{n(i(g.currentTarget))},de(o,p,()=>!0);var h=a;return typeof h=="function"?de(h,p):a=p,p.style.setProperty("font-size","16px"),p.style.setProperty("appearance","auto"),p.value=r,x(f,m(Ue,{type:"button",class:"h-[56px]","on:click":c,get children(){return e.block.options?.labels?.button}}),null),A(g=>{var v=e.block.options?.labels?.placeholder??Kb.labels.placeholder,y=e.block.options?.min,T=e.block.options?.max,C=e.block.options?.step??"any";return v!==g.e&&j(p,"placeholder",g.e=v),y!==g.t&&j(p,"min",g.t=y),T!==g.a&&j(p,"max",g.a=T),C!==g.o&&j(p,"step",g.o=C),g},{e:void 0,t:void 0,a:void 0,o:void 0}),f})()};Me(["keydown","input"]);var oy=Fr(ry(),1);var Ts={provider:"Stripe",labels:{button:"Pay",success:"Success"},retryMessageContent:"Payment failed. Please, try again.",currency:"USD"};var yE=S('<div class="agent-input-error-message mt-4 text-center animate-fade-in">'),xE=S('<form id=payment-form class="flex flex-col p-4 agent-input w-full items-center"><slot name=stripe-payment-form>'),vE="stripe-payment-form",Lc,zi=null,Cs=null,iy=e=>{let[t,n]=O(),[r,o]=O(!1),[i,a]=O(!1);ne(async()=>{if(wE(Lc),!e.options?.publicKey)return n("Missing Stripe public key");if(zi=await(0,oy.loadStripe)(e.options?.publicKey),!zi)return;Cs=zi.elements({appearance:{theme:"stripe",variables:{colorPrimary:getComputedStyle(Lc).getPropertyValue("--agent-button-bg-color")}},clientSecret:e.options.paymentIntentSecret}),Cs.create("payment",{layout:"tabs"}).mount("#payment-element"),setTimeout(()=>{o(!0),e.onTransitionEnd()},1e3)});let s=async c=>{if(c.preventDefault(),!zi||!Cs)return;a(!0),Td({sessionId:e.context.sessionId,resultId:e.context.resultId,agent:e.context.agent});let{postalCode:l,...u}=e.options?.additionalInformation?.address??{},{error:f,paymentIntent:d}=await zi.confirmPayment({elements:Cs,confirmParams:{return_url:window.location.href,payment_method_data:{billing_details:{name:e.options?.additionalInformation?.name,email:e.options?.additionalInformation?.email,phone:e.options?.additionalInformation?.phoneNumber,address:{...u,postal_code:l}}}},redirect:"if_required"});if(ma(),a(!1),f?.type!=="validation_error"){if(f?.type==="card_error")return n(f.message);if(!f&&d.status==="succeeded")return e.onSuccess()}};return(()=>{var c=xE(),l=c.firstChild;return c.addEventListener("submit",s),de(u=>Lc=u,l),l._$owner=jr(),x(c,m(N,{get when(){return r()},get children(){return m(Ue,{get isLoading(){return i()},class:"mt-4 w-full max-w-lg animate-fade-in",disableIcon:!0,get children(){return[B(()=>e.options?.labels?.button??Ts.labels.button)," ",B(()=>e.options?.amountLabel)]}})}}),null),x(c,m(N,{get when(){return t()},get children(){var u=yE();return x(u,t),u}}),null),c})()},wE=e=>{let n=e.getRootNode().host,r=document.createElement("div");r.style.width="100%",r.slot=vE,n.appendChild(r);let o=document.createElement("div");o.id="payment-element",r.appendChild(o)};var ay=e=>m(iy,{get onSuccess(){return e.onSuccess},get options(){return e.options},get context(){return e.context},get onTransitionEnd(){return e.onTransitionEnd}});var SE=S('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2px stroke-linecap=round stroke-linejoin=round><polyline points="6 9 12 15 18 9">'),sy=e=>(()=>{var t=SE();return Te(t,e,!0,!0),t})();var ly={labels:{button:Qe,placeholder:"Type your phone number..."},retryMessageContent:"This phone number doesn't seem to be valid. Can you type it again?"};var Tr=[{name:"International",flag:"\u{1F310}",code:"INT",dial_code:""},{name:"Afghanistan",flag:"\u{1F1E6}\u{1F1EB}",code:"AF",dial_code:"+93"},{name:"\xC5land Islands",flag:"\u{1F1E6}\u{1F1FD}",code:"AX",dial_code:"+358"},{name:"Albania",flag:"\u{1F1E6}\u{1F1F1}",code:"AL",dial_code:"+355"},{name:"Algeria",flag:"\u{1F1E9}\u{1F1FF}",code:"DZ",dial_code:"+213"},{name:"American Samoa",flag:"\u{1F1E6}\u{1F1F8}",code:"AS",dial_code:"+1684"},{name:"Andorra",flag:"\u{1F1E6}\u{1F1E9}",code:"AD",dial_code:"+376"},{name:"Angola",flag:"\u{1F1E6}\u{1F1F4}",code:"AO",dial_code:"+244"},{name:"Anguilla",flag:"\u{1F1E6}\u{1F1EE}",code:"AI",dial_code:"+1264"},{name:"Antarctica",flag:"\u{1F1E6}\u{1F1F6}",code:"AQ",dial_code:"+672"},{name:"Antigua and Barbuda",flag:"\u{1F1E6}\u{1F1EC}",code:"AG",dial_code:"+1268"},{name:"Argentina",flag:"\u{1F1E6}\u{1F1F7}",code:"AR",dial_code:"+54"},{name:"Armenia",flag:"\u{1F1E6}\u{1F1F2}",code:"AM",dial_code:"+374"},{name:"Aruba",flag:"\u{1F1E6}\u{1F1FC}",code:"AW",dial_code:"+297"},{name:"Australia",flag:"\u{1F1E6}\u{1F1FA}",code:"AU",dial_code:"+61"},{name:"Austria",flag:"\u{1F1E6}\u{1F1F9}",code:"AT",dial_code:"+43"},{name:"Azerbaijan",flag:"\u{1F1E6}\u{1F1FF}",code:"AZ",dial_code:"+994"},{name:"Bahamas",flag:"\u{1F1E7}\u{1F1F8}",code:"BS",dial_code:"+1242"},{name:"Bahrain",flag:"\u{1F1E7}\u{1F1ED}",code:"BH",dial_code:"+973"},{name:"Bangladesh",flag:"\u{1F1E7}\u{1F1E9}",code:"BD",dial_code:"+880"},{name:"Barbados",flag:"\u{1F1E7}\u{1F1E7}",code:"BB",dial_code:"+1246"},{name:"Belarus",flag:"\u{1F1E7}\u{1F1FE}",code:"BY",dial_code:"+375"},{name:"Belgium",flag:"\u{1F1E7}\u{1F1EA}",code:"BE",dial_code:"+32"},{name:"Belize",flag:"\u{1F1E7}\u{1F1FF}",code:"BZ",dial_code:"+501"},{name:"Benin",flag:"\u{1F1E7}\u{1F1EF}",code:"BJ",dial_code:"+229"},{name:"Bermuda",flag:"\u{1F1E7}\u{1F1F2}",code:"BM",dial_code:"+1441"},{name:"Bhutan",flag:"\u{1F1E7}\u{1F1F9}",code:"BT",dial_code:"+975"},{name:"Bolivia, Plurinational State of bolivia",flag:"\u{1F1E7}\u{1F1F4}",code:"BO",dial_code:"+591"},{name:"Bosnia and Herzegovina",flag:"\u{1F1E7}\u{1F1E6}",code:"BA",dial_code:"+387"},{name:"Botswana",flag:"\u{1F1E7}\u{1F1FC}",code:"BW",dial_code:"+267"},{name:"Bouvet Island",flag:"\u{1F1E7}\u{1F1FB}",code:"BV",dial_code:"+47"},{name:"Brazil",flag:"\u{1F1E7}\u{1F1F7}",code:"BR",dial_code:"+55"},{name:"British Indian Ocean Territory",flag:"\u{1F1EE}\u{1F1F4}",code:"IO",dial_code:"+246"},{name:"Brunei Darussalam",flag:"\u{1F1E7}\u{1F1F3}",code:"BN",dial_code:"+673"},{name:"Bulgaria",flag:"\u{1F1E7}\u{1F1EC}",code:"BG",dial_code:"+359"},{name:"Burkina Faso",flag:"\u{1F1E7}\u{1F1EB}",code:"BF",dial_code:"+226"},{name:"Burundi",flag:"\u{1F1E7}\u{1F1EE}",code:"BI",dial_code:"+257"},{name:"Cambodia",flag:"\u{1F1F0}\u{1F1ED}",code:"KH",dial_code:"+855"},{name:"Cameroon",flag:"\u{1F1E8}\u{1F1F2}",code:"CM",dial_code:"+237"},{name:"Canada",flag:"\u{1F1E8}\u{1F1E6}",code:"CA",dial_code:"+1"},{name:"Cape Verde",flag:"\u{1F1E8}\u{1F1FB}",code:"CV",dial_code:"+238"},{name:"Cayman Islands",flag:"\u{1F1F0}\u{1F1FE}",code:"KY",dial_code:"+345"},{name:"Central African Republic",flag:"\u{1F1E8}\u{1F1EB}",code:"CF",dial_code:"+236"},{name:"Chad",flag:"\u{1F1F9}\u{1F1E9}",code:"TD",dial_code:"+235"},{name:"Chile",flag:"\u{1F1E8}\u{1F1F1}",code:"CL",dial_code:"+56"},{name:"China",flag:"\u{1F1E8}\u{1F1F3}",code:"CN",dial_code:"+86"},{name:"Christmas Island",flag:"\u{1F1E8}\u{1F1FD}",code:"CX",dial_code:"+61"},{name:"Cocos (Keeling) Islands",flag:"\u{1F1E8}\u{1F1E8}",code:"CC",dial_code:"+61"},{name:"Colombia",flag:"\u{1F1E8}\u{1F1F4}",code:"CO",dial_code:"+57"},{name:"Comoros",flag:"\u{1F1F0}\u{1F1F2}",code:"KM",dial_code:"+269"},{name:"Congo",flag:"\u{1F1E8}\u{1F1EC}",code:"CG",dial_code:"+242"},{name:"Congo, The Democratic Republic of the Congo",flag:"\u{1F1E8}\u{1F1E9}",code:"CD",dial_code:"+243"},{name:"Cook Islands",flag:"\u{1F1E8}\u{1F1F0}",code:"CK",dial_code:"+682"},{name:"Costa Rica",flag:"\u{1F1E8}\u{1F1F7}",code:"CR",dial_code:"+506"},{name:"Cote d'Ivoire",flag:"\u{1F1E8}\u{1F1EE}",code:"CI",dial_code:"+225"},{name:"Croatia",flag:"\u{1F1ED}\u{1F1F7}",code:"HR",dial_code:"+385"},{name:"Cuba",flag:"\u{1F1E8}\u{1F1FA}",code:"CU",dial_code:"+53"},{name:"Cyprus",flag:"\u{1F1E8}\u{1F1FE}",code:"CY",dial_code:"+357"},{name:"Czech Republic",flag:"\u{1F1E8}\u{1F1FF}",code:"CZ",dial_code:"+420"},{name:"Denmark",flag:"\u{1F1E9}\u{1F1F0}",code:"DK",dial_code:"+45"},{name:"Djibouti",flag:"\u{1F1E9}\u{1F1EF}",code:"DJ",dial_code:"+253"},{name:"Dominica",flag:"\u{1F1E9}\u{1F1F2}",code:"DM",dial_code:"+1767"},{name:"Dominican Republic",flag:"\u{1F1E9}\u{1F1F4}",code:"DO",dial_code:"+1849"},{name:"Dominican Republic",flag:"\u{1F1E9}\u{1F1F4}",code:"DO",dial_code:"+1829"},{name:"Dominican Republic",flag:"\u{1F1E9}\u{1F1F4}",code:"DO",dial_code:"+1809"},{name:"Ecuador",flag:"\u{1F1EA}\u{1F1E8}",code:"EC",dial_code:"+593"},{name:"Egypt",flag:"\u{1F1EA}\u{1F1EC}",code:"EG",dial_code:"+20"},{name:"El Salvador",flag:"\u{1F1F8}\u{1F1FB}",code:"SV",dial_code:"+503"},{name:"Equatorial Guinea",flag:"\u{1F1EC}\u{1F1F6}",code:"GQ",dial_code:"+240"},{name:"Eritrea",flag:"\u{1F1EA}\u{1F1F7}",code:"ER",dial_code:"+291"},{name:"Estonia",flag:"\u{1F1EA}\u{1F1EA}",code:"EE",dial_code:"+372"},{name:"Ethiopia",flag:"\u{1F1EA}\u{1F1F9}",code:"ET",dial_code:"+251"},{name:"Falkland Islands (Malvinas)",flag:"\u{1F1EB}\u{1F1F0}",code:"FK",dial_code:"+500"},{name:"Faroe Islands",flag:"\u{1F1EB}\u{1F1F4}",code:"FO",dial_code:"+298"},{name:"Fiji",flag:"\u{1F1EB}\u{1F1EF}",code:"FJ",dial_code:"+679"},{name:"Finland",flag:"\u{1F1EB}\u{1F1EE}",code:"FI",dial_code:"+358"},{name:"France",flag:"\u{1F1EB}\u{1F1F7}",code:"FR",dial_code:"+33"},{name:"French Guiana",flag:"\u{1F1EC}\u{1F1EB}",code:"GF",dial_code:"+594"},{name:"French Polynesia",flag:"\u{1F1F5}\u{1F1EB}",code:"PF",dial_code:"+689"},{name:"French Southern Territories",flag:"\u{1F1F9}\u{1F1EB}",code:"TF",dial_code:"+262"},{name:"Gabon",flag:"\u{1F1EC}\u{1F1E6}",code:"GA",dial_code:"+241"},{name:"Gambia",flag:"\u{1F1EC}\u{1F1F2}",code:"GM",dial_code:"+220"},{name:"Georgia",flag:"\u{1F1EC}\u{1F1EA}",code:"GE",dial_code:"+995"},{name:"Germany",flag:"\u{1F1E9}\u{1F1EA}",code:"DE",dial_code:"+49"},{name:"Ghana",flag:"\u{1F1EC}\u{1F1ED}",code:"GH",dial_code:"+233"},{name:"Gibraltar",flag:"\u{1F1EC}\u{1F1EE}",code:"GI",dial_code:"+350"},{name:"Greece",flag:"\u{1F1EC}\u{1F1F7}",code:"GR",dial_code:"+30"},{name:"Greenland",flag:"\u{1F1EC}\u{1F1F1}",code:"GL",dial_code:"+299"},{name:"Grenada",flag:"\u{1F1EC}\u{1F1E9}",code:"GD",dial_code:"+1473"},{name:"Guadeloupe",flag:"\u{1F1EC}\u{1F1F5}",code:"GP",dial_code:"+590"},{name:"Guam",flag:"\u{1F1EC}\u{1F1FA}",code:"GU",dial_code:"+1671"},{name:"Guatemala",flag:"\u{1F1EC}\u{1F1F9}",code:"GT",dial_code:"+502"},{name:"Guernsey",flag:"\u{1F1EC}\u{1F1EC}",code:"GG",dial_code:"+44"},{name:"Guinea",flag:"\u{1F1EC}\u{1F1F3}",code:"GN",dial_code:"+224"},{name:"Guinea-Bissau",flag:"\u{1F1EC}\u{1F1FC}",code:"GW",dial_code:"+245"},{name:"Guyana",flag:"\u{1F1EC}\u{1F1FE}",code:"GY",dial_code:"+592"},{name:"Haiti",flag:"\u{1F1ED}\u{1F1F9}",code:"HT",dial_code:"+509"},{name:"Heard Island and Mcdonald Islands",flag:"\u{1F1ED}\u{1F1F2}",code:"HM",dial_code:"+672"},{name:"Holy See (Vatican City State)",flag:"\u{1F1FB}\u{1F1E6}",code:"VA",dial_code:"+379"},{name:"Honduras",flag:"\u{1F1ED}\u{1F1F3}",code:"HN",dial_code:"+504"},{name:"Hong Kong",flag:"\u{1F1ED}\u{1F1F0}",code:"HK",dial_code:"+852"},{name:"Hungary",flag:"\u{1F1ED}\u{1F1FA}",code:"HU",dial_code:"+36"},{name:"Iceland",flag:"\u{1F1EE}\u{1F1F8}",code:"IS",dial_code:"+354"},{name:"India",flag:"\u{1F1EE}\u{1F1F3}",code:"IN",dial_code:"+91"},{name:"Indonesia",flag:"\u{1F1EE}\u{1F1E9}",code:"ID",dial_code:"+62"},{name:"Iran, Islamic Republic of Persian Gulf",flag:"\u{1F1EE}\u{1F1F7}",code:"IR",dial_code:"+98"},{name:"Iraq",flag:"\u{1F1EE}\u{1F1F6}",code:"IQ",dial_code:"+964"},{name:"Ireland",flag:"\u{1F1EE}\u{1F1EA}",code:"IE",dial_code:"+353"},{name:"Isle of Man",flag:"\u{1F1EE}\u{1F1F2}",code:"IM",dial_code:"+44"},{name:"Israel",flag:"\u{1F1EE}\u{1F1F1}",code:"IL",dial_code:"+972"},{name:"Italy",flag:"\u{1F1EE}\u{1F1F9}",code:"IT",dial_code:"+39"},{name:"Jamaica",flag:"\u{1F1EF}\u{1F1F2}",code:"JM",dial_code:"+1876"},{name:"Japan",flag:"\u{1F1EF}\u{1F1F5}",code:"JP",dial_code:"+81"},{name:"Jersey",flag:"\u{1F1EF}\u{1F1EA}",code:"JE",dial_code:"+44"},{name:"Jordan",flag:"\u{1F1EF}\u{1F1F4}",code:"JO",dial_code:"+962"},{name:"Kazakhstan",flag:"\u{1F1F0}\u{1F1FF}",code:"KZ",dial_code:"+7"},{name:"Kenya",flag:"\u{1F1F0}\u{1F1EA}",code:"KE",dial_code:"+254"},{name:"Kiribati",flag:"\u{1F1F0}\u{1F1EE}",code:"KI",dial_code:"+686"},{name:"Korea, Democratic People's Republic of Korea",flag:"\u{1F1F0}\u{1F1F5}",code:"KP",dial_code:"+850"},{name:"Korea, Republic of South Korea",flag:"\u{1F1F0}\u{1F1F7}",code:"KR",dial_code:"+82"},{name:"Kosovo",flag:"\u{1F1FD}\u{1F1F0}",code:"XK",dial_code:"+383"},{name:"Kuwait",flag:"\u{1F1F0}\u{1F1FC}",code:"KW",dial_code:"+965"},{name:"Kyrgyzstan",flag:"\u{1F1F0}\u{1F1EC}",code:"KG",dial_code:"+996"},{name:"Laos",flag:"\u{1F1F1}\u{1F1E6}",code:"LA",dial_code:"+856"},{name:"Latvia",flag:"\u{1F1F1}\u{1F1FB}",code:"LV",dial_code:"+371"},{name:"Lebanon",flag:"\u{1F1F1}\u{1F1E7}",code:"LB",dial_code:"+961"},{name:"Lesotho",flag:"\u{1F1F1}\u{1F1F8}",code:"LS",dial_code:"+266"},{name:"Liberia",flag:"\u{1F1F1}\u{1F1F7}",code:"LR",dial_code:"+231"},{name:"Libyan Arab Jamahiriya",flag:"\u{1F1F1}\u{1F1FE}",code:"LY",dial_code:"+218"},{name:"Liechtenstein",flag:"\u{1F1F1}\u{1F1EE}",code:"LI",dial_code:"+423"},{name:"Lithuania",flag:"\u{1F1F1}\u{1F1F9}",code:"LT",dial_code:"+370"},{name:"Luxembourg",flag:"\u{1F1F1}\u{1F1FA}",code:"LU",dial_code:"+352"},{name:"Macao",flag:"\u{1F1F2}\u{1F1F4}",code:"MO",dial_code:"+853"},{name:"Macedonia",flag:"\u{1F1F2}\u{1F1F0}",code:"MK",dial_code:"+389"},{name:"Madagascar",flag:"\u{1F1F2}\u{1F1EC}",code:"MG",dial_code:"+261"},{name:"Malawi",flag:"\u{1F1F2}\u{1F1FC}",code:"MW",dial_code:"+265"},{name:"Malaysia",flag:"\u{1F1F2}\u{1F1FE}",code:"MY",dial_code:"+60"},{name:"Maldives",flag:"\u{1F1F2}\u{1F1FB}",code:"MV",dial_code:"+960"},{name:"Mali",flag:"\u{1F1F2}\u{1F1F1}",code:"ML",dial_code:"+223"},{name:"Malta",flag:"\u{1F1F2}\u{1F1F9}",code:"MT",dial_code:"+356"},{name:"Marshall Islands",flag:"\u{1F1F2}\u{1F1ED}",code:"MH",dial_code:"+692"},{name:"Martinique",flag:"\u{1F1F2}\u{1F1F6}",code:"MQ",dial_code:"+596"},{name:"Mauritania",flag:"\u{1F1F2}\u{1F1F7}",code:"MR",dial_code:"+222"},{name:"Mauritius",flag:"\u{1F1F2}\u{1F1FA}",code:"MU",dial_code:"+230"},{name:"Mayotte",flag:"\u{1F1FE}\u{1F1F9}",code:"YT",dial_code:"+262"},{name:"Mexico",flag:"\u{1F1F2}\u{1F1FD}",code:"MX",dial_code:"+52"},{name:"Micronesia, Federated States of Micronesia",flag:"\u{1F1EB}\u{1F1F2}",code:"FM",dial_code:"+691"},{name:"Moldova",flag:"\u{1F1F2}\u{1F1E9}",code:"MD",dial_code:"+373"},{name:"Monaco",flag:"\u{1F1F2}\u{1F1E8}",code:"MC",dial_code:"+377"},{name:"Mongolia",flag:"\u{1F1F2}\u{1F1F3}",code:"MN",dial_code:"+976"},{name:"Montenegro",flag:"\u{1F1F2}\u{1F1EA}",code:"ME",dial_code:"+382"},{name:"Montserrat",flag:"\u{1F1F2}\u{1F1F8}",code:"MS",dial_code:"+1664"},{name:"Morocco",flag:"\u{1F1F2}\u{1F1E6}",code:"MA",dial_code:"+212"},{name:"Mozambique",flag:"\u{1F1F2}\u{1F1FF}",code:"MZ",dial_code:"+258"},{name:"Myanmar",flag:"\u{1F1F2}\u{1F1F2}",code:"MM",dial_code:"+95"},{name:"Namibia",flag:"\u{1F1F3}\u{1F1E6}",code:"NA",dial_code:"+264"},{name:"Nauru",flag:"\u{1F1F3}\u{1F1F7}",code:"NR",dial_code:"+674"},{name:"Nepal",flag:"\u{1F1F3}\u{1F1F5}",code:"NP",dial_code:"+977"},{name:"Netherlands",flag:"\u{1F1F3}\u{1F1F1}",code:"NL",dial_code:"+31"},{name:"Netherlands Antilles",flag:"",code:"AN",dial_code:"+599"},{name:"New Caledonia",flag:"\u{1F1F3}\u{1F1E8}",code:"NC",dial_code:"+687"},{name:"New Zealand",flag:"\u{1F1F3}\u{1F1FF}",code:"NZ",dial_code:"+64"},{name:"Nicaragua",flag:"\u{1F1F3}\u{1F1EE}",code:"NI",dial_code:"+505"},{name:"Niger",flag:"\u{1F1F3}\u{1F1EA}",code:"NE",dial_code:"+227"},{name:"Nigeria",flag:"\u{1F1F3}\u{1F1EC}",code:"NG",dial_code:"+234"},{name:"Niue",flag:"\u{1F1F3}\u{1F1FA}",code:"NU",dial_code:"+683"},{name:"Norfolk Island",flag:"\u{1F1F3}\u{1F1EB}",code:"NF",dial_code:"+672"},{name:"Northern Mariana Islands",flag:"\u{1F1F2}\u{1F1F5}",code:"MP",dial_code:"+1670"},{name:"Norway",flag:"\u{1F1F3}\u{1F1F4}",code:"NO",dial_code:"+47"},{name:"Oman",flag:"\u{1F1F4}\u{1F1F2}",code:"OM",dial_code:"+968"},{name:"Pakistan",flag:"\u{1F1F5}\u{1F1F0}",code:"PK",dial_code:"+92"},{name:"Palau",flag:"\u{1F1F5}\u{1F1FC}",code:"PW",dial_code:"+680"},{name:"Palestinian Territory, Occupied",flag:"\u{1F1F5}\u{1F1F8}",code:"PS",dial_code:"+970"},{name:"Panama",flag:"\u{1F1F5}\u{1F1E6}",code:"PA",dial_code:"+507"},{name:"Papua New Guinea",flag:"\u{1F1F5}\u{1F1EC}",code:"PG",dial_code:"+675"},{name:"Paraguay",flag:"\u{1F1F5}\u{1F1FE}",code:"PY",dial_code:"+595"},{name:"Peru",flag:"\u{1F1F5}\u{1F1EA}",code:"PE",dial_code:"+51"},{name:"Philippines",flag:"\u{1F1F5}\u{1F1ED}",code:"PH",dial_code:"+63"},{name:"Pitcairn",flag:"\u{1F1F5}\u{1F1F3}",code:"PN",dial_code:"+64"},{name:"Poland",flag:"\u{1F1F5}\u{1F1F1}",code:"PL",dial_code:"+48"},{name:"Portugal",flag:"\u{1F1F5}\u{1F1F9}",code:"PT",dial_code:"+351"},{name:"Puerto Rico",flag:"\u{1F1F5}\u{1F1F7}",code:"PR",dial_code:"+1939"},{name:"Qatar",flag:"\u{1F1F6}\u{1F1E6}",code:"QA",dial_code:"+974"},{name:"Romania",flag:"\u{1F1F7}\u{1F1F4}",code:"RO",dial_code:"+40"},{name:"Russia",flag:"\u{1F1F7}\u{1F1FA}",code:"RU",dial_code:"+7"},{name:"Rwanda",flag:"\u{1F1F7}\u{1F1FC}",code:"RW",dial_code:"+250"},{name:"Reunion",flag:"\u{1F1F7}\u{1F1EA}",code:"RE",dial_code:"+262"},{name:"Saint Barthelemy",flag:"\u{1F1E7}\u{1F1F1}",code:"BL",dial_code:"+590"},{name:"Saint Helena, Ascension and Tristan Da Cunha",flag:"\u{1F1F8}\u{1F1ED}",code:"SH",dial_code:"+290"},{name:"Saint Kitts and Nevis",flag:"\u{1F1F0}\u{1F1F3}",code:"KN",dial_code:"+1869"},{name:"Saint Lucia",flag:"\u{1F1F1}\u{1F1E8}",code:"LC",dial_code:"+1758"},{name:"Saint Martin",flag:"\u{1F1F2}\u{1F1EB}",code:"MF",dial_code:"+590"},{name:"Saint Pierre and Miquelon",flag:"\u{1F1F5}\u{1F1F2}",code:"PM",dial_code:"+508"},{name:"Saint Vincent and the Grenadines",flag:"\u{1F1FB}\u{1F1E8}",code:"VC",dial_code:"+1784"},{name:"Samoa",flag:"\u{1F1FC}\u{1F1F8}",code:"WS",dial_code:"+685"},{name:"San Marino",flag:"\u{1F1F8}\u{1F1F2}",code:"SM",dial_code:"+378"},{name:"Sao Tome and Principe",flag:"\u{1F1F8}\u{1F1F9}",code:"ST",dial_code:"+239"},{name:"Saudi Arabia",flag:"\u{1F1F8}\u{1F1E6}",code:"SA",dial_code:"+966"},{name:"Senegal",flag:"\u{1F1F8}\u{1F1F3}",code:"SN",dial_code:"+221"},{name:"Serbia",flag:"\u{1F1F7}\u{1F1F8}",code:"RS",dial_code:"+381"},{name:"Seychelles",flag:"\u{1F1F8}\u{1F1E8}",code:"SC",dial_code:"+248"},{name:"Sierra Leone",flag:"\u{1F1F8}\u{1F1F1}",code:"SL",dial_code:"+232"},{name:"Singapore",flag:"\u{1F1F8}\u{1F1EC}",code:"SG",dial_code:"+65"},{name:"Slovakia",flag:"\u{1F1F8}\u{1F1F0}",code:"SK",dial_code:"+421"},{name:"Slovenia",flag:"\u{1F1F8}\u{1F1EE}",code:"SI",dial_code:"+386"},{name:"Solomon Islands",flag:"\u{1F1F8}\u{1F1E7}",code:"SB",dial_code:"+677"},{name:"Somalia",flag:"\u{1F1F8}\u{1F1F4}",code:"SO",dial_code:"+252"},{name:"South Africa",flag:"\u{1F1FF}\u{1F1E6}",code:"ZA",dial_code:"+27"},{name:"South Sudan",flag:"\u{1F1F8}\u{1F1F8}",code:"SS",dial_code:"+211"},{name:"South Georgia and the South Sandwich Islands",flag:"\u{1F1EC}\u{1F1F8}",code:"GS",dial_code:"+500"},{name:"Spain",flag:"\u{1F1EA}\u{1F1F8}",code:"ES",dial_code:"+34"},{name:"Sri Lanka",flag:"\u{1F1F1}\u{1F1F0}",code:"LK",dial_code:"+94"},{name:"Sudan",flag:"\u{1F1F8}\u{1F1E9}",code:"SD",dial_code:"+249"},{name:"Suriname",flag:"\u{1F1F8}\u{1F1F7}",code:"SR",dial_code:"+597"},{name:"Svalbard and Jan Mayen",flag:"\u{1F1F8}\u{1F1EF}",code:"SJ",dial_code:"+47"},{name:"Swaziland",flag:"\u{1F1F8}\u{1F1FF}",code:"SZ",dial_code:"+268"},{name:"Sweden",flag:"\u{1F1F8}\u{1F1EA}",code:"SE",dial_code:"+46"},{name:"Switzerland",flag:"\u{1F1E8}\u{1F1ED}",code:"CH",dial_code:"+41"},{name:"Syrian Arab Republic",flag:"\u{1F1F8}\u{1F1FE}",code:"SY",dial_code:"+963"},{name:"Taiwan",flag:"\u{1F1F9}\u{1F1FC}",code:"TW",dial_code:"+886"},{name:"Tajikistan",flag:"\u{1F1F9}\u{1F1EF}",code:"TJ",dial_code:"+992"},{name:"Tanzania, United Republic of Tanzania",flag:"\u{1F1F9}\u{1F1FF}",code:"TZ",dial_code:"+255"},{name:"Thailand",flag:"\u{1F1F9}\u{1F1ED}",code:"TH",dial_code:"+66"},{name:"Timor-Leste",flag:"\u{1F1F9}\u{1F1F1}",code:"TL",dial_code:"+670"},{name:"Togo",flag:"\u{1F1F9}\u{1F1EC}",code:"TG",dial_code:"+228"},{name:"Tokelau",flag:"\u{1F1F9}\u{1F1F0}",code:"TK",dial_code:"+690"},{name:"Tonga",flag:"\u{1F1F9}\u{1F1F4}",code:"TO",dial_code:"+676"},{name:"Trinidad and Tobago",flag:"\u{1F1F9}\u{1F1F9}",code:"TT",dial_code:"+1868"},{name:"Tunisia",flag:"\u{1F1F9}\u{1F1F3}",code:"TN",dial_code:"+216"},{name:"Turkey",flag:"\u{1F1F9}\u{1F1F7}",code:"TR",dial_code:"+90"},{name:"Turkmenistan",flag:"\u{1F1F9}\u{1F1F2}",code:"TM",dial_code:"+993"},{name:"Turks and Caicos Islands",flag:"\u{1F1F9}\u{1F1E8}",code:"TC",dial_code:"+1649"},{name:"Tuvalu",flag:"\u{1F1F9}\u{1F1FB}",code:"TV",dial_code:"+688"},{name:"Uganda",flag:"\u{1F1FA}\u{1F1EC}",code:"UG",dial_code:"+256"},{name:"Ukraine",flag:"\u{1F1FA}\u{1F1E6}",code:"UA",dial_code:"+380"},{name:"United Arab Emirates",flag:"\u{1F1E6}\u{1F1EA}",code:"AE",dial_code:"+971"},{name:"United Kingdom",flag:"\u{1F1EC}\u{1F1E7}",code:"GB",dial_code:"+44"},{name:"United States",flag:"\u{1F1FA}\u{1F1F8}",code:"US",dial_code:"+1"},{name:"Uruguay",flag:"\u{1F1FA}\u{1F1FE}",code:"UY",dial_code:"+598"},{name:"Uzbekistan",flag:"\u{1F1FA}\u{1F1FF}",code:"UZ",dial_code:"+998"},{name:"Vanuatu",flag:"\u{1F1FB}\u{1F1FA}",code:"VU",dial_code:"+678"},{name:"Venezuela, Bolivarian Republic of Venezuela",flag:"\u{1F1FB}\u{1F1EA}",code:"VE",dial_code:"+58"},{name:"Vietnam",flag:"\u{1F1FB}\u{1F1F3}",code:"VN",dial_code:"+84"},{name:"Virgin Islands, British",flag:"\u{1F1FB}\u{1F1EC}",code:"VG",dial_code:"+1284"},{name:"Virgin Islands, U.S.",flag:"\u{1F1FB}\u{1F1EE}",code:"VI",dial_code:"+1340"},{name:"Wallis and Futuna",flag:"\u{1F1FC}\u{1F1EB}",code:"WF",dial_code:"+681"},{name:"Yemen",flag:"\u{1F1FE}\u{1F1EA}",code:"YE",dial_code:"+967"},{name:"Zambia",flag:"\u{1F1FF}\u{1F1F2}",code:"ZM",dial_code:"+260"},{name:"Zimbabwe",flag:"\u{1F1FF}\u{1F1FC}",code:"ZW",dial_code:"+263"}];var TE=S('<div class="agent-input-form flex w-full gap-2 items-end max-w-[350px]"><div class="flex agent-input w-full"><div class="relative agent-country-select flex justify-center items-center"><div class="pl-2 pr-1 flex items-center gap-2"><span></span></div><select class="absolute top-0 left-0 w-full h-full cursor-pointer opacity-0">'),CE=S("<option> "),cy=e=>{let[t,n]=O($e(e.defaultCountryCode)?"INT":e.defaultCountryCode),[r,o]=O(e.defaultValue??""),i,a=d=>{o(d),(d===""||d==="+")&&t()!=="INT"&&n("INT");let p=d?.startsWith("+")&&d.length>2&&Tr.reduce((h,g)=>!g?.dial_code||h!==null&&!h.dial_code?h:d?.startsWith(g.dial_code)&&g.dial_code.length>(h?.dial_code.length??0)?g:h,null);p&&n(p.code)},s=()=>i?.value!==""&&i?.reportValidity(),c=()=>{let d=Tr.find(p=>p.code===t())?.dial_code;if(s()){let p=i?.value??r();e.onSubmit({type:"text",value:p.startsWith("+")?p:`${d??""}${p}`})}else i?.focus()},l=d=>{d.key==="Enter"&&c()},u=d=>{let p=Tr.find(g=>g.code===d.currentTarget.value);if(!p)return;let h=Tr.find(g=>g.code===t());(r()===""||h&&r()===h.dial_code)&&o(p.dial_code),n(p.code),i?.focus()};ne(()=>{!K()&&i&&i.focus({preventScroll:!0}),window.addEventListener("message",f)}),se(()=>{window.removeEventListener("message",f)});let f=d=>{let{data:p}=d;p.isFromAgent&&p.command==="setInputValue"&&o(p.value)};return(()=>{var d=TE(),p=d.firstChild,h=p.firstChild,g=h.firstChild,v=g.firstChild,y=g.nextSibling;return d.$$keydown=l,x(v,()=>Tr.find(T=>t()===T.code)?.flag),x(g,m(sy,{class:"w-3"}),null),y.addEventListener("change",u),x(y,m(he,{each:Tr,children:T=>(()=>{var C=CE(),E=C.firstChild;return x(C,()=>T.name,E),x(C,()=>T.dial_code?`(${T.dial_code})`:"",null),A(()=>C.selected=T.code===t()),A(()=>C.value=T.code),C})()})),x(p,m(Xn,{type:"tel",ref(T){var C=i;typeof C=="function"?C(T):i=T},get value(){return r()},onInput:a,get placeholder(){return e.labels?.placeholder??ly.labels.placeholder},get autofocus(){return!K()}}),null),x(d,m(Ue,{type:"button",class:"h-[56px]","on:click":c,get children(){return e.labels?.button}}),null),d})()};Me(["keydown"]);var Nc={buttonLabel:Qe,searchInputPlaceholder:"Filter the options...",isMultipleChoice:!1,isSearchable:!1,dynamicItems:{isEnabled:!1}};var _E=S('<div class="flex items-end agent-input w-full">'),kE=S('<form class="flex flex-col gap-2 w-full items-end"><div>'),uy=S("<span class=font-semibold>"),dy=S('<span class="text-sm whitespace-pre-wrap text-left">'),fy=S('<div class="flex flex-col gap-1 ">'),EE=S("<div role=checkbox><img fetchpriority=high class=m-auto><div>"),PE=S('<div role=checkbox aria-checked class="flex flex-col focus:outline-none cursor-pointer select-none agent-selectable-picture selected"><img fetchpriority=high><div>'),py=e=>{let t,[n,r]=O(e.defaultItems),[o,i]=O([]),[a,s]=O(0);ne(()=>{!K()&&t&&t.focus({preventScroll:!0})});let c=p=>{l(p)},l=p=>{let h=o().indexOf(p);i(h!==-1?g=>g.filter(v=>v!==p):g=>[...g,p])},u=()=>e.onSubmit({type:"text",value:o().map(p=>{let h=e.defaultItems.find(g=>g.id===p);return Ce(h?.title)?h.title:h?.pictureSrc}).join(", ")}),f=p=>{r(e.defaultItems.filter(h=>h.title?.toLowerCase().includes((p??"").toLowerCase())||h.description?.toLowerCase().includes((p??"").toLowerCase())))};ge(()=>{a()===e.defaultItems.filter(p=>re(p.pictureSrc)).length&&e.onTransitionEnd()});let d=()=>{s(p=>p+1)};return(()=>{var p=kE(),h=p.firstChild;return p.addEventListener("submit",u),x(p,m(N,{get when(){return e.options?.isSearchable},get children(){var g=_E();return x(g,m(Yn,{ref(v){var y=t;typeof y=="function"?y(v):t=v},onInput:f,get placeholder(){return e.options?.searchInputPlaceholder??Nc.searchInputPlaceholder},onClear:()=>r(e.defaultItems)})),g}}),h),x(h,m(he,{get each(){return n()},children:(g,v)=>(()=>{var y=EE(),T=y.firstChild,C=T.nextSibling;return Fe(y,"click",()=>c(g.id)),T.addEventListener("load",d),x(C,m(So,{get isChecked(){return o().some(E=>E===g.id)},get class(){return"flex-shrink-0"+(g.title||g.description?" mt-1":void 0)}}),null),x(C,m(N,{get when(){return g.title||g.description},get children(){var E=fy();return x(E,m(N,{get when(){return g.title},get children(){var I=uy();return x(I,()=>g.title),I}}),null),x(E,m(N,{get when(){return g.description},get children(){var I=dy();return x(I,()=>g.description),I}}),null),E}}),null),A(E=>{var I=o().some(P=>P===g.id),U="flex flex-col focus:outline-none cursor-pointer select-none agent-selectable-picture"+(o().some(P=>P===g.id)?" selected":"")+(Ft(g.pictureSrc)?" has-svg":""),R=g.id,oe=g.pictureSrc,H=g.title??`Picture ${v()+1}`,G=`Picture choice ${v()+1}`,L="flex gap-3 py-2 flex-shrink-0"+($e(g.title)&&$e(g.description)?" justify-center":" px-3");return I!==E.e&&j(y,"aria-checked",E.e=I),U!==E.t&&$(y,E.t=U),R!==E.a&&j(y,"data-itemid",E.a=R),oe!==E.o&&j(T,"src",E.o=oe),H!==E.i&&j(T,"alt",E.i=H),G!==E.n&&j(T,"elementtiming",E.n=G),L!==E.s&&$(C,E.s=L),E},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),y})()}),null),x(h,m(he,{get each(){return o().filter(g=>n().every(v=>v.id!==g)).map(g=>e.defaultItems.find(v=>v.id===g)).filter(re)},children:(g,v)=>(()=>{var y=PE(),T=y.firstChild,C=T.nextSibling;return Fe(y,"click",()=>c(g.id)),x(C,m(So,{get isChecked(){return o().some(E=>E===g.id)},get class(){return"flex-shrink-0"+(g.title||g.description?" mt-1":void 0)}}),null),x(C,m(N,{get when(){return g.title||g.description},get children(){var E=fy();return x(E,m(N,{get when(){return g.title},get children(){var I=uy();return x(I,()=>g.title),I}}),null),x(E,m(N,{get when(){return g.description},get children(){var I=dy();return x(I,()=>g.description),I}}),null),E}}),null),A(E=>{var I=g.id,U=e.defaultItems.find(G=>G.id===g.id)?.pictureSrc,R=g.title??`Selected picture ${v()+1}`,oe=`Selected picture choice ${v()+1}`,H="flex gap-3 py-2 flex-shrink-0"+($e(g.title)&&$e(g.description)?" justify-center":" pl-4");return I!==E.e&&j(y,"data-itemid",E.e=I),U!==E.t&&j(T,"src",E.t=U),R!==E.a&&j(T,"alt",E.a=R),oe!==E.o&&j(T,"elementtiming",E.o=oe),H!==E.i&&$(C,E.i=H),E},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),y})()}),null),x(p,(()=>{var g=B(()=>o().length>0);return()=>g()&&m(Ue,{disableIcon:!0,get children(){return e.options?.buttonLabel??Nc.buttonLabel}})})(),null),A(()=>$(h,"flex flex-wrap justify-end gap-2"+(e.options?.isSearchable?" overflow-y-scroll max-h-[464px] rounded-md":""))),p})()};var IE=S('<div class="flex items-end agent-input w-full">'),AE=S('<div class="flex flex-col gap-2 w-full"><div>'),OE=S('<button><img fetchpriority=high class=m-auto><div><span class=font-semibold></span><span class="text-sm whitespace-pre-wrap text-left">'),my=e=>{let t,[n,r]=O(e.defaultItems),[o,i]=O(0);ne(()=>{!K()&&t&&t.focus({preventScroll:!0})});let a=l=>{let u=n()[l];if(u)return e.onSubmit({type:"text",label:Ce(u.title)?u.title:u.pictureSrc??u.id,value:u.id})},s=l=>{r(e.defaultItems.filter(u=>u.title?.toLowerCase().includes((l??"").toLowerCase())||u.description?.toLowerCase().includes((l??"").toLowerCase())))};ge(()=>{o()===e.defaultItems.filter(l=>re(l.pictureSrc)).length&&e.onTransitionEnd()});let c=()=>{i(l=>l+1)};return(()=>{var l=AE(),u=l.firstChild;return x(l,m(N,{get when(){return e.options?.isSearchable},get children(){var f=IE();return x(f,m(Yn,{ref(d){var p=t;typeof p=="function"?p(d):t=d},onInput:s,get placeholder(){return e.options?.searchInputPlaceholder??""},onClear:()=>r(e.defaultItems)})),f}}),u),x(u,m(he,{get each(){return n()},children:(f,d)=>(()=>{var p=OE(),h=p.firstChild,g=h.nextSibling,v=g.firstChild,y=v.nextSibling;return Fe(p,"click",()=>a(d())),h.addEventListener("load",c),x(v,()=>f.title),x(y,()=>f.description),A(T=>{var C=f.id,E="flex flex-col agent-picture-button focus:outline-none filter hover:brightness-90 active:brightness-75 justify-between "+(Ft(f.pictureSrc)?"has-svg":""),I=f.pictureSrc,U=f.title??`Picture ${d()+1}`,R=`Picture choice ${d()+1}`,oe="flex flex-col gap-1 py-2 flex-shrink-0 px-4 w-full"+(f.description?" items-start":"");return C!==T.e&&j(p,"data-itemid",T.e=C),E!==T.t&&$(p,T.t=E),I!==T.a&&j(h,"src",T.a=I),U!==T.o&&j(h,"alt",T.o=U),R!==T.i&&j(h,"elementtiming",T.i=R),oe!==T.n&&$(g,T.n=oe),T},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),p})()})),A(()=>$(u,"gap-2 flex flex-wrap justify-end"+(e.options?.isSearchable?" overflow-y-scroll max-h-[464px] rounded-md":""))),l})()};var Pn={buttonType:"Numbers",length:10,labels:{button:Qe},startsAt:0,customIcon:{isEnabled:!1},isOneClickSubmitEnabled:!1};var RE=S('<form class="flex flex-col gap-2"><div class="flex flex-wrap justify-center gap-2"></div><div class="flex justify-end">'),ME=S('<span class="text-sm w-full rating-label">'),DE=S('<span class="text-sm w-full text-right pr-2 rating-label">'),LE=S("<div role=checkbox>"),NE=S("<div>"),gy=e=>{let[t,n]=O(e.defaultValue?Number(e.defaultValue):void 0),r=i=>{i.preventDefault();let a=t();Ge(a)||e.onSubmit({type:"text",value:a.toString()})},o=i=>{e.block.options?.isOneClickSubmitEnabled&&e.onSubmit({type:"text",value:i.toString()}),n(i)};return(()=>{var i=RE(),a=i.firstChild,s=a.nextSibling;return i.addEventListener("submit",r),x(i,(()=>{var c=B(()=>!!e.block.options?.labels?.left);return()=>c()&&(()=>{var l=ME();return x(l,()=>e.block.options.labels.left),l})()})(),a),x(a,m(he,{get each(){return Array.from(Array((e.block.options?.length??Pn.length)+((e.block.options?.buttonType??Pn.buttonType)==="Numbers"?-((e.block.options?.startsAt??Pn.startsAt)-1):0)))},children:(c,l)=>m($E,Se(()=>e.block.options,{get rating(){return t()},get idx(){return l()+((e.block.options?.buttonType??Pn.buttonType)==="Numbers"?e.block.options?.startsAt??Pn.startsAt:1)},onClick:o}))})),x(i,(()=>{var c=B(()=>!!e.block.options?.labels?.right);return()=>c()&&(()=>{var l=DE();return x(l,()=>e.block.options.labels.right),l})()})(),s),x(s,(()=>{var c=B(()=>!!re(t()));return()=>c()&&m(Ue,{disableIcon:!0,get children(){return e.block.options?.labels?.button??Pn.labels.button}})})()),i})()},$E=e=>{let t=n=>{n.preventDefault(),e.onClick(e.idx)};return m(Ee,{get children(){return[m(q,{get when(){return(e.buttonType??Pn.buttonType)==="Numbers"},get children(){return[m(N,{get when(){return e.isOneClickSubmitEnabled},get children(){return m(qt,{"on:click":t,get children(){return e.idx}})}}),m(N,{get when(){return!e.isOneClickSubmitEnabled},get children(){var n=LE();return Fe(n,"click",t),x(n,()=>e.idx),A(r=>{var o=re(e.rating)&&e.idx<=e.rating,i="py-2 px-4 font-semibold focus:outline-none cursor-pointer select-none agent-selectable"+(re(e.rating)&&e.idx<=e.rating?" selected":"");return o!==r.e&&j(n,"aria-checked",r.e=o),i!==r.t&&$(n,r.t=i),r},{e:void 0,t:void 0}),n}})]}}),m(q,{get when(){return(e.buttonType??Pn.buttonType)!=="Numbers"},get children(){var n=NE();return Fe(n,"click",()=>e.onClick(e.idx)),A(r=>{var o="flex justify-center items-center rating-icon-container cursor-pointer "+(re(e.rating)&&e.idx<=e.rating?"selected":""),i=e.customIcon?.isEnabled&&!$e(e.customIcon.svg)?e.customIcon.svg:BE;return o!==r.e&&$(n,r.e=o),i!==r.t&&(n.innerHTML=r.t=i),r},{e:void 0,t:void 0}),n}})]}})},BE='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>';var FE=S('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48">'),$c=e=>(()=>{var t=FE();return Te(t,e,!0,!0),t})();var UE=S('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2px stroke-linecap=round stroke-linejoin=round><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path><circle cx=10 cy=12 r=2></circle><path d="m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22">'),hy=e=>(()=>{var t=UE();return Te(t,e,!0,!0),t})();var jE=S("<input type=file id=document-upload multiple class=hidden>"),VE=S('<input type=file id=photos-upload accept="image/*, video/*"multiple class=hidden>'),HE=S('<label aria-label="Add attachments"for=document-upload>'),zE=S("<label> Document"),GE=S("<label> Photos & videos"),by=e=>[(()=>{var t=jE();return t.addEventListener("change",n=>{n.currentTarget.files&&e.onNewFiles(n.currentTarget.files)}),t})(),(()=>{var t=VE();return t.addEventListener("change",n=>{n.currentTarget.files&&e.onNewFiles(n.currentTarget.files)}),t})(),m(Ee,{get children(){return[m(q,{get when(){return K()},get children(){var t=HE();return x(t,m($c,{class:"w-5"})),A(()=>$(t,pe("filter data-[state=open]:backdrop-brightness-90 hover:backdrop-brightness-95 transition rounded-md p-2 focus:outline-none",e.class))),t}}),m(q,{when:!0,get children(){return m(_n.Root,{get children(){return[m(_n.Trigger,{get class(){return pe("filter data-[state=open]:backdrop-brightness-90 hover:backdrop-brightness-95 transition rounded-md p-2 focus:outline-none",e.class)},"aria-label":"Add attachments",get children(){return m($c,{class:"w-5"})}}),m(_n.Positioner,{get children(){return m(_n.Content,{class:"p-3 gap-2 focus:outline-none",get children(){return[m(_n.Item,{value:"document",asChild:t=>(()=>{var n=zE(),r=n.firstChild;return Te(n,Se(t,{for:"document-upload",class:"p-2 filter hover:brightness-95 flex gap-3 items-center"}),!1,!0),x(n,m(bs,{class:"w-4"}),r),n})()}),m(_n.Item,{value:"photos",asChild:t=>(()=>{var n=GE(),r=n.firstChild;return Te(n,Se(t,{for:"photos-upload",class:"p-2 filter hover:brightness-95 flex gap-3 items-center"}),!1,!0),x(n,m(hy,{class:"w-4"}),r),n})()})]}})}})]}})}})]}})];var WE=S('<svg viewBox="0 0 384 512"stroke=currentColor fill=currentColor><path d="M192 0C139 0 96 43 96 96l0 160c0 53 43 96 96 96s96-43 96-96l0-160c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c85.8-11.7 152-85.3 152-174.4l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40z">'),yy=e=>(()=>{var t=WE();return Te(t,e,!0,!0),t})();var qE=S('<textarea class="focus:outline-none bg-transparent px-4 py-4 flex-1 w-full text-input"rows=6 data-testid=textarea required>'),xy=e=>{let[t,n]=Be(e,["ref","onInput"]);return(()=>{var r=qE();r.$$input=i=>t.onInput(i.currentTarget.value);var o=t.ref;return typeof o=="function"?de(o,r):t.ref=r,Te(r,Se({get autofocus(){return!K()}},n),!1,!1),r})()};Me(["input"]);var ox=Fr(tx(),1);var js={isLong:!1,labels:{button:Qe,placeholder:"Type your answer..."},audioClip:{isEnabled:!1,visibility:"Auto"},attachments:{isEnabled:!1,visibility:"Auto"}};var nx=`
|
|
98
82
|
const gainFactor = 3;
|
|
99
83
|
|
|
100
84
|
class VolumeProcessor extends AudioWorkletProcessor {
|
|
@@ -119,38 +103,38 @@ class VolumeProcessor extends AudioWorkletProcessor {
|
|
|
119
103
|
|
|
120
104
|
registerProcessor("volume-processor", VolumeProcessor);
|
|
121
105
|
|
|
122
|
-
`;var XP=w('<div><button class="p-0.5 rounded-full"aria-label="Stop recording"></button><div class="relative flex w-full"><canvas class="w-full h-[56px]"></canvas><div class="absolute left-gradient w-2 left-0 h-[56px]"></div><div class="absolute right-gradient w-3 right-0 h-[56px]"></div></div><span class="time-container flex-none w-[35px] font-bold text-sm">'),Hr=3,Kr=3,QP=60,eI=10,tI=5,nI=90,X0=e=>{let[t,n]=M(0),r,o,a,i,s,c,l,u=[],f,d,p=0,h=tt(e.buttonsTheme?.backgroundColor??ba).join(", "),g=()=>{if(!a||!r||!d)return;let E=performance.now(),S=E-d;d=E,a.clearRect(0,0,r.width,r.height),a.fillStyle=`rgba(${h}, 0.2)`;for(let k=0;k<(r.width+Kr)/(Hr+Kr);k++){let I=k*(Hr+Kr)-p,G=r.height*(eI/100),D=(r.height-G)/2;a.beginPath(),a.roundRect(I,D,Hr,G,5),a.fill()}a.fillStyle=`rgba(${h}, 1)`;for(let k=0;k<u.length;k++){let I=r.width+(k+1)*(Hr+Kr)-p,G=r.height*((u[k]??0)/100),D=(r.height-G)/2;a.beginPath(),a.roundRect(I,D,Hr,G,5),a.fill()}p+=QP*(S/1e3),o=requestAnimationFrame(g)},x=async()=>{r&&(l=await navigator.mediaDevices.getUserMedia({audio:!0}),e.onRecordingConfirmed(l),a||(a=r.getContext("2d")??void 0),f=setInterval(()=>{n(E=>E+=1)},1e3),i=new AudioContext,s=await rI(i),c=i.createMediaStreamSource(l),c.connect(s),s.connect(i.destination),s.port.onmessage=E=>{((r.width+Kr)/(Hr+Kr)+u.length)*(Hr+Kr)<r.width+p&&u.push(Math.min(Math.max(E.data,tI),nI))},d=performance.now(),o=requestAnimationFrame(g))},b=()=>{a&&r&&a.clearRect(0,0,r.width,r.height),p=0,s?.disconnect(),s=void 0,c?.disconnect(),c=void 0,i?.close(),i=void 0,l?.getTracks().forEach(E=>E.stop()),l=void 0,u=[],clearTimeout(f),n(0),cancelAnimationFrame(o),e.onAbortRecording()};return be(()=>{e.recordingStatus==="asking"?x():e.recordingStatus==="stopped"&&b()}),ue(()=>{b()}),(()=>{var E=XP(),S=E.firstChild,k=S.nextSibling,I=k.firstChild,G=k.nextSibling;Ve(S,"click",b),v(S,m(Sn,{class:"w-4"}));var D=r;return typeof D=="function"?pe(D,I):r=I,v(G,()=>oI(t())),_(()=>U(E,he("w-full gap-2 items-center transition-opacity px-2 agent-recorder",e.recordingStatus==="started"?"opacity-1 flex":"opacity-0 hidden"))),E})()},rI=async e=>{let t=new Blob([J0],{type:"application/javascript"}),n=URL.createObjectURL(t);return await e.audioWorklet.addModule(n),new AudioWorkletNode(e,"volume-processor")},oI=e=>{let t=Math.floor(e/60),r=(e%60).toString().padStart(2,"0");return`${t}:${r}`};var aI=w('<div class="p-2 flex gap-2 border-gray-100 overflow-auto">'),iI=w("<div>"),sI=w("<div><div>"),ev=e=>{let[t,n]=M(e.defaultValue??""),[r,o]=M([]),[a,i]=M(void 0),[s,c]=M(!1),[l,u]=M("stopped"),f,d,p=[],h=P=>n(P),g=()=>f?.value!==""&&f?.reportValidity(),x=async()=>{if(l()==="started"&&d){d.stop();return}if(g()){let P;r().length>0&&(i(void 0),P=(await Go({apiHost:e.context.apiHost??Ct({ignoreChatApiUrl:!0}),files:r().map(C=>({file:C,input:{blockId:e.block.id,sessionId:e.context.sessionId,fileName:C.name}})),onUploadProgress:i}))?.map((C,R)=>C?{...C,blobUrl:URL.createObjectURL(r()[R])}:null).filter(te)),e.onSubmit({type:"text",value:f?.value??t(),attachments:P})}else f?.focus()},b=P=>{e.block.options?.isLong||P.key==="Enter"&&x()},E=P=>{e.block.options?.isLong&&P.key==="Enter"&&(P.metaKey||P.ctrlKey)&&x()};ae(()=>{!Y()&&f&&f.focus({preventScroll:!0}),window.addEventListener("message",S)}),ue(()=>{window.removeEventListener("message",S)});let S=P=>{let{data:T}=P;T.isFromAgent&&T.command==="setInputValue"&&n(T.value)},k=P=>{P.preventDefault(),c(!0)},I=()=>c(!1),G=P=>{P.preventDefault(),P.stopPropagation(),P.dataTransfer?.files&&D(P.dataTransfer.files)},D=P=>{let T=Array.from(P).map(C=>Hs({existingFiles:r(),newFile:C,params:{sizeLimit:cn("NEXT_PUBLIC_AGENT_FILE_UPLOAD_MAX_SIZE")},onError:({description:R,title:O})=>{lr.create({description:R,title:O})}})).filter(te);T.length!==0&&o(C=>[...T,...C])},ie=P=>{o(T=>T.filter((C,R)=>R!==P))},V=()=>{u("asking")},W=P=>{let T,C=MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":"video/mp4";d=new MediaRecorder(P,{mimeType:C}),d.ondataavailable=R=>{R.data.size!==0&&p.push(R.data)},d.onstart=()=>{T=Date.now()},d.onstop=async()=>{if(l()!=="started"||p.length===0)return;let R=Date.now()-T,O=await(0,Q0.fixWebmDuration)(new Blob(p,{type:C}),R),re=new File([O],`rec-${e.block.id}-${Date.now()}.${C==="audio/webm"?"webm":"mp4"}`,{type:C});i(void 0);let ge=(await Go({apiHost:e.context.apiHost??Ct({ignoreChatApiUrl:!0}),files:[{file:re,input:{blockId:e.block.id,sessionId:e.context.sessionId,fileName:re.name}}],onUploadProgress:i})).filter(te).map(ve=>ve.url);e.onSubmit({type:"recording",url:ge[0],blobUrl:URL.createObjectURL(re)})},d.start(),u("started")},L=()=>{d?.stop(),u("stopped"),d=void 0,p=[]};return(()=>{var P=sI(),T=P.firstChild;return P.addEventListener("dragleave",I),P.addEventListener("dragover",k),P.addEventListener("drop",G),P.$$keydown=b,v(T,m(X0,{get recordingStatus(){return l()},get buttonsTheme(){return e.context.agent.theme.chat?.buttons},onRecordingConfirmed:W,onAbortRecording:L}),null),v(T,m(B,{get when(){return l()!=="started"},get children(){return[m(B,{get when(){return r().length},get children(){var C=aI();return C.style.setProperty("border-bottom-width","1px"),v(C,m(ye,{get each(){return r()},children:(R,O)=>m(js,{file:R,get uploadProgressPercent(){return F(()=>!!a())()?F(()=>a()?.fileIndex===O())()?20:O()<(a()?.fileIndex??0)?100:0:void 0},onRemoveClick:()=>ie(O())})})),C}}),(()=>{var C=iI();return v(C,(()=>{var R=F(()=>!!e.block.options?.isLong);return()=>R()?m(m0,{ref(O){var re=f;typeof re=="function"?re(O):f=O},onInput:h,onKeyDown:E,get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??pl.labels.placeholder}}):m(ur,{ref(O){var re=f;typeof re=="function"?re(O):f=O},onInput:h,get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??pl.labels.placeholder}})})(),null),v(C,m(B,{get when(){return(e.block.options?.attachments?.isEnabled??pl.attachments.isEnabled)&&e.block.options?.attachments?.saveVariableId},get children(){return m(f0,{onNewFiles:D,get class(){return he(e.block.options?.isLong?"ml-2":void 0)}})}}),null),_(()=>U(C,he("flex justify-between px-2",e.block.options?.isLong?"items-end":"items-center"))),C})()]}}),null),v(P,m(Ie,{get children(){return[m(Z,{get when(){return!t()&&l()!=="started"&&e.block.options?.audioClip?.isEnabled},get children(){return m(nn,{class:"h-[56px] flex items-center","on:click":V,"aria-label":"Record voice",get children(){return m(p0,{class:"flex w-6 h-6"})}})}}),m(Z,{when:!0,get children(){return m(je,{type:"button","on:click":x,get isDisabled(){return!!a()},class:"h-[56px]",get children(){return e.block.options?.labels?.button}})}})]}}),null),_(C=>{var R=he("agent-input-form flex w-full gap-2 items-end",e.block.options?.isLong&&l()!=="started"?"max-w-full":"max-w-[350px]"),O=he("relative agent-input flex-col w-full",s()&&"filter brightness-95");return R!==C.e&&U(P,C.e=R),O!==C.t&&U(T,C.t=O),C},{e:void 0,t:void 0}),P})()};$e(["keydown"]);var tv={labels:{button:it,placeholder:"Type a URL..."},retryMessageContent:"This URL doesn't seem to be valid. Can you type it again?"};var lI=w('<div class="agent-input-form flex w-full gap-2 items-end max-w-[350px]"><div class="flex agent-input w-full">'),nv=e=>{let[t,n]=M(e.defaultValue??""),r,o=l=>{n(l)},a=()=>r?.value!==""&&r?.reportValidity(),i=()=>{r&&!r?.value.startsWith("http")&&(r.value=`https://${r.value}`),a()?e.onSubmit({type:"text",value:r?.value??t()}):r?.focus()},s=l=>{l.key==="Enter"&&i()};ae(()=>{!Y()&&r&&r.focus({preventScroll:!0}),window.addEventListener("message",c)}),ue(()=>{window.removeEventListener("message",c)});let c=l=>{let{data:u}=l;u.isFromAgent&&u.command==="setInputValue"&&n(u.value)};return(()=>{var l=lI(),u=l.firstChild;return l.$$keydown=s,v(u,m(ur,{ref(f){var d=r;typeof d=="function"?d(f):r=f},get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??tv.labels.placeholder},onInput:o,type:"url",autocomplete:"url"})),v(l,m(je,{type:"button",class:"h-[56px]","on:click":i,get children(){return e.block.options?.labels?.button}}),null),l})()};$e(["keydown"]);var rv=e=>m(sr.Root,{get open(){return e.isOpen},lazyMount:!0,unmountOnExit:!0,onOpenChange:t=>t.open?void 0:e.onClose?.(),get children(){return[m(sr.Backdrop,{class:"fixed inset-0 bg-[rgba(0,0,0,0.5)] h-screen z-50"}),m(sr.Positioner,{class:"fixed inset-0 z-50 flex items-center justify-center px-2",get children(){return[m(sr.Content,{get children(){return e.children}}),m(sr.CloseTrigger,{class:"fixed top-2 right-2 z-50 rounded-md bg-white p-2 text-black",get children(){return m(Sn,{class:"w-6 h-6"})}})]}})]}});var cI=w('<svg viewBox="0 0 80 80"><g transform=translate(15,15)><g stroke=none stroke-width=1 fill=none fill-rule=evenodd><g transform="translate(1.000000, 1.000000)"stroke=currentColor stroke-width=2><path d="M23,5.0109 L23,2.5 C23,1.1193 24.1193,0 25.5,0 C26.8807,0 28,1.1193 28,2.5 L28,5"stroke-linecap=round stroke-linejoin=round></path><path d="M36.4505,45 L13.5495,45 C8.8473,45 5,41.1527 5,36.4505 L5,13.5495 C5,8.8473 8.8473,5 13.5495,5 L36.4505,5 C41.1527,5 45,8.8473 45,13.5495 L45,36.4505 C45,41.1527 41.1527,45 36.4505,45 Z"stroke-linecap=round stroke-linejoin=round></path><circle stroke-linecap=round stroke-linejoin=round cx=33.8346 cy=18.0022 r=2.8338></circle><circle stroke-linecap=round stroke-linejoin=round cx=16.3342 cy=18.0017 r=2.8338></circle><path d="M33.5,36.5 L16.5,36.5 C14.3,36.5 12.5,34.7 12.5,32.5 C12.5,30.3 14.3,28.5 16.5,28.5 L33.5,28.5 C35.7,28.5 37.5,30.3 37.5,32.5 C37.5,34.7 35.7,36.5 33.5,36.5 Z"></path><g stroke-linecap=round stroke-linejoin=round transform="translate(0.000000, 17.000000)"><path d="M2.5,13 C1.1193,13 0,11.8807 0,10.5 L0,2.5 C0,1.1193 1.1193,0 2.5,0 C3.8807,0 5,1.1193 5,2.5 L5,10.5 C5,11.8807 3.8807,13 2.5,13 Z"></path><path d="M47.5,13 C48.8807,13 50,11.8807 50,10.5 L50,2.5 C50,1.1193 48.8807,0 47.5,0 C46.1193,0 45,1.1193 45,2.5 L45,10.5 C45,11.8807 46.1193,13 47.5,13 Z"></path><line x1=17 y1=12 x2=17 y2=19></line><line x1=22 y1=12 x2=22 y2=19></line><line x1=27 y1=12 x2=27 y2=19></line><line x1=32 y1=12 x2=32 y2=19>'),ov=({strokeColor:e})=>(()=>{var t=cI();return e!=null?t.style.setProperty("color",e):t.style.removeProperty("color"),_(()=>H(t,"class",Y()?"size-6":"size-10")),t})();var uI=w('<svg viewBox="0 0 80 80"><g transform=translate(15,15)><g stroke=none stroke-width=1 fill=none fill-rule=evenodd><g transform="translate(1.000000, 1.000000)"><circle id=Oval stroke=currentColor stroke-width=2 cx=25 cy=25 r=25></circle><path d="M14.9350649,32.4675325 C16.9120779,35.9554545 20.6786364,38.3116883 25,38.3116883 C29.3213636,38.3116883 33.0879221,35.9554545 35.0649351,32.4675325"id=Path stroke=currentColor stroke-width=3 stroke-linecap=round></path><circle fill=currentColor fill-rule=nonzero cx=15.2597403 cy=16.5584416 r=2.92207792></circle><circle fill=currentColor fill-rule=nonzero cx=34.0909091 cy=16.5584416 r=2.92207792>'),av=({strokeColor:e})=>(()=>{var t=uI();return e!=null?t.style.setProperty("color",e):t.style.removeProperty("color"),_(()=>H(t,"class",Y()?"size-6":"size-10")),t})();var dI=w('<span class="text-4xl text-[40px]">'),fI=w('<img alt="Bot avatar"elementtiming="Bot avatar">'),pI=w('<figure><img alt="Bot avatar"class="rounded-full object-cover w-full h-full"elementtiming="Bot avatar"fetchpriority=high>'),mI=w('<div class="absolute left-[-4px] top-1/2 -translate-y-1/2 w-0 h-0">'),gI=w('<div class="absolute right-[-4px] top-1/2 -translate-y-1/2 w-0 h-0">'),hI=w("<div>"),ml=e=>m(B,{get when(){return Ee(e.src)},keyed:!0,get fallback(){return(()=>{var t=hI();return v(t,m(B,{get when(){return e.isGuest},get children(){return[m(av,{get strokeColor(){return e.theme.chat?.hostBubbles?.color??ya}}),(()=>{var n=mI();return n.style.setProperty("border-top","5px solid transparent"),n.style.setProperty("border-bottom","5px solid transparent"),_(r=>(r=`5px solid ${e.theme.chat?.hostBubbles?.backgroundColor??So}`)!=null?n.style.setProperty("border-right",r):n.style.removeProperty("border-right")),n})()]}}),null),v(t,m(B,{get when(){return!e.isGuest},get children(){return[m(ov,{get strokeColor(){return e.theme.chat?.hostBubbles?.color??ya}}),(()=>{var n=gI();return n.style.setProperty("border-top","5px solid transparent"),n.style.setProperty("border-bottom","5px solid transparent"),_(r=>(r=`5px solid ${e.theme.chat?.hostBubbles?.backgroundColor??So}`)!=null?n.style.setProperty("border-left",r):n.style.removeProperty("border-left")),n})()]}}),null),_(n=>{var r=`relative flex justify-center items-center rounded-full ${Y()?"w-6 h-6":"w-10 h-10"}
|
|
123
|
-
`,o=e.theme.chat?.hostBubbles?.backgroundColor??So;return r!==n.e&&U(t,n.e=r),o!==n.t&&((n.t=o)!=null?t.style.setProperty("background",o):t.style.removeProperty("background")),n},{e:void 0,t:void 0}),t})()},get children(){return m(Ie,{get children(){return[m(Z,{get when(){return bI(e.src??"")},get children(){var t=dI();return v(t,()=>e.src),t}}),m(Z,{get when(){return Zt(e.src)},get children(){var t=fI();return _(n=>{var r=e.src,o="flex justify-center items-center relative animate-fade-in flex-shrink-0 "+(Y()?"w-6 h-6 text-sm":"w-10 h-10 text-xl");return r!==n.e&&H(t,"src",n.e=r),o!==n.t&&U(t,n.t=o),n},{e:void 0,t:void 0}),t}}),m(Z,{when:!0,get children(){var t=pI(),n=t.firstChild;return _(r=>{var o="flex justify-center items-center rounded-full text-white relative animate-fade-in flex-shrink-0 "+(Y()?"w-6 h-6 text-sm":"w-10 h-10 text-xl"),a=e.src;return o!==r.e&&U(t,r.e=o),a!==r.t&&H(n,"src",r.t=a),r},{e:void 0,t:void 0}),t}})]}})}}),bI=e=>/^\p{Emoji}$/u.test(e);var yI=w('<div class="flex justify-end items-end animate-fade-in gap-2 guest-container">'),iv=w("<div>"),vI=w('<span class="px-[15px] py-[7px]">'),xI=w("<img alt=Attachment>"),SI=w('<div class="flex flex-col gap-1 items-end"><div class="p-[1px] whitespace-pre-wrap max-w-full agent-guest-bubble flex flex-col"data-testid=guest-bubble>'),wI=w("<img>"),TI=w('<div class="flex flex-col gap-1 items-end"><div class="p-2 w-full whitespace-pre-wrap agent-guest-bubble flex flex-col"data-testid=guest-bubble><audio controls>'),sv=e=>(()=>{var t=yI();return v(t,m(Ie,{get children(){return[m(Z,{get when(){return e.answer?.type==="text"},get children(){return m(CI,{get answer(){return e.answer}})}}),m(Z,{get when(){return e.answer?.type==="recording"},get children(){return m(EI,{get answer(){return e.answer}})}})]}}),null),v(t,m(B,{get when(){return e.showAvatar},get children(){return m(ml,{isGuest:!0,get theme(){return e.theme},get src(){return e.avatarSrc}})}}),null),_(n=>(n=e.hasHostAvatar?Y()?"28px":"50px":void 0)!=null?t.style.setProperty("margin-left",n):t.style.removeProperty("margin-left")),t})(),CI=e=>{let[t,n]=M();return(()=>{var r=SI(),o=r.firstChild;return v(r,m(B,{get when(){return(e.answer.attachments??[]).length>0},get children(){return[(()=>{var a=iv();return v(a,m(ye,{get each(){return e.answer.attachments?.filter(i=>i.type.startsWith("image"))},children:(i,s)=>(()=>{var c=wI();return c.$$click=()=>n(i.blobUrl??i.url),_(l=>{var u=i.blobUrl??i.url,f=`Attached image ${s()+1}`,d=he("agent-guest-bubble-image-attachment cursor-pointer",e.answer.attachments.filter(p=>p.type.startsWith("image")).length>1&&"max-w-[90%]");return u!==l.e&&H(c,"src",l.e=u),f!==l.t&&H(c,"alt",l.t=f),d!==l.a&&U(c,l.a=d),l},{e:void 0,t:void 0,a:void 0}),c})()})),_(()=>U(a,he("flex gap-1 overflow-auto max-w-[350px]",Y()?"flex-wrap justify-end":"items-center"))),a})(),(()=>{var a=iv();return v(a,m(ye,{get each(){return e.answer.attachments?.filter(i=>!i.type.startsWith("image"))},children:i=>m(Vs,{get file(){return{name:i.url.split("/").at(-1)}}})})),_(()=>U(a,he("flex gap-1 overflow-auto max-w-[350px]",Y()?"flex-wrap justify-end":"items-center"))),a})()]}}),o),v(o,m(B,{get when(){return Ee(e.answer.label??e.answer.value)},get children(){var a=vI();return v(a,()=>e.answer.label??e.answer.value),a}})),v(r,m(rv,{get isOpen(){return t()!==void 0},onClose:()=>n(void 0),get children(){var a=xI();return a.style.setProperty("border-radius","6px"),_(()=>H(a,"src",t())),a}}),null),r})()},EI=e=>(()=>{var t=TI(),n=t.firstChild,r=n.firstChild;return _(()=>H(r,"src",e.answer.blobUrl??e.answer.url)),t})();$e(["click"]);var kI=w("<div>"),AI=w('<div class="flex justify-end animate-fade-in gap-2 agent-input-container">'),lv=e=>{let[t,n]=fn(M(),{key:`agent-${e.context.agent.id}-input-${e.chunkIndex}`,storage:e.context.storage});ae(()=>{e.isOngoingLastChunk&&te(t())&&e.onSubmit(t())});let r=async a=>{n(a),e.onSubmit(a)},o=a=>{n({type:"text",value:a}),e.onSkip()};return be(()=>{let a=$s().findLast(i=>e.chunkIndex===i.inputIndex)?.formattedMessage;a&&e.block.type!=="file input"&&n(i=>i?.type==="text"?{...i,label:a}:i)}),m(Ie,{get children(){return[m(Z,{get when(){return t()&&!e.hasError},get children(){return m(sv,{get theme(){return e.theme},get answer(){return t()},get showAvatar(){return e.guestAvatar?.isEnabled??va},get avatarSrc(){return e.guestAvatar?.url&&e.guestAvatar.url},get hasHostAvatar(){return e.hasHostAvatar}})}}),m(Z,{get when(){return Je(t())||e.hasError},get children(){var a=AI(),i=e.ref;return typeof i=="function"?pe(i,a):e.ref=a,v(a,m(B,{get when(){return e.hasHostAvatar},get children(){var s=kI();return _(()=>U(s,"flex flex-shrink-0 items-center "+(Y()?"w-6 h-6":"w-10 h-10"))),s}}),null),v(a,m(II,{get context(){return e.context},get block(){return e.block},get chunkIndex(){return e.chunkIndex},get isInputPrefillEnabled(){return e.isInputPrefillEnabled},get existingAnswer(){return F(()=>!!e.hasError)()?PI(t()):void 0},get onTransitionEnd(){return e.onTransitionEnd},onSubmit:r,onSkip:o}),null),_(()=>H(a,"data-blockid",e.block.id)),a}})]}})},PI=e=>{if(e)return e.type==="text"?e.value:e.url},II=e=>{let t=o=>e.onSubmit(o),n=()=>e.existingAnswer??(e.isInputPrefillEnabled?e.block.prefilledValue:void 0),r=()=>e.onSubmit({type:"text",value:e.block.options?.labels?.success??Ys.labels.success});return m(Ie,{get children(){return[m(Z,{get when(){return e.block.type==="text input"},get children(){return m(ev,{get block(){return e.block},get defaultValue(){return n()},get context(){return e.context},onSubmit:t})}}),m(Z,{get when(){return e.block.type==="number input"},get children(){return m(jy,{get block(){return e.block},get defaultValue(){return n()},onSubmit:t})}}),m(Z,{get when(){return e.block.type==="email input"},get children(){return m($y,{get block(){return e.block},get defaultValue(){return n()},onSubmit:t})}}),m(Z,{get when(){return e.block.type==="url input"},get children(){return m(nv,{get block(){return e.block},get defaultValue(){return n()},onSubmit:t})}}),m(Z,{get when(){return e.block.type==="phone number input"},get children(){return m(o0,{get labels(){return e.block.options?.labels},get defaultCountryCode(){return e.block.options?.defaultCountryCode},get defaultValue(){return n()},onSubmit:t})}}),m(Z,{get when(){return e.block.type==="date input"},get children(){return m(Uy,{get options(){return e.block.options},get defaultValue(){return n()},onSubmit:t})}}),m(Z,{get when(){return _I(e.block)},keyed:!0,children:o=>m(Ie,{get children(){return[m(Z,{get when(){return!o.options?.isMultipleChoice},get children(){return m(Ny,{get chunkIndex(){return e.chunkIndex},get defaultItems(){return o.items},get options(){return o.options},onSubmit:t})}}),m(Z,{get when(){return o.options?.isMultipleChoice},get children(){return m(Dy,{get defaultItems(){return o.items},get options(){return o.options},onSubmit:t})}})]}})}),m(Z,{get when(){return MI(e.block)},keyed:!0,children:o=>m(Ie,{get children(){return[m(Z,{get when(){return!o.options?.isMultipleChoice},get children(){return m(c0,{get defaultItems(){return o.items},get options(){return o.options},onSubmit:t,get onTransitionEnd(){return e.onTransitionEnd}})}}),m(Z,{get when(){return o.options?.isMultipleChoice},get children(){return m(l0,{get defaultItems(){return o.items},get options(){return o.options},onSubmit:t,get onTransitionEnd(){return e.onTransitionEnd}})}})]}})}),m(Z,{get when(){return e.block.type==="rating input"},get children(){return m(u0,{get block(){return e.block},get defaultValue(){return n()},onSubmit:t})}}),m(Z,{get when(){return e.block.type==="file input"},get children(){return m(Hy,{get context(){return e.context},get block(){return e.block},onSubmit:t,get onSkip(){return e.onSkip}})}}),m(Z,{get when(){return e.block.type==="payment input"},get children(){return m(t0,{get context(){return e.context},get options(){return{...e.block.options,...e.block.runtimeOptions}},onSuccess:r,get onTransitionEnd(){return e.onTransitionEnd}})}})]}})},_I=e=>e?.type==="choice input"?e:void 0,MI=e=>e?.type==="image choice"?e:void 0;var RI=w('<div class="flex items-center gap-1"><div class="w-2 h-2 rounded-full bubble1"></div><div class="w-2 h-2 rounded-full bubble2"></div><div class="w-2 h-2 rounded-full bubble3">'),It=()=>RI();var cv={isAutoplayEnabled:!0};var NI=w('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start agent-host-bubble max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 "></div><audio controls>'),OI=400,LI=100,Bu,uv=e=>{let t=!1,n,r,[o,a]=M(!!e.onTransitionEnd);return ae(()=>{Bu=setTimeout(()=>{t||(t=!0,a(!1),setTimeout(()=>e.onTransitionEnd?.(n),OI))},LI)}),ue(()=>{Bu&&clearTimeout(Bu)}),(()=>{var i=NI(),s=i.firstChild,c=s.firstChild,l=c.firstChild,u=l.nextSibling,f=n;typeof f=="function"?pe(f,i):n=i,v(l,(()=>{var p=F(()=>!!o());return()=>p()&&m(It,{})})());var d=r;return typeof d=="function"?pe(d,u):r=u,_(p=>{var h=he("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),g=o()?"64px":"100%",x=o()?"32px":"100%",b=e.content?.url,E=e.onTransitionEnd?e.content?.isAutoplayEnabled??cv.isAutoplayEnabled:!1,S="z-10 text-fade-in "+(o()?"opacity-0":"opacity-100 m-2"),k=o()?Y()?"32px":"36px":"revert";return h!==p.e&&U(i,p.e=h),g!==p.t&&((p.t=g)!=null?l.style.setProperty("width",g):l.style.removeProperty("width")),x!==p.a&&((p.a=x)!=null?l.style.setProperty("height",x):l.style.removeProperty("height")),b!==p.o&&H(u,"src",p.o=b),E!==p.i&&(u.autoplay=p.i=E),S!==p.n&&U(u,p.n=S),k!==p.s&&((p.s=k)!=null?u.style.setProperty("height",k):u.style.removeProperty("height")),p},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),i})()};var DI=w('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start agent-host-bubble w-full max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 "></div><div><div class="w-full overflow-y-auto">'),Uu,BI=400,dv=e=>{let t,[n,r]=M(!!e.onTransitionEnd),o;return ae(()=>{Ka({args:{...e.content.initFunction.args,agentElement:o},content:e.content.initFunction.content}),e.content.waitForEventFunction&&Ka({args:{...e.content.waitForEventFunction.args,continueFlow:a=>e.onCompleted(a?{type:"text",value:a}:void 0)},content:e.content.waitForEventFunction.content}),Uu=setTimeout(()=>{r(!1),setTimeout(()=>e.onTransitionEnd?.(t),BI)},2e3)}),ue(()=>{Uu&&clearTimeout(Uu)}),(()=>{var a=DI(),i=a.firstChild,s=i.firstChild,c=s.firstChild,l=c.nextSibling,u=l.firstChild,f=t;typeof f=="function"?pe(f,a):t=a,v(c,(()=>{var p=F(()=>!!n());return()=>p()&&m(It,{})})());var d=o;return typeof d=="function"?pe(d,u):o=u,_(p=>{var h=he("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),g=n()?"64px":"100%",x=n()?"32px":"100%",b=he("p-2 z-20 text-fade-in w-full",n()?"opacity-0":"opacity-100"),E=n()?Y()?"32px":"36px":void 0,S=`calc(${Gp()} - 100px)`;return h!==p.e&&U(a,p.e=h),g!==p.t&&((p.t=g)!=null?c.style.setProperty("width",g):c.style.removeProperty("width")),x!==p.a&&((p.a=x)!=null?c.style.setProperty("height",x):c.style.removeProperty("height")),b!==p.o&&U(l,p.o=b),E!==p.i&&((p.i=E)!=null?l.style.setProperty("height",E):l.style.removeProperty("height")),S!==p.n&&((p.n=S)!=null?u.style.setProperty("max-height",S):u.style.removeProperty("max-height")),p},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),a})()};var fv={height:400};var UI=w('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start agent-host-bubble w-full max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 "></div><div><iframe id=embed-bubble-content class="w-full h-full ">'),Fu,FI=400,pv=e=>{let t,[n,r]=M(!!e.onTransitionEnd),o=a=>{e.content?.waitForEvent?.isEnabled&&Ee(a.data.name)&&a.data.name===e.content?.waitForEvent.name&&(e.onCompleted?.(e.content.waitForEvent.saveDataInVariableId&&a.data.data?{type:"text",value:a.data.data}:void 0),window.removeEventListener("message",o))};return ae(()=>{Fu=setTimeout(()=>{r(!1),e.content?.waitForEvent?.isEnabled&&window.addEventListener("message",o),setTimeout(()=>{e.onTransitionEnd?.(t)},FI)},2e3)}),ue(()=>{Fu&&clearTimeout(Fu),window.removeEventListener("message",o)}),(()=>{var a=UI(),i=a.firstChild,s=i.firstChild,c=s.firstChild,l=c.nextSibling,u=l.firstChild,f=t;return typeof f=="function"?pe(f,a):t=a,v(c,(()=>{var d=F(()=>!!n());return()=>d()&&m(It,{})})()),_(d=>{var p=he("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),h=n()?"64px":"100%",g=n()?"32px":"100%",x=he("p-4 z-20 text-fade-in w-full",n()?"opacity-0":"opacity-100 p-4"),b=n()?Y()?"32px":"36px":`${e.content?.height??fv.height}px`,E=e.content?.url;return p!==d.e&&U(a,d.e=p),h!==d.t&&((d.t=h)!=null?c.style.setProperty("width",h):c.style.removeProperty("width")),g!==d.a&&((d.a=g)!=null?c.style.setProperty("height",g):c.style.removeProperty("height")),x!==d.o&&U(l,d.o=x),b!==d.i&&((d.i=b)!=null?l.style.setProperty("height",b):l.style.removeProperty("height")),E!==d.n&&H(u,"src",d.n=E),d},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),a})()};var mv={clickLink:{alt:"Bubble image"}};var $I=w('<img elementtiming="Bubble image"fetchpriority=high>'),GI=w('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start agent-host-bubble max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 ">'),HI=w("<a target=_blank rel=noreferrer>"),KI=w("<figure>"),VI=400,jI=5e3,gl,gv=e=>{let t,n,[r,o]=M(!!e.onTransitionEnd),a=()=>{r()&&(o(!1),setTimeout(()=>{e.onTransitionEnd?.(t)},VI))};ae(()=>{n&&(gl=setTimeout(a,jI),n.onload=()=>{clearTimeout(gl),a()})}),ue(()=>{gl&&clearTimeout(gl)});let i=(()=>{var s=$I(),c=n;return typeof c=="function"?pe(c,s):n=s,s.style.setProperty("max-height","512px"),_(l=>{var u=e.content?.url,f=e.content?.clickLink?.alt??mv.clickLink.alt,d=he(r()?"opacity-0":"opacity-100",e.onTransitionEnd?"text-fade-in":void 0,e.content?.url?.endsWith(".svg")?"w-full":void 0),p=r()?"32px":"auto";return u!==l.e&&H(s,"src",l.e=u),f!==l.t&&H(s,"alt",l.t=f),d!==l.a&&U(s,l.a=d),p!==l.o&&((l.o=p)!=null?s.style.setProperty("height",p):s.style.removeProperty("height")),l},{e:void 0,t:void 0,a:void 0,o:void 0}),s})();return(()=>{var s=GI(),c=s.firstChild,l=c.firstChild,u=l.firstChild,f=t;return typeof f=="function"?pe(f,s):t=s,v(u,(()=>{var d=F(()=>!!r());return()=>d()?m(It,{}):null})()),v(l,(()=>{var d=F(()=>!!e.content?.clickLink);return()=>d()?(()=>{var p=HI();return v(p,i),_(h=>{var g=e.content.clickLink.url,x=he("z-10",r()?"h-8":"p-4");return g!==h.e&&H(p,"href",h.e=g),x!==h.t&&U(p,h.t=x),h},{e:void 0,t:void 0}),p})():(()=>{var p=KI();return v(p,i),_(()=>U(p,he("z-10",!r()&&"p-4",r()?Y()?"h-8":"h-9":""))),p})()})(),null),_(d=>{var p=he("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),h=r()?"64px":"100%",g=r()?"32px":"100%";return p!==d.e&&U(s,d.e=p),h!==d.t&&((d.t=h)!=null?u.style.setProperty("width",h):u.style.removeProperty("width")),g!==d.a&&((d.a=g)!=null?u.style.setProperty("height",g):u.style.removeProperty("height")),d},{e:void 0,t:void 0,a:void 0}),s})()};var hv=({bubbleContent:e,typingSettings:t})=>{let n=e.match(/(\w+)/g)?.length??0;n===0&&(n=e.length);let{enabled:r,speed:o,maxDelay:a}={enabled:t?.enabled??at.typingEmulation.enabled,speed:t?.speed??at.typingEmulation.speed,maxDelay:t?.maxDelay??at.typingEmulation.maxDelay},s=r?n/o*6e4:0;return s>a*1e3&&(s=a*1e3),s};var $u=e=>e.map(t=>t.text??$u(t.children)).join("");var WI=w("<br>"),zI=w("<span>"),ZI=(e,t,n)=>{let r="";return e&&(r+="slate-bold"),t&&(r+=" slate-italic"),n&&(r+=" slate-underline"),r},bv=e=>(()=>{var t=zI();return v(t,()=>e.text,null),v(t,m(B,{get when(){return F(()=>!!e.isUniqueChild)()&&He(e.text)},get children(){return WI()}}),null),_(()=>U(t,ZI(e.bold,e.italic,e.underline))),t})();var YI=w('<a target=_blank rel="noopener noreferrer">'),qI=w("<ol>"),JI=w("<ul>"),XI=w("<li>"),QI=w("<span>"),e_=w("<div>"),Vr=e=>m(Ie,{get children(){return[m(Z,{get when(){return te(e.element.text)},get children(){return m(bv,Te(()=>e.element,{get isUniqueChild(){return e.isUniqueChild??!1}}))}}),m(Z,{when:!0,get children(){return m(Ie,{get children(){return[m(Z,{get when(){return e.element.type==="a"},get children(){var t=YI();return v(t,m(ye,{get each(){return e.element.children},children:n=>m(Vr,{element:n,get isUniqueChild(){return e.element.children?.length===1}})})),_(()=>H(t,"href",e.element.url)),t}}),m(Z,{get when(){return e.element.type==="ol"},get children(){var t=qI();return v(t,m(ye,{get each(){return e.element.children},children:n=>m(Vr,{element:n,get isUniqueChild(){return e.element.children?.length===1}})})),t}}),m(Z,{get when(){return e.element.type==="ul"},get children(){var t=JI();return v(t,m(ye,{get each(){return e.element.children},children:n=>m(Vr,{element:n,get isUniqueChild(){return e.element.children?.length===1}})})),t}}),m(Z,{get when(){return e.element.type==="li"},get children(){var t=XI();return v(t,m(ye,{get each(){return e.element.children},children:n=>m(Vr,{element:n,get isUniqueChild(){return e.element.children?.length===1}})})),t}}),m(Z,{when:!0,get children(){return m(t_,{get element(){return e.element},get insideInlineVariable(){return e.insideInlineVariable??!1},get children(){return m(ye,{get each(){return e.element.children},children:t=>m(Vr,{element:t,get isUniqueChild(){return e.element.children?.length===1},get insideInlineVariable(){return e.element.type==="inline-variable"}})})}})}})]}})}})]}}),t_=e=>m(Ie,{get children(){return[m(Z,{get when(){return e.element.type==="inline-variable"||e.insideInlineVariable},get children(){var t=QI();return v(t,()=>e.children),_(()=>H(t,"data-element-type",e.element.type)),t}}),m(Z,{when:!0,get children(){var t=e_();return v(t,()=>e.children),_(()=>H(t,"data-element-type",e.element.type)),t}})]}});var n_=w('<div><div class="flex w-full items-center"><div class="flex relative items-start agent-host-bubble max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing "data-testid=host-bubble></div><div>'),r_=400,Gu,yv=e=>{let t,[n,r]=M(!!e.onTransitionEnd),o=()=>{n()&&(r(!1),setTimeout(()=>{e.onTransitionEnd?.(t)},r_))};return ae(()=>{if(!n)return;let a=e.content?.richText?$u(e.content.richText):"",i=e.typingEmulation?.enabled===!1||e.isTypingSkipped?0:hv({bubbleContent:a,typingSettings:e.typingEmulation});Gu=setTimeout(o,i)}),ue(()=>{Gu&&clearTimeout(Gu)}),(()=>{var a=n_(),i=a.firstChild,s=i.firstChild,c=s.firstChild,l=c.nextSibling,u=t;return typeof u=="function"?pe(u,a):t=a,v(c,(()=>{var f=F(()=>!!n());return()=>f()&&m(It,{})})()),v(l,m(ye,{get each(){return e.content?.richText},children:f=>m(Vr,{element:f})})),_(f=>{var d=he("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),p=n()?"64px":"100%",h=n()?"32px":"100%",g=he("overflow-hidden text-fade-in mx-4 my-2 whitespace-pre-wrap slate-html-container relative text-ellipsis",n()?"opacity-0":"opacity-100"),x=n()?Y()?"16px":"20px":"100%";return d!==f.e&&U(a,f.e=d),p!==f.t&&((f.t=p)!=null?c.style.setProperty("width",p):c.style.removeProperty("width")),h!==f.a&&((f.a=h)!=null?c.style.setProperty("height",h):c.style.removeProperty("height")),g!==f.o&&U(l,f.o=g),x!==f.i&&((f.i=x)!=null?l.style.setProperty("height",x):l.style.removeProperty("height")),f},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()};var Hu=["youtube","vimeo","tiktok","gumlet"],jr={height:400,aspectRatio:"16/9",maxWidth:"100%",areControlsDisplayed:!0,isAutoplayEnabled:!0};var o_="https://www.youtube.com/embed";var a_="https://player.vimeo.com/video";var i_="https://www.tiktok.com/embed/v2";var s_="https://play.gumlet.io/embed";var vv={vimeo:a_,youtube:o_,tiktok:i_,gumlet:s_};var l_=w("<video>"),c_=w('<div><iframe class="w-full h-full"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"allowfullscreen>'),u_=w('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start agent-host-bubble overflow-hidden w-full max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 ">'),d_=400,Ku,xv=e=>{let t,[n,r]=M(!!e.onTransitionEnd);return ae(()=>{let o=e.content?.type&&Hu.includes(e.content?.type)?2e3:100;Ku=setTimeout(()=>{n()&&(r(!1),setTimeout(()=>{e.onTransitionEnd?.(t)},d_))},o)}),ue(()=>{Ku&&clearTimeout(Ku)}),(()=>{var o=u_(),a=o.firstChild,i=a.firstChild,s=i.firstChild,c=t;return typeof c=="function"?pe(c,o):t=o,v(s,(()=>{var l=F(()=>!!n());return()=>l()&&m(It,{})})()),v(i,m(Ie,{get children(){return[m(Z,{get when(){return e.content?.type&&e.content.type==="url"},get children(){var l=l_();return _(u=>{var f=e.onTransitionEnd?e.content?.isAutoplayEnabled??jr.isAutoplayEnabled:!1,d=e.content?.url,p=e.content?.areControlsDisplayed??jr.areControlsDisplayed,h="p-4 focus:outline-none w-full z-10 text-fade-in rounded-md "+(n()?"opacity-0":"opacity-100"),g=n()?Y()?"32px":"36px":"auto",x=e.content?.aspectRatio,b=e.content?.maxWidth??jr.maxWidth;return f!==u.e&&(l.autoplay=u.e=f),d!==u.t&&H(l,"src",u.t=d),p!==u.a&&(l.controls=u.a=p),h!==u.o&&U(l,u.o=h),g!==u.i&&((u.i=g)!=null?l.style.setProperty("height",g):l.style.removeProperty("height")),x!==u.n&&((u.n=x)!=null?l.style.setProperty("aspect-ratio",x):l.style.removeProperty("aspect-ratio")),b!==u.s&&((u.s=b)!=null?l.style.setProperty("max-width",b):l.style.removeProperty("max-width")),u},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),l}}),m(Z,{get when(){return F(()=>!!e.content?.type)()&&Hu.includes(e.content.type)},get children(){var l=c_(),u=l.firstChild;return _(f=>{var d=_t("p-4 z-10 text-fade-in w-full",n()?"opacity-0":"opacity-100 p-4"),p=n()?Y()?"32px":"36px":e.content?.aspectRatio?void 0:`${e.content?.height??jr.height}px`,h=e.content?.aspectRatio,g=e.content?.maxWidth??jr.maxWidth,x=`${vv[e.content?.type]}/${e.content?.id??""}${e.content?.queryParamsStr??""}`;return d!==f.e&&U(l,f.e=d),p!==f.t&&((f.t=p)!=null?l.style.setProperty("height",p):l.style.removeProperty("height")),h!==f.a&&((f.a=h)!=null?l.style.setProperty("aspect-ratio",h):l.style.removeProperty("aspect-ratio")),g!==f.o&&((f.o=g)!=null?l.style.setProperty("max-width",g):l.style.removeProperty("max-width")),x!==f.i&&H(u,"src",f.i=x),f},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l}})]}}),null),_(l=>{var u=_t("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),f=n()?"64px":"100%",d=n()?"32px":"100%",p=e.content?.maxWidth??jr.maxWidth;return u!==l.e&&U(o,l.e=u),f!==l.t&&((l.t=f)!=null?s.style.setProperty("width",f):s.style.removeProperty("width")),d!==l.a&&((l.a=d)!=null?s.style.setProperty("height",d):s.style.removeProperty("height")),p!==l.o&&((l.o=p)!=null?s.style.setProperty("max-width",p):s.style.removeProperty("max-width")),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o})()};var Sv=e=>m(Ie,{get children(){return[m(Z,{get when(){return e.message.type==="text"},get children(){return m(yv,{get content(){return e.message.content},get isTypingSkipped(){return e.isTypingSkipped},get typingEmulation(){return e.typingEmulation},get onTransitionEnd(){return e.onTransitionEnd}})}}),m(Z,{get when(){return e.message.type==="image"},get children(){return m(gv,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}}),m(Z,{get when(){return e.message.type==="video"},get children(){return m(xv,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}}),m(Z,{get when(){return e.message.type==="embed"},get children(){return m(pv,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd},get onCompleted(){return e.onCompleted}})}}),m(Z,{get when(){return e.message.type==="custom-embed"},get children(){return m(dv,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd},get onCompleted(){return e.onCompleted}})}}),m(Z,{get when(){return e.message.type==="audio"},get children(){return m(uv,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}})]}});var Yu=br(wv(),1);function Zu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zr=Zu();function Av(e){zr=e}var Pv=/[&<>"']/,f_=new RegExp(Pv.source,"g"),Iv=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,p_=new RegExp(Iv.source,"g"),m_={"&":"&","<":"<",">":">",'"':""","'":"'"},Tv=e=>m_[e];function Ot(e,t){if(t){if(Pv.test(e))return e.replace(f_,Tv)}else if(Iv.test(e))return e.replace(p_,Tv);return e}var g_=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function h_(e){return e.replace(g_,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}var b_=/(^|[^\[])\^/g;function _e(e,t){e=typeof e=="string"?e:e.source,t=t||"";let n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(b_,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function Cv(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}var hl={exec:()=>null};function Ev(e,t){let n=e.replace(/\|/g,(a,i,s)=>{let c=!1,l=i;for(;--l>=0&&s[l]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/),o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(/\\\|/g,"|");return r}function Wu(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r;){let a=e.charAt(r-o-1);if(a===t&&!n)o++;else if(a!==t&&n)o++;else break}return e.slice(0,r-o)}function y_(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function kv(e,t,n,r){let o=t.href,a=t.title?Ot(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;let s={type:"link",raw:n,href:o,title:a,text:i,tokens:r.inlineTokens(i)};return r.state.inLink=!1,s}return{type:"image",raw:n,href:o,title:a,text:Ot(i)}}function v_(e,t){let n=e.match(/^(\s+)(?:```)/);if(n===null)return t;let r=n[1];return t.split(`
|
|
124
|
-
`).map(o=>{let
|
|
125
|
-
`)}var
|
|
126
|
-
`)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],o=
|
|
127
|
-
`,1)[0].replace(/^\t+/,
|
|
106
|
+
`;var fP=S('<div><button class="p-0.5 rounded-full"aria-label="Stop recording"></button><div class="relative flex w-full"><canvas class="w-full h-[56px]"></canvas><div class="absolute left-gradient w-2 left-0 h-[56px]"></div><div class="absolute right-gradient w-3 right-0 h-[56px]"></div></div><span class="time-container flex-none w-[35px] font-bold text-sm">'),Cr=3,_r=3,pP=60,mP=10,gP=5,hP=90,rx=e=>{let[t,n]=O(0),r,o,i,a,s,c,l,u=[],f,d,p=0,h=Ke(e.buttonsTheme?.backgroundColor??Qo).join(", "),g=()=>{if(!i||!r||!d)return;let T=performance.now(),C=T-d;d=T,i.clearRect(0,0,r.width,r.height),i.fillStyle=`rgba(${h}, 0.2)`;for(let E=0;E<(r.width+_r)/(Cr+_r);E++){let I=E*(Cr+_r)-p,U=r.height*(mP/100),R=(r.height-U)/2;i.beginPath(),i.roundRect(I,R,Cr,U,5),i.fill()}i.fillStyle=`rgba(${h}, 1)`;for(let E=0;E<u.length;E++){let I=r.width+(E+1)*(Cr+_r)-p,U=r.height*((u[E]??0)/100),R=(r.height-U)/2;i.beginPath(),i.roundRect(I,R,Cr,U,5),i.fill()}p+=pP*(C/1e3),o=requestAnimationFrame(g)},v=async()=>{r&&(l=await navigator.mediaDevices.getUserMedia({audio:!0}),e.onRecordingConfirmed(l),i||(i=r.getContext("2d")??void 0),f=setInterval(()=>{n(T=>T+=1)},1e3),a=new AudioContext,s=await bP(a),c=a.createMediaStreamSource(l),c.connect(s),s.connect(a.destination),s.port.onmessage=T=>{((r.width+_r)/(Cr+_r)+u.length)*(Cr+_r)<r.width+p&&u.push(Math.min(Math.max(T.data,gP),hP))},d=performance.now(),o=requestAnimationFrame(g))},y=()=>{i&&r&&i.clearRect(0,0,r.width,r.height),p=0,s?.disconnect(),s=void 0,c?.disconnect(),c=void 0,a?.close(),a=void 0,l?.getTracks().forEach(T=>T.stop()),l=void 0,u=[],clearTimeout(f),n(0),cancelAnimationFrame(o),e.onAbortRecording()};return ge(()=>{e.recordingStatus==="asking"?v():e.recordingStatus==="stopped"&&y()}),se(()=>{y()}),(()=>{var T=fP(),C=T.firstChild,E=C.nextSibling,I=E.firstChild,U=E.nextSibling;Fe(C,"click",y),x(C,m(fn,{class:"w-4"}));var R=r;return typeof R=="function"?de(R,I):r=I,x(U,()=>yP(t())),A(()=>$(T,pe("w-full gap-2 items-center transition-opacity px-2 agent-recorder",e.recordingStatus==="started"?"opacity-1 flex":"opacity-0 hidden"))),T})()},bP=async e=>{let t=new Blob([nx],{type:"application/javascript"}),n=URL.createObjectURL(t);return await e.audioWorklet.addModule(n),new AudioWorkletNode(e,"volume-processor")},yP=e=>{let t=Math.floor(e/60),r=(e%60).toString().padStart(2,"0");return`${t}:${r}`};var xP=S('<div class="p-2 flex gap-2 border-gray-100 overflow-auto">'),vP=S("<div>"),wP=S("<div><div>"),ix=e=>{let[t,n]=O(e.defaultValue??""),[r,o]=O([]),[i,a]=O(void 0),[s,c]=O(!1),[l,u]=O("stopped"),f,d,p=[],h=P=>n(P),g=()=>f?.value!==""&&f?.reportValidity(),v=async()=>{if(l()==="started"&&d){d.stop();return}if(g()){let P;r().length>0&&(a(void 0),P=(await To({apiHost:e.context.apiHost??bt({ignoreChatApiUrl:!0}),files:r().map(w=>({file:w,input:{blockId:e.block.id,sessionId:e.context.sessionId,fileName:w.name}})),onUploadProgress:a}))?.map((w,M)=>w?{...w,blobUrl:URL.createObjectURL(r()[M])}:null).filter(re)),e.onSubmit({type:"text",value:f?.value??t(),attachments:P})}else f?.focus()},y=P=>{e.block.options?.isLong||P.key==="Enter"&&v()},T=P=>{e.block.options?.isLong&&P.key==="Enter"&&(P.metaKey||P.ctrlKey)&&v()};ne(()=>{!K()&&f&&f.focus({preventScroll:!0}),window.addEventListener("message",C)}),se(()=>{window.removeEventListener("message",C)});let C=P=>{let{data:_}=P;_.isFromAgent&&_.command==="setInputValue"&&n(_.value)},E=P=>{P.preventDefault(),c(!0)},I=()=>c(!1),U=P=>{P.preventDefault(),P.stopPropagation(),P.dataTransfer?.files&&R(P.dataTransfer.files)},R=P=>{let _=Array.from(P).map(w=>hs({existingFiles:r(),newFile:w,params:{sizeLimit:Qt("NEXT_PUBLIC_AGENT_FILE_UPLOAD_MAX_SIZE")},onError:({description:M,title:D})=>{Kn.create({description:M,title:D})}})).filter(re);_.length!==0&&o(w=>[..._,...w])},oe=P=>{o(_=>_.filter((w,M)=>M!==P))},H=()=>{u("asking")},G=P=>{let _,w=MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":"video/mp4";d=new MediaRecorder(P,{mimeType:w}),d.ondataavailable=M=>{M.data.size!==0&&p.push(M.data)},d.onstart=()=>{_=Date.now()},d.onstop=async()=>{if(l()!=="started"||p.length===0)return;let M=Date.now()-_,D=await(0,ox.fixWebmDuration)(new Blob(p,{type:w}),M),J=new File([D],`rec-${e.block.id}-${Date.now()}.${w==="audio/webm"?"webm":"mp4"}`,{type:w});a(void 0);let ue=(await To({apiHost:e.context.apiHost??bt({ignoreChatApiUrl:!0}),files:[{file:J,input:{blockId:e.block.id,sessionId:e.context.sessionId,fileName:J.name}}],onUploadProgress:a})).filter(re).map(le=>le.url);e.onSubmit({type:"recording",url:ue[0],blobUrl:URL.createObjectURL(J)})},d.start(),u("started")},L=()=>{d?.stop(),u("stopped"),d=void 0,p=[]};return(()=>{var P=wP(),_=P.firstChild;return P.addEventListener("dragleave",I),P.addEventListener("dragover",E),P.addEventListener("drop",U),P.$$keydown=y,x(_,m(rx,{get recordingStatus(){return l()},get buttonsTheme(){return e.context.agent.theme.chat?.buttons},onRecordingConfirmed:G,onAbortRecording:L}),null),x(_,m(N,{get when(){return l()!=="started"},get children(){return[m(N,{get when(){return r().length},get children(){var w=xP();return w.style.setProperty("border-bottom-width","1px"),x(w,m(he,{get each(){return r()},children:(M,D)=>m(xs,{file:M,get uploadProgressPercent(){return B(()=>!!i())()?B(()=>i()?.fileIndex===D())()?20:D()<(i()?.fileIndex??0)?100:0:void 0},onRemoveClick:()=>oe(D())})})),w}}),(()=>{var w=vP();return x(w,(()=>{var M=B(()=>!!e.block.options?.isLong);return()=>M()?m(xy,{ref(D){var J=f;typeof J=="function"?J(D):f=D},onInput:h,onKeyDown:T,get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??js.labels.placeholder}}):m(Xn,{ref(D){var J=f;typeof J=="function"?J(D):f=D},onInput:h,get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??js.labels.placeholder}})})(),null),x(w,m(N,{get when(){return(e.block.options?.attachments?.isEnabled??js.attachments.isEnabled)&&e.block.options?.attachments?.saveVariableId},get children(){return m(by,{onNewFiles:R,get class(){return pe(e.block.options?.isLong?"ml-2":void 0)}})}}),null),A(()=>$(w,pe("flex justify-between px-2",e.block.options?.isLong?"items-end":"items-center"))),w})()]}}),null),x(P,m(Ee,{get children(){return[m(q,{get when(){return!t()&&l()!=="started"&&e.block.options?.audioClip?.isEnabled},get children(){return m(qt,{class:"h-[56px] flex items-center","on:click":H,"aria-label":"Record voice",get children(){return m(yy,{class:"flex w-6 h-6"})}})}}),m(q,{when:!0,get children(){return m(Ue,{type:"button","on:click":v,get isDisabled(){return!!i()},class:"h-[56px]",get children(){return e.block.options?.labels?.button}})}})]}}),null),A(w=>{var M=pe("agent-input-form flex w-full gap-2 items-end",e.block.options?.isLong&&l()!=="started"?"max-w-full":"max-w-[350px]"),D=pe("relative agent-input flex-col w-full",s()&&"filter brightness-95");return M!==w.e&&$(P,w.e=M),D!==w.t&&$(_,w.t=D),w},{e:void 0,t:void 0}),P})()};Me(["keydown"]);var ax={labels:{button:Qe,placeholder:"Type a URL..."},retryMessageContent:"This URL doesn't seem to be valid. Can you type it again?"};var SP=S('<div class="agent-input-form flex w-full gap-2 items-end max-w-[350px]"><div class="flex agent-input w-full">'),sx=e=>{let[t,n]=O(e.defaultValue??""),r,o=l=>{n(l)},i=()=>r?.value!==""&&r?.reportValidity(),a=()=>{r&&!r?.value.startsWith("http")&&(r.value=`https://${r.value}`),i()?e.onSubmit({type:"text",value:r?.value??t()}):r?.focus()},s=l=>{l.key==="Enter"&&a()};ne(()=>{!K()&&r&&r.focus({preventScroll:!0}),window.addEventListener("message",c)}),se(()=>{window.removeEventListener("message",c)});let c=l=>{let{data:u}=l;u.isFromAgent&&u.command==="setInputValue"&&n(u.value)};return(()=>{var l=SP(),u=l.firstChild;return l.$$keydown=s,x(u,m(Xn,{ref(f){var d=r;typeof d=="function"?d(f):r=f},get value(){return t()},get placeholder(){return e.block.options?.labels?.placeholder??ax.labels.placeholder},onInput:o,type:"url",autocomplete:"url"})),x(l,m(Ue,{type:"button",class:"h-[56px]","on:click":a,get children(){return e.block.options?.labels?.button}}),null),l})()};Me(["keydown"]);var lx=e=>m(qn.Root,{get open(){return e.isOpen},lazyMount:!0,unmountOnExit:!0,onOpenChange:t=>t.open?void 0:e.onClose?.(),get children(){return[m(qn.Backdrop,{class:"fixed inset-0 bg-[rgba(0,0,0,0.5)] h-screen z-50"}),m(qn.Positioner,{class:"fixed inset-0 z-50 flex items-center justify-center px-2",get children(){return[m(qn.Content,{get children(){return e.children}}),m(qn.CloseTrigger,{class:"fixed top-2 right-2 z-50 rounded-md bg-white p-2 text-black",get children(){return m(fn,{class:"w-6 h-6"})}})]}})]}});var TP=S('<svg viewBox="0 0 80 80"><g transform=translate(15,15)><g stroke=none stroke-width=1 fill=none fill-rule=evenodd><g transform="translate(1.000000, 1.000000)"stroke=currentColor stroke-width=2><path d="M23,5.0109 L23,2.5 C23,1.1193 24.1193,0 25.5,0 C26.8807,0 28,1.1193 28,2.5 L28,5"stroke-linecap=round stroke-linejoin=round></path><path d="M36.4505,45 L13.5495,45 C8.8473,45 5,41.1527 5,36.4505 L5,13.5495 C5,8.8473 8.8473,5 13.5495,5 L36.4505,5 C41.1527,5 45,8.8473 45,13.5495 L45,36.4505 C45,41.1527 41.1527,45 36.4505,45 Z"stroke-linecap=round stroke-linejoin=round></path><circle stroke-linecap=round stroke-linejoin=round cx=33.8346 cy=18.0022 r=2.8338></circle><circle stroke-linecap=round stroke-linejoin=round cx=16.3342 cy=18.0017 r=2.8338></circle><path d="M33.5,36.5 L16.5,36.5 C14.3,36.5 12.5,34.7 12.5,32.5 C12.5,30.3 14.3,28.5 16.5,28.5 L33.5,28.5 C35.7,28.5 37.5,30.3 37.5,32.5 C37.5,34.7 35.7,36.5 33.5,36.5 Z"></path><g stroke-linecap=round stroke-linejoin=round transform="translate(0.000000, 17.000000)"><path d="M2.5,13 C1.1193,13 0,11.8807 0,10.5 L0,2.5 C0,1.1193 1.1193,0 2.5,0 C3.8807,0 5,1.1193 5,2.5 L5,10.5 C5,11.8807 3.8807,13 2.5,13 Z"></path><path d="M47.5,13 C48.8807,13 50,11.8807 50,10.5 L50,2.5 C50,1.1193 48.8807,0 47.5,0 C46.1193,0 45,1.1193 45,2.5 L45,10.5 C45,11.8807 46.1193,13 47.5,13 Z"></path><line x1=17 y1=12 x2=17 y2=19></line><line x1=22 y1=12 x2=22 y2=19></line><line x1=27 y1=12 x2=27 y2=19></line><line x1=32 y1=12 x2=32 y2=19>'),cx=({strokeColor:e})=>(()=>{var t=TP();return e!=null?t.style.setProperty("color",e):t.style.removeProperty("color"),A(()=>j(t,"class",K()?"size-6":"size-10")),t})();var CP=S('<svg viewBox="0 0 80 80"><g transform=translate(15,15)><g stroke=none stroke-width=1 fill=none fill-rule=evenodd><g transform="translate(1.000000, 1.000000)"><circle id=Oval stroke=currentColor stroke-width=2 cx=25 cy=25 r=25></circle><path d="M14.9350649,32.4675325 C16.9120779,35.9554545 20.6786364,38.3116883 25,38.3116883 C29.3213636,38.3116883 33.0879221,35.9554545 35.0649351,32.4675325"id=Path stroke=currentColor stroke-width=3 stroke-linecap=round></path><circle fill=currentColor fill-rule=nonzero cx=15.2597403 cy=16.5584416 r=2.92207792></circle><circle fill=currentColor fill-rule=nonzero cx=34.0909091 cy=16.5584416 r=2.92207792>'),ux=({strokeColor:e})=>(()=>{var t=CP();return e!=null?t.style.setProperty("color",e):t.style.removeProperty("color"),A(()=>j(t,"class",K()?"size-6":"size-10")),t})();var _P=S('<span class="text-4xl text-[40px]">'),kP=S('<img alt="Bot avatar"elementtiming="Bot avatar">'),EP=S('<figure><img alt="Bot avatar"class="rounded-full object-cover w-full h-full"elementtiming="Bot avatar"fetchpriority=high>'),PP=S('<div class="absolute left-[-4px] top-1/2 -translate-y-1/2 w-0 h-0">'),IP=S('<div class="absolute right-[-4px] top-1/2 -translate-y-1/2 w-0 h-0">'),AP=S("<div>"),Vs=e=>m(N,{get when(){return Ce(e.src)},keyed:!0,get fallback(){return(()=>{var t=AP();return x(t,m(N,{get when(){return e.isGuest},get children(){return[m(ux,{get strokeColor(){return e.theme.chat?.hostBubbles?.color??ei}}),(()=>{var n=PP();return n.style.setProperty("border-top","5px solid transparent"),n.style.setProperty("border-bottom","5px solid transparent"),A(r=>(r=`5px solid ${e.theme.chat?.hostBubbles?.backgroundColor??no}`)!=null?n.style.setProperty("border-right",r):n.style.removeProperty("border-right")),n})()]}}),null),x(t,m(N,{get when(){return!e.isGuest},get children(){return[m(cx,{get strokeColor(){return e.theme.chat?.hostBubbles?.color??ei}}),(()=>{var n=IP();return n.style.setProperty("border-top","5px solid transparent"),n.style.setProperty("border-bottom","5px solid transparent"),A(r=>(r=`5px solid ${e.theme.chat?.hostBubbles?.backgroundColor??no}`)!=null?n.style.setProperty("border-left",r):n.style.removeProperty("border-left")),n})()]}}),null),A(n=>{var r=`relative flex justify-center items-center rounded-full ${K()?"w-6 h-6":"w-10 h-10"}
|
|
107
|
+
`,o=e.theme.chat?.hostBubbles?.backgroundColor??no;return r!==n.e&&$(t,n.e=r),o!==n.t&&((n.t=o)!=null?t.style.setProperty("background",o):t.style.removeProperty("background")),n},{e:void 0,t:void 0}),t})()},get children(){return m(Ee,{get children(){return[m(q,{get when(){return OP(e.src??"")},get children(){var t=_P();return x(t,()=>e.src),t}}),m(q,{get when(){return Ft(e.src)},get children(){var t=kP();return A(n=>{var r=e.src,o="flex justify-center items-center relative animate-fade-in flex-shrink-0 "+(K()?"w-6 h-6 text-sm":"w-10 h-10 text-xl");return r!==n.e&&j(t,"src",n.e=r),o!==n.t&&$(t,n.t=o),n},{e:void 0,t:void 0}),t}}),m(q,{when:!0,get children(){var t=EP(),n=t.firstChild;return A(r=>{var o="flex justify-center items-center rounded-full text-white relative animate-fade-in flex-shrink-0 "+(K()?"w-6 h-6 text-sm":"w-10 h-10 text-xl"),i=e.src;return o!==r.e&&$(t,r.e=o),i!==r.t&&j(n,"src",r.t=i),r},{e:void 0,t:void 0}),t}})]}})}}),OP=e=>/^\p{Emoji}$/u.test(e);var RP=S('<div class="flex justify-end items-end animate-fade-in gap-2 guest-container">'),dx=S("<div>"),MP=S('<span class="px-[15px] py-[7px]">'),DP=S("<img alt=Attachment>"),LP=S('<div class="flex flex-col gap-1 items-end"><div class="p-[1px] whitespace-pre-wrap max-w-full agent-guest-bubble flex flex-col"data-testid=guest-bubble>'),NP=S("<img>"),$P=S('<div class="flex flex-col gap-1 items-end"><div class="p-2 w-full whitespace-pre-wrap agent-guest-bubble flex flex-col"data-testid=guest-bubble><audio controls>'),fx=e=>(()=>{var t=RP();return x(t,m(Ee,{get children(){return[m(q,{get when(){return e.answer?.type==="text"},get children(){return m(BP,{get answer(){return e.answer}})}}),m(q,{get when(){return e.answer?.type==="recording"},get children(){return m(FP,{get answer(){return e.answer}})}})]}}),null),x(t,m(N,{get when(){return e.showAvatar},get children(){return m(Vs,{isGuest:!0,get theme(){return e.theme},get src(){return e.avatarSrc}})}}),null),A(n=>(n=e.hasHostAvatar?K()?"28px":"50px":void 0)!=null?t.style.setProperty("margin-left",n):t.style.removeProperty("margin-left")),t})(),BP=e=>{let[t,n]=O();return(()=>{var r=LP(),o=r.firstChild;return x(r,m(N,{get when(){return(e.answer.attachments??[]).length>0},get children(){return[(()=>{var i=dx();return x(i,m(he,{get each(){return e.answer.attachments?.filter(a=>a.type.startsWith("image"))},children:(a,s)=>(()=>{var c=NP();return c.$$click=()=>n(a.blobUrl??a.url),A(l=>{var u=a.blobUrl??a.url,f=`Attached image ${s()+1}`,d=pe("agent-guest-bubble-image-attachment cursor-pointer",e.answer.attachments.filter(p=>p.type.startsWith("image")).length>1&&"max-w-[90%]");return u!==l.e&&j(c,"src",l.e=u),f!==l.t&&j(c,"alt",l.t=f),d!==l.a&&$(c,l.a=d),l},{e:void 0,t:void 0,a:void 0}),c})()})),A(()=>$(i,pe("flex gap-1 overflow-auto max-w-[350px]",K()?"flex-wrap justify-end":"items-center"))),i})(),(()=>{var i=dx();return x(i,m(he,{get each(){return e.answer.attachments?.filter(a=>!a.type.startsWith("image"))},children:a=>m(ys,{get file(){return{name:a.url.split("/").at(-1)}}})})),A(()=>$(i,pe("flex gap-1 overflow-auto max-w-[350px]",K()?"flex-wrap justify-end":"items-center"))),i})()]}}),o),x(o,m(N,{get when(){return Ce(e.answer.label??e.answer.value)},get children(){var i=MP();return x(i,()=>e.answer.label??e.answer.value),i}})),x(r,m(lx,{get isOpen(){return t()!==void 0},onClose:()=>n(void 0),get children(){var i=DP();return i.style.setProperty("border-radius","6px"),A(()=>j(i,"src",t())),i}}),null),r})()},FP=e=>(()=>{var t=$P(),n=t.firstChild,r=n.firstChild;return A(()=>j(r,"src",e.answer.blobUrl??e.answer.url)),t})();Me(["click"]);var UP=S("<div>"),jP=S('<div class="flex justify-end animate-fade-in gap-2 agent-input-container">'),px=e=>{let[t,n]=tn(O(),{key:`agent-${e.context.agent.id}-input-${e.chunkIndex}`,storage:e.context.storage});ne(()=>{e.isOngoingLastChunk&&re(t())&&e.onSubmit(t())});let r=async i=>{n(i),e.onSubmit(i)},o=i=>{n({type:"text",value:i}),e.onSkip()};return ge(()=>{let i=ms().findLast(a=>e.chunkIndex===a.inputIndex)?.formattedMessage;i&&e.block.type!=="file input"&&n(a=>a?.type==="text"?{...a,label:i}:a)}),m(Ee,{get children(){return[m(q,{get when(){return t()&&!e.hasError},get children(){return m(fx,{get theme(){return e.theme},get answer(){return t()},get showAvatar(){return e.guestAvatar?.isEnabled??ti},get avatarSrc(){return e.guestAvatar?.url&&e.guestAvatar.url},get hasHostAvatar(){return e.hasHostAvatar}})}}),m(q,{get when(){return Ge(t())||e.hasError},get children(){var i=jP(),a=e.ref;return typeof a=="function"?de(a,i):e.ref=i,x(i,m(N,{get when(){return e.hasHostAvatar},get children(){var s=UP();return A(()=>$(s,"flex flex-shrink-0 items-center "+(K()?"w-6 h-6":"w-10 h-10"))),s}}),null),x(i,m(HP,{get context(){return e.context},get block(){return e.block},get chunkIndex(){return e.chunkIndex},get isInputPrefillEnabled(){return e.isInputPrefillEnabled},get existingAnswer(){return B(()=>!!e.hasError)()?VP(t()):void 0},get onTransitionEnd(){return e.onTransitionEnd},onSubmit:r,onSkip:o}),null),A(()=>j(i,"data-blockid",e.block.id)),i}})]}})},VP=e=>{if(e)return e.type==="text"?e.value:e.url},HP=e=>{let t=o=>e.onSubmit(o),n=()=>e.existingAnswer??(e.isInputPrefillEnabled?e.block.prefilledValue:void 0),r=()=>e.onSubmit({type:"text",value:e.block.options?.labels?.success??Ts.labels.success});return m(Ee,{get children(){return[m(q,{get when(){return e.block.type==="text input"},get children(){return m(ix,{get block(){return e.block},get defaultValue(){return n()},get context(){return e.context},onSubmit:t})}}),m(q,{get when(){return e.block.type==="number input"},get children(){return m(Xb,{get block(){return e.block},get defaultValue(){return n()},onSubmit:t})}}),m(q,{get when(){return e.block.type==="email input"},get children(){return m(Gb,{get block(){return e.block},get defaultValue(){return n()},onSubmit:t})}}),m(q,{get when(){return e.block.type==="url input"},get children(){return m(sx,{get block(){return e.block},get defaultValue(){return n()},onSubmit:t})}}),m(q,{get when(){return e.block.type==="phone number input"},get children(){return m(cy,{get labels(){return e.block.options?.labels},get defaultCountryCode(){return e.block.options?.defaultCountryCode},get defaultValue(){return n()},onSubmit:t})}}),m(q,{get when(){return e.block.type==="date input"},get children(){return m(Hb,{get options(){return e.block.options},get defaultValue(){return n()},onSubmit:t})}}),m(q,{get when(){return zP(e.block)},keyed:!0,children:o=>m(Ee,{get children(){return[m(q,{get when(){return!o.options?.isMultipleChoice},get children(){return m(Bb,{get chunkIndex(){return e.chunkIndex},get defaultItems(){return o.items},get options(){return o.options},onSubmit:t})}}),m(q,{get when(){return o.options?.isMultipleChoice},get children(){return m(jb,{get defaultItems(){return o.items},get options(){return o.options},onSubmit:t})}})]}})}),m(q,{get when(){return GP(e.block)},keyed:!0,children:o=>m(Ee,{get children(){return[m(q,{get when(){return!o.options?.isMultipleChoice},get children(){return m(my,{get defaultItems(){return o.items},get options(){return o.options},onSubmit:t,get onTransitionEnd(){return e.onTransitionEnd}})}}),m(q,{get when(){return o.options?.isMultipleChoice},get children(){return m(py,{get defaultItems(){return o.items},get options(){return o.options},onSubmit:t,get onTransitionEnd(){return e.onTransitionEnd}})}})]}})}),m(q,{get when(){return e.block.type==="rating input"},get children(){return m(gy,{get block(){return e.block},get defaultValue(){return n()},onSubmit:t})}}),m(q,{get when(){return e.block.type==="file input"},get children(){return m(qb,{get context(){return e.context},get block(){return e.block},onSubmit:t,get onSkip(){return e.onSkip}})}}),m(q,{get when(){return e.block.type==="payment input"},get children(){return m(ay,{get context(){return e.context},get options(){return{...e.block.options,...e.block.runtimeOptions}},onSuccess:r,get onTransitionEnd(){return e.onTransitionEnd}})}})]}})},zP=e=>e?.type==="choice input"?e:void 0,GP=e=>e?.type==="image choice"?e:void 0;var WP=S('<div class="flex items-center gap-1"><div class="w-2 h-2 rounded-full bubble1"></div><div class="w-2 h-2 rounded-full bubble2"></div><div class="w-2 h-2 rounded-full bubble3">'),wt=()=>WP();var mx={isAutoplayEnabled:!0};var qP=S('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start agent-host-bubble max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 "></div><audio controls>'),KP=400,YP=100,eu,gx=e=>{let t=!1,n,r,[o,i]=O(!!e.onTransitionEnd);return ne(()=>{eu=setTimeout(()=>{t||(t=!0,i(!1),setTimeout(()=>e.onTransitionEnd?.(n),KP))},YP)}),se(()=>{eu&&clearTimeout(eu)}),(()=>{var a=qP(),s=a.firstChild,c=s.firstChild,l=c.firstChild,u=l.nextSibling,f=n;typeof f=="function"?de(f,a):n=a,x(l,(()=>{var p=B(()=>!!o());return()=>p()&&m(wt,{})})());var d=r;return typeof d=="function"?de(d,u):r=u,A(p=>{var h=pe("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),g=o()?"64px":"100%",v=o()?"32px":"100%",y=e.content?.url,T=e.onTransitionEnd?e.content?.isAutoplayEnabled??mx.isAutoplayEnabled:!1,C="z-10 text-fade-in "+(o()?"opacity-0":"opacity-100 m-2"),E=o()?K()?"32px":"36px":"revert";return h!==p.e&&$(a,p.e=h),g!==p.t&&((p.t=g)!=null?l.style.setProperty("width",g):l.style.removeProperty("width")),v!==p.a&&((p.a=v)!=null?l.style.setProperty("height",v):l.style.removeProperty("height")),y!==p.o&&j(u,"src",p.o=y),T!==p.i&&(u.autoplay=p.i=T),C!==p.n&&$(u,p.n=C),E!==p.s&&((p.s=E)!=null?u.style.setProperty("height",E):u.style.removeProperty("height")),p},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),a})()};var XP=S('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start agent-host-bubble w-full max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 "></div><div><div class="w-full overflow-y-auto">'),tu,ZP=400,hx=e=>{let t,[n,r]=O(!!e.onTransitionEnd),o;return ne(()=>{_i({args:{...e.content.initFunction.args,agentElement:o},content:e.content.initFunction.content}),e.content.waitForEventFunction&&_i({args:{...e.content.waitForEventFunction.args,continueFlow:i=>e.onCompleted(i?{type:"text",value:i}:void 0)},content:e.content.waitForEventFunction.content}),tu=setTimeout(()=>{r(!1),setTimeout(()=>e.onTransitionEnd?.(t),ZP)},2e3)}),se(()=>{tu&&clearTimeout(tu)}),(()=>{var i=XP(),a=i.firstChild,s=a.firstChild,c=s.firstChild,l=c.nextSibling,u=l.firstChild,f=t;typeof f=="function"?de(f,i):t=i,x(c,(()=>{var p=B(()=>!!n());return()=>p()&&m(wt,{})})());var d=o;return typeof d=="function"?de(d,u):o=u,A(p=>{var h=pe("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),g=n()?"64px":"100%",v=n()?"32px":"100%",y=pe("p-2 z-20 text-fade-in w-full",n()?"opacity-0":"opacity-100"),T=n()?K()?"32px":"36px":void 0,C=`calc(${Wf()} - 100px)`;return h!==p.e&&$(i,p.e=h),g!==p.t&&((p.t=g)!=null?c.style.setProperty("width",g):c.style.removeProperty("width")),v!==p.a&&((p.a=v)!=null?c.style.setProperty("height",v):c.style.removeProperty("height")),y!==p.o&&$(l,p.o=y),T!==p.i&&((p.i=T)!=null?l.style.setProperty("height",T):l.style.removeProperty("height")),C!==p.n&&((p.n=C)!=null?u.style.setProperty("max-height",C):u.style.removeProperty("max-height")),p},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),i})()};var bx={height:400};var JP=S('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start agent-host-bubble w-full max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 "></div><div><iframe id=embed-bubble-content class="w-full h-full ">'),nu,QP=400,yx=e=>{let t,[n,r]=O(!!e.onTransitionEnd),o=i=>{e.content?.waitForEvent?.isEnabled&&Ce(i.data.name)&&i.data.name===e.content?.waitForEvent.name&&(e.onCompleted?.(e.content.waitForEvent.saveDataInVariableId&&i.data.data?{type:"text",value:i.data.data}:void 0),window.removeEventListener("message",o))};return ne(()=>{nu=setTimeout(()=>{r(!1),e.content?.waitForEvent?.isEnabled&&window.addEventListener("message",o),setTimeout(()=>{e.onTransitionEnd?.(t)},QP)},2e3)}),se(()=>{nu&&clearTimeout(nu),window.removeEventListener("message",o)}),(()=>{var i=JP(),a=i.firstChild,s=a.firstChild,c=s.firstChild,l=c.nextSibling,u=l.firstChild,f=t;return typeof f=="function"?de(f,i):t=i,x(c,(()=>{var d=B(()=>!!n());return()=>d()&&m(wt,{})})()),A(d=>{var p=pe("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),h=n()?"64px":"100%",g=n()?"32px":"100%",v=pe("p-4 z-20 text-fade-in w-full",n()?"opacity-0":"opacity-100 p-4"),y=n()?K()?"32px":"36px":`${e.content?.height??bx.height}px`,T=e.content?.url;return p!==d.e&&$(i,d.e=p),h!==d.t&&((d.t=h)!=null?c.style.setProperty("width",h):c.style.removeProperty("width")),g!==d.a&&((d.a=g)!=null?c.style.setProperty("height",g):c.style.removeProperty("height")),v!==d.o&&$(l,d.o=v),y!==d.i&&((d.i=y)!=null?l.style.setProperty("height",y):l.style.removeProperty("height")),T!==d.n&&j(u,"src",d.n=T),d},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),i})()};var xx={clickLink:{alt:"Bubble image"}};var eI=S('<img elementtiming="Bubble image"fetchpriority=high>'),tI=S('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start agent-host-bubble max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 ">'),nI=S("<a target=_blank rel=noreferrer>"),rI=S("<figure>"),oI=400,iI=5e3,Hs,vx=e=>{let t,n,[r,o]=O(!!e.onTransitionEnd),i=()=>{r()&&(o(!1),setTimeout(()=>{e.onTransitionEnd?.(t)},oI))};ne(()=>{n&&(Hs=setTimeout(i,iI),n.onload=()=>{clearTimeout(Hs),i()})}),se(()=>{Hs&&clearTimeout(Hs)});let a=(()=>{var s=eI(),c=n;return typeof c=="function"?de(c,s):n=s,s.style.setProperty("max-height","512px"),A(l=>{var u=e.content?.url,f=e.content?.clickLink?.alt??xx.clickLink.alt,d=pe(r()?"opacity-0":"opacity-100",e.onTransitionEnd?"text-fade-in":void 0,e.content?.url?.endsWith(".svg")?"w-full":void 0),p=r()?"32px":"auto";return u!==l.e&&j(s,"src",l.e=u),f!==l.t&&j(s,"alt",l.t=f),d!==l.a&&$(s,l.a=d),p!==l.o&&((l.o=p)!=null?s.style.setProperty("height",p):s.style.removeProperty("height")),l},{e:void 0,t:void 0,a:void 0,o:void 0}),s})();return(()=>{var s=tI(),c=s.firstChild,l=c.firstChild,u=l.firstChild,f=t;return typeof f=="function"?de(f,s):t=s,x(u,(()=>{var d=B(()=>!!r());return()=>d()?m(wt,{}):null})()),x(l,(()=>{var d=B(()=>!!e.content?.clickLink);return()=>d()?(()=>{var p=nI();return x(p,a),A(h=>{var g=e.content.clickLink.url,v=pe("z-10",r()?"h-8":"p-4");return g!==h.e&&j(p,"href",h.e=g),v!==h.t&&$(p,h.t=v),h},{e:void 0,t:void 0}),p})():(()=>{var p=rI();return x(p,a),A(()=>$(p,pe("z-10",!r()&&"p-4",r()?K()?"h-8":"h-9":""))),p})()})(),null),A(d=>{var p=pe("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),h=r()?"64px":"100%",g=r()?"32px":"100%";return p!==d.e&&$(s,d.e=p),h!==d.t&&((d.t=h)!=null?u.style.setProperty("width",h):u.style.removeProperty("width")),g!==d.a&&((d.a=g)!=null?u.style.setProperty("height",g):u.style.removeProperty("height")),d},{e:void 0,t:void 0,a:void 0}),s})()};var wx=({bubbleContent:e,typingSettings:t})=>{let n=e.match(/(\w+)/g)?.length??0;n===0&&(n=e.length);let{enabled:r,speed:o,maxDelay:i}={enabled:t?.enabled??Je.typingEmulation.enabled,speed:t?.speed??Je.typingEmulation.speed,maxDelay:t?.maxDelay??Je.typingEmulation.maxDelay},s=r?n/o*6e4:0;return s>i*1e3&&(s=i*1e3),s};var ru=e=>e.map(t=>t.text??ru(t.children)).join("");var aI=S("<br>"),sI=S("<span>"),lI=(e,t,n)=>{let r="";return e&&(r+="slate-bold"),t&&(r+=" slate-italic"),n&&(r+=" slate-underline"),r},Sx=e=>(()=>{var t=sI();return x(t,()=>e.text,null),x(t,m(N,{get when(){return B(()=>!!e.isUniqueChild)()&&$e(e.text)},get children(){return aI()}}),null),A(()=>$(t,lI(e.bold,e.italic,e.underline))),t})();var cI=S('<a target=_blank rel="noopener noreferrer">'),uI=S("<ol>"),dI=S("<ul>"),fI=S("<li>"),pI=S("<span>"),mI=S("<div>"),kr=e=>m(Ee,{get children(){return[m(q,{get when(){return re(e.element.text)},get children(){return m(Sx,Se(()=>e.element,{get isUniqueChild(){return e.isUniqueChild??!1}}))}}),m(q,{when:!0,get children(){return m(Ee,{get children(){return[m(q,{get when(){return e.element.type==="a"},get children(){var t=cI();return x(t,m(he,{get each(){return e.element.children},children:n=>m(kr,{element:n,get isUniqueChild(){return e.element.children?.length===1}})})),A(()=>j(t,"href",e.element.url)),t}}),m(q,{get when(){return e.element.type==="ol"},get children(){var t=uI();return x(t,m(he,{get each(){return e.element.children},children:n=>m(kr,{element:n,get isUniqueChild(){return e.element.children?.length===1}})})),t}}),m(q,{get when(){return e.element.type==="ul"},get children(){var t=dI();return x(t,m(he,{get each(){return e.element.children},children:n=>m(kr,{element:n,get isUniqueChild(){return e.element.children?.length===1}})})),t}}),m(q,{get when(){return e.element.type==="li"},get children(){var t=fI();return x(t,m(he,{get each(){return e.element.children},children:n=>m(kr,{element:n,get isUniqueChild(){return e.element.children?.length===1}})})),t}}),m(q,{when:!0,get children(){return m(gI,{get element(){return e.element},get insideInlineVariable(){return e.insideInlineVariable??!1},get children(){return m(he,{get each(){return e.element.children},children:t=>m(kr,{element:t,get isUniqueChild(){return e.element.children?.length===1},get insideInlineVariable(){return e.element.type==="inline-variable"}})})}})}})]}})}})]}}),gI=e=>m(Ee,{get children(){return[m(q,{get when(){return e.element.type==="inline-variable"||e.insideInlineVariable},get children(){var t=pI();return x(t,()=>e.children),A(()=>j(t,"data-element-type",e.element.type)),t}}),m(q,{when:!0,get children(){var t=mI();return x(t,()=>e.children),A(()=>j(t,"data-element-type",e.element.type)),t}})]}});var hI=S('<div><div class="flex w-full items-center"><div class="flex relative items-start agent-host-bubble max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing "data-testid=host-bubble></div><div>'),bI=400,ou,Tx=e=>{let t,[n,r]=O(!!e.onTransitionEnd),o=()=>{n()&&(r(!1),setTimeout(()=>{e.onTransitionEnd?.(t)},bI))};return ne(()=>{if(!n)return;let i=e.content?.richText?ru(e.content.richText):"",a=e.typingEmulation?.enabled===!1||e.isTypingSkipped?0:wx({bubbleContent:i,typingSettings:e.typingEmulation});ou=setTimeout(o,a)}),se(()=>{ou&&clearTimeout(ou)}),(()=>{var i=hI(),a=i.firstChild,s=a.firstChild,c=s.firstChild,l=c.nextSibling,u=t;return typeof u=="function"?de(u,i):t=i,x(c,(()=>{var f=B(()=>!!n());return()=>f()&&m(wt,{})})()),x(l,m(he,{get each(){return e.content?.richText},children:f=>m(kr,{element:f})})),A(f=>{var d=pe("flex flex-col",e.onTransitionEnd?"animate-fade-in":void 0),p=n()?"64px":"100%",h=n()?"32px":"100%",g=pe("overflow-hidden text-fade-in mx-4 my-2 whitespace-pre-wrap slate-html-container relative text-ellipsis",n()?"opacity-0":"opacity-100"),v=n()?K()?"16px":"20px":"100%";return d!==f.e&&$(i,f.e=d),p!==f.t&&((f.t=p)!=null?c.style.setProperty("width",p):c.style.removeProperty("width")),h!==f.a&&((f.a=h)!=null?c.style.setProperty("height",h):c.style.removeProperty("height")),g!==f.o&&$(l,f.o=g),v!==f.i&&((f.i=v)!=null?l.style.setProperty("height",v):l.style.removeProperty("height")),f},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),i})()};var iu=["youtube","vimeo","tiktok","gumlet"],Er={height:400,aspectRatio:"16/9",maxWidth:"100%",areControlsDisplayed:!0,isAutoplayEnabled:!0};var yI="https://www.youtube.com/embed";var xI="https://player.vimeo.com/video";var vI="https://www.tiktok.com/embed/v2";var wI="https://play.gumlet.io/embed";var Cx={vimeo:xI,youtube:yI,tiktok:vI,gumlet:wI};var SI=S("<video>"),TI=S('<div><iframe class="w-full h-full"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"allowfullscreen>'),CI=S('<div><div class="flex w-full items-center"><div class="flex relative z-10 items-start agent-host-bubble overflow-hidden w-full max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing z-10 ">'),_I=400,au,_x=e=>{let t,[n,r]=O(!!e.onTransitionEnd);return ne(()=>{let o=e.content?.type&&iu.includes(e.content?.type)?2e3:100;au=setTimeout(()=>{n()&&(r(!1),setTimeout(()=>{e.onTransitionEnd?.(t)},_I))},o)}),se(()=>{au&&clearTimeout(au)}),(()=>{var o=CI(),i=o.firstChild,a=i.firstChild,s=a.firstChild,c=t;return typeof c=="function"?de(c,o):t=o,x(s,(()=>{var l=B(()=>!!n());return()=>l()&&m(wt,{})})()),x(a,m(Ee,{get children(){return[m(q,{get when(){return e.content?.type&&e.content.type==="url"},get children(){var l=SI();return A(u=>{var f=e.onTransitionEnd?e.content?.isAutoplayEnabled??Er.isAutoplayEnabled:!1,d=e.content?.url,p=e.content?.areControlsDisplayed??Er.areControlsDisplayed,h="p-4 focus:outline-none w-full z-10 text-fade-in rounded-md "+(n()?"opacity-0":"opacity-100"),g=n()?K()?"32px":"36px":"auto",v=e.content?.aspectRatio,y=e.content?.maxWidth??Er.maxWidth;return f!==u.e&&(l.autoplay=u.e=f),d!==u.t&&j(l,"src",u.t=d),p!==u.a&&(l.controls=u.a=p),h!==u.o&&$(l,u.o=h),g!==u.i&&((u.i=g)!=null?l.style.setProperty("height",g):l.style.removeProperty("height")),v!==u.n&&((u.n=v)!=null?l.style.setProperty("aspect-ratio",v):l.style.removeProperty("aspect-ratio")),y!==u.s&&((u.s=y)!=null?l.style.setProperty("max-width",y):l.style.removeProperty("max-width")),u},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),l}}),m(q,{get when(){return B(()=>!!e.content?.type)()&&iu.includes(e.content.type)},get children(){var l=TI(),u=l.firstChild;return A(f=>{var d=Pt("p-4 z-10 text-fade-in w-full",n()?"opacity-0":"opacity-100 p-4"),p=n()?K()?"32px":"36px":e.content?.aspectRatio?void 0:`${e.content?.height??Er.height}px`,h=e.content?.aspectRatio,g=e.content?.maxWidth??Er.maxWidth,v=`${Cx[e.content?.type]}/${e.content?.id??""}${e.content?.queryParamsStr??""}`;return d!==f.e&&$(l,f.e=d),p!==f.t&&((f.t=p)!=null?l.style.setProperty("height",p):l.style.removeProperty("height")),h!==f.a&&((f.a=h)!=null?l.style.setProperty("aspect-ratio",h):l.style.removeProperty("aspect-ratio")),g!==f.o&&((f.o=g)!=null?l.style.setProperty("max-width",g):l.style.removeProperty("max-width")),v!==f.i&&j(u,"src",f.i=v),f},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l}})]}}),null),A(l=>{var u=Pt("flex flex-col w-full",e.onTransitionEnd?"animate-fade-in":void 0),f=n()?"64px":"100%",d=n()?"32px":"100%",p=e.content?.maxWidth??Er.maxWidth;return u!==l.e&&$(o,l.e=u),f!==l.t&&((l.t=f)!=null?s.style.setProperty("width",f):s.style.removeProperty("width")),d!==l.a&&((l.a=d)!=null?s.style.setProperty("height",d):s.style.removeProperty("height")),p!==l.o&&((l.o=p)!=null?s.style.setProperty("max-width",p):s.style.removeProperty("max-width")),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o})()};var kx=e=>m(Ee,{get children(){return[m(q,{get when(){return e.message.type==="text"},get children(){return m(Tx,{get content(){return e.message.content},get isTypingSkipped(){return e.isTypingSkipped},get typingEmulation(){return e.typingEmulation},get onTransitionEnd(){return e.onTransitionEnd}})}}),m(q,{get when(){return e.message.type==="image"},get children(){return m(vx,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}}),m(q,{get when(){return e.message.type==="video"},get children(){return m(_x,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}}),m(q,{get when(){return e.message.type==="embed"},get children(){return m(yx,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd},get onCompleted(){return e.onCompleted}})}}),m(q,{get when(){return e.message.type==="custom-embed"},get children(){return m(hx,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd},get onCompleted(){return e.onCompleted}})}}),m(q,{get when(){return e.message.type==="audio"},get children(){return m(gx,{get content(){return e.message.content},get onTransitionEnd(){return e.onTransitionEnd}})}})]}});var fu=Fr(Ex(),1);function du(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ir=du();function Rx(e){Ir=e}var Mx=/[&<>"']/,kI=new RegExp(Mx.source,"g"),Dx=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,EI=new RegExp(Dx.source,"g"),PI={"&":"&","<":"<",">":">",'"':""","'":"'"},Px=e=>PI[e];function _t(e,t){if(t){if(Mx.test(e))return e.replace(kI,Px)}else if(Dx.test(e))return e.replace(EI,Px);return e}var II=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function AI(e){return e.replace(II,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}var OI=/(^|[^\[])\^/g;function Pe(e,t){e=typeof e=="string"?e:e.source,t=t||"";let n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(OI,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function Ix(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}var zs={exec:()=>null};function Ax(e,t){let n=e.replace(/\|/g,(i,a,s)=>{let c=!1,l=a;for(;--l>=0&&s[l]==="\\";)c=!c;return c?"|":" |"}),r=n.split(/ \|/),o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(/\\\|/g,"|");return r}function cu(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r;){let i=e.charAt(r-o-1);if(i===t&&!n)o++;else if(i!==t&&n)o++;else break}return e.slice(0,r-o)}function RI(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function Ox(e,t,n,r){let o=t.href,i=t.title?_t(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;let s={type:"link",raw:n,href:o,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,s}return{type:"image",raw:n,href:o,title:i,text:_t(a)}}function MI(e,t){let n=e.match(/^(\s+)(?:```)/);if(n===null)return t;let r=n[1];return t.split(`
|
|
108
|
+
`).map(o=>{let i=o.match(/^\s+/);if(i===null)return o;let[a]=i;return a.length>=r.length?o.slice(r.length):o}).join(`
|
|
109
|
+
`)}var Eo=class{options;rules;lexer;constructor(t){this.options=t||Ir}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:cu(r,`
|
|
110
|
+
`)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],o=MI(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){let o=cu(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=n[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;let i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim(),o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");let a=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),s="",c="",l=!1;for(;t;){let u=!1;if(!(n=a.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let f=n[2].split(`
|
|
111
|
+
`,1)[0].replace(/^\t+/,y=>" ".repeat(3*y.length)),d=t.split(`
|
|
128
112
|
`,1)[0],p=0;this.options.pedantic?(p=2,c=f.trimStart()):(p=n[2].search(/[^ ]/),p=p>4?1:p,c=f.slice(p),p+=n[1].length);let h=!1;if(!f&&/^ *$/.test(d)&&(s+=d+`
|
|
129
|
-
`,t=t.substring(d.length+1),u=!0),!u){let
|
|
130
|
-
`,1)[0];if(d=I,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),
|
|
131
|
-
`+d.slice(p);else{if(h||f.search(/[^ ]/)>=4||
|
|
113
|
+
`,t=t.substring(d.length+1),u=!0),!u){let y=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),T=new RegExp(`^ {0,${Math.min(3,p-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),C=new RegExp(`^ {0,${Math.min(3,p-1)}}(?:\`\`\`|~~~)`),E=new RegExp(`^ {0,${Math.min(3,p-1)}}#`);for(;t;){let I=t.split(`
|
|
114
|
+
`,1)[0];if(d=I,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),C.test(d)||E.test(d)||y.test(d)||T.test(t))break;if(d.search(/[^ ]/)>=p||!d.trim())c+=`
|
|
115
|
+
`+d.slice(p);else{if(h||f.search(/[^ ]/)>=4||C.test(f)||E.test(f)||T.test(f))break;c+=`
|
|
132
116
|
`+d}!h&&!d.trim()&&(h=!0),s+=I+`
|
|
133
|
-
`,t=t.substring(I.length+1),f=d.slice(p)}}
|
|
134
|
-
`):[]};if(r.header.length===r.align.length){let o=r.align.length,a,
|
|
135
|
-
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:
|
|
136
|
-
]`).replace("lheading",
|
|
137
|
-
`),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(s,c,l)=>c+" ".repeat(l.length));let r,o,a
|
|
117
|
+
`,t=t.substring(I.length+1),f=d.slice(p)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(s)&&(l=!0));let g=null,v;this.options.gfm&&(g=/^\[[ xX]\] /.exec(c),g&&(v=g[0]!=="[ ] ",c=c.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!g,checked:v,loose:!1,text:c,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=c.trimEnd(),i.raw=i.raw.trimEnd();for(let u=0;u<i.items.length;u++)if(this.lexer.state.top=!1,i.items[u].tokens=this.lexer.blockTokens(i.items[u].text,[]),!i.loose){let f=i.items[u].tokens.filter(p=>p.type==="space"),d=f.length>0&&f.some(p=>/\n.*\n/.test(p.raw));i.loose=d}if(i.loose)for(let u=0;u<i.items.length;u++)i.items[u].loose=!0;return i}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(/\s+/g," "),o=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){let n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;let r={type:"table",raw:n[0],header:Ax(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
|
118
|
+
`):[]};if(r.header.length===r.align.length){let o=r.align.length,i,a,s,c;for(i=0;i<o;i++){let l=r.align[i];l&&(/^ *-+: *$/.test(l)?r.align[i]="right":/^ *:-+: *$/.test(l)?r.align[i]="center":/^ *:-+ *$/.test(l)?r.align[i]="left":r.align[i]=null)}for(o=r.rows.length,i=0;i<o;i++)r.rows[i]=Ax(r.rows[i],r.header.length).map(l=>({text:l,tokens:[]}));for(o=r.header.length,a=0;a<o;a++)r.header[a].tokens=this.lexer.inline(r.header[a].text);for(o=r.rows.length,a=0;a<o;a++)for(c=r.rows[a],s=0;s<c.length;s++)c[s].tokens=this.lexer.inline(c[s].text);return r}}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===`
|
|
119
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:_t(n[1])}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;let a=cu(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=RI(n[2],"()");if(a>-1){let c=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){let a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);a&&(o=a[1],i=a[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),Ox(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Ox(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let a=[...o[0]].length-1,s,c,l=a,u=0,f=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(f.lastIndex=0,n=n.slice(-1*t.length+o[0].length-1);(o=f.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(c=[...s].length,o[3]||o[4]){l+=c;continue}else if((o[5]||o[6])&&a%3&&!((a+c)%3)){u+=c;continue}if(l-=c,l>0)continue;c=Math.min(c,c+l+u);let d=[...t].slice(0,a+o.index+c+1).join("");if(Math.min(a,c)%2){let h=d.slice(1,-1);return{type:"em",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," "),o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=_t(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){let n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=_t(n[1]),o="mailto:"+r):(r=_t(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=_t(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=_t(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=_t(n[0]),{type:"text",raw:n[0],text:r}}}},te={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:zs,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};te._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;te._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;te.def=Pe(te.def).replace("label",te._label).replace("title",te._title).getRegex();te.bullet=/(?:[*+-]|\d{1,9}[.)])/;te.listItemStart=Pe(/^( *)(bull) */).replace("bull",te.bullet).getRegex();te.list=Pe(te.list).replace(/bull/g,te.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+te.def.source+")").getRegex();te._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";te._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;te.html=Pe(te.html,"i").replace("comment",te._comment).replace("tag",te._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();te.lheading=Pe(te.lheading).replace(/bull/g,te.bullet).getRegex();te.paragraph=Pe(te._paragraph).replace("hr",te.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",te._tag).getRegex();te.blockquote=Pe(te.blockquote).replace("paragraph",te.paragraph).getRegex();te.normal={...te};te.gfm={...te.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};te.gfm.table=Pe(te.gfm.table).replace("hr",te.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",te._tag).getRegex();te.gfm.paragraph=Pe(te._paragraph).replace("hr",te.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",te.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",te._tag).getRegex();te.pedantic={...te.normal,html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",te._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:zs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pe(te.normal._paragraph).replace("hr",te.hr).replace("heading",` *#{1,6} *[^
|
|
120
|
+
]`).replace("lheading",te.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};var z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:zs,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:zs,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};z._punctuation="\\p{P}$+<=>`^|~";z.punctuation=Pe(z.punctuation,"u").replace(/punctuation/g,z._punctuation).getRegex();z.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;z.anyPunctuation=/\\[punct]/g;z._escapes=/\\([punct])/g;z._comment=Pe(te._comment).replace("(?:-->|$)","-->").getRegex();z.emStrong.lDelim=Pe(z.emStrong.lDelim,"u").replace(/punct/g,z._punctuation).getRegex();z.emStrong.rDelimAst=Pe(z.emStrong.rDelimAst,"gu").replace(/punct/g,z._punctuation).getRegex();z.emStrong.rDelimUnd=Pe(z.emStrong.rDelimUnd,"gu").replace(/punct/g,z._punctuation).getRegex();z.anyPunctuation=Pe(z.anyPunctuation,"gu").replace(/punct/g,z._punctuation).getRegex();z._escapes=Pe(z._escapes,"gu").replace(/punct/g,z._punctuation).getRegex();z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;z._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;z.autolink=Pe(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex();z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;z.tag=Pe(z.tag).replace("comment",z._comment).replace("attribute",z._attribute).getRegex();z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;z._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;z.link=Pe(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex();z.reflink=Pe(z.reflink).replace("label",z._label).replace("ref",te._label).getRegex();z.nolink=Pe(z.nolink).replace("ref",te._label).getRegex();z.reflinkSearch=Pe(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex();z.normal={...z};z.pedantic={...z.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()};z.gfm={...z.normal,escape:Pe(z.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};z.gfm.url=Pe(z.gfm.url,"i").replace("email",z.gfm._extended_email).getRegex();z.breaks={...z.gfm,br:Pe(z.br).replace("{2,}","*").getRegex(),text:Pe(z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};var An=class e{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ir,this.options.tokenizer=this.options.tokenizer||new Eo,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={block:te.normal,inline:z.normal};this.options.pedantic?(n.block=te.pedantic,n.inline=z.pedantic):this.options.gfm&&(n.block=te.gfm,this.options.breaks?n.inline=z.breaks:n.inline=z.gfm),this.tokenizer.rules=n}static get rules(){return{block:te,inline:z}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
121
|
+
`),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(s,c,l)=>c+" ".repeat(l.length));let r,o,i,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
|
138
122
|
`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
|
|
139
123
|
`+r.raw,o.text+=`
|
|
140
124
|
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
|
|
141
125
|
`+r.raw,o.text+=`
|
|
142
|
-
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(
|
|
126
|
+
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0,c=t.slice(1),l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},c),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],a&&o.type==="paragraph"?(o.raw+=`
|
|
143
127
|
`+r.raw,o.text+=`
|
|
144
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),i
|
|
128
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),a=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=`
|
|
145
129
|
`+r.raw,o.text+=`
|
|
146
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,a
|
|
147
|
-
`,o?'<pre><code class="language-'+
|
|
148
|
-
`:"<pre><code>"+(r?t:
|
|
130
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,a=t,s,c,l;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(l=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(u=>(r=u.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,a,l)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let u=1/0,f=t.slice(1),d;this.options.extensions.startInline.forEach(p=>{d=p.call({lexer:this},f),typeof d=="number"&&d>=0&&(u=Math.min(u,d))}),u<1/0&&u>=0&&(i=t.substring(0,u+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(l=r.raw.slice(-1)),c=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return n}},Po=class{options;constructor(t){this.options=t||Ir}code(t,n,r){let o=(n||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+`
|
|
131
|
+
`,o?'<pre><code class="language-'+_t(o)+'">'+(r?t:_t(t,!0))+`</code></pre>
|
|
132
|
+
`:"<pre><code>"+(r?t:_t(t,!0))+`</code></pre>
|
|
149
133
|
`}blockquote(t){return`<blockquote>
|
|
150
134
|
${t}</blockquote>
|
|
151
135
|
`}html(t,n){return t}heading(t,n,r){return`<h${n}>${t}</h${n}>
|
|
152
136
|
`}hr(){return`<hr>
|
|
153
|
-
`}list(t,n,r){let o=n?"ol":"ul",
|
|
137
|
+
`}list(t,n,r){let o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`>
|
|
154
138
|
`+t+"</"+o+`>
|
|
155
139
|
`}listitem(t,n,r){return`<li>${t}</li>
|
|
156
140
|
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
|
|
@@ -161,11 +145,11 @@ ${t}</blockquote>
|
|
|
161
145
|
`}tablerow(t){return`<tr>
|
|
162
146
|
${t}</tr>
|
|
163
147
|
`}tablecell(t,n){let r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+`</${r}>
|
|
164
|
-
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,n,r){let o=
|
|
165
|
-
`+(
|
|
166
|
-
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+
|
|
148
|
+
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,n,r){let o=Ix(t);if(o===null)return r;t=o;let i='<a href="'+t+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){let o=Ix(t);if(o===null)return r;t=o;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${n}"`),i+=">",i}text(t){return t}},qi=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}},On=class e{options;renderer;textRenderer;constructor(t){this.options=t||Ir,this.options.renderer=this.options.renderer||new Po,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new qi}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(t,n=!0){let r="";for(let o=0;o<t.length;o++){let i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){let a=i,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){r+=s||"";continue}}switch(i.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{let a=i;r+=this.renderer.heading(this.parseInline(a.tokens),a.depth,AI(this.parseInline(a.tokens,this.textRenderer)));continue}case"code":{let a=i;r+=this.renderer.code(a.text,a.lang,!!a.escaped);continue}case"table":{let a=i,s="",c="";for(let u=0;u<a.header.length;u++)c+=this.renderer.tablecell(this.parseInline(a.header[u].tokens),{header:!0,align:a.align[u]});s+=this.renderer.tablerow(c);let l="";for(let u=0;u<a.rows.length;u++){let f=a.rows[u];c="";for(let d=0;d<f.length;d++)c+=this.renderer.tablecell(this.parseInline(f[d].tokens),{header:!1,align:a.align[d]});l+=this.renderer.tablerow(c)}r+=this.renderer.table(s,l);continue}case"blockquote":{let a=i,s=this.parse(a.tokens);r+=this.renderer.blockquote(s);continue}case"list":{let a=i,s=a.ordered,c=a.start,l=a.loose,u="";for(let f=0;f<a.items.length;f++){let d=a.items[f],p=d.checked,h=d.task,g="";if(d.task){let v=this.renderer.checkbox(!!p);l?d.tokens.length>0&&d.tokens[0].type==="paragraph"?(d.tokens[0].text=v+" "+d.tokens[0].text,d.tokens[0].tokens&&d.tokens[0].tokens.length>0&&d.tokens[0].tokens[0].type==="text"&&(d.tokens[0].tokens[0].text=v+" "+d.tokens[0].tokens[0].text)):d.tokens.unshift({type:"text",text:v+" "}):g+=v+" "}g+=this.parse(d.tokens,l),u+=this.renderer.listitem(g,h,!!p)}r+=this.renderer.list(u,s,c);continue}case"html":{let a=i;r+=this.renderer.html(a.text,a.block);continue}case"paragraph":{let a=i;r+=this.renderer.paragraph(this.parseInline(a.tokens));continue}case"text":{let a=i,s=a.tokens?this.parseInline(a.tokens):a.text;for(;o+1<t.length&&t[o+1].type==="text";)a=t[++o],s+=`
|
|
149
|
+
`+(a.tokens?this.parseInline(a.tokens):a.text);r+=n?this.renderer.paragraph(s):s;continue}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}parseInline(t,n){n=n||this.renderer;let r="";for(let o=0;o<t.length;o++){let i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){let a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=a||"";continue}}switch(i.type){case"escape":{let a=i;r+=n.text(a.text);break}case"html":{let a=i;r+=n.html(a.text);break}case"link":{let a=i;r+=n.link(a.href,a.title,this.parseInline(a.tokens,n));break}case"image":{let a=i;r+=n.image(a.href,a.title,a.text);break}case"strong":{let a=i;r+=n.strong(this.parseInline(a.tokens,n));break}case"em":{let a=i;r+=n.em(this.parseInline(a.tokens,n));break}case"codespan":{let a=i;r+=n.codespan(a.text);break}case"br":{r+=n.br();break}case"del":{let a=i;r+=n.del(this.parseInline(a.tokens,n));break}case"text":{let a=i;r+=n.text(a.text);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}},ko=class{options;constructor(t){this.options=t||Ir}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(t){return t}postprocess(t){return t}},uu=class{defaults=du();options=this.setOptions;parse=this.#e(An.lex,On.parse);parseInline=this.#e(An.lexInline,On.parseInline);Parser=On;parser=On.parse;Renderer=Po;TextRenderer=qi;Lexer=An;lexer=An.lex;Tokenizer=Eo;Hooks=ko;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let o of t)switch(r=r.concat(n.call(this,o)),o.type){case"table":{let i=o;for(let a of i.header)r=r.concat(this.walkTokens(a.tokens,n));for(let a of i.rows)for(let s of a)r=r.concat(this.walkTokens(s.tokens,n));break}case"list":{let i=o;r=r.concat(this.walkTokens(i.items,n));break}default:{let i=o;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{r=r.concat(this.walkTokens(i[a],n))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=n.renderers[i.name];a?n.renderers[i.name]=function(...s){let c=i.renderer.apply(this,s);return c===!1&&(c=a.apply(this,s)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[i.level];a?a.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){let i=this.defaults.renderer||new Po(this.defaults);for(let a in r.renderer){let s=r.renderer[a],c=a,l=i[c];i[c]=(...u)=>{let f=s.apply(i,u);return f===!1&&(f=l.apply(i,u)),f||""}}o.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Eo(this.defaults);for(let a in r.tokenizer){let s=r.tokenizer[a],c=a,l=i[c];i[c]=(...u)=>{let f=s.apply(i,u);return f===!1&&(f=l.apply(i,u)),f}}o.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new ko;for(let a in r.hooks){let s=r.hooks[a],c=a,l=i[c];ko.passThroughHooks.has(a)?i[c]=u=>{if(this.defaults.async)return Promise.resolve(s.call(i,u)).then(d=>l.call(i,d));let f=s.call(i,u);return l.call(i,f)}:i[c]=(...u)=>{let f=s.apply(i,u);return f===!1&&(f=l.apply(i,u)),f}}o.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;o.walkTokens=function(s){let c=[];return c.push(a.call(this,s)),i&&(c=c.concat(i.call(this,s))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}#e(t,n){return(r,o)=>{let i={...o},a={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);let s=this.#t(!!a.silent,!!a.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(c=>t(c,a)).then(c=>a.walkTokens?Promise.all(this.walkTokens(c,a.walkTokens)).then(()=>c):c).then(c=>n(c,a)).then(c=>a.hooks?a.hooks.postprocess(c):c).catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let c=t(r,a);a.walkTokens&&this.walkTokens(c,a.walkTokens);let l=n(c,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(c){return s(c)}}}#t(t,n){return r=>{if(r.message+=`
|
|
150
|
+
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+_t(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}},Pr=new uu;function _e(e,t){return Pr.parse(e,t)}_e.options=_e.setOptions=function(e){return Pr.setOptions(e),_e.defaults=Pr.defaults,Rx(_e.defaults),_e};_e.getDefaults=du;_e.defaults=Ir;_e.use=function(...e){return Pr.use(...e),_e.defaults=Pr.defaults,Rx(_e.defaults),_e};_e.walkTokens=function(e,t){return Pr.walkTokens(e,t)};_e.parseInline=Pr.parseInline;_e.Parser=On;_e.parser=On.parse;_e.Renderer=Po;_e.TextRenderer=qi;_e.Lexer=An;_e.lexer=An.lex;_e.Tokenizer=Eo;_e.Hooks=ko;_e.parse=_e;var A9=_e.options,O9=_e.setOptions,R9=_e.use,M9=_e.walkTokens,D9=_e.parseInline;var L9=On.parse,N9=An.lex;var DI=S('<div class="flex flex-col animate-fade-in agent-streaming-container"><div class="flex w-full items-center"><div class="flex relative items-start agent-host-bubble max-w-full"><div class="flex items-center absolute px-4 py-2 bubble-typing "data-testid=host-bubble></div><div class="flex flex-col overflow-hidden text-fade-in mx-4 my-2 relative text-ellipsis h-full gap-6">'),LI=S("<span>"),Lx=e=>{let[t,n]=tn(O([]),{key:`agent-streaming-message-${e.streamingMessageId}`,storage:e.context.storage});return _e.use({renderer:{link:(r,o,i)=>`<a href="${r}" target="_blank" rel="noopener noreferrer">${i}</a>`}}),ge(()=>{if(Ac()?.id!==e.streamingMessageId)return[];n(Ac()?.content.split("```").flatMap((r,o)=>o%2===0?r.split(`
|
|
167
151
|
|
|
168
|
-
`).map(a=>Yu.default.sanitize(ke.parse(a.replace(/【.+】/g,"").replace(/</g,"<").replace(/>/g,">"),{breaks:!0}),{ADD_ATTR:["target"]})):[Yu.default.sanitize(ke.parse("```"+r+"```".replace(/</g,"<").replace(/>/g,">"),{breaks:!0}),{ADD_ATTR:["target"]})]).filter(Ee)??[])}),(()=>{var r=x_(),o=r.firstChild,a=o.firstChild,i=a.firstChild,s=i.nextSibling;return i.style.setProperty("width","100%"),i.style.setProperty("height","100%"),v(s,m(ye,{get each(){return t()},children:c=>(()=>{var l=S_();return l.innerHTML=c,l})()})),r})()};var w_=w("<div><div>"),fi=e=>{let t,[n,r]=M(0),o=new ResizeObserver(a=>r(a[0].target.clientHeight-(Y()?24:40)));return ae(()=>{t&&o.observe(t)}),ue(()=>{t&&o.unobserve(t)}),(()=>{var a=w_(),i=a.firstChild,s=t;return typeof s=="function"?pe(s,a):t=a,v(i,m(ml,{get theme(){return e.theme},get src(){return e.avatarSrc}})),_(c=>{var l="flex flex-shrink-0 items-center relative agent-avatar-container "+(Y()?"w-6":"w-10"),u="absolute flex items-center top-0"+(Y()?" w-6 h-6":" w-10 h-10")+(e.hideAvatar?" opacity-0":" opacity-100"),f=`${n()}px`,d=e.isTransitionDisabled?void 0:"top 350ms ease-out, opacity 250ms ease-out";return l!==c.e&&U(a,c.e=l),u!==c.t&&U(i,c.t=u),f!==c.a&&((c.a=f)!=null?i.style.setProperty("top",f):i.style.removeProperty("top")),d!==c.o&&((c.o=d)!=null?i.style.setProperty("transition",d):i.style.removeProperty("transition")),c},{e:void 0,t:void 0,a:void 0,o:void 0}),a})()};var Mv=w('<div><div class="flex flex-col flex-1 gap-2">'),T_=w('<div class="flex flex-col w-full min-w-0 gap-2 agent-chat-chunk">'),Rv=e=>{let t,[n,r]=M(e.isTransitionDisabled?e.messages.length:0),[o,a]=M();ae(()=>{e.streamingMessageId||(e.messages.length===0&&e.onAllBubblesDisplayed(),e.onScrollToBottom(t,50))});let i=async s=>{(e.settings.typingEmulation?.delayBetweenBubbles??at.typingEmulation.delayBetweenBubbles)>0&&n()<e.messages.length-1&&await new Promise(l=>setTimeout(l,(e.settings.typingEmulation?.delayBetweenBubbles??at.typingEmulation.delayBetweenBubbles)*1e3));let c=e.messages[n()].id;await e.onNewBubbleDisplayed(c),r(n()===e.messages.length?n():n()+1),e.onScrollToBottom(s),n()===e.messages.length&&(a(s),e.onAllBubblesDisplayed())};return(()=>{var s=T_();return v(s,m(B,{get when(){return e.messages.length>0},get children(){var c=Mv(),l=c.firstChild;return v(c,m(B,{get when(){return(e.theme.chat?.hostAvatar?.isEnabled??wo)&&e.messages.length>0},get children(){return m(fi,{get theme(){return e.theme},get avatarSrc(){return e.theme.chat?.hostAvatar?.url},get hideAvatar(){return e.hideAvatar},get isTransitionDisabled(){return e.isTransitionDisabled}})}}),l),v(l,m(ye,{get each(){return e.messages.slice(0,n()+1)},children:(u,f)=>m(Sv,{message:u,get typingEmulation(){return e.settings.typingEmulation},get isTypingSkipped(){return F(()=>!!((e.settings.typingEmulation?.isDisabledOnFirstMessage??at.typingEmulation.isDisabledOnFirstMessage)&&e.index===0))()&&f()===0},get onTransitionEnd(){return e.isTransitionDisabled?void 0:i},get onCompleted(){return e.onSubmit}})})),_(u=>{var f="flex"+(Y()?" gap-1":" gap-2"),d=e.theme.chat?.guestAvatar?.isEnabled??va?Y()?"calc(100% - 60px)":"calc(100% - 48px - 48px)":"100%";return f!==u.e&&U(c,u.e=f),d!==u.t&&((u.t=d)!=null?l.style.setProperty("max-width",d):l.style.removeProperty("max-width")),u},{e:void 0,t:void 0}),c}}),null),v(s,(()=>{var c=F(()=>!!(e.input&&n()===e.messages.length));return()=>c()&&m(lv,{get theme(){return e.theme},ref(l){var u=t;typeof u=="function"?u(l):t=l},get block(){return e.input},get chunkIndex(){return e.index},get hasHostAvatar(){return e.theme.chat?.hostAvatar?.isEnabled??wo},get guestAvatar(){return e.theme.chat?.guestAvatar},get context(){return e.context},get isInputPrefillEnabled(){return e.settings.general?.isInputPrefillEnabled??at.general.isInputPrefillEnabled},get isOngoingLastChunk(){return e.isOngoingLastChunk},get hasError(){return e.hasError},onTransitionEnd:()=>e.onScrollToBottom(o()),get onSubmit(){return e.onSubmit},get onSkip(){return e.onSkip}})})(),null),v(s,m(B,{get when(){return e.streamingMessageId},keyed:!0,children:c=>(()=>{var l=Mv(),u=l.firstChild;return v(l,m(B,{get when(){return e.theme.chat?.hostAvatar?.isEnabled??wo},get children(){return m(fi,{get theme(){return e.theme},get avatarSrc(){return e.theme.chat?.hostAvatar?.url},get hideAvatar(){return e.hideAvatar}})}}),u),v(u,m(_v,{streamingMessageId:c,get context(){return e.context}})),_(f=>{var d="flex"+(Y()?" gap-1":" gap-2"),p=e.theme.chat?.guestAvatar?.isEnabled??va?Y()?"calc(100% - 60px)":"calc(100% - 48px - 48px)":"100%";return d!==f.e&&U(l,f.e=d),p!==f.t&&((f.t=p)!=null?u.style.setProperty("max-width",p):u.style.removeProperty("max-width")),f},{e:void 0,t:void 0}),l})()}),null),s})()};var C_=w('<div class="flex flex-col animate-fade-in"><div class="flex w-full items-center"><div class="flex relative items-start agent-host-bubble"><div class="flex items-center absolute px-4 py-2 bubble-typing "data-testid=host-bubble></div><p class="overflow-hidden text-fade-in mx-4 my-2 whitespace-pre-wrap slate-html-container relative opacity-0 h-6 text-ellipsis">'),Nv=()=>(()=>{var e=C_(),t=e.firstChild,n=t.firstChild,r=n.firstChild;return r.style.setProperty("width","64px"),r.style.setProperty("height","32px"),v(r,m(It,{})),e})();var E_=w('<div class="flex w-full agent-loading-chunk"><div class="flex flex-col w-full min-w-0"><div class="flex gap-2">'),Ov=e=>(()=>{var t=E_(),n=t.firstChild,r=n.firstChild;return v(r,m(B,{get when(){return e.theme.chat?.hostAvatar?.isEnabled??wo},get children(){return m(fi,{get theme(){return e.theme},get avatarSrc(){return e.theme.chat?.hostAvatar?.url}})}}),null),v(r,m(Nv,{}),null),t})();var k_=w('<div class="w-full max-w-xs p-4 text-gray-500 bg-white shadow flex flex-col gap-2 agent-popup-blocked-toast"role=alert><div class="flex flex-col gap-1"><span class=" text-sm font-semibold text-gray-900">Popup blocked</span><div class="text-sm font-normal">The agent wants to open a new tab but it was blocked by your browser. It needs a manual approval.</div></div><a target=_blank class="py-1 px-4 justify-center text-sm font-semibold text-white focus:outline-none flex items-center disabled:opacity-50 disabled:cursor-not-allowed disabled:brightness-100 filter hover:brightness-90 active:brightness-75 agent-button"rel=noreferrer>Continue in new tab'),Lv=e=>(()=>{var t=k_(),n=t.firstChild,r=n.nextSibling;return r.$$click=()=>e.onLinkClick(),_(()=>H(r,"href",e.url)),t})();$e(["click"]);var A_=w('<div class="flex flex-col overflow-y-auto w-full relative scrollable-container agent-chat-view scroll-smooth gap-2">'),P_=w('<div class="flex justify-end">'),I_=w('<div class="w-full flex-shrink-0 agent-bottom-spacer h-[20%]">'),__=.6,M_=50,R_=(e,t)=>({...e,chat:{...e.chat,hostAvatar:e.chat?.hostAvatar&&t?.hostAvatarUrl?{...e.chat.hostAvatar,url:t.hostAvatarUrl}:e.chat?.hostAvatar,guestAvatar:e.chat?.guestAvatar&&t?.guestAvatarUrl?{...e.chat.guestAvatar,url:t?.guestAvatarUrl}:e.chat?.guestAvatar}}),Dv=e=>{let t,[n,r]=fn(M([{input:e.initialChatReply.input,messages:e.initialChatReply.messages}]),{key:`agent-${e.context.agent.id}-chatChunks`,storage:e.context.storage,onRecovered:()=>{setTimeout(()=>{t?.scrollTo(0,t.scrollHeight)},200)}}),[o,a]=fn(M(e.initialChatReply.clientSideActions??[]),{key:`agent-${e.context.agent.id}-clientSideActions`,storage:e.context.storage}),[i,s]=fn(M(!1),{key:`agent-${e.context.agent.id}-isEnded`,storage:e.context.storage}),[c,l]=M(e.initialChatReply.dynamicTheme),[u,f]=M(e.initialChatReply.agent.theme),[d,p]=M(!1),[h,g]=M(),[x,b]=M(!1);ae(()=>{(async()=>{if(n().length>1)E();else{let P=o()?.filter(T=>Je(T.lastBubbleBlockId));await V(P)}})()});let E=()=>{[...n()].pop()?.streamingMessageId&&r(P=>P.slice(0,-1));let L=qu({clientSideActions:o(),lastBubbleBlockId:void 0});a(P=>P.slice(L.length))},S=({id:L,message:P})=>{p(!1);let T=[...n()].pop();T&&(T.streamingMessageId!==L&&r(C=>[...C,{messages:[],streamingMessageId:L}]),mu({id:L,content:P}))};be(()=>{f(R_(e.initialChatReply.agent.theme,c()))});let k=async L=>{L&&(e.onNewLogs?.(L),!e.context.isPreview&&await au({apiHost:e.context.apiHost,sessionId:e.initialChatReply.sessionId,clientLogs:L}))},I=async L=>{b(!1);let P=[...n()].pop()?.input;P?.id&&e.onAnswer&&L&&e.onAnswer({message:Ry(L),blockId:P.id});let T=setTimeout(()=>{p(!0)},1e3);G();let{data:C,error:R}=await oy({apiHost:e.context.apiHost,sessionId:e.initialChatReply.sessionId,message:O_(L)});if(clearTimeout(T),p(!1),R){b(!0);let O=[{description:"Failed to send the reply",details:R instanceof dn?{status:R.response.status,body:await R.response.json()}:R,status:"error"}];await au({apiHost:e.context.apiHost,sessionId:e.initialChatReply.sessionId,clientLogs:O}),e.onNewLogs?.(O);return}if(C){if(C.progress&&e.onProgressUpdate?.(C.progress),C.lastMessageNewFormat&&fu([...$s(),{inputIndex:[...n()].length-1,formattedMessage:C.lastMessageNewFormat}]),C.logs&&e.onNewLogs?.(C.logs),C.dynamicTheme&&l(C.dynamicTheme),C.input&&e.onNewInputBlock&&e.onNewInputBlock(C.input),C.clientSideActions){a(C.clientSideActions);let O=qu({clientSideActions:C.clientSideActions,lastBubbleBlockId:void 0});if(await V(O),C.clientSideActions.length===1&&C.clientSideActions[0].type==="stream"&&C.messages.length===0&&C.input===void 0)return}r(O=>[...O,{input:C.input,messages:C.messages}])}},G=(L,P=0)=>{!t||t.scrollTop+t.clientHeight<t.scrollHeight-t.clientHeight*__||setTimeout(()=>{t?.scrollTo({top:L?L.offsetTop-P:t.scrollHeight,behavior:"smooth"})},M_)},D=async()=>{let L=[...n()].pop();L&&Je(L.input)&&(s(!0),e.onEnd?.())},ie=async L=>{let P=qu({clientSideActions:o(),lastBubbleBlockId:L});await V(P)},V=async L=>{for(let P of L){("streamOpenAiChatCompletion"in P||"webhookToExecute"in P||"stream"in P)&&p(!0);let T=await My({clientSideAction:P,context:{apiHost:e.context.apiHost,sessionId:e.initialChatReply.sessionId,resultId:e.initialChatReply.resultId},onMessageStream:S});if(a(C=>C.slice(1)),T&&"logs"in T&&k(T.logs),T&&"replyToSend"in T){p(!1),I(T.replyToSend?{type:"text",value:T.replyToSend}:void 0);return}T&&"blockedPopupUrl"in T&&g(T.blockedPopupUrl),T&&"scriptCallbackMessage"in T&&e.onScriptExecutionSuccess?.(T.scriptCallbackMessage)}};ue(()=>{mu(void 0),fu([])});let W=()=>I(void 0);return(()=>{var L=A_(),P=t;return typeof P=="function"?pe(P,L):t=L,v(L,m(ye,{get each(){return n()},children:(T,C)=>m(Rv,{get index(){return C()},get messages(){return T.messages},get input(){return T.input},get theme(){return u()},get settings(){return e.initialChatReply.agent.settings},get streamingMessageId(){return T.streamingMessageId},get context(){return e.context},get hideAvatar(){return F(()=>!T.input)()&&((n()[C()+1]?.messages??[]).length>0||n()[C()+1]?.streamingMessageId!==void 0||T.messages.length>0&&d())},get hasError(){return F(()=>!!x())()&&C()===n().length-1},get isTransitionDisabled(){return C()!==n().length-1},get isOngoingLastChunk(){return F(()=>!i())()&&C()===n().length-1},onNewBubbleDisplayed:ie,onAllBubblesDisplayed:D,onSubmit:I,onScrollToBottom:G,onSkip:W})}),null),v(L,m(B,{get when(){return d()},get children(){return m(Ov,{get theme(){return u()}})}}),null),v(L,m(B,{get when(){return h()},keyed:!0,children:T=>(()=>{var C=P_();return v(C,m(Lv,{url:T,onLinkClick:()=>g(void 0)})),C})()}),null),v(L,m(N_,{}),null),L})()},N_=()=>I_(),O_=e=>{if(e){if(e.type==="text")return{type:"text",text:e.value,attachedFileUrls:e.attachments?.map(t=>t.url)};if(e.type==="recording")return{type:"audio",url:e.url}}},qu=({clientSideActions:e,lastBubbleBlockId:t})=>{let n=[],r=t;for(let o of e){if(r!==o.lastBubbleBlockId)break;r=o.lastBubbleBlockId,t===o.lastBubbleBlockId&&n.push(o)}return n};var L_=w('<div class="h-full flex justify-center items-center flex-col"><p class="text-2xl text-center"></p><pre>'),Bv=e=>(()=>{var t=L_(),n=t.firstChild,r=n.nextSibling;return v(n,()=>e.error.message),v(r,()=>JSON.stringify(e.error.cause,null,2)),t})();var D_=w('<a target=_blank rel="noopener noreferrer"class=brand-mark id=brand-mark><span>'),Uv=e=>{let t,n,r=o=>{o.forEach(a=>{a.removedNodes.forEach(i=>{"id"in i&&t&&i.id==="brand-mark"&&e.agentContainer?.append(t)})})};return ae(()=>{!document||!e.agentContainer||(n=new MutationObserver(r),n.observe(e.agentContainer,{subtree:!1,childList:!0}))}),ue(()=>{n&&n.disconnect()}),(()=>{var o=D_(),a=o.firstChild,i=t;return typeof i=="function"?pe(i,o):t=o,v(a,()=>e.text),_(()=>H(o,"href",e.url)),o})()};var B_=w("<div class=agent-progress-bar-container><div class=agent-progress-bar>"),Ju=e=>(()=>{var t=B_(),n=t.firstChild;return _(r=>(r=`${e.value}%`)!=null?n.style.setProperty("width",r):n.style.removeProperty("width")),t})();var Fv=w("<style>"),U_=w("<div>"),zo=e=>{let[t,n]=M(),[r,o]=M(""),[a,i]=M(!1),[s,c]=M(),l=async()=>{e.font&&vc(e.font),i(!0);let u=new URLSearchParams(location.search);e.onInit?.();let f={};u.forEach((b,E)=>{f[E]=b});let d=typeof e.agent=="string"?e.agent:void 0,p=typeof e.agent!="string"||(e.isPreview??!1),h=mm(d),{data:g,error:x}=await $p({stripeRedirectStatus:u.get("redirect_status")??void 0,agent:e.agent,apiHost:e.apiHost,isPreview:p,resultId:Ee(e.resultId)?e.resultId:h,prefilledVariables:{...f,...e.prefilledVariables},startFrom:e.startFrom,sessionId:e.sessionId});if(x instanceof dn)return p?c(new Error("\u{1F6A8} An error occurred while loading the agent.",{})):x.response.status===400||x.response.status===403?c(new Error("This agent is now closed.")):x.response.status===404?c(new Error("The agent you're looking for doesn't exist.")):c(new Error(`Error! Couldn't initiate the chat. (${x.response.statusText})`));if(x instanceof so)return c(new Error(x.message));if(!g)return x&&(console.error(x),p)?c(new Error("Error! Could not reach server. Check your connection.",{cause:x})):c(new Error("Error! Could not reach server. Check your connection."));if(g.resultId&&d&&(g.agent.settings.general?.rememberUser?.isEnabled??at.general.rememberUser.isEnabled)){h&&h!==g.resultId&&os(g.agent.id);let b=g.agent.settings.general?.rememberUser?.storage??at.general.rememberUser.storage;gm(b)(d,g.resultId);let E=hm(g.agent.id);E&&E.agent.publishedAt&&g.agent.publishedAt?new Date(E.agent.publishedAt).getTime()===new Date(g.agent.publishedAt).getTime()?n(E):(os(g.agent.id),n(g),Tc(g,{agentId:g.agent.id,storage:b})):(n(g),Tc(g,{agentId:g.agent.id,storage:b})),e.onChatStatePersisted?.(!0)}else{if(os(g.agent.id),n(g),g.input?.id&&e.onNewInputBlock&&e.onNewInputBlock(g.input),g.logs){let b=g.logs.map(E=>({status:E.status??"",description:E.description??"",details:E.details}));e.onNewLogs?.(b)}e.onChatStatePersisted?.(!1)}o(g.agent.theme.customCss??"")};return be(()=>{Je(e.agent)||a()||l().then()}),be(()=>{Je(e.agent)||typeof e.agent=="string"||(o(e.agent.theme.customCss??""),e.agent.theme.general?.progressBar?.isEnabled&&t()&&!t()?.agent.theme.general?.progressBar?.isEnabled&&(i(!1),l().then()))}),ue(()=>{i(!1)}),[(()=>{var u=Fv();return v(u,r),u})(),(()=>{var u=Fv();return v(u,ry),u})(),m(B,{get when(){return s()},keyed:!0,children:u=>m(Bv,{error:u})}),m(B,{get when(){return t()},keyed:!0,children:u=>m(F_,{get class(){return e.class},get initialChatReply(){return{...u,agent:{...u.agent,settings:typeof e.agent=="string"?u.agent?.settings:e.agent?.settings,theme:typeof e.agent=="string"?u.agent?.theme:e.agent?.theme}}},get context(){return{apiHost:e.apiHost,isPreview:typeof e.agent!="string"||(e.isPreview??!1),resultId:u.resultId,sessionId:u.sessionId,agent:u.agent,storage:u.agent.settings.general?.rememberUser?.isEnabled&&!(typeof e.agent!="string"||(e.isPreview??!1))?u.agent.settings.general?.rememberUser?.storage??at.general.rememberUser.storage:void 0}},get progressBarRef(){return e.progressBarRef},get onNewInputBlock(){return e.onNewInputBlock},get onNewLogs(){return e.onNewLogs},get onAnswer(){return e.onAnswer},get onEnd(){return e.onEnd},get onScriptExecutionSuccess(){return e.onScriptExecutionSuccess}})})]},F_=e=>{let[t,n]=fn(M(e.initialChatReply.progress),{storage:e.context.storage,key:`agent-${e.context.agent.id}-progressValue`}),r,o=new ResizeObserver(a=>im((a[0]?.target.clientWidth??0)<432));return ae(()=>{r&&(Kp(r),o.observe(r),Hp(`${r.clientHeight}px`))}),be(()=>{vc(e.initialChatReply.agent.theme.general?.font??{type:Vp,family:vo}),r&&pm(e.initialChatReply.agent.theme,r,e.context.isPreview)}),ue(()=>{r&&o.unobserve(r)}),(()=>{var a=U_(),i=r;return typeof i=="function"?pe(i,a):r=a,v(a,m(B,{get when(){return te(t())&&e.initialChatReply.agent.theme.general?.progressBar?.isEnabled},get children(){return m(B,{get when(){return e.progressBarRef&&(e.initialChatReply.agent.theme.general?.progressBar?.position??Ji)==="fixed"},get fallback(){return m(Ju,{get value(){return t()}})},get children(){return m(nf,{get mount(){return e.progressBarRef},get children(){return m(Ju,{get value(){return t()}})}})}})}}),null),v(a,m(Dv,{get context(){return e.context},get initialChatReply(){return e.initialChatReply},get onNewInputBlock(){return e.onNewInputBlock},get onAnswer(){return e.onAnswer},get onEnd(){return e.onEnd},get onNewLogs(){return e.onNewLogs},onProgressUpdate:n,get onScriptExecutionSuccess(){return e.onScriptExecutionSuccess}}),null),v(a,m(B,{get when(){return e.initialChatReply.agent.settings.general?.isBrandingEnabled},get children(){return m(Uv,{agentContainer:r,get url(){return e.initialChatReply.agent.settings.general?.brandingUrl??"https://release0.com/?utm_source=brand-mark"},get text(){return e.initialChatReply.agent.settings.general?.brandingText??"Powered by Release0"}})}}),null),v(a,m(Qc,{toaster:lr,children:s=>m(Or.Root,{get children(){return[m(Or.Title,{get children(){return s().title}}),m(Or.Description,{get children(){return s().description}}),m(Or.CloseTrigger,{class:"absolute right-2 top-2",get children(){return m(Sn,{class:"w-4 h-4"})}})]}})}),null),_(()=>U(a,he("relative flex w-full h-full text-base overflow-hidden flex-col justify-center items-center agent-container",e.class))),a})()};var bl="Zendesk Web Widget Opened";var Zr=`*, ::before, ::after {
|
|
152
|
+
`).map(i=>fu.default.sanitize(_e.parse(i.replace(/【.+】/g,"").replace(/</g,"<").replace(/>/g,">"),{breaks:!0}),{ADD_ATTR:["target"]})):[fu.default.sanitize(_e.parse("```"+r+"```".replace(/</g,"<").replace(/>/g,">"),{breaks:!0}),{ADD_ATTR:["target"]})]).filter(Ce)??[])}),(()=>{var r=DI(),o=r.firstChild,i=o.firstChild,a=i.firstChild,s=a.nextSibling;return a.style.setProperty("width","100%"),a.style.setProperty("height","100%"),x(s,m(he,{get each(){return t()},children:c=>(()=>{var l=LI();return l.innerHTML=c,l})()})),r})()};var NI=S("<div><div>"),Ki=e=>{let t,[n,r]=O(0),o=new ResizeObserver(i=>r(i[0].target.clientHeight-(K()?24:40)));return ne(()=>{t&&o.observe(t)}),se(()=>{t&&o.unobserve(t)}),(()=>{var i=NI(),a=i.firstChild,s=t;return typeof s=="function"?de(s,i):t=i,x(a,m(Vs,{get theme(){return e.theme},get src(){return e.avatarSrc}})),A(c=>{var l="flex flex-shrink-0 items-center relative agent-avatar-container "+(K()?"w-6":"w-10"),u="absolute flex items-center top-0"+(K()?" w-6 h-6":" w-10 h-10")+(e.hideAvatar?" opacity-0":" opacity-100"),f=`${n()}px`,d=e.isTransitionDisabled?void 0:"top 350ms ease-out, opacity 250ms ease-out";return l!==c.e&&$(i,c.e=l),u!==c.t&&$(a,c.t=u),f!==c.a&&((c.a=f)!=null?a.style.setProperty("top",f):a.style.removeProperty("top")),d!==c.o&&((c.o=d)!=null?a.style.setProperty("transition",d):a.style.removeProperty("transition")),c},{e:void 0,t:void 0,a:void 0,o:void 0}),i})()};var Nx=S('<div><div class="flex flex-col flex-1 gap-2">'),$I=S('<div class="flex flex-col w-full min-w-0 gap-2 agent-chat-chunk">'),$x=e=>{let t,[n,r]=O(e.isTransitionDisabled?e.messages.length:0),[o,i]=O();ne(()=>{e.streamingMessageId||(e.messages.length===0&&e.onAllBubblesDisplayed(),e.onScrollToBottom(t,50))});let a=async s=>{(e.settings.typingEmulation?.delayBetweenBubbles??Je.typingEmulation.delayBetweenBubbles)>0&&n()<e.messages.length-1&&await new Promise(l=>setTimeout(l,(e.settings.typingEmulation?.delayBetweenBubbles??Je.typingEmulation.delayBetweenBubbles)*1e3));let c=e.messages[n()].id;await e.onNewBubbleDisplayed(c),r(n()===e.messages.length?n():n()+1),e.onScrollToBottom(s),n()===e.messages.length&&(i(s),e.onAllBubblesDisplayed())};return(()=>{var s=$I();return x(s,m(N,{get when(){return e.messages.length>0},get children(){var c=Nx(),l=c.firstChild;return x(c,m(N,{get when(){return(e.theme.chat?.hostAvatar?.isEnabled??ro)&&e.messages.length>0},get children(){return m(Ki,{get theme(){return e.theme},get avatarSrc(){return e.theme.chat?.hostAvatar?.url},get hideAvatar(){return e.hideAvatar},get isTransitionDisabled(){return e.isTransitionDisabled}})}}),l),x(l,m(he,{get each(){return e.messages.slice(0,n()+1)},children:(u,f)=>m(kx,{message:u,get typingEmulation(){return e.settings.typingEmulation},get isTypingSkipped(){return B(()=>!!((e.settings.typingEmulation?.isDisabledOnFirstMessage??Je.typingEmulation.isDisabledOnFirstMessage)&&e.index===0))()&&f()===0},get onTransitionEnd(){return e.isTransitionDisabled?void 0:a},get onCompleted(){return e.onSubmit}})})),A(u=>{var f="flex"+(K()?" gap-1":" gap-2"),d=e.theme.chat?.guestAvatar?.isEnabled??ti?K()?"calc(100% - 60px)":"calc(100% - 48px - 48px)":"100%";return f!==u.e&&$(c,u.e=f),d!==u.t&&((u.t=d)!=null?l.style.setProperty("max-width",d):l.style.removeProperty("max-width")),u},{e:void 0,t:void 0}),c}}),null),x(s,(()=>{var c=B(()=>!!(e.input&&n()===e.messages.length));return()=>c()&&m(px,{get theme(){return e.theme},ref(l){var u=t;typeof u=="function"?u(l):t=l},get block(){return e.input},get chunkIndex(){return e.index},get hasHostAvatar(){return e.theme.chat?.hostAvatar?.isEnabled??ro},get guestAvatar(){return e.theme.chat?.guestAvatar},get context(){return e.context},get isInputPrefillEnabled(){return e.settings.general?.isInputPrefillEnabled??Je.general.isInputPrefillEnabled},get isOngoingLastChunk(){return e.isOngoingLastChunk},get hasError(){return e.hasError},onTransitionEnd:()=>e.onScrollToBottom(o()),get onSubmit(){return e.onSubmit},get onSkip(){return e.onSkip}})})(),null),x(s,m(N,{get when(){return e.streamingMessageId},keyed:!0,children:c=>(()=>{var l=Nx(),u=l.firstChild;return x(l,m(N,{get when(){return e.theme.chat?.hostAvatar?.isEnabled??ro},get children(){return m(Ki,{get theme(){return e.theme},get avatarSrc(){return e.theme.chat?.hostAvatar?.url},get hideAvatar(){return e.hideAvatar}})}}),u),x(u,m(Lx,{streamingMessageId:c,get context(){return e.context}})),A(f=>{var d="flex"+(K()?" gap-1":" gap-2"),p=e.theme.chat?.guestAvatar?.isEnabled??ti?K()?"calc(100% - 60px)":"calc(100% - 48px - 48px)":"100%";return d!==f.e&&$(l,f.e=d),p!==f.t&&((f.t=p)!=null?u.style.setProperty("max-width",p):u.style.removeProperty("max-width")),f},{e:void 0,t:void 0}),l})()}),null),s})()};var BI=S('<div class="flex flex-col animate-fade-in"><div class="flex w-full items-center"><div class="flex relative items-start agent-host-bubble"><div class="flex items-center absolute px-4 py-2 bubble-typing "data-testid=host-bubble></div><p class="overflow-hidden text-fade-in mx-4 my-2 whitespace-pre-wrap slate-html-container relative opacity-0 h-6 text-ellipsis">'),Bx=()=>(()=>{var e=BI(),t=e.firstChild,n=t.firstChild,r=n.firstChild;return r.style.setProperty("width","64px"),r.style.setProperty("height","32px"),x(r,m(wt,{})),e})();var FI=S('<div class="flex w-full agent-loading-chunk"><div class="flex flex-col w-full min-w-0"><div class="flex gap-2">'),Fx=e=>(()=>{var t=FI(),n=t.firstChild,r=n.firstChild;return x(r,m(N,{get when(){return e.theme.chat?.hostAvatar?.isEnabled??ro},get children(){return m(Ki,{get theme(){return e.theme},get avatarSrc(){return e.theme.chat?.hostAvatar?.url}})}}),null),x(r,m(Bx,{}),null),t})();var UI=S('<div class="w-full max-w-xs p-4 text-gray-500 bg-white shadow flex flex-col gap-2 agent-popup-blocked-toast"role=alert><div class="flex flex-col gap-1"><span class=" text-sm font-semibold text-gray-900">Popup blocked</span><div class="text-sm font-normal">The agent wants to open a new tab but it was blocked by your browser. It needs a manual approval.</div></div><a target=_blank class="py-1 px-4 justify-center text-sm font-semibold text-white focus:outline-none flex items-center disabled:opacity-50 disabled:cursor-not-allowed disabled:brightness-100 filter hover:brightness-90 active:brightness-75 agent-button"rel=noreferrer>Continue in new tab'),Ux=e=>(()=>{var t=UI(),n=t.firstChild,r=n.nextSibling;return r.$$click=()=>e.onLinkClick(),A(()=>j(r,"href",e.url)),t})();Me(["click"]);var jI=S('<div class="flex flex-col overflow-y-auto w-full relative scrollable-container agent-chat-view scroll-smooth gap-2">'),VI=S('<div class="flex justify-end">'),HI=S('<div class="w-full flex-shrink-0 agent-bottom-spacer h-[20%]">'),zI=.6,GI=50,WI=(e,t)=>({...e,chat:{...e.chat,hostAvatar:e.chat?.hostAvatar&&t?.hostAvatarUrl?{...e.chat.hostAvatar,url:t.hostAvatarUrl}:e.chat?.hostAvatar,guestAvatar:e.chat?.guestAvatar&&t?.guestAvatarUrl?{...e.chat.guestAvatar,url:t?.guestAvatarUrl}:e.chat?.guestAvatar}}),jx=e=>{let t,[n,r]=tn(O([{input:e.initialChatReply.input,messages:e.initialChatReply.messages}]),{key:`agent-${e.context.agent.id}-chatChunks`,storage:e.context.storage,onRecovered:()=>{setTimeout(()=>{t?.scrollTo(0,t.scrollHeight)},200)}}),[o,i]=tn(O(e.initialChatReply.clientSideActions??[]),{key:`agent-${e.context.agent.id}-clientSideActions`,storage:e.context.storage}),[a,s]=tn(O(!1),{key:`agent-${e.context.agent.id}-isEnded`,storage:e.context.storage}),[c,l]=O(e.initialChatReply.dynamicTheme),[u,f]=O(e.initialChatReply.agent.theme),[d,p]=O(!1),[h,g]=O(),[v,y]=O(!1);ne(()=>{(async()=>{if(n().length>1)T();else{let P=o()?.filter(_=>Ge(_.lastBubbleBlockId));await H(P)}})()});let T=()=>{[...n()].pop()?.streamingMessageId&&r(P=>P.slice(0,-1));let L=pu({clientSideActions:o(),lastBubbleBlockId:void 0});i(P=>P.slice(L.length))},C=({id:L,message:P})=>{p(!1);let _=[...n()].pop();_&&(_.streamingMessageId!==L&&r(w=>[...w,{messages:[],streamingMessageId:L}]),Oc({id:L,content:P}))};ge(()=>{f(WI(e.initialChatReply.agent.theme,c()))});let E=async L=>{L&&(e.onNewLogs?.(L),!e.context.isPreview&&await Sc({apiHost:e.context.apiHost,sessionId:e.initialChatReply.sessionId,clientLogs:L}))},I=async L=>{y(!1);let P=[...n()].pop()?.input;P?.id&&e.onAnswer&&L&&e.onAnswer({message:$b(L),blockId:P.id});let _=setTimeout(()=>{p(!0)},1e3);U();let{data:w,error:M}=await cb({apiHost:e.context.apiHost,sessionId:e.initialChatReply.sessionId,message:KI(L)});if(clearTimeout(_),p(!1),M){y(!0);let D=[{description:"Failed to send the reply",details:M instanceof en?{status:M.response.status,body:await M.response.json()}:M,status:"error"}];await Sc({apiHost:e.context.apiHost,sessionId:e.initialChatReply.sessionId,clientLogs:D}),e.onNewLogs?.(D);return}if(w){if(w.progress&&e.onProgressUpdate?.(w.progress),w.lastMessageNewFormat&&Ic([...ms(),{inputIndex:[...n()].length-1,formattedMessage:w.lastMessageNewFormat}]),w.logs&&e.onNewLogs?.(w.logs),w.dynamicTheme&&l(w.dynamicTheme),w.input&&e.onNewInputBlock&&e.onNewInputBlock(w.input),w.clientSideActions){i(w.clientSideActions);let D=pu({clientSideActions:w.clientSideActions,lastBubbleBlockId:void 0});if(await H(D),w.clientSideActions.length===1&&w.clientSideActions[0].type==="stream"&&w.messages.length===0&&w.input===void 0)return}r(D=>[...D,{input:w.input,messages:w.messages}])}},U=(L,P=0)=>{!t||t.scrollTop+t.clientHeight<t.scrollHeight-t.clientHeight*zI||setTimeout(()=>{t?.scrollTo({top:L?L.offsetTop-P:t.scrollHeight,behavior:"smooth"})},GI)},R=async()=>{let L=[...n()].pop();L&&Ge(L.input)&&(s(!0),e.onEnd?.())},oe=async L=>{let P=pu({clientSideActions:o(),lastBubbleBlockId:L});await H(P)},H=async L=>{for(let P of L){("streamOpenAiChatCompletion"in P||"webhookToExecute"in P||"stream"in P)&&p(!0);let _=await Nb({clientSideAction:P,context:{apiHost:e.context.apiHost,sessionId:e.initialChatReply.sessionId,resultId:e.initialChatReply.resultId},onMessageStream:C});if(i(w=>w.slice(1)),_&&"logs"in _&&E(_.logs),_&&"replyToSend"in _){p(!1),I(_.replyToSend?{type:"text",value:_.replyToSend}:void 0);return}_&&"blockedPopupUrl"in _&&g(_.blockedPopupUrl),_&&"scriptCallbackMessage"in _&&e.onScriptExecutionSuccess?.(_.scriptCallbackMessage)}};se(()=>{Oc(void 0),Ic([])});let G=()=>I(void 0);return(()=>{var L=jI(),P=t;return typeof P=="function"?de(P,L):t=L,x(L,m(he,{get each(){return n()},children:(_,w)=>m($x,{get index(){return w()},get messages(){return _.messages},get input(){return _.input},get theme(){return u()},get settings(){return e.initialChatReply.agent.settings},get streamingMessageId(){return _.streamingMessageId},get context(){return e.context},get hideAvatar(){return B(()=>!_.input)()&&((n()[w()+1]?.messages??[]).length>0||n()[w()+1]?.streamingMessageId!==void 0||_.messages.length>0&&d())},get hasError(){return B(()=>!!v())()&&w()===n().length-1},get isTransitionDisabled(){return w()!==n().length-1},get isOngoingLastChunk(){return B(()=>!a())()&&w()===n().length-1},onNewBubbleDisplayed:oe,onAllBubblesDisplayed:R,onSubmit:I,onScrollToBottom:U,onSkip:G})}),null),x(L,m(N,{get when(){return d()},get children(){return m(Fx,{get theme(){return u()}})}}),null),x(L,m(N,{get when(){return h()},keyed:!0,children:_=>(()=>{var w=VI();return x(w,m(Ux,{url:_,onLinkClick:()=>g(void 0)})),w})()}),null),x(L,m(qI,{}),null),L})()},qI=()=>HI(),KI=e=>{if(e){if(e.type==="text")return{type:"text",text:e.value,attachedFileUrls:e.attachments?.map(t=>t.url)};if(e.type==="recording")return{type:"audio",url:e.url}}},pu=({clientSideActions:e,lastBubbleBlockId:t})=>{let n=[],r=t;for(let o of e){if(r!==o.lastBubbleBlockId)break;r=o.lastBubbleBlockId,t===o.lastBubbleBlockId&&n.push(o)}return n};var YI=S('<div class="h-full flex justify-center items-center flex-col"><p class="text-2xl text-center"></p><pre>'),Vx=e=>(()=>{var t=YI(),n=t.firstChild,r=n.nextSibling;return x(n,()=>e.error.message),x(r,()=>JSON.stringify(e.error.cause,null,2)),t})();var XI=S('<a target=_blank rel="noopener noreferrer"class=brand-mark id=brand-mark><span>'),Hx=e=>{let t,n,r=o=>{o.forEach(i=>{i.removedNodes.forEach(a=>{"id"in a&&t&&a.id==="brand-mark"&&e.agentContainer?.append(t)})})};return ne(()=>{!document||!e.agentContainer||(n=new MutationObserver(r),n.observe(e.agentContainer,{subtree:!1,childList:!0}))}),se(()=>{n&&n.disconnect()}),(()=>{var o=XI(),i=o.firstChild,a=t;return typeof a=="function"?de(a,o):t=o,x(i,()=>e.text),A(()=>j(o,"href",e.url)),o})()};var ZI=S("<div class=agent-progress-bar-container><div class=agent-progress-bar>"),mu=e=>(()=>{var t=ZI(),n=t.firstChild;return A(r=>(r=`${e.value}%`)!=null?n.style.setProperty("width",r):n.style.removeProperty("width")),t})();var zx=S("<style>"),JI=S("<div>"),Io=e=>{let[t,n]=O(),[r,o]=O(""),[i,a]=O(!1),[s,c]=O(),l=async()=>{e.font&&Nl(e.font),a(!0);let u=new URLSearchParams(location.search);e.onInit?.();let f={};u.forEach((y,T)=>{f[T]=y});let d=typeof e.agent=="string"?e.agent:void 0,p=typeof e.agent!="string"||(e.isPreview??!1),h=xp(d),{data:g,error:v}=await Gf({stripeRedirectStatus:u.get("redirect_status")??void 0,agent:e.agent,apiHost:e.apiHost,isPreview:p,resultId:Ce(e.resultId)?e.resultId:h,prefilledVariables:{...f,...e.prefilledVariables},startFrom:e.startFrom,sessionId:e.sessionId});if(v instanceof en)return p?c(new Error("\u{1F6A8} An error occurred while loading the agent.",{})):v.response.status===400||v.response.status===403?c(new Error("This agent is now closed.")):v.response.status===404?c(new Error("The agent you're looking for doesn't exist.")):c(new Error(`Something went wrong while starting the chat! (${v.response.statusText}) Please try again.`));if(v instanceof Gr)return c(new Error(v.message));if(!g)return v&&(console.error(v),p)?c(new Error("Error! Could not reach server. Check your connection.",{cause:v})):c(new Error("Error! Could not reach server. Check your connection."));if(g.resultId&&d&&(g.agent.settings.general?.rememberUser?.isEnabled??Je.general.rememberUser.isEnabled)){h&&h!==g.resultId&&Ra(g.agent.id);let y=g.agent.settings.general?.rememberUser?.storage??Je.general.rememberUser.storage;vp(y)(d,g.resultId);let T=wp(g.agent.id);T&&T.agent.publishedAt&&g.agent.publishedAt?new Date(T.agent.publishedAt).getTime()===new Date(g.agent.publishedAt).getTime()?n(T):(Ra(g.agent.id),n(g),Ul(g,{agentId:g.agent.id,storage:y})):(n(g),Ul(g,{agentId:g.agent.id,storage:y})),e.onChatStatePersisted?.(!0)}else{if(Ra(g.agent.id),n(g),g.input?.id&&e.onNewInputBlock&&e.onNewInputBlock(g.input),g.logs){let y=g.logs.map(T=>({status:T.status??"",description:T.description??"",details:T.details}));e.onNewLogs?.(y)}e.onChatStatePersisted?.(!1)}o(g.agent.theme.customCss??"")};return ge(()=>{Ge(e.agent)||i()||l().then()}),ge(()=>{Ge(e.agent)||typeof e.agent=="string"||(o(e.agent.theme.customCss??""),e.agent.theme.general?.progressBar?.isEnabled&&t()&&!t()?.agent.theme.general?.progressBar?.isEnabled&&(a(!1),l().then()))}),se(()=>{a(!1)}),[(()=>{var u=zx();return x(u,r),u})(),(()=>{var u=zx();return x(u,lb),u})(),m(N,{get when(){return s()},keyed:!0,children:u=>m(Vx,{error:u})}),m(N,{get when(){return t()},keyed:!0,children:u=>m(QI,{get class(){return e.class},get initialChatReply(){return{...u,agent:{...u.agent,settings:typeof e.agent=="string"?u.agent?.settings:e.agent?.settings,theme:typeof e.agent=="string"?u.agent?.theme:e.agent?.theme}}},get context(){return{apiHost:e.apiHost,isPreview:typeof e.agent!="string"||(e.isPreview??!1),resultId:u.resultId,sessionId:u.sessionId,agent:u.agent,storage:u.agent.settings.general?.rememberUser?.isEnabled&&!(typeof e.agent!="string"||(e.isPreview??!1))?u.agent.settings.general?.rememberUser?.storage??Je.general.rememberUser.storage:void 0}},get progressBarRef(){return e.progressBarRef},get onNewInputBlock(){return e.onNewInputBlock},get onNewLogs(){return e.onNewLogs},get onAnswer(){return e.onAnswer},get onEnd(){return e.onEnd},get onScriptExecutionSuccess(){return e.onScriptExecutionSuccess}})})]},QI=e=>{let[t,n]=tn(O(e.initialChatReply.progress),{storage:e.context.storage,key:`agent-${e.context.agent.id}-progressValue`}),r,o=new ResizeObserver(i=>dp((i[0]?.target.clientWidth??0)<432));return ne(()=>{r&&(Kf(r),o.observe(r),qf(`${r.clientHeight}px`))}),ge(()=>{Nl(e.initialChatReply.agent.theme.general?.font??{type:Yf,family:eo}),r&&yp(e.initialChatReply.agent.theme,r,e.context.isPreview)}),se(()=>{r&&o.unobserve(r)}),(()=>{var i=JI(),a=r;return typeof a=="function"?de(a,i):r=i,x(i,m(N,{get when(){return re(t())&&e.initialChatReply.agent.theme.general?.progressBar?.isEnabled},get children(){return m(N,{get when(){return e.progressBarRef&&(e.initialChatReply.agent.theme.general?.progressBar?.position??_a)==="fixed"},get fallback(){return m(mu,{get value(){return t()}})},get children(){return m(xd,{get mount(){return e.progressBarRef},get children(){return m(mu,{get value(){return t()}})}})}})}}),null),x(i,m(jx,{get context(){return e.context},get initialChatReply(){return e.initialChatReply},get onNewInputBlock(){return e.onNewInputBlock},get onAnswer(){return e.onAnswer},get onEnd(){return e.onEnd},get onNewLogs(){return e.onNewLogs},onProgressUpdate:n,get onScriptExecutionSuccess(){return e.onScriptExecutionSuccess}}),null),x(i,m(N,{get when(){return e.initialChatReply.agent.settings.general?.isBrandingEnabled},get children(){return m(Hx,{agentContainer:r,get url(){return e.initialChatReply.agent.settings.general?.brandingUrl??"https://release0.com/?utm_source=brand-mark"},get text(){return e.initialChatReply.agent.settings.general?.brandingText??"Powered by Release0"}})}}),null),x(i,m(hc,{toaster:Kn,children:s=>m(hr.Root,{get children(){return[m(hr.Title,{get children(){return s().title}}),m(hr.Description,{get children(){return s().description}}),m(hr.CloseTrigger,{class:"absolute right-2 top-2",get children(){return m(fn,{class:"w-4 h-4"})}})]}})}),null),A(()=>$(i,pe("relative flex w-full h-full text-base overflow-hidden flex-col justify-center items-center agent-container",e.class))),i})()};var Gs="Zendesk Web Widget Opened";var Ar=`*, ::before, ::after {
|
|
169
153
|
--tw-border-spacing-x: 0;
|
|
170
154
|
--tw-border-spacing-y: 0;
|
|
171
155
|
--tw-translate-x: 0;
|
|
@@ -702,6 +686,9 @@ video {
|
|
|
702
686
|
.pointer-events-none {
|
|
703
687
|
pointer-events: none;
|
|
704
688
|
}
|
|
689
|
+
.static {
|
|
690
|
+
position: static;
|
|
691
|
+
}
|
|
705
692
|
.fixed {
|
|
706
693
|
position: fixed;
|
|
707
694
|
}
|
|
@@ -714,15 +701,24 @@ video {
|
|
|
714
701
|
.inset-0 {
|
|
715
702
|
inset: 0px;
|
|
716
703
|
}
|
|
704
|
+
.-left-5 {
|
|
705
|
+
left: -20px;
|
|
706
|
+
}
|
|
717
707
|
.-right-2 {
|
|
718
708
|
right: -8px;
|
|
719
709
|
}
|
|
710
|
+
.-right-5 {
|
|
711
|
+
right: -20px;
|
|
712
|
+
}
|
|
720
713
|
.-top-2 {
|
|
721
714
|
top: -8px;
|
|
722
715
|
}
|
|
723
716
|
.bottom-5 {
|
|
724
717
|
bottom: 20px;
|
|
725
718
|
}
|
|
719
|
+
.bottom-\\[calc\\(100\\%\\+12px\\)\\] {
|
|
720
|
+
bottom: calc(100% + 12px);
|
|
721
|
+
}
|
|
726
722
|
.left-0 {
|
|
727
723
|
left: 0px;
|
|
728
724
|
}
|
|
@@ -762,6 +758,9 @@ video {
|
|
|
762
758
|
.z-50 {
|
|
763
759
|
z-index: 50;
|
|
764
760
|
}
|
|
761
|
+
.z-\\[424242\\] {
|
|
762
|
+
z-index: 424242;
|
|
763
|
+
}
|
|
765
764
|
.m-2 {
|
|
766
765
|
margin: 8px;
|
|
767
766
|
}
|
|
@@ -892,6 +891,9 @@ video {
|
|
|
892
891
|
.w-6 {
|
|
893
892
|
width: 24px;
|
|
894
893
|
}
|
|
894
|
+
.w-64 {
|
|
895
|
+
width: 256px;
|
|
896
|
+
}
|
|
895
897
|
.w-8 {
|
|
896
898
|
width: 32px;
|
|
897
899
|
}
|
|
@@ -907,6 +909,9 @@ video {
|
|
|
907
909
|
.w-full {
|
|
908
910
|
width: 100%;
|
|
909
911
|
}
|
|
912
|
+
.w-screen {
|
|
913
|
+
width: 100vw;
|
|
914
|
+
}
|
|
910
915
|
.min-w-0 {
|
|
911
916
|
min-width: 0px;
|
|
912
917
|
}
|
|
@@ -1065,6 +1070,9 @@ video {
|
|
|
1065
1070
|
.whitespace-pre-wrap {
|
|
1066
1071
|
white-space: pre-wrap;
|
|
1067
1072
|
}
|
|
1073
|
+
.rounded-2xl {
|
|
1074
|
+
border-radius: 16px;
|
|
1075
|
+
}
|
|
1068
1076
|
.rounded-full {
|
|
1069
1077
|
border-radius: 9999px;
|
|
1070
1078
|
}
|
|
@@ -1077,12 +1085,6 @@ video {
|
|
|
1077
1085
|
.border {
|
|
1078
1086
|
border-width: 1px;
|
|
1079
1087
|
}
|
|
1080
|
-
.border-2 {
|
|
1081
|
-
border-width: 2px;
|
|
1082
|
-
}
|
|
1083
|
-
.border-dashed {
|
|
1084
|
-
border-style: dashed;
|
|
1085
|
-
}
|
|
1086
1088
|
.border-gray-100 {
|
|
1087
1089
|
--tw-border-opacity: 1;
|
|
1088
1090
|
border-color: rgb(243 244 246 / var(--tw-border-opacity, 1));
|
|
@@ -1091,10 +1093,6 @@ video {
|
|
|
1091
1093
|
--tw-border-opacity: 1;
|
|
1092
1094
|
border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));
|
|
1093
1095
|
}
|
|
1094
|
-
.border-gray-300 {
|
|
1095
|
-
--tw-border-opacity: 1;
|
|
1096
|
-
border-color: rgb(209 213 219 / var(--tw-border-opacity, 1));
|
|
1097
|
-
}
|
|
1098
1096
|
.border-gray-400 {
|
|
1099
1097
|
--tw-border-opacity: 1;
|
|
1100
1098
|
border-color: rgb(156 163 175 / var(--tw-border-opacity, 1));
|
|
@@ -1121,10 +1119,6 @@ video {
|
|
|
1121
1119
|
--tw-bg-opacity: 1;
|
|
1122
1120
|
background-color: rgb(156 163 175 / var(--tw-bg-opacity, 1));
|
|
1123
1121
|
}
|
|
1124
|
-
.bg-gray-50 {
|
|
1125
|
-
--tw-bg-opacity: 1;
|
|
1126
|
-
background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
|
|
1127
|
-
}
|
|
1128
1122
|
.bg-green-400 {
|
|
1129
1123
|
--tw-bg-opacity: 1;
|
|
1130
1124
|
background-color: rgb(74 222 128 / var(--tw-bg-opacity, 1));
|
|
@@ -1603,6 +1597,12 @@ pre {
|
|
|
1603
1597
|
color: var(--agent-host-bubble-color);
|
|
1604
1598
|
}
|
|
1605
1599
|
|
|
1600
|
+
form.agent-host-bubble {
|
|
1601
|
+
border-color: rgba(var(--agent-host-bubble-bg-rgb), 1);
|
|
1602
|
+
border-width: 2px;
|
|
1603
|
+
border-style: dashed;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
1606
|
.agent-host-bubble > .bubble-typing {
|
|
1607
1607
|
background-color: rgba(
|
|
1608
1608
|
var(--agent-host-bubble-bg-rgb),
|
|
@@ -1824,7 +1824,7 @@ select option {
|
|
|
1824
1824
|
bottom: var(--agent-progress-bar-bottom);
|
|
1825
1825
|
left: 0;
|
|
1826
1826
|
width: 100%;
|
|
1827
|
-
z-index:
|
|
1827
|
+
z-index: 99999999;
|
|
1828
1828
|
}
|
|
1829
1829
|
|
|
1830
1830
|
.agent-progress-bar-container > .agent-progress-bar {
|
|
@@ -1995,11 +1995,6 @@ select option {
|
|
|
1995
1995
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1996
1996
|
}
|
|
1997
1997
|
|
|
1998
|
-
.hover\\:bg-gray-100:hover {
|
|
1999
|
-
--tw-bg-opacity: 1;
|
|
2000
|
-
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
1998
|
.hover\\:shadow-lg:hover {
|
|
2004
1999
|
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
2005
2000
|
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
@@ -2068,6 +2063,14 @@ select option {
|
|
|
2068
2063
|
|
|
2069
2064
|
@media (min-width: 640px) {
|
|
2070
2065
|
|
|
2066
|
+
.sm\\:left-0 {
|
|
2067
|
+
left: 0px;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
.sm\\:right-0 {
|
|
2071
|
+
right: 0px;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2071
2074
|
.sm\\:right-5 {
|
|
2072
2075
|
right: 20px;
|
|
2073
2076
|
}
|
|
@@ -2085,32 +2088,19 @@ select option {
|
|
|
2085
2088
|
opacity: 0;
|
|
2086
2089
|
}
|
|
2087
2090
|
}
|
|
2088
|
-
`;var G_=w('<svg part=button-icon viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z">'),H_=w('<img part=button-icon alt="Bubble button icon">'),$v=w("<span part=button-icon>"),K_=w('<svg part=button-icon viewBox="0 0 24 24"><path fill-rule=evenodd clip-rule=evenodd d="M18.601 8.39897C18.269 8.06702 17.7309 8.06702 17.3989 8.39897L12 13.7979L6.60099 8.39897C6.26904 8.06702 5.73086 8.06702 5.39891 8.39897C5.06696 8.73091 5.06696 9.2691 5.39891 9.60105L11.3989 15.601C11.7309 15.933 12.269 15.933 12.601 15.601L18.601 9.60105C18.9329 9.2691 18.9329 8.73091 18.601 8.39897Z">'),V_=w('<img part=button-icon alt="Bubble button close icon">'),j_=w('<button part=button aria-label="Open agent">'),Xu="#0042DA",Gv="#27272A",Hv="#fff",yl=e=>e.startsWith("http")||e.startsWith("data:image/svg+xml"),Kv=e=>(()=>{var t=j_();return t.$$click=()=>e.toggleAgent(),t.style.setProperty("z-index","42424242"),v(t,m(B,{get when(){return Je(e.customIconSrc)},keyed:!0,get children(){var n=G_();return _(r=>{var o=e.iconColor??(_n(e.backgroundColor??Xu)?Gv:Hv),a=_t("stroke-2 fill-transparent absolute duration-200 transition w-[60%]",e.isAgentOpened?"scale-0 opacity-0":"scale-100 opacity-100");return o!==r.e&&((r.e=o)!=null?n.style.setProperty("stroke",o):n.style.removeProperty("stroke")),a!==r.t&&H(n,"class",r.t=a),r},{e:void 0,t:void 0}),n}}),null),v(t,m(B,{get when(){return F(()=>!!e.customIconSrc)()&&yl(e.customIconSrc)},get children(){var n=H_();return _(r=>{var o=e.customIconSrc,a=_t("duration-200 transition",e.isAgentOpened?"scale-0 opacity-0":"scale-100 opacity-100",Zt(e.customIconSrc)?"w-[60%]":"w-full h-full",Zt(e.customIconSrc)?"":"object-cover rounded-full");return o!==r.e&&H(n,"src",r.e=o),a!==r.t&&U(n,r.t=a),r},{e:void 0,t:void 0}),n}}),null),v(t,m(B,{get when(){return F(()=>!!e.customIconSrc)()&&!yl(e.customIconSrc)},get children(){var n=$v();return n.style.setProperty("font-family","-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"),v(n,()=>e.customIconSrc),_(()=>U(n,_t("text-4xl duration-200 transition",e.isAgentOpened?"scale-0 opacity-0":"scale-100 opacity-100"))),n}}),null),v(t,m(B,{get when(){return Je(e.customCloseIconSrc)},get children(){var n=K_();return _(r=>{var o=e.iconColor??(_n(e.backgroundColor??Xu)?Gv:Hv),a=_t("absolute duration-200 transition w-[60%]",e.isAgentOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0");return o!==r.e&&((r.e=o)!=null?n.style.setProperty("fill",o):n.style.removeProperty("fill")),a!==r.t&&H(n,"class",r.t=a),r},{e:void 0,t:void 0}),n}}),null),v(t,m(B,{get when(){return F(()=>!!e.customCloseIconSrc)()&&yl(e.customCloseIconSrc)},get children(){var n=V_();return _(r=>{var o=e.customCloseIconSrc,a=_t("absolute duration-200 transition",e.isAgentOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0",Zt(e.customCloseIconSrc)?"w-[60%]":"w-full h-full",Zt(e.customCloseIconSrc)?"":"object-cover rounded-full");return o!==r.e&&H(n,"src",r.e=o),a!==r.t&&U(n,r.t=a),r},{e:void 0,t:void 0}),n}}),null),v(t,m(B,{get when(){return F(()=>!!e.customCloseIconSrc)()&&!yl(e.customCloseIconSrc)},get children(){var n=$v();return n.style.setProperty("font-family","-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"),v(n,()=>e.customCloseIconSrc),_(()=>U(n,_t("absolute text-4xl duration-200 transition",e.isAgentOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0"))),n}}),null),_(n=>{var r=_t("fixed bottom-5 shadow-md rounded-full hover:scale-110 active:scale-95 transition-transform duration-200 flex justify-center items-center animate-fade-in",e.placement==="left"?" left-5":" right-5"),o=e.backgroundColor??Xu,a=e.buttonSize,i=e.buttonSize;return r!==n.e&&U(t,n.e=r),o!==n.t&&((n.t=o)!=null?t.style.setProperty("background-color",o):t.style.removeProperty("background-color")),a!==n.a&&((n.a=a)!=null?t.style.setProperty("width",a):t.style.removeProperty("width")),i!==n.o&&((n.o=i)!=null?t.style.setProperty("height",i):t.style.removeProperty("height")),n},{e:void 0,t:void 0,a:void 0,o:void 0}),t})();$e(["click"]);var W_=w("<div part=preview-message><p>"),z_=w('<img class="rounded-full w-8 h-8 object-cover"alt="Agent avatar"elementtiming="Agent avatar"fetchpriority=high>'),Z_=w('<button part=preview-message-close-button aria-label=Close><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>'),Vv="#F7F8FF",jv="#303235",Wv=e=>{let[t,n]=M(!1),[r,o]=M({x:0,y:0}),a=s=>{o({x:s.touches[0]?.clientX??0,y:s.touches[0]?.clientY??0})},i=s=>{let c=s.changedTouches[0]?.clientX??0,l=s.changedTouches[0]?.clientY??0;(Math.abs(c-r().x)>10||l-r().y>10)&&e.onCloseClick(),o({x:0,y:0})};return(()=>{var s=W_(),c=s.firstChild;return s.$$touchend=i,s.$$touchstart=a,s.addEventListener("mouseleave",()=>n(!1)),s.addEventListener("mouseenter",()=>n(!0)),s.$$click=()=>e.onClick(),s.style.setProperty("z-index","42424242"),v(s,m(Y_,{get isHovered(){return t()},get previewMessageTheme(){return e.previewMessageTheme},get onClick(){return e.onCloseClick}}),c),v(s,m(B,{get when(){return e.avatarUrl},keyed:!0,children:l=>(()=>{var u=z_();return H(u,"src",l),u})()}),c),v(c,()=>e.message),_(l=>{var u="fixed max-w-[256px] rounded-md duration-200 flex items-center gap-4 shadow-md animate-fade-in cursor-pointer hover:shadow-lg p-4"+(e.placement==="left"?" left-5":" right-5"),f=e.previewMessageTheme?.backgroundColor??Vv,d=e.previewMessageTheme?.textColor??jv,p=`calc(${e.buttonSize} + 32px)`;return u!==l.e&&U(s,l.e=u),f!==l.t&&((l.t=f)!=null?s.style.setProperty("background-color",f):s.style.removeProperty("background-color")),d!==l.a&&((l.a=d)!=null?s.style.setProperty("color",d):s.style.removeProperty("color")),p!==l.o&&((l.o=p)!=null?s.style.setProperty("bottom",p):s.style.removeProperty("bottom")),l},{e:void 0,t:void 0,a:void 0,o:void 0}),s})()},Y_=e=>(()=>{var t=Z_();return t.$$click=n=>(n.stopPropagation(),e.onClick()),_(n=>{var r="absolute -top-2 -right-2 rounded-full w-6 h-6 p-1 hover:brightness-95 active:brightness-90 transition-all border "+(e.isHovered?"opacity-100":"opacity-0"),o=e.previewMessageTheme?.closeButtonBackgroundColor??Vv,a=e.previewMessageTheme?.closeButtonIconColor??jv;return r!==n.e&&U(t,n.e=r),o!==n.t&&((n.t=o)!=null?t.style.setProperty("background-color",o):t.style.removeProperty("background-color")),a!==n.a&&((n.a=a)!=null?t.style.setProperty("color",a):t.style.removeProperty("color")),n},{e:void 0,t:void 0,a:void 0}),t})();$e(["click","touchstart","touchend"]);var q_=w("<style>"),J_=w("<div>"),X_=w("<div part=agent>"),Zv=e=>{let[t,n]=Ke(e,["onOpen","onClose","previewMessage","onPreviewMessageClick","onPreviewMessageDismissed","theme","autoShowDelay"]),[r,o]=M(!0),[a,i]=M(n.prefilledVariables),[s,c]=M(!1),[l,u]=M({message:t.previewMessage?.message??"",avatarUrl:t.previewMessage?.avatarUrl}),[f,d]=M(!1),[p,h]=M(!1),[g,x]=M(zv(t.theme?.button?.size??"medium"));be(()=>{x(zv(t.theme?.button?.size??"medium"))});let b;ae(()=>{window.addEventListener("message",E);let P=t.autoShowDelay,T=t.previewMessage?.autoShowDelay;(rs()||io())&&S(),te(P)&&setTimeout(()=>{S()},P),te(T)&&setTimeout(()=>{D()},T)}),ue(()=>{window.removeEventListener("message",E)}),be(()=>{e.prefilledVariables&&i(P=>({...P,...e.prefilledVariables}))});let E=P=>{let{data:T}=P;!T.isFromAgent||T.id&&n.id!==T.id||(T.command==="open"&&S(),T.command==="close"&&k(),T.command==="toggle"&&I(),T.command==="showPreviewMessage"&&D(T.message),T.command==="hidePreviewMessage"&&ie(),T.command==="setPrefilledVariables"&&i(C=>({...C,...T.variables})),T.command==="unmount"&&V())},S=()=>{p()||h(!0),ie(),d(!0),f()&&t.onOpen?.()},k=()=>{d(!1),ns(),f()&&t.onClose?.()},I=()=>{f()?k():S()},G=()=>{t.onPreviewMessageClick?.(),S()},D=P=>{P&&u(P),!f()&&c(!0)},ie=()=>{t.onPreviewMessageDismissed?.(),c(!1)},V=()=>{f()?(k(),setTimeout(()=>{o(!1)},200)):o(!1)},W=P=>{n.onChatStatePersisted?.(P),P&&ts()},L=P=>{(P===bl||P===Uo)&&V(),e.onScriptExecutionSuccess?.(P)};return m(B,{get when(){return r()},get children(){return m(Ar,{get value(){return document.querySelector("agent-bubble")?.shadowRoot},get children(){return[(()=>{var P=q_();return v(P,Zr),P})(),m(B,{get when(){return s()},get children(){return m(Wv,Te(l,{get placement(){return t.theme?.placement},get previewMessageTheme(){return t.theme?.previewMessage},get buttonSize(){return g()},onClick:G,onCloseClick:ie}))}}),m(Kv,Te(()=>t.theme?.button,{get placement(){return t.theme?.placement},toggleAgent:I,get isAgentOpened(){return f()},get buttonSize(){return g()}})),(()=>{var P=J_(),T=b;return typeof T=="function"?pe(T,P):b=P,P})(),(()=>{var P=X_();return P.style.setProperty("transition","transform 200ms cubic-bezier(0, 1.2, 1, 1), opacity 150ms ease-out"),P.style.setProperty("box-shadow","rgb(0 0 0 / 16%) 0px 5px 40px"),P.style.setProperty("z-index","42424242"),v(P,m(B,{get when(){return p()},get children(){return m(zo,Te(n,{onScriptExecutionSuccess:L,onChatStatePersisted:W,get prefilledVariables(){return a()},class:"rounded-lg",progressBarRef:b}))}})),_(T=>{var C=`calc(100% - ${g()} - 32px)`,R=e.theme?.chatWindow?.maxHeight??"704px",O=e.theme?.chatWindow?.maxWidth??"400px",re=e.theme?.placement==="left"?"bottom left":"bottom right",ge=f()?"scale3d(1, 1, 1)":"scale3d(0, 0, 1)",ve=t.theme?.chatWindow?.backgroundColor,Ue=`calc(${g()} + 32px)`,We="fixed rounded-lg w-full"+(f()?" opacity-1":" opacity-0 pointer-events-none")+(e.theme?.placement==="left"?" left-5":" sm:right-5 right-0");return C!==T.e&&((T.e=C)!=null?P.style.setProperty("height",C):P.style.removeProperty("height")),R!==T.t&&((T.t=R)!=null?P.style.setProperty("max-height",R):P.style.removeProperty("max-height")),O!==T.a&&((T.a=O)!=null?P.style.setProperty("max-width",O):P.style.removeProperty("max-width")),re!==T.o&&((T.o=re)!=null?P.style.setProperty("transform-origin",re):P.style.removeProperty("transform-origin")),ge!==T.i&&((T.i=ge)!=null?P.style.setProperty("transform",ge):P.style.removeProperty("transform")),ve!==T.n&&((T.n=ve)!=null?P.style.setProperty("background-color",ve):P.style.removeProperty("background-color")),Ue!==T.s&&((T.s=Ue)!=null?P.style.setProperty("bottom",Ue):P.style.removeProperty("bottom")),We!==T.h&&U(P,T.h=We),T},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),P})()]}})}})},zv=e=>e==="medium"?"48px":e==="large"?"64px":e||"48px";var Q_=w("<style>"),eM=w('<div class=relative aria-labelledby=modal-title role=dialog aria-modal=true><style></style><div class="fixed inset-0 bg-black bg-opacity-50 transition-opacity animate-fade-in"part=overlay></div><div class="fixed inset-0 z-10 overflow-y-auto"><div class="flex min-h-full items-center justify-center p-4 text-center sm:p-0"><div>'),Yv=e=>{let[t,n]=Ke(e,["onOpen","onClose","autoShowDelay","theme","isOpen","defaultOpen"]),[r,o]=M(n.prefilledVariables),[a,i]=M(t.isOpen??!1);ae(()=>{(t.defaultOpen||io()||rs())&&l(),window.addEventListener("message",c);let h=t.autoShowDelay;te(h)&&setTimeout(()=>{l()},h)}),ue(()=>{window.removeEventListener("message",c)}),be(()=>{Je(e.isOpen)||e.isOpen===a()||f()}),be(()=>{e.prefilledVariables&&o(h=>({...h,...e.prefilledVariables}))});let s=h=>{h.stopPropagation()},c=h=>{let{data:g}=h;!g.isFromAgent||g.id&&n.id!==g.id||(g.command==="open"&&l(),g.command==="close"&&u(),g.command==="toggle"&&f(),g.command==="setPrefilledVariables"&&o(x=>({...x,...g.variables})))},l=()=>{i(!0),t.onOpen?.(),document.body.style.setProperty("overflow","hidden","important"),document.addEventListener("pointerdown",u)},u=()=>{i(!1),t.onClose?.(),document.body.style.overflow="auto",document.removeEventListener("pointerdown",u),ns()},f=()=>{a()?u():l()},d=h=>{n.onChatStatePersisted?.(h),h&&ts()},p=h=>{(h===bl||h===Uo)&&u(),e.onScriptExecutionSuccess?.(h)};return m(B,{get when(){return a()},get children(){return m(Ar,{get value(){return document.querySelector("agent-popup")?.shadowRoot},get children(){return[(()=>{var h=Q_();return v(h,Zr),h})(),(()=>{var h=eM(),g=h.firstChild,x=g.nextSibling,b=x.nextSibling,E=b.firstChild,S=E.firstChild;return v(g,Zr),Ve(S,"pointerdown",s),v(S,m(zo,Te(n,{onScriptExecutionSuccess:p,get prefilledVariables(){return r()},onChatStatePersisted:d}))),_(k=>{var I=e.theme?.zIndex??42424242,G="relative h-[80vh] transform overflow-hidden rounded-lg text-left transition-all sm:my-8 w-full max-w-lg"+(e.theme?.backgroundColor?" shadow-xl":""),D=e.theme?.backgroundColor??"transparent",ie=e.theme?.width??"512px";return I!==k.e&&((k.e=I)!=null?h.style.setProperty("z-index",I):h.style.removeProperty("z-index")),G!==k.t&&U(S,k.t=G),D!==k.a&&((k.a=D)!=null?S.style.setProperty("background-color",D):S.style.removeProperty("background-color")),ie!==k.o&&((k.o=ie)!=null?S.style.setProperty("max-width",ie):S.style.removeProperty("max-width")),k},{e:void 0,t:void 0,a:void 0,o:void 0}),h})()]}})}})};var tM=w(`<style>
|
|
2091
|
+
`;function Or(...e){return Rd(pe(e))}var t1=S('<svg part=button-icon viewBox="0 0 24 24"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z">'),n1=S('<img part=button-icon alt="Bubble button icon">'),Gx=S("<span part=button-icon>"),r1=S('<svg part=button-icon viewBox="0 0 24 24"><path fill-rule=evenodd clip-rule=evenodd d="M18.601 8.39897C18.269 8.06702 17.7309 8.06702 17.3989 8.39897L12 13.7979L6.60099 8.39897C6.26904 8.06702 5.73086 8.06702 5.39891 8.39897C5.06696 8.73091 5.06696 9.2691 5.39891 9.60105L11.3989 15.601C11.7309 15.933 12.269 15.933 12.601 15.601L18.601 9.60105C18.9329 9.2691 18.9329 8.73091 18.601 8.39897Z">'),o1=S('<img part=button-icon alt="Bubble button close icon">'),i1=S('<button part=button aria-label="Open agent">'),gu="#0042DA",Wx="#27272A",qx="#fff",Ws=e=>e.startsWith("http")||e.startsWith("data:image/svg+xml"),Kx=e=>(()=>{var t=i1();return t.$$click=()=>e.toggleAgent(),t.style.setProperty("z-index","99999999"),x(t,m(N,{get when(){return Ge(e.customIconSrc)},keyed:!0,get children(){var n=t1();return A(r=>{var o=e.iconColor??(xn(e.backgroundColor??gu)?Wx:qx),i=Pt("stroke-2 fill-transparent absolute duration-200 transition w-[60%]",e.isAgentOpened?"scale-0 opacity-0":"scale-100 opacity-100");return o!==r.e&&((r.e=o)!=null?n.style.setProperty("stroke",o):n.style.removeProperty("stroke")),i!==r.t&&j(n,"class",r.t=i),r},{e:void 0,t:void 0}),n}}),null),x(t,m(N,{get when(){return B(()=>!!e.customIconSrc)()&&Ws(e.customIconSrc)},get children(){var n=n1();return A(r=>{var o=e.customIconSrc,i=Pt("duration-200 transition",e.isAgentOpened?"scale-0 opacity-0":"scale-100 opacity-100",Ft(e.customIconSrc)?"w-[60%]":"w-full h-full",Ft(e.customIconSrc)?"":"object-cover rounded-full");return o!==r.e&&j(n,"src",r.e=o),i!==r.t&&$(n,r.t=i),r},{e:void 0,t:void 0}),n}}),null),x(t,m(N,{get when(){return B(()=>!!e.customIconSrc)()&&!Ws(e.customIconSrc)},get children(){var n=Gx();return n.style.setProperty("font-family","-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"),x(n,()=>e.customIconSrc),A(()=>$(n,Pt("text-4xl duration-200 transition",e.isAgentOpened?"scale-0 opacity-0":"scale-100 opacity-100"))),n}}),null),x(t,m(N,{get when(){return Ge(e.customCloseIconSrc)},get children(){var n=r1();return A(r=>{var o=e.iconColor??(xn(e.backgroundColor??gu)?Wx:qx),i=Pt("absolute duration-200 transition w-[60%]",e.isAgentOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0");return o!==r.e&&((r.e=o)!=null?n.style.setProperty("fill",o):n.style.removeProperty("fill")),i!==r.t&&j(n,"class",r.t=i),r},{e:void 0,t:void 0}),n}}),null),x(t,m(N,{get when(){return B(()=>!!e.customCloseIconSrc)()&&Ws(e.customCloseIconSrc)},get children(){var n=o1();return A(r=>{var o=e.customCloseIconSrc,i=Pt("absolute duration-200 transition",e.isAgentOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0",Ft(e.customCloseIconSrc)?"w-[60%]":"w-full h-full",Ft(e.customCloseIconSrc)?"":"object-cover rounded-full");return o!==r.e&&j(n,"src",r.e=o),i!==r.t&&$(n,r.t=i),r},{e:void 0,t:void 0}),n}}),null),x(t,m(N,{get when(){return B(()=>!!e.customCloseIconSrc)()&&!Ws(e.customCloseIconSrc)},get children(){var n=Gx();return n.style.setProperty("font-family","-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"),x(n,()=>e.customCloseIconSrc),A(()=>$(n,Pt("absolute text-4xl duration-200 transition",e.isAgentOpened?"scale-100 rotate-0 opacity-100":"scale-0 -rotate-180 opacity-0"))),n}}),null),A(n=>{var r=Or("relative shadow-md rounded-2xl hover:scale-110 active:scale-95 transition-transform duration-200 flex justify-center items-center animate-fade-in"),o=e.backgroundColor??gu,i=e.buttonSize,a=e.buttonSize;return r!==n.e&&$(t,n.e=r),o!==n.t&&((n.t=o)!=null?t.style.setProperty("background-color",o):t.style.removeProperty("background-color")),i!==n.a&&((n.a=i)!=null?t.style.setProperty("width",i):t.style.removeProperty("width")),a!==n.o&&((n.o=a)!=null?t.style.setProperty("height",a):t.style.removeProperty("height")),n},{e:void 0,t:void 0,a:void 0,o:void 0}),t})();Me(["click"]);var a1=S("<div part=preview-message><p>"),s1=S('<img class="rounded-full w-8 h-8 object-cover"alt="Agent avatar"elementtiming="Agent avatar"fetchpriority=high>'),l1=S('<button part=preview-message-close-button aria-label=Close><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><line x1=18 y1=6 x2=6 y2=18></line><line x1=6 y1=6 x2=18 y2=18>'),Yx="#F7F8FF",Xx="#303235",Zx=e=>{let[t,n]=O(!1),[r,o]=O({x:0,y:0}),i=s=>{o({x:s.touches[0]?.clientX??0,y:s.touches[0]?.clientY??0})},a=s=>{let c=s.changedTouches[0]?.clientX??0,l=s.changedTouches[0]?.clientY??0;(Math.abs(c-r().x)>10||l-r().y>10)&&e.onCloseClick(),o({x:0,y:0})};return(()=>{var s=a1(),c=s.firstChild;return s.$$touchend=a,s.$$touchstart=i,s.addEventListener("mouseleave",()=>n(!1)),s.addEventListener("mouseenter",()=>n(!0)),s.$$click=()=>e.onClick(),s.style.setProperty("z-index","99999999"),x(s,m(c1,{get isHovered(){return t()},get previewMessageTheme(){return e.previewMessageTheme},get onClick(){return e.onCloseClick}}),c),x(s,m(N,{get when(){return e.avatarUrl},keyed:!0,children:l=>(()=>{var u=s1();return j(u,"src",l),u})()}),c),x(c,()=>e.message),A(l=>{var u=Or("absolute bottom-[calc(100%+12px)] w-64 rounded-md duration-200 flex items-center gap-4 shadow-md animate-fade-in cursor-pointer hover:shadow-lg p-4",e.placement==="left"?"left-0":"right-0"),f=e.previewMessageTheme?.backgroundColor??Yx,d=e.previewMessageTheme?.textColor??Xx,p=`calc(${e.buttonSize} + 32px)`;return u!==l.e&&$(s,l.e=u),f!==l.t&&((l.t=f)!=null?s.style.setProperty("background-color",f):s.style.removeProperty("background-color")),d!==l.a&&((l.a=d)!=null?s.style.setProperty("color",d):s.style.removeProperty("color")),p!==l.o&&((l.o=p)!=null?s.style.setProperty("bottom",p):s.style.removeProperty("bottom")),l},{e:void 0,t:void 0,a:void 0,o:void 0}),s})()},c1=e=>(()=>{var t=l1();return t.$$click=n=>(n.stopPropagation(),e.onClick()),A(n=>{var r="absolute -top-2 -right-2 rounded-full w-6 h-6 p-1 hover:brightness-95 active:brightness-90 transition-all border "+(e.isHovered?"opacity-100":"opacity-0"),o=e.previewMessageTheme?.closeButtonBackgroundColor??Yx,i=e.previewMessageTheme?.closeButtonIconColor??Xx;return r!==n.e&&$(t,n.e=r),o!==n.t&&((n.t=o)!=null?t.style.setProperty("background-color",o):t.style.removeProperty("background-color")),i!==n.a&&((n.a=i)!=null?t.style.setProperty("color",i):t.style.removeProperty("color")),n},{e:void 0,t:void 0,a:void 0}),t})();Me(["click","touchstart","touchend"]);var u1=S("<style>"),d1=S("<div><div></div><div part=agent>"),f1="20px",p1="12px",Qx=e=>{let[t,n]=Be(e,["onOpen","onClose","previewMessage","onPreviewMessageClick","onPreviewMessageDismissed","theme","autoShowDelay","inlineStyle"]),[r,o]=O(!0),[i,a]=O(n.prefilledVariables),[s,c]=O(!1),[l,u]=O({message:t.previewMessage?.message??"",avatarUrl:t.previewMessage?.avatarUrl}),[f,d]=O(!1),[p,h]=O(!1),[g,v]=O(Jx(t.theme?.button?.size??"medium"));ge(()=>{v(Jx(t.theme?.button?.size??"medium"))});let y;ne(()=>{window.addEventListener("message",T);let P=t.autoShowDelay,_=t.previewMessage?.autoShowDelay;(Oa()||zr())&&C(),P&&setTimeout(()=>{C()},P),_&&setTimeout(()=>{R()},_)}),se(()=>{window.removeEventListener("message",T)}),ge(()=>{e.prefilledVariables&&a(P=>({...P,...e.prefilledVariables}))});let T=P=>{let{data:_}=P;!_.isFromAgent||_.id&&n.id!==_.id||(_.command==="open"&&C(),_.command==="close"&&E(),_.command==="toggle"&&I(),_.command==="showPreviewMessage"&&R(_.message),_.command==="hidePreviewMessage"&&oe(),_.command==="setPrefilledVariables"&&a(w=>({...w,..._.variables})),_.command==="unmount"&&H())},C=()=>{p()||h(!0),oe(),d(!0),f()&&t.onOpen?.()},E=()=>{d(!1),Aa(),f()&&t.onClose?.()},I=()=>{f()?E():C()},U=()=>{t.onPreviewMessageClick?.(),C()},R=P=>{P&&u(P),!f()&&c(!0)},oe=()=>{t.onPreviewMessageDismissed?.(),c(!1)},H=()=>{f()?(E(),setTimeout(()=>{o(!1)},200)):o(!1)},G=P=>{n.onChatStatePersisted?.(P),P&&Ia()},L=P=>{(P===Gs||P===vo)&&H(),e.onScriptExecutionSuccess?.(P)};return console.log("bubbleProps.theme?",t.theme),m(N,{get when(){return r()},get children(){return m(cr,{get value(){return document.querySelector("agent-bubble")?.shadowRoot},get children(){return[(()=>{var P=u1();return x(P,Ar),P})(),(()=>{var P=d1(),_=P.firstChild,w=_.nextSibling;x(P,m(N,{get when(){return s()},get children(){return m(Zx,Se(l,{get placement(){return t.theme?.placement},get previewMessageTheme(){return t.theme?.previewMessage},get buttonSize(){return g()},onClick:U,onCloseClick:oe}))}}),_),x(P,m(Kx,Se(()=>t.theme?.button,{get placement(){return t.theme?.placement},toggleAgent:I,get isAgentOpened(){return f()},get buttonSize(){return g()}})),_);var M=y;return typeof M=="function"?de(M,_):y=_,w.style.setProperty("transition","transform 200ms cubic-bezier(0, 1.2, 1, 1), opacity 150ms ease-out"),w.style.setProperty("box-shadow","rgb(0 0 0 / 16%) 0px 5px 40px"),x(w,m(N,{get when(){return p()},get children(){return m(Io,Se(n,{onScriptExecutionSuccess:L,onChatStatePersisted:G,get prefilledVariables(){return i()},class:"rounded-lg",progressBarRef:y}))}})),A(D=>{var J=Or(t.theme?.position!=="static"?t.theme?.placement==="left"?"z-[424242] fixed bottom-5 left-5":"z-[424242] fixed bottom-5 right-5":"relative"),ue=t.inlineStyle,le=`calc(100vh - ${f1} - ${g()} - ${p1})`,xe=t.theme?.chatWindow?.maxHeight??"704px",we=t.theme?.chatWindow?.maxWidth??"400px",St=t.theme?.placement==="left"?"bottom left":"bottom right",$t=f()?"scale3d(1, 1, 1)":"scale3d(0, 0, 1)",mt=t.theme?.chatWindow?.backgroundColor,Xt=Or("absolute rounded-lg w-screen bottom-[calc(100%+12px)]",f()?"opacity-1":"opacity-0 pointer-events-none",t.theme?.placement==="left"?"sm:left-0 -left-5":"sm:right-0 -right-5");return J!==D.e&&$(P,D.e=J),D.t=vl(P,ue,D.t),le!==D.a&&((D.a=le)!=null?w.style.setProperty("max-height",le):w.style.removeProperty("max-height")),xe!==D.o&&((D.o=xe)!=null?w.style.setProperty("height",xe):w.style.removeProperty("height")),we!==D.i&&((D.i=we)!=null?w.style.setProperty("max-width",we):w.style.removeProperty("max-width")),St!==D.n&&((D.n=St)!=null?w.style.setProperty("transform-origin",St):w.style.removeProperty("transform-origin")),$t!==D.s&&((D.s=$t)!=null?w.style.setProperty("transform",$t):w.style.removeProperty("transform")),mt!==D.h&&((D.h=mt)!=null?w.style.setProperty("background-color",mt):w.style.removeProperty("background-color")),Xt!==D.r&&$(w,D.r=Xt),D},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),P})()]}})}})},Jx=e=>e==="medium"?"48px":e==="large"?"64px":e||"48px";var m1=S("<style>"),g1=S('<div class=relative aria-labelledby=modal-title role=dialog aria-modal=true><style></style><div class="fixed inset-0 bg-black bg-opacity-50 transition-opacity animate-fade-in"part=overlay></div><div class="fixed inset-0 z-10 overflow-y-auto"><div class="flex min-h-full items-center justify-center p-4 text-center sm:p-0"><div>'),ev=e=>{let[t,n]=Be(e,["onOpen","onClose","autoShowDelay","theme","isOpen","defaultOpen"]),[r,o]=O(n.prefilledVariables),[i,a]=O(t.isOpen??!1);ne(()=>{(t.defaultOpen||zr()||Oa())&&l(),window.addEventListener("message",c);let h=t.autoShowDelay;re(h)&&setTimeout(()=>{l()},h)}),se(()=>{window.removeEventListener("message",c)}),ge(()=>{Ge(e.isOpen)||e.isOpen===i()||f()}),ge(()=>{e.prefilledVariables&&o(h=>({...h,...e.prefilledVariables}))});let s=h=>{h.stopPropagation()},c=h=>{let{data:g}=h;!g.isFromAgent||g.id&&n.id!==g.id||(g.command==="open"&&l(),g.command==="close"&&u(),g.command==="toggle"&&f(),g.command==="setPrefilledVariables"&&o(v=>({...v,...g.variables})))},l=()=>{a(!0),t.onOpen?.(),document.body.style.setProperty("overflow","hidden","important"),document.addEventListener("pointerdown",u)},u=()=>{a(!1),t.onClose?.(),document.body.style.overflow="auto",document.removeEventListener("pointerdown",u),Aa()},f=()=>{i()?u():l()},d=h=>{n.onChatStatePersisted?.(h),h&&Ia()},p=h=>{(h===Gs||h===vo)&&u(),e.onScriptExecutionSuccess?.(h)};return m(N,{get when(){return i()},get children(){return m(cr,{get value(){return document.querySelector("agent-popup")?.shadowRoot},get children(){return[(()=>{var h=m1();return x(h,Ar),h})(),(()=>{var h=g1(),g=h.firstChild,v=g.nextSibling,y=v.nextSibling,T=y.firstChild,C=T.firstChild;return x(g,Ar),Fe(C,"pointerdown",s),x(C,m(Io,Se(n,{onScriptExecutionSuccess:p,get prefilledVariables(){return r()},onChatStatePersisted:d}))),A(E=>{var I=e.theme?.zIndex??99999999,U="relative h-[80vh] transform overflow-hidden rounded-lg text-left transition-all sm:my-8 w-full max-w-lg"+(e.theme?.backgroundColor?" shadow-xl":""),R=e.theme?.backgroundColor??"transparent",oe=e.theme?.width??"512px";return I!==E.e&&((E.e=I)!=null?h.style.setProperty("z-index",I):h.style.removeProperty("z-index")),U!==E.t&&$(C,E.t=U),R!==E.a&&((E.a=R)!=null?C.style.setProperty("background-color",R):C.style.removeProperty("background-color")),oe!==E.o&&((E.o=oe)!=null?C.style.setProperty("max-width",oe):C.style.removeProperty("max-width")),E},{e:void 0,t:void 0,a:void 0,o:void 0}),h})()]}})}})};var h1=S(`<style>
|
|
2089
2092
|
:host {
|
|
2090
2093
|
display: block;
|
|
2091
2094
|
width: 100%;
|
|
2092
2095
|
height: 100%;
|
|
2093
2096
|
overflow-y: hidden;
|
|
2094
2097
|
}
|
|
2095
|
-
`);var
|
|
2098
|
+
`);var tv=(e,{element:t})=>{let[n,r]=O(!1),[o,i]=O(e.prefilledVariables),a=()=>{r(!0)},s=new IntersectionObserver(l=>{l.some(u=>u.isIntersecting)&&a()});ne(()=>{window.addEventListener("message",c),s.observe(t)}),ge(()=>{e.prefilledVariables&&i(l=>({...l,...e.prefilledVariables}))});let c=l=>{let{data:u}=l;!u.isFromAgent||u.id&&e.id!==u.id||u.command==="setPrefilledVariables"&&i(f=>({...f,...u.variables}))};return se(()=>{s.disconnect()}),m(cr,{get value(){return document.querySelector("agent-standard")?.shadowRoot},get children(){return[(()=>{var l=h1(),u=l.firstChild;return x(l,Ar,u),l})(),m(N,{get when(){return n()},get children(){return m(Io,Se(e,{get prefilledVariables(){return o()}}))}})]}})};var nv=()=>{typeof window>"u"||(fa("agent-standard",pa,tv),fa("agent-bubble",Sd,Qx),fa("agent-popup",wd,ev))};var rv=({id:e}={})=>{let t={isFromAgent:!0,command:"close",id:e};window.postMessage(t)};var ov=({id:e}={})=>{let t={isFromAgent:!0,command:"hidePreviewMessage",id:e};window.postMessage(t)};var iv=({id:e}={})=>{let t={isFromAgent:!0,command:"open",id:e};window.postMessage(t)};var av=(e,{id:t}={})=>{let n={isFromAgent:!0,command:"setInputValue",value:e,id:t};window.postMessage(n)};var sv=(e,{id:t}={})=>{let n={isFromAgent:!0,command:"setPrefilledVariables",variables:e,id:t};window.postMessage(n)};var lv=(e,{id:t}={})=>{let n={isFromAgent:!0,command:"showPreviewMessage",message:e,id:t};window.postMessage(n)};var cv=({id:e}={})=>{let t={isFromAgent:!0,command:"toggle",id:e};window.postMessage(t)};var uv=({id:e}={})=>{let t={isFromAgent:!0,command:"unmount",id:e};window.postMessage(t)};var b1=e=>{let t=e.id?document.getElementById(e.id):document.querySelector("agent-standard");if(!t)throw new Error("<agent-standard> element not found.");Object.assign(t,e)},y1=e=>{let t=document.createElement("agent-popup");Object.assign(t,e),document.body.prepend(t)},x1=e=>{let t=document.createElement("agent-bubble");Object.assign(t,e),document.body.prepend(t)},dv=()=>({initStandard:b1,initPopup:y1,initBubble:x1,close:rv,hidePreviewMessage:ov,open:iv,setPrefilledVariables:sv,showPreviewMessage:lv,toggle:cv,setInputValue:av,unmount:uv}),fv=e=>{typeof window>"u"||(window.Agent={...e})};nv();var pv=dv();fv(pv);var BW=pv;export{BW as default};
|
|
2096
2099
|
/*! Bundled license information:
|
|
2097
2100
|
|
|
2098
2101
|
@noble/hashes/utils.js:
|
|
2099
2102
|
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
2100
2103
|
|
|
2101
|
-
@prisma/client/runtime/index-browser.js:
|
|
2102
|
-
(*! Bundled license information:
|
|
2103
|
-
|
|
2104
|
-
decimal.js/decimal.mjs:
|
|
2105
|
-
(*!
|
|
2106
|
-
* decimal.js v10.4.3
|
|
2107
|
-
* An arbitrary-precision Decimal type for JavaScript.
|
|
2108
|
-
* https://github.com/MikeMcl/decimal.js
|
|
2109
|
-
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
2110
|
-
* MIT Licence
|
|
2111
|
-
*)
|
|
2112
|
-
*)
|
|
2113
|
-
|
|
2114
2104
|
dompurify/dist/purify.js:
|
|
2115
2105
|
(*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE *)
|
|
2116
2106
|
|