@molin.ai/shop-ai 0.6.18 → 0.6.20

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.
@@ -1,16 +1,16 @@
1
- var Pc=Object.defineProperty;var Zo=n=>{throw TypeError(n)};var Oc=(n,e,t)=>e in n?Pc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var S=(n,e,t)=>Oc(n,typeof e!="symbol"?e+"":e,t),as=(n,e,t)=>e.has(n)||Zo("Cannot "+t);var h=(n,e,t)=>(as(n,e,"read from private field"),t?t.call(n):e.get(n)),b=(n,e,t)=>e.has(n)?Zo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),T=(n,e,t,i)=>(as(n,e,"write to private field"),i?i.call(n,t):e.set(n,t),t),R=(n,e,t)=>(as(n,e,"access private method"),t);var ea=(n,e,t,i)=>({set _(r){T(n,e,r,t)},get _(){return h(n,e,i)}});function ms(n){return[...n.v,(n.i?"!":"")+n.n].join(":")}function Fc(n,e=","){return n.map(ms).join(e)}var aa=typeof CSS<"u"&&CSS.escape||(n=>n.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Fi(n){for(var e=9,t=n.length;t--;)e=Math.imul(e^n.charCodeAt(t),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Li(n,e="@media "){return e+J(n).map(t=>(typeof t=="string"&&(t={min:t}),t.raw||Object.keys(t).map(i=>`(${i}-width:${t[i]})`).join(" and "))).join(",")}function J(n=[]){return Array.isArray(n)?n:n==null?[]:[n]}function ta(n){return n}function ji(){}var ce={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function la(n){return n.match(/[-=:;]/g)?.length||0}function fs(n){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(n)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(la(n),15)<<18}var Mc=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function ys({n,i:e,v:t=[]},i,r,s){n&&(n=ms({n,i:e,v:t})),s=[...J(s)];for(let a of t){let l=i.theme("screens",a);for(let u of J(l&&Li(l)||i.v(a))){var o;s.push(u),r|=l?67108864|fs(u):a=="dark"?1073741824:u[0]=="@"?fs(u):(o=u,1<<~(/:([a-z-]+)/.test(o)&&~Mc.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n,p:r,r:s,i:e}}var ua=new Map;function hs(n){if(n.d){let e=[],t=ls(n.r.reduce((i,r)=>r[0]=="@"?(e.push(r),i):r?ls(i,s=>ls(r,o=>{let a=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(a){let l=s.indexOf(a[1]);return~l?s.slice(0,l)+a[0]+s.slice(l+a[1].length):us(s,o)}return us(o,s)})):i,"&"),i=>us(i,n.n?"."+aa(n.n):""));return t&&e.push(t.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((i,r)=>r+"{"+i+"}",n.d)}}function ls(n,e){return n.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(t,i,r)=>e(i)+r)}function us(n,e){return n.replace(/&/g,e)}var na=new Intl.Collator("en",{numeric:!0});function ca(n,e){for(var t=0,i=n.length;t<i;){let r=i+t>>1;0>=pa(n[r],e)?t=r+1:i=r}return i}function pa(n,e){let t=n.p&ce.o;return t==(e.p&ce.o)&&(t==ce.b||t==ce.o)?0:n.p-e.p||n.o-e.o||na.compare(ia(n.n),ia(e.n))||na.compare(ra(n.n),ra(e.n))}function ia(n){return(n||"").split(/:/).pop().split("/").pop()||"\0"}function ra(n){return(n||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function cs(n,e){return Math.round(parseInt(n,16)*e)}function ze(n,e={}){if(typeof n=="function")return n(e);let{opacityValue:t="1",opacityVariable:i}=e,r=i?`var(${i})`:t;if(n.includes("<alpha-value>"))return n.replace("<alpha-value>",r);if(n[0]=="#"&&(n.length==4||n.length==7)){let s=(n.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[cs(n.substr(1,s),o),cs(n.substr(1+s,s),o),cs(n.substr(1+2*s,s),o),r]})`}return r=="1"?n:r=="0"?"#0000":n.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${r})`)}function fa(n,e,t,i,r=[]){return function s(o,{n:a,p:l,r:u=[],i:c},p){let f=[],d="",g=0,v=0;for(let E in o||{}){var k,L;let F=o[E];if(E[0]=="@"){if(!F)continue;if(E[1]=="a"){f.push(...bs(a,l,Di(""+F),p,l,u,c,!0));continue}if(E[1]=="l"){for(let U of J(F))f.push(...s(U,{n:a,p:(k=ce[E[7]],l&~ce.o|k),r:E[7]=="d"?[]:u,i:c},p));continue}if(E[1]=="i"){f.push(...J(F).map(U=>({p:-1,o:0,r:[],d:E+" "+U})));continue}if(E[1]=="k"){f.push({p:ce.d,o:0,r:[E],d:s(F,{p:ce.d},p).map(hs).join("")});continue}if(E[1]=="f"){f.push(...J(F).map(U=>({p:ce.d,o:0,r:[E],d:s(U,{p:ce.d},p).map(hs).join("")})));continue}}if(typeof F!="object"||Array.isArray(F))E=="label"&&F?a=F+Fi(JSON.stringify([l,c,o])):(F||F===0)&&(E=E.replace(/[A-Z]/g,U=>"-"+U.toLowerCase()),v+=1,g=Math.max(g,(L=E)[0]=="-"?0:la(L)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(L)?+!!RegExp.$1||-!!RegExp.$2:0)+1),d+=(d?";":"")+J(F).map(U=>p.s(E,_s(""+U,p.theme)+(c?" !important":""))).join(";"));else if(E[0]=="@"||E.includes("&")){let U=l;E[0]=="@"&&(E=E.replace(/\bscreen\(([^)]+)\)/g,(G,Q)=>{let K=p.theme("screens",Q);return K?(U|=67108864,Li(K,"")):G}),U|=fs(E)),f.push(...s(F,{n:a,p:U,r:[...u,E],i:c},p))}else f.push(...s(F,{p:l,r:[...u,E]},p))}return f.unshift({n:a,p:l,o:Math.max(0,15-v)+1.5*Math.min(g||15,15),r:u,d}),f.sort(pa)}(n,ys(e,t,i,r),t)}function _s(n,e){return n.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(t,i,r,s,o="")=>{let a=e(r,o);return typeof a=="function"&&/color|fill|stroke/i.test(r)?ze(a):""+J(a).filter(l=>Object(l)!==l)})}function ha(n,e){let t,i=[];for(let r of n)r.d&&r.n?t?.p==r.p&&""+t.r==""+r.r?(t.c=[t.c,r.c].filter(Boolean).join(" "),t.d=t.d+";"+r.d):i.push(t={...r,n:r.n&&e}):i.push({...r,n:r.n&&e});return i}function Mi(n,e,t=ce.u,i,r){let s=[];for(let o of n)for(let a of function(l,u,c,p,f){l={...l,i:l.i||f};let d=function(g,v){let k=ua.get(g.n);return k?k(g,v):v.r(g.n,g.v[0]=="dark")}(l,u);return d?typeof d=="string"?({r:p,p:c}=ys(l,u,c,p),ha(Mi(Di(d),u,c,p,l.i),l.n)):Array.isArray(d)?d.map(g=>{var v,k;return{o:0,...g,r:[...J(p),...J(g.r)],p:(v=c,k=g.p??c,v&~ce.o|k)}}):fa(d,l,u,c,p):[{c:ms(l),p:0,o:0,r:[]}]}(o,e,t,i,r))s.splice(ca(s,a),0,a);return s}function bs(n,e,t,i,r,s,o,a){return ha((a?t.flatMap(l=>Mi([l],i,r,s,o)):Mi(t,i,r,s,o)).map(l=>l.p&ce.o&&(l.n||e==ce.b)?{...l,p:l.p&~ce.o|e,o:0}:l),n)}function Dc(n,e,t,i){var r;return r=(s,o)=>{let{n:a,p:l,r:u,i:c}=ys(s,o,e);return t&&bs(a,e,t,o,l,u,c,i)},ua.set(n,r),n}function ps(n,e,t){if(n[n.length-1]!="("){let i=[],r=!1,s=!1,o="";for(let a of n)if(!(a=="("||/[~@]$/.test(a))){if(a[0]=="!"&&(a=a.slice(1),r=!r),a.endsWith(":")){i[a=="dark:"?"unshift":"push"](a.slice(0,-1));continue}a[0]=="-"&&(a=a.slice(1),s=!s),a.endsWith("-")&&(a=a.slice(0,-1)),a&&a!="&"&&(o+=(o&&"-")+a)}o&&(s&&(o="-"+o),e[0].push({n:o,v:i.filter(Lc),i:r}))}}function Lc(n,e,t){return t.indexOf(n)==e}var sa=new Map;function Di(n){let e=sa.get(n);if(!e){let t=[],i=[[]],r=0,s=0,o=null,a=0,l=(u,c=0)=>{r!=a&&(t.push(n.slice(r,a+c)),u&&ps(t,i)),r=a+1};for(;a<n.length;a++){let u=n[a];if(s)n[a-1]!="\\"&&(s+=+(u=="[")||-(u=="]"));else if(u=="[")s+=1;else if(o)n[a-1]!="\\"&&o.test(n.slice(a))&&(o=null,r=a+RegExp.lastMatch.length);else if(u=="/"&&n[a-1]!="\\"&&(n[a+1]=="*"||n[a+1]=="/"))o=n[a+1]=="*"?/^\*\//:/^[\r\n]/;else if(u=="(")l(),t.push(u);else if(u==":")n[a+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(u)){l(!0);let c=t.lastIndexOf("(");if(u==")"){let p=t[c-1];if(/[~@]$/.test(p)){let f=i.shift();t.length=c,ps([...t,"#"],i);let{v:d}=i[0].pop();for(let g of f)g.v.splice(+(g.v[0]=="dark")-+(d[0]=="dark"),d.length);ps([...t,Dc(p.length>1?p.slice(0,-1)+Fi(JSON.stringify([p,f])):p+"("+Fc(f)+")",ce.a,f,/@$/.test(p))],i)}c=t.lastIndexOf("(",c-1)}t.length=c+1}else/[~@]/.test(u)&&n[a+1]=="("&&i.unshift([])}l(!0),sa.set(n,e=i[0])}return e}function _(n,e,t){return[n,ds(e,t)]}function ds(n,e){return typeof n=="function"?n:typeof n=="string"&&/^[\w-]+$/.test(n)?(t,i)=>({[n]:e?e(t,i):gs(t,1)}):t=>n||{[t[1]]:gs(t,2)}}function gs(n,e,t=n.slice(e).find(Boolean)||n.$$||n.input){return n.input[0]=="-"?`calc(${t} * -1)`:t}function w(n,e,t,i){return[n,ws(e,t,i)]}function ws(n,e,t){let i=typeof e=="string"?(r,s)=>({[e]:t?t(r,s):r._}):e||(({1:r,_:s},o,a)=>({[r||a]:s}));return(r,s)=>{let o=da(n||r[1]),a=s.theme(o,r.$$)??nt(r.$$,o,s);if(a!=null)return r._=gs(r,0,a),i(r,s,o)}}function pe(n,e={},t){return[n,jc(e,t)]}function jc(n={},e){return(t,i)=>{let{section:r=da(t[0]).replace("-","")+"Color"}=n,[s,o]=qc(t.$$);if(!s)return;let a=i.theme(r,s)||nt(s,r,i);if(!a||typeof a=="object")return;let{opacityVariable:l=`--tw-${t[0].replace(/-$/,"")}-opacity`,opacitySection:u=r.replace("Color","Opacity"),property:c=r,selector:p}=n,f=i.theme(u,o||"DEFAULT")||o&&nt(o,u,i),d=e||(({_:v})=>{let k=jn(c,v);return p?{[p]:k}:k});t._={value:ze(a,{opacityVariable:l||void 0,opacityValue:f||void 0}),color:v=>ze(a,v),opacityVariable:l||void 0,opacityValue:f||void 0};let g=d(t,i);if(!t.dark){let v=i.d(r,s,a);v&&v!==a&&(t._={value:ze(v,{opacityVariable:l||void 0,opacityValue:f||"1"}),color:k=>ze(v,k),opacityVariable:l||void 0,opacityValue:f||void 0},g={"&":g,[i.v("dark")]:d(t,i)})}return g}}function qc(n){return(n.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function jn(n,e){let t={};return typeof e=="string"?t[n]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(t[e.opacityVariable]=e.opacityValue||"1"),t[n]=e.value),t}function nt(n,e,t){if(n[0]=="["&&n.slice(-1)=="]"){if(n=an(_s(n.slice(1,-1),t.theme)),!e)return n;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(n)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(n))||/image/i.test(e)&&!(/^image:/.test(n)||/^[a-z-]+\(/.test(n))||/weight/i.test(e)&&!(/^(number|any):/.test(n)||/^\d+$/.test(n))||/position/i.test(e)&&/^(length|size):/.test(n)))return n.replace(/^[a-z-]+:/,"")}}function da(n){return n.replace(/-./g,e=>e[1].toUpperCase())}function an(n){return n.includes("url(")?n.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,t="",i,r="")=>an(t)+i+an(r)):n.replace(/(^|[^\\])_+/g,(e,t)=>t+" ".repeat(e.length-t.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function qn({presets:n=[],...e}){let t={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:J(e.variants),rules:J(e.rules),ignorelist:J(e.ignorelist),hash:void 0,stringify:(i,r)=>i+":"+r,finalize:[]};for(let i of J([...n,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&J(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:r,darkMode:s=t.darkMode,darkColor:o=t.darkColor,theme:a,variants:l,rules:u,ignorelist:c,hash:p=t.hash,stringify:f=t.stringify,finalize:d}=typeof i=="function"?i(t):i;t={preflight:t.preflight!==!1&&r!==!1&&[...t.preflight,...J(r)],darkMode:s,darkColor:o,theme:{...t.theme,...a,extend:{...t.theme.extend,...a?.extend}},variants:[...t.variants,...J(l)],rules:[...t.rules,...J(u)],ignorelist:[...t.ignorelist,...J(c)],hash:p,stringify:f,finalize:[...t.finalize,...J(d)]}}return t}function oa(n,e,t,i,r,s){for(let o of e){let a=t.get(o);a||t.set(o,a=i(o));let l=a(n,r,s);if(l)return l}}function Nc(n){var e;return vs(n[0],typeof(e=n[1])=="function"?e:()=>e)}function Uc(n){var e,t;return Array.isArray(n)?vs(n[0],ds(n[1],n[2])):vs(n,ds(e,t))}function vs(n,e){return ga(n,(t,i,r,s)=>{let o=i.exec(t);if(o)return o.$$=t.slice(o[0].length),o.dark=s,e(o,r)})}function ga(n,e){let t=J(n).map(Bc);return(i,r,s)=>{for(let o of t){let a=e(i,o,r,s);if(a)return a}}}function Bc(n){return typeof n=="string"?RegExp("^"+n+(n.includes("$")||n.slice(-1)=="-"?"":"$")):n}function va(n,e){let t=qn(n),i=function({theme:l,darkMode:u,darkColor:c=ji,variants:p,rules:f,hash:d,stringify:g,ignorelist:v,finalize:k}){let L=new Map,E=new Map,F=new Map,U=new Map,G=ga(v,(A,oe)=>oe.test(A));p.push(["dark",Array.isArray(u)||u=="class"?`${J(u)[1]||".dark"} &`:typeof u=="string"&&u!="media"?u:"@media (prefers-color-scheme:dark)"]);let Q=typeof d=="function"?A=>d(A,Fi):d?Fi:ta;Q!==ta&&k.push(A=>({...A,n:A.n&&Q(A.n),d:A.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(oe,ee)=>"--"+Q(ee).replace("#",""))}));let K={theme:function({extend:A={},...oe}){let ee={},ct={get colors(){return ve("colors")},theme:ve,negative(){return{}},breakpoints(V){let Z={};for(let ae in V)typeof V[ae]=="string"&&(Z["screen-"+ae]=V[ae]);return Z}};return ve;function ve(V,Z,ae,Fe){if(V){if({1:V,2:Fe}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(V)||[,V],/[.[]/.test(V)){let Se=[];V.replace(/\[([^\]]+)\]|([^.[]+)/g,(te,me,Ce=me)=>Se.push(Ce)),V=Se.shift(),ae=Z,Z=Se.join("-")}let ie=ee[V]||Object.assign(Object.assign(ee[V]={},Be(oe,V)),Be(A,V));if(Z==null)return ie;Z||(Z="DEFAULT");let ke=ie[Z]??Z.split("-").reduce((Se,te)=>Se?.[te],ie)??ae;return Fe?ze(ke,{opacityValue:_s(Fe,ve)}):ke}let je={};for(let ie of[...Object.keys(oe),...Object.keys(A)])je[ie]=ve(ie);return je}function Be(V,Z){let ae=V[Z];return typeof ae=="function"&&(ae=ae(ct)),ae&&/color|fill|stroke/i.test(Z)?function Fe(je,ie=[]){let ke={};for(let Se in je){let te=je[Se],me=[...ie,Se];ke[me.join("-")]=te,Se=="DEFAULT"&&(me=ie,ke[ie.join("-")]=te),typeof te=="object"&&Object.assign(ke,Fe(te,me))}return ke}(ae):ae}}(l),e:aa,h:Q,s(A,oe){return g(A,oe,K)},d(A,oe,ee){return c(A,oe,K,ee)},v(A){return L.has(A)||L.set(A,oa(A,p,E,Nc,K)||"&:"+A),L.get(A)},r(A,oe){let ee=JSON.stringify([A,oe]);return F.has(ee)||F.set(ee,!G(A,K)&&oa(A,f,U,Uc,K,oe)),F.get(ee)},f(A){return k.reduce((oe,ee)=>ee(oe,K),A)}};return K}(t),r=new Map,s=[],o=new Set;e.resume(l=>r.set(l,l),(l,u)=>{e.insert(l,s.length,u),s.push(u),o.add(l)});function a(l){let u=i.f(l),c=hs(u);if(c&&!o.has(c)){o.add(c);let p=ca(s,l);e.insert(c,p,l),s.splice(p,0,l)}return u.n}return Object.defineProperties(function(u){if(!r.size)for(let p of J(t.preflight))typeof p=="function"&&(p=p(i)),p&&(typeof p=="string"?bs("",ce.b,Di(p),i,ce.b,[],!1,!0):fa(p,{},i,ce.b)).forEach(a);u=""+u;let c=r.get(u);if(!c){let p=new Set;for(let f of Mi(Di(u),i))p.add(f.c).add(a(f));c=[...p].filter(Boolean).join(" "),r.set(u,c).set(c,c)}return c},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:i.theme,config:t,snapshot(){let l=e.snapshot(),u=new Set(o),c=new Map(r),p=[...s];return()=>{l(),o=u,r=c,s=p}},clear(){e.clear(),o=new Set,r=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function zc(n,e){return n!=e&&""+n.split(" ").sort()!=""+e.split(" ").sort()}function ma(n){let e=new MutationObserver(t);return{observe(r){e.observe(r,{attributeFilter:["class"],subtree:!0,childList:!0}),i(r),t([{target:r,type:""}])},disconnect(){e.disconnect()}};function t(r){for(let{type:s,target:o}of r)if(s[0]=="a")i(o);else for(let a of o.querySelectorAll("[class]"))i(a);e.takeRecords()}function i(r){let s,o=r.getAttribute?.("class");o&&zc(o,s=n(o))&&r.setAttribute("class",s)}}function Hc(n){let e=document.querySelector(n||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function qi(n){let e=n?.cssRules?n:(n&&typeof n!="string"?n:Hc(n)).sheet;return{target:e,snapshot(){let t=Array.from(e.cssRules,i=>i.cssText);return()=>{this.clear(),t.forEach(this.insert)}},clear(){for(let t=e.cssRules.length;t--;)e.deleteRule(t)},destroy(){e.ownerNode?.remove()},insert(t,i){try{e.insertRule(t,i)}catch{e.insertRule(":root{}",i)}},resume:ji}}var Wc=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function ya(n){return Wc.get(n)}function _a(n){var e=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(n);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function ba(n,e){var t=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(n);return t?t[1]?/^sti/i.test(e)?1:0:t[2]?/^pat/i.test(e)?1:0:t[3]?/^image-/i.test(e)?1:0:t[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var Gc=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Ni(){return({stringify:n})=>({stringify(e,t,i){let r="",s=ya(e);s&&(r+=n(s,t,i)+";");let o=_a(e),a=ba(e,t);for(let l of Gc)o&l[1]&&(r+=n(l[0]+e,t,i)+";"),a&l[1]&&(r+=n(e,l[0]+t,i)+";");return r+n(e,t,i)}})}function Ui(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",ws("lineClamp",({_:n})=>wa(n))],["line-clamp-(\\d+)",({1:n})=>wa(n)]]}}function wa(n){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${n}`}}var Un={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...qe(4,"rem",4,.5,.5),...qe(12,"rem",4,5),14:"3.5rem",...qe(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:B("blur"),backdropBrightness:B("brightness"),backdropContrast:B("contrast"),backdropGrayscale:B("grayscale"),backdropHueRotate:B("hueRotate"),backdropInvert:B("invert"),backdropOpacity:B("opacity"),backdropSaturate:B("saturate"),backdropSepia:B("sepia"),backgroundColor:B("colors"),backgroundImage:{none:"none"},backgroundOpacity:B("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...qe(200,"",100,0,50),...qe(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:n})=>({DEFAULT:n("colors.gray.200","currentColor"),...n("colors")}),borderOpacity:B("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:B("spacing"),borderWidth:{DEFAULT:"1px",...He(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:B("colors"),caretColor:B("colors"),accentColor:({theme:n})=>({auto:"auto",...n("colors")}),contrast:{...qe(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:B("borderColor"),divideOpacity:B("borderOpacity"),divideWidth:B("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:n})=>({...n("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:n})=>({...n("spacing"),...Nn(2,6),...Nn(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:B("spacing"),gradientColorStops:B("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:n})=>({...n("spacing"),...Nn(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:n})=>({...n("spacing"),...Nn(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...qe(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:n})=>({auto:"auto",...n("spacing")}),maxHeight:({theme:n})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...n("spacing")}),maxWidth:({theme:n,breakpoints:e})=>({...e(n("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...qe(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:B("spacing"),placeholderColor:B("colors"),placeholderOpacity:B("opacity"),outlineColor:B("colors"),outlineOffset:He(8,"px"),outlineWidth:He(8,"px"),ringColor:({theme:n})=>({...n("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:B("colors"),ringOffsetWidth:He(8,"px"),ringOpacity:({theme:n})=>({...n("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...He(8,"px")},rotate:{...He(2,"deg"),...He(12,"deg",3),...He(180,"deg",45)},saturate:qe(200,"",100,0,50),scale:{...qe(150,"",100,0,50),...qe(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:B("spacing"),scrollPadding:B("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...He(2,"deg"),...He(12,"deg",3)},space:B("spacing"),stroke:({theme:n})=>({...n("colors"),none:"none"}),strokeWidth:qe(2),textColor:B("colors"),textDecorationColor:B("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...He(8,"px")},textUnderlineOffset:{auto:"auto",...He(8,"px")},textIndent:B("spacing"),textOpacity:B("opacity"),transitionDuration:({theme:n})=>({...n("durations"),DEFAULT:"150ms"}),transitionDelay:B("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:n})=>({...n("spacing"),...Nn(2,4),full:"100%"}),width:({theme:n})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...n("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...qe(50,"",1,0,10),auto:"auto"}};function Nn(n,e){let t={};do for(var i=1;i<n;i++)t[`${i}/${n}`]=Number((i/n*100).toFixed(6))+"%";while(++n<=e);return t}function He(n,e,t=0){let i={};for(;t<=n;t=2*t||1)i[t]=t+e;return i}function qe(n,e="",t=1,i=0,r=1,s={}){for(;i<=n;i+=r)s[i]=i/t+e;return s}function B(n){return({theme:e})=>e(n)}var xa={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Un.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Un.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}};var Aa=[_("\\[([-\\w]+):(.+)]",({1:n,2:e},t)=>({"@layer overrides":{"&":{[n]:nt(`[${e}]`,"",t)}}})),_("(group|peer)([~/][^-[]+)?",({input:n},{h:e})=>[{c:e(n)}]),w("aspect-","aspectRatio"),_("container",(n,{theme:e})=>{let{screens:t=e("screens"),center:i,padding:r}=e("container"),s={width:"100%",marginRight:i&&"auto",marginLeft:i&&"auto",...o("xs")};for(let a in t){let l=t[a];typeof l=="string"&&(s[Li(l)]={"&":{maxWidth:l,...o(a)}})}return s;function o(a){let l=r&&(typeof r=="string"?r:r[a]||r.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),w("content-","content",({_:n})=>({"--tw-content":n,content:"var(--tw-content)"})),_("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),_("box-(border|content)","boxSizing",({1:n})=>n+"-box"),_("hidden",{display:"none"}),_("table-(auto|fixed)","tableLayout"),_(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",_("isolate","isolation"),_("object-(contain|cover|fill|none|scale-down)","objectFit"),w("object-","objectPosition"),_("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Bi),_("overscroll(-[xy])?-(auto|contain|none)",({1:n="",2:e})=>({["overscroll-behavior"+n]:e})),_("(static|fixed|absolute|relative|sticky)","position"),w("-?inset(-[xy])?(?:$|-)","inset",({1:n,_:e})=>({top:n!="-x"&&e,right:n!="-y"&&e,bottom:n!="-x"&&e,left:n!="-y"&&e})),w("-?(top|bottom|left|right)(?:$|-)","inset"),_("(visible|collapse)","visibility"),_("invisible",{visibility:"hidden"}),w("-?z-","zIndex"),_("flex-((row|col)(-reverse)?)","flexDirection",ka),_("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),w("(flex-(?:grow|shrink))(?:$|-)"),w("(flex)-"),w("grow(?:$|-)","flexGrow"),w("shrink(?:$|-)","flexShrink"),w("basis-","flexBasis"),w("-?(order)-"),"-?(order)-(\\d+)",w("grid-cols-","gridTemplateColumns"),_("grid-cols-(\\d+)","gridTemplateColumns",Ca),w("col-","gridColumn"),_("col-(span)-(\\d+)","gridColumn",$a),w("col-start-","gridColumnStart"),_("col-start-(auto|\\d+)","gridColumnStart"),w("col-end-","gridColumnEnd"),_("col-end-(auto|\\d+)","gridColumnEnd"),w("grid-rows-","gridTemplateRows"),_("grid-rows-(\\d+)","gridTemplateRows",Ca),w("row-","gridRow"),_("row-(span)-(\\d+)","gridRow",$a),w("row-start-","gridRowStart"),_("row-start-(auto|\\d+)","gridRowStart"),w("row-end-","gridRowEnd"),_("row-end-(auto|\\d+)","gridRowEnd"),_("grid-flow-((row|col)(-dense)?)","gridAutoFlow",n=>Bi(ka(n))),_("grid-flow-(dense)","gridAutoFlow"),w("auto-cols-","gridAutoColumns"),w("auto-rows-","gridAutoRows"),w("gap-x(?:$|-)","gap","columnGap"),w("gap-y(?:$|-)","gap","rowGap"),w("gap(?:$|-)","gap"),"(justify-(?:items|self))-",_("justify-","justifyContent",Sa),_("(content|items|self)-",n=>({["align-"+n[1]]:Sa(n)})),_("(place-(content|items|self))-",({1:n,$$:e})=>({[n]:("wun".includes(e[3])?"space-":"")+e})),w("p([xytrbl])?(?:$|-)","padding",ln("padding")),w("-?m([xytrbl])?(?:$|-)","margin",ln("margin")),w("-?space-(x|y)(?:$|-)","space",({1:n,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${n}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[n]]:`calc(${e} * calc(1 - var(--tw-space-${n}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[n]]:`calc(${e} * var(--tw-space-${n}-reverse))`}})),_("space-(x|y)-reverse",({1:n})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${n}-reverse`]:"1"}})),w("w-","width"),w("min-w-","minWidth"),w("max-w-","maxWidth"),w("h-","height"),w("min-h-","minHeight"),w("max-h-","maxHeight"),w("font-","fontWeight"),w("font-","fontFamily",({_:n})=>typeof(n=J(n))[1]=="string"?{fontFamily:Xe(n)}:{fontFamily:Xe(n[0]),...n[1]}),_("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),_("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),_("italic","fontStyle"),_("not-italic",{fontStyle:"normal"}),_("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:n,2:e="",3:t})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(t?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":n)]:n,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...kt({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),w("tracking-","letterSpacing"),w("leading-","lineHeight"),_("list-(inside|outside)","listStylePosition"),w("list-","listStyleType"),_("list-","listStyleType"),w("placeholder-opacity-","placeholderOpacity",({_:n})=>({"&::placeholder":{"--tw-placeholder-opacity":n}})),pe("placeholder-",{property:"color",selector:"&::placeholder"}),_("text-(left|center|right|justify|start|end)","textAlign"),_("text-(ellipsis|clip)","textOverflow"),w("text-opacity-","textOpacity","--tw-text-opacity"),pe("text-",{property:"color"}),w("text-","fontSize",({_:n})=>typeof n=="string"?{fontSize:n}:{fontSize:n[0],...typeof n[1]=="string"?{lineHeight:n[1]}:n[1]}),w("indent-","textIndent"),_("(overline|underline|line-through)","textDecorationLine"),_("no-underline",{textDecorationLine:"none"}),w("underline-offset-","textUnderlineOffset"),pe("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),w("decoration-","textDecorationThickness"),_("decoration-","textDecorationStyle"),_("(uppercase|lowercase|capitalize)","textTransform"),_("normal-case",{textTransform:"none"}),_("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),_("align-","verticalAlign"),_("whitespace-","whiteSpace"),_("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),_("break-words",{overflowWrap:"break-word"}),_("break-all",{wordBreak:"break-all"}),_("break-keep",{wordBreak:"keep-all"}),pe("caret-",{opacityVariable:!1,opacitySection:"opacity"}),pe("accent-",{opacityVariable:!1,opacitySection:"opacity"}),_("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:n})=>`linear-gradient(to ${Bt(n," ")},var(--tw-gradient-stops))`),pe("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:n})=>({"--tw-gradient-from":n.value,"--tw-gradient-to":n.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),pe("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:n})=>({"--tw-gradient-to":n.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${n.value},var(--tw-gradient-to)`})),pe("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),_("bg-(fixed|local|scroll)","backgroundAttachment"),_("bg-origin-(border|padding|content)","backgroundOrigin",({1:n})=>n+"-box"),_(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),_("bg-blend-","backgroundBlendMode"),_("bg-clip-(border|padding|content|text)","backgroundClip",({1:n})=>n+(n=="text"?"":"-box")),w("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),pe("bg-",{section:"backgroundColor"}),w("bg-","backgroundImage"),w("bg-","backgroundPosition"),_("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Bi),w("bg-","backgroundSize"),w("rounded(?:$|-)","borderRadius"),w("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:n,_:e})=>{let t={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[n]||[n,n];return{[`border-${Bt(t[0])}-radius`]:e,[`border-${Bt(t[1])}-radius`]:e}}),_("border-(collapse|separate)","borderCollapse"),w("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),_("border-(solid|dashed|dotted|double|none)","borderStyle"),w("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:n,_:e})=>({...kt({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(n||"-x")]:e,["--tw-border-spacing"+(n||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),pe("border-([xytrbl])-",{section:"borderColor"},ln("border","Color")),pe("border-"),w("border-([xytrbl])(?:$|-)","borderWidth",ln("border","Width")),w("border(?:$|-)","borderWidth"),w("divide-opacity(?:$|-)","divideOpacity",({_:n})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":n}})),_("divide-(solid|dashed|dotted|double|none)",({1:n})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:n}})),_("divide-([xy]-reverse)",({1:n})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+n]:"1"}})),w("divide-([xy])(?:$|-)","divideWidth",({1:n,_:e})=>{let t={x:"lr",y:"tb"}[n];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${n}-reverse`]:"0",[`border-${Bt(t[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${n}-reverse)))`,[`border-${Bt(t[1])}Width`]:`calc(${e} * var(--tw-divide-${n}-reverse))`}}}),pe("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),w("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),pe("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),w("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),_("ring-inset",{"--tw-ring-inset":"inset"}),pe("ring-",{property:"--tw-ring-color"}),w("ring(?:$|-)","ringWidth",({_:n},{theme:e})=>({...kt({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":ze(e("ringOffsetColor","","#fff")),"--tw-ring-color":ze(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${n} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),pe("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:n})=>({"--tw-shadow-color":n.value,"--tw-shadow":"var(--tw-shadow-colored)"})),w("shadow(?:$|-)","boxShadow",({_:n})=>({...kt({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":Xe(n),"--tw-shadow-colored":Xe(n).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),w("(opacity)-"),_("mix-blend-","mixBlendMode"),...Ea(),...Ea("backdrop-"),w("transition(?:$|-)","transitionProperty",(n,{theme:e})=>({transitionProperty:Xe(n),transitionTimingFunction:n._=="none"?void 0:Xe(e("transitionTimingFunction","")),transitionDuration:n._=="none"?void 0:Xe(e("transitionDuration",""))})),w("duration(?:$|-)","transitionDuration","transitionDuration",Xe),w("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Xe),w("delay(?:$|-)","transitionDelay","transitionDelay",Xe),w("animate(?:$|-)","animation",(n,{theme:e,h:t,e:i})=>{let r=Xe(n),s=r.split(" "),o=e("keyframes",s[0]);return o?{["@keyframes "+(s[0]=i(t(s[0])))]:o,animation:s.join(" ")}:{animation:r}}),"(transform)-(none)",_("transform",ks),_("transform-(cpu|gpu)",({1:n})=>({"--tw-transform":Ia(n=="gpu")})),w("scale(-[xy])?-","scale",({1:n,_:e})=>({["--tw-scale"+(n||"-x")]:e,["--tw-scale"+(n||"-y")]:e,...ks()})),w("-?(rotate)-","rotate",xs),w("-?(translate-[xy])-","translate",xs),w("-?(skew-[xy])-","skew",xs),_("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Bi),"(appearance)-",w("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",w("(cursor)-"),"(cursor)-",_("snap-(none)","scroll-snap-type"),_("snap-(x|y|both)",({1:n})=>({...kt({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":n+" var(--tw-scroll-snap-strictness)"})),_("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),_("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),_("snap-(normal|always)","scroll-snap-stop"),_("scroll-(auto|smooth)","scroll-behavior"),w("scroll-p([xytrbl])?(?:$|-)","padding",ln("scroll-padding")),w("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",ln("scroll-margin")),_("touch-(auto|none|manipulation)","touch-action"),_("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:n,2:e,3:t})=>({...kt({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":t?"pan-y":n}`]:n,"touch-action":"var(--tw-touch-action)"})),_("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),_("outline",{outlineStyle:"solid"}),_("outline-(dashed|dotted|double)","outlineStyle"),w("-?(outline-offset)-"),pe("outline-",{opacityVariable:!1,opacitySection:"opacity"}),w("outline-","outlineWidth"),"(pointer-events)-",w("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:n})=>({x:"horizontal",y:"vertical"})[n]||n||"both"],_("select-(none|text|all|auto)","userSelect"),pe("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),pe("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),w("stroke-","strokeWidth"),_("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),_("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Bi(n){return(typeof n=="string"?n:n[1]).replace(/-/g," ").trim()}function ka(n){return(typeof n=="string"?n:n[1]).replace("col","column")}function Bt(n,e="-"){let t=[];for(let i of n)t.push({t:"top",r:"right",b:"bottom",l:"left"}[i]);return t.join(e)}function Xe(n){return n&&""+(n._||n)}function Sa({$$:n}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[n[3]||""]||"")+n}function ln(n,e=""){return({1:t,_:i})=>{let r={x:"lr",y:"tb"}[t]||t+t;return r?{...jn(n+"-"+Bt(r[0])+e,i),...jn(n+"-"+Bt(r[1])+e,i)}:jn(n+e,i)}}function Ea(n=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",n&&"opacity","saturate","sepia",!n&&"drop-shadow"].filter(Boolean),t={};for(let i of e)t[`--tw-${n}${i}`]="var(--tw-empty,/*!*/ /*!*/)";return t={...kt(t),[`${n}filter`]:e.map(i=>`var(--tw-${n}${i})`).join(" ")},[`(${n}filter)-(none)`,_(`${n}filter`,t),...e.map(i=>w(`${i[0]=="h"?"-?":""}(${n}${i})(?:$|-)`,i,({1:r,_:s})=>({[`--tw-${r}`]:J(s).map(o=>`${i}(${o})`).join(" "),...t})))]}function xs({1:n,_:e}){return{["--tw-"+n]:e,...ks()}}function ks(){return{...kt({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Ia()}),transform:"var(--tw-transform)"}}function Ia(n){return[n?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(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))"].join(" ")}function $a({1:n,2:e}){return`${n} ${e} / ${n} ${e}`}function Ca({1:n}){return`repeat(${n},minmax(0,1fr))`}function kt(n){return{"@layer defaults":{"*,::before,::after":n,"::backdrop":n}}}var Ta=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:n})=>`@media (orientation:${n})`],["contrast-(more|less)",({1:n})=>`@media (prefers-contrast:${n})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:n})=>`&::${n}`],["(marker|selection)",({1:n})=>`& *::${n},&::${n}`],["file","&::file-selector-button"],["(first|last|only)",({1:n})=>`&:${n}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:n,$$:e},t)=>e&&`&[${n}-${t.theme(n,e)||nt(e,"",t)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:n,3:e="",4:t,5:i="",6:r=e},{e:s,h:o,v:a})=>{let l=an(i)||(t[0]=="["?t:a(t.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(n+r))})`)}${n[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:n})=>`[dir="${n}"] &`],["supports-",({$$:n},e)=>{if(n&&(n=e.theme("supports",n)||nt(n,"",e)),n)return n.includes(":")||(n+=":var(--tw)"),/^\w*\s*\(/.test(n)||(n=`(${n})`),`@supports ${n.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:n},e)=>{if(n&&(n=e.theme("screens",n)||nt(n,"",e)),typeof n=="string")return`@media not all and (min-width:${n})`}],["min-",({$$:n},e)=>(n&&(n=nt(n,"",e)),n&&`@media (min-width:${n})`)],[/^\[(.+)]$/,({1:n})=>/[&@]/.test(n)&&an(n).replace(/[}]+$/,"").split("{")]];function Ra({colors:n,disablePreflight:e}={}){return{preflight:e?void 0:xa,theme:{...Un,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...n}},variants:Ta,rules:Aa,finalize(t){return t.n&&t.d&&t.r.some(i=>/^&::(before|after)$/.test(i))&&!/(^|;)content:/.test(t.d)?{...t,d:"content:var(--tw-content);"+t.d}:t}}}var Vc={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Xc={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Jc={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Yc={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Kc={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Qc={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},Zc={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},ep={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},tp={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},np={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},ip={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},rp={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},sp={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},op={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},ap={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},lp={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},up={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},cp={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},pp={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},fp={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},hp={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},dp={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},Pa={__proto__:null,slate:Vc,gray:Xc,zinc:Jc,neutral:Yc,stone:Kc,red:Qc,orange:Zc,amber:ep,yellow:tp,lime:np,green:ip,emerald:rp,teal:sp,cyan:op,sky:ap,blue:lp,indigo:up,violet:cp,purple:pp,fuchsia:fp,pink:hp,rose:dp};function zi({disablePreflight:n}={}){return Ra({colors:Pa,disablePreflight:n})}function Hi({className:n="prose",defaultColor:e="gray",extend:t={},colors:i={}}={}){return i={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...i,dark:i.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...i.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${n}-${s}`,(a,l)=>Ma(n,o[0]=="."?"."+l.e(l.h(o.slice(1))):o,l,u=>`& :is(${u.trim()})`)]),rules:[[`(lead|not-${n})`,({1:s},{h:o})=>[{c:o(s)}]],[`${n}-invert`,{"@layer base":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[n+"-",({$$:s},o)=>{let a=Fa(o.theme("fontSize",s));return a&&{"@layer components":a}}],[n+"-",({$$:s},o)=>r(s,o)],[n,(s,o)=>({...r(e,o),"@layer base":[Oa(n,o,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:P(20,16),marginBottom:P(20,16),paddingLeft:P(26,16)},li:{marginTop:P(8,16),marginBottom:P(8,16)},"ol>li,ul>li":{paddingLeft:P(6,16)},">ul>li p":{marginTop:P(12,16),marginBottom:P(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:P(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:P(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:P(12,16),marginBottom:P(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:P(48,16),marginBottom:P(48,16)},blockquote:{marginTop:P(32,20),marginBottom:P(32,20),paddingLeft:P(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:P(20,16),marginBottom:P(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:P(36,16),marginTop:"0",marginBottom:P(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:P(24,16),marginTop:P(48,24),marginBottom:P(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:P(20,16),marginTop:P(32,20),marginBottom:P(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:P(24,16),marginBottom:P(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:P(32,16),marginBottom:P(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:P(14,16),lineHeight:"1.4",marginTop:P(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:P(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:P(21,24)},"h3 code":{fontSize:P(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:P(14,16),lineHeight:"1.7",marginTop:P(24,14),marginBottom:P(24,14),borderRadius:"0.375rem",paddingTop:P(12,14),paddingRight:P(16,14),paddingBottom:P(12,14),paddingLeft:P(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:P(32,16),marginBottom:P(32,16),fontSize:P(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:P(8,14),paddingBottom:P(8,14),paddingLeft:P(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:P(8,14),paddingRight:P(8,14),paddingBottom:P(8,14),paddingLeft:P(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${o.e(o.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:P(20,16),lineHeight:"1.6",marginTop:P(24,20),marginBottom:P(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Oa(n,o,t)],"@layer components":{...Fa(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function r(s,o){let a={},l={},u=(c,p,f)=>{let d=o.theme(`colors.${s}.${p}`,p);f["--tw-prose-"+c]=ze(d);let g=f!=l&&o.d("colors",`${s}-${p}`,d);g&&(l["--tw-prose-"+c]=ze(g))};for(let c in i){let p=i[c];c!="dark"&&p&&u(c,p,a)}for(let c in i.dark||{}){let p=i.dark[c];p&&(i.dark?u("invert-"+c,p,a):u(c,p,l))}return Object.keys(a).length?{"@layer defaults":{"&":a,[o.v("dark")]:l}}:void 0}}function Oa(n,e,t){let i={};for(let r in t)i[Ma(n,r,e,s=>`.${e.e(e.h(n))}${s}`)]=t[r];return i}function Ma(n,e,{e:t,h:i},r){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",a=s,l="")=>r(`${o}:where(${a}):not(:where(.${t(i("not-"+n))} *))${l}`))}function Fa(n){return n?typeof n=="string"?{fontSize:n}:{fontSize:n[0],...typeof n[1]=="string"?{lineHeight:n[1]}:n[1]}:void 0}function P(n,e){return`${(n/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var Ss=qn({darkMode:"class",theme:{extend:{fontFamily:{display:["Space Grotesk","sans-serif"],sans:["Open Sans","sans-serif"],serif:["Roboto Slab","serif"],mono:["Roboto Mono","monospace"]},colors:{primary:{50:"#fdffe4",100:"#f9ffc5",200:"#f1ff92",300:"#e2ff54",400:"#d1fa21",500:"#b9e901",600:"#8ab400",700:"#688902",800:"#526b09",900:"#465a0d",950:"#243300"},secondary:{50:"#fff0fc",100:"#ffe3fc",200:"#ffc6f9",300:"#ff98f2",400:"#ff58e5",500:"#ff27d5",600:"#ff0bbb",700:"#df0095",800:"#b8007b",900:"#980368",950:"#5f003b"},tertiary:{50:"#f3f2ff",100:"#eae7ff",200:"#d7d2ff",300:"#baaeff",400:"#9980ff",500:"#784dff",600:"#6829fe",700:"#601feb",800:"#4b12c5",900:"#3f11a1",950:"#25086d"}}}},presets:[zi(),Ni(),Ui(),Hi()],hash:!1});function Wi(n,e=!0){let t=function(){if(gp)try{let l=qi(new CSSStyleSheet);return l.connect=u=>{let c=Es(u);c.adoptedStyleSheets=[...c.adoptedStyleSheets,l.target]},l.disconnect=ji,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[qi(s)],a=new WeakMap;return{get target(){return o[0].target},snapshot(){let l=o.map(u=>u.snapshot());return()=>l.forEach(u=>u())},clear(){o.forEach(l=>l.clear())},destroy(){o.forEach(l=>l.destroy())},insert(l,u,c){o[0].insert(l,u,c);let p=this.target.cssRules[u];o.forEach((f,d)=>d&&f.target.insertRule(p.cssText,u))},resume(l,u){return o[0].resume(l,u)},connect(l){let u=document.createElement("style");Es(l).appendChild(u);let c=qi(u),{cssRules:p}=this.target;for(let f=0;f<p.length;f++)c.target.insertRule(p[f].cssText,f);o.push(c),a.set(l,c)},disconnect(l){let u=o.indexOf(a.get(l));u>=0&&o.splice(u,1)}}}(),i=va({...n,hash:n.hash??e},t),r=ma(i);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),t.connect(this),r.observe(Es(this))}disconnectedCallback(){t.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=i}}}}var gp=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Es(n){return n.shadowRoot||n.attachShadow({mode:"open"})}var $s=n=>Wi(Ss)(n);var Gi=globalThis,Vi=Gi.ShadowRoot&&(Gi.ShadyCSS===void 0||Gi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Cs=Symbol(),Da=new WeakMap,Bn=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Cs)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Vi&&e===void 0){let i=t!==void 0&&t.length===1;i&&(e=Da.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Da.set(t,e))}return e}toString(){return this.cssText}},La=n=>new Bn(typeof n=="string"?n:n+"",void 0,Cs),As=(n,...e)=>{let t=n.length===1?n[0]:e.reduce((i,r,s)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+n[s+1],n[0]);return new Bn(t,n,Cs)},Is=(n,e)=>{if(Vi)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let i=document.createElement("style"),r=Gi.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=t.cssText,n.appendChild(i)}},Xi=Vi?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let i of e.cssRules)t+=i.cssText;return La(t)})(n):n;var{is:vp,defineProperty:mp,getOwnPropertyDescriptor:yp,getOwnPropertyNames:_p,getOwnPropertySymbols:bp,getPrototypeOf:wp}=Object,Ji=globalThis,ja=Ji.trustedTypes,xp=ja?ja.emptyScript:"",kp=Ji.reactiveElementPolyfillSupport,zn=(n,e)=>n,Ts={toAttribute(n,e){switch(e){case Boolean:n=n?xp:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Na=(n,e)=>!vp(n,e),qa={attribute:!0,type:String,converter:Ts,reflect:!1,hasChanged:Na};Symbol.metadata??=Symbol("metadata"),Ji.litPropertyMetadata??=new WeakMap;var pt=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=qa){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){let i=Symbol(),r=this.getPropertyDescriptor(e,i,t);r!==void 0&&mp(this.prototype,e,r)}}static getPropertyDescriptor(e,t,i){let{get:r,set:s}=yp(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get(){return r?.call(this)},set(o){let a=r?.call(this);s.call(this,o),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??qa}static _$Ei(){if(this.hasOwnProperty(zn("elementProperties")))return;let e=wp(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(zn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zn("properties"))){let t=this.properties,i=[..._p(t),...bp(t)];for(let r of i)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[i,r]of t)this.elementProperties.set(i,r)}this._$Eh=new Map;for(let[t,i]of this.elementProperties){let r=this._$Eu(t,i);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let r of i)t.unshift(Xi(r))}else e!==void 0&&t.push(Xi(e));return t}static _$Eu(e,t){let i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Is(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){let i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){let s=(i.converter?.toAttribute!==void 0?i.converter:Ts).toAttribute(t,i.type);this._$Em=e,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,t){let i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let s=i.getPropertyOptions(r),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Ts;this._$Em=r,this[r]=o.fromAttribute(t,s.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??=this.constructor.getPropertyOptions(e),!(i.hasChanged??Na)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[r,s]of i)s.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.P(r,this[r],s)}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(t)):this._$EU()}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach(t=>this._$EC(t,this[t])),this._$EU()}updated(e){}firstUpdated(e){}};pt.elementStyles=[],pt.shadowRootOptions={mode:"open"},pt[zn("elementProperties")]=new Map,pt[zn("finalized")]=new Map,kp?.({ReactiveElement:pt}),(Ji.reactiveElementVersions??=[]).push("2.0.4");var Ps=globalThis,Yi=Ps.trustedTypes,Ua=Yi?Yi.createPolicy("lit-html",{createHTML:n=>n}):void 0,Os="$lit$",ft=`lit$${Math.random().toFixed(9).slice(2)}$`,Fs="?"+ft,Sp=`<${Fs}>`,Wt=document,Wn=()=>Wt.createComment(""),Gn=n=>n===null||typeof n!="object"&&typeof n!="function",Va=Array.isArray,Xa=n=>Va(n)||typeof n?.[Symbol.iterator]=="function",Rs=`[
2
- \f\r]`,Hn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ba=/-->/g,za=/>/g,zt=RegExp(`>|${Rs}(?:([^\\s"'>=/]+)(${Rs}*=${Rs}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ha=/'/g,Wa=/"/g,Ja=/^(?:script|style|textarea|title)$/i,Ya=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),O=Ya(1),pd=Ya(2),Je=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),Ga=new WeakMap,Ht=Wt.createTreeWalker(Wt,129);function Ka(n,e){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ua!==void 0?Ua.createHTML(e):e}var Qa=(n,e)=>{let t=n.length-1,i=[],r,s=e===2?"<svg>":"",o=Hn;for(let a=0;a<t;a++){let l=n[a],u,c,p=-1,f=0;for(;f<l.length&&(o.lastIndex=f,c=o.exec(l),c!==null);)f=o.lastIndex,o===Hn?c[1]==="!--"?o=Ba:c[1]!==void 0?o=za:c[2]!==void 0?(Ja.test(c[2])&&(r=RegExp("</"+c[2],"g")),o=zt):c[3]!==void 0&&(o=zt):o===zt?c[0]===">"?(o=r??Hn,p=-1):c[1]===void 0?p=-2:(p=o.lastIndex-c[2].length,u=c[1],o=c[3]===void 0?zt:c[3]==='"'?Wa:Ha):o===Wa||o===Ha?o=zt:o===Ba||o===za?o=Hn:(o=zt,r=void 0);let d=o===zt&&n[a+1].startsWith("/>")?" ":"";s+=o===Hn?l+Sp:p>=0?(i.push(u),l.slice(0,p)+Os+l.slice(p)+ft+d):l+ft+(p===-2?a:d)}return[Ka(n,s+(n[t]||"<?>")+(e===2?"</svg>":"")),i]},Vn=class n{constructor({strings:e,_$litType$:t},i){let r;this.parts=[];let s=0,o=0,a=e.length-1,l=this.parts,[u,c]=Qa(e,t);if(this.el=n.createElement(u,i),Ht.currentNode=this.el.content,t===2){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=Ht.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let p of r.getAttributeNames())if(p.endsWith(Os)){let f=c[o++],d=r.getAttribute(p).split(ft),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:s,name:g[2],strings:d,ctor:g[1]==="."?Qi:g[1]==="?"?Zi:g[1]==="@"?er:Vt}),r.removeAttribute(p)}else p.startsWith(ft)&&(l.push({type:6,index:s}),r.removeAttribute(p));if(Ja.test(r.tagName)){let p=r.textContent.split(ft),f=p.length-1;if(f>0){r.textContent=Yi?Yi.emptyScript:"";for(let d=0;d<f;d++)r.append(p[d],Wn()),Ht.nextNode(),l.push({type:2,index:++s});r.append(p[f],Wn())}}}else if(r.nodeType===8)if(r.data===Fs)l.push({type:2,index:s});else{let p=-1;for(;(p=r.data.indexOf(ft,p+1))!==-1;)l.push({type:7,index:s}),p+=ft.length-1}s++}}static createElement(e,t){let i=Wt.createElement("template");return i.innerHTML=e,i}};function Gt(n,e,t=n,i){if(e===Je)return e;let r=i!==void 0?t._$Co?.[i]:t._$Cl,s=Gn(e)?void 0:e._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),s===void 0?r=void 0:(r=new s(n),r._$AT(n,t,i)),i!==void 0?(t._$Co??=[])[i]=r:t._$Cl=r),r!==void 0&&(e=Gt(n,r._$AS(n,e.values),r,i)),e}var Ki=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:i}=this._$AD,r=(e?.creationScope??Wt).importNode(t,!0);Ht.currentNode=r;let s=Ht.nextNode(),o=0,a=0,l=i[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new un(s,s.nextSibling,this,e):l.type===1?u=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(u=new tr(s,this,e)),this._$AV.push(u),l=i[++a]}o!==l?.index&&(s=Ht.nextNode(),o++)}return Ht.currentNode=Wt,r}p(e){let t=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}},un=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,r){this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Gt(this,e,t),Gn(e)?e===D||e==null||e===""?(this._$AH!==D&&this._$AR(),this._$AH=D):e!==this._$AH&&e!==Je&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Xa(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==D&&Gn(this._$AH)?this._$AA.nextSibling.data=e:this.T(Wt.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Vn.createElement(Ka(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(t);else{let s=new Ki(r,this),o=s.u(this.options);s.p(t),this.T(o),this._$AH=s}}_$AC(e){let t=Ga.get(e.strings);return t===void 0&&Ga.set(e.strings,t=new Vn(e)),t}k(e){Va(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,r=0;for(let s of e)r===t.length?t.push(i=new n(this.S(Wn()),this.S(Wn()),this,this.options)):i=t[r],i._$AI(s),r++;r<t.length&&(this._$AR(i&&i._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){let i=e.nextSibling;e.remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Vt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,r,s){this.type=1,this._$AH=D,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=D}_$AI(e,t=this,i,r){let s=this.strings,o=!1;if(s===void 0)e=Gt(this,e,t,0),o=!Gn(e)||e!==this._$AH&&e!==Je,o&&(this._$AH=e);else{let a=e,l,u;for(e=s[0],l=0;l<s.length-1;l++)u=Gt(this,a[i+l],t,l),u===Je&&(u=this._$AH[l]),o||=!Gn(u)||u!==this._$AH[l],u===D?e=D:e!==D&&(e+=(u??"")+s[l+1]),this._$AH[l]=u}o&&!r&&this.j(e)}j(e){e===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Qi=class extends Vt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===D?void 0:e}},Zi=class extends Vt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==D)}},er=class extends Vt{constructor(e,t,i,r,s){super(e,t,i,r,s),this.type=5}_$AI(e,t=this){if((e=Gt(this,e,t,0)??D)===Je)return;let i=this._$AH,r=e===D&&i!==D||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==D&&(i===D||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},tr=class{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Gt(this,e)}},Za={P:Os,A:ft,C:Fs,M:1,L:Qa,R:Ki,D:Xa,V:Gt,I:un,H:Vt,N:Zi,U:er,B:Qi,F:tr},Ep=Ps.litHtmlPolyfillSupport;Ep?.(Vn,un),(Ps.litHtmlVersions??=[]).push("3.1.4");var el=(n,e,t)=>{let i=t?.renderBefore??e,r=i._$litPart$;if(r===void 0){let s=t?.renderBefore??null;i._$litPart$=r=new un(e.insertBefore(Wn(),s),s,void 0,t??{})}return r._$AI(n),r};var j=class extends pt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=el(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Je}};j._$litElement$=!0,j.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:j});var $p=globalThis.litElementPolyfillSupport;$p?.({LitElement:j});(globalThis.litElementVersions??=[]).push("4.0.6");var Cp="Free",nr,tl,Xn=class extends $s(j){constructor(){super();b(this,nr);this.planConfigs}render(){return O`
1
+ var Fc=Object.defineProperty;var ta=n=>{throw TypeError(n)};var Mc=(n,e,t)=>e in n?Fc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var S=(n,e,t)=>Mc(n,typeof e!="symbol"?e+"":e,t),us=(n,e,t)=>e.has(n)||ta("Cannot "+t);var h=(n,e,t)=>(us(n,e,"read from private field"),t?t.call(n):e.get(n)),b=(n,e,t)=>e.has(n)?ta("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,i)=>(us(n,e,"write to private field"),i?i.call(n,t):e.set(n,t),t),R=(n,e,t)=>(us(n,e,"access private method"),t);var na=(n,e,t,i)=>({set _(r){$(n,e,r,t)},get _(){return h(n,e,i)}});function _s(n){return[...n.v,(n.i?"!":"")+n.n].join(":")}function Dc(n,e=","){return n.map(_s).join(e)}var ua=typeof CSS<"u"&&CSS.escape||(n=>n.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Di(n){for(var e=9,t=n.length;t--;)e=Math.imul(e^n.charCodeAt(t),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function qi(n,e="@media "){return e+J(n).map(t=>(typeof t=="string"&&(t={min:t}),t.raw||Object.keys(t).map(i=>`(${i}-width:${t[i]})`).join(" and "))).join(",")}function J(n=[]){return Array.isArray(n)?n:n==null?[]:[n]}function ia(n){return n}function Ni(){}var ce={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function ca(n){return n.match(/[-=:;]/g)?.length||0}function ds(n){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(n)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(ca(n),15)<<18}var Lc=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function bs({n,i:e,v:t=[]},i,r,s){n&&(n=_s({n,i:e,v:t})),s=[...J(s)];for(let a of t){let l=i.theme("screens",a);for(let u of J(l&&qi(l)||i.v(a))){var o;s.push(u),r|=l?67108864|ds(u):a=="dark"?1073741824:u[0]=="@"?ds(u):(o=u,1<<~(/:([a-z-]+)/.test(o)&&~Lc.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n,p:r,r:s,i:e}}var pa=new Map;function gs(n){if(n.d){let e=[],t=cs(n.r.reduce((i,r)=>r[0]=="@"?(e.push(r),i):r?cs(i,s=>cs(r,o=>{let a=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(a){let l=s.indexOf(a[1]);return~l?s.slice(0,l)+a[0]+s.slice(l+a[1].length):ps(s,o)}return ps(o,s)})):i,"&"),i=>ps(i,n.n?"."+ua(n.n):""));return t&&e.push(t.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((i,r)=>r+"{"+i+"}",n.d)}}function cs(n,e){return n.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(t,i,r)=>e(i)+r)}function ps(n,e){return n.replace(/&/g,e)}var ra=new Intl.Collator("en",{numeric:!0});function fa(n,e){for(var t=0,i=n.length;t<i;){let r=i+t>>1;0>=ha(n[r],e)?t=r+1:i=r}return i}function ha(n,e){let t=n.p&ce.o;return t==(e.p&ce.o)&&(t==ce.b||t==ce.o)?0:n.p-e.p||n.o-e.o||ra.compare(sa(n.n),sa(e.n))||ra.compare(oa(n.n),oa(e.n))}function sa(n){return(n||"").split(/:/).pop().split("/").pop()||"\0"}function oa(n){return(n||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function fs(n,e){return Math.round(parseInt(n,16)*e)}function ze(n,e={}){if(typeof n=="function")return n(e);let{opacityValue:t="1",opacityVariable:i}=e,r=i?`var(${i})`:t;if(n.includes("<alpha-value>"))return n.replace("<alpha-value>",r);if(n[0]=="#"&&(n.length==4||n.length==7)){let s=(n.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[fs(n.substr(1,s),o),fs(n.substr(1+s,s),o),fs(n.substr(1+2*s,s),o),r]})`}return r=="1"?n:r=="0"?"#0000":n.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${r})`)}function da(n,e,t,i,r=[]){return function s(o,{n:a,p:l,r:u=[],i:c},p){let f=[],d="",g=0,v=0;for(let E in o||{}){var k,L;let F=o[E];if(E[0]=="@"){if(!F)continue;if(E[1]=="a"){f.push(...xs(a,l,ji(""+F),p,l,u,c,!0));continue}if(E[1]=="l"){for(let U of J(F))f.push(...s(U,{n:a,p:(k=ce[E[7]],l&~ce.o|k),r:E[7]=="d"?[]:u,i:c},p));continue}if(E[1]=="i"){f.push(...J(F).map(U=>({p:-1,o:0,r:[],d:E+" "+U})));continue}if(E[1]=="k"){f.push({p:ce.d,o:0,r:[E],d:s(F,{p:ce.d},p).map(gs).join("")});continue}if(E[1]=="f"){f.push(...J(F).map(U=>({p:ce.d,o:0,r:[E],d:s(U,{p:ce.d},p).map(gs).join("")})));continue}}if(typeof F!="object"||Array.isArray(F))E=="label"&&F?a=F+Di(JSON.stringify([l,c,o])):(F||F===0)&&(E=E.replace(/[A-Z]/g,U=>"-"+U.toLowerCase()),v+=1,g=Math.max(g,(L=E)[0]=="-"?0:ca(L)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(L)?+!!RegExp.$1||-!!RegExp.$2:0)+1),d+=(d?";":"")+J(F).map(U=>p.s(E,ws(""+U,p.theme)+(c?" !important":""))).join(";"));else if(E[0]=="@"||E.includes("&")){let U=l;E[0]=="@"&&(E=E.replace(/\bscreen\(([^)]+)\)/g,(G,Q)=>{let K=p.theme("screens",Q);return K?(U|=67108864,qi(K,"")):G}),U|=ds(E)),f.push(...s(F,{n:a,p:U,r:[...u,E],i:c},p))}else f.push(...s(F,{p:l,r:[...u,E]},p))}return f.unshift({n:a,p:l,o:Math.max(0,15-v)+1.5*Math.min(g||15,15),r:u,d}),f.sort(ha)}(n,bs(e,t,i,r),t)}function ws(n,e){return n.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(t,i,r,s,o="")=>{let a=e(r,o);return typeof a=="function"&&/color|fill|stroke/i.test(r)?ze(a):""+J(a).filter(l=>Object(l)!==l)})}function ga(n,e){let t,i=[];for(let r of n)r.d&&r.n?t?.p==r.p&&""+t.r==""+r.r?(t.c=[t.c,r.c].filter(Boolean).join(" "),t.d=t.d+";"+r.d):i.push(t={...r,n:r.n&&e}):i.push({...r,n:r.n&&e});return i}function Li(n,e,t=ce.u,i,r){let s=[];for(let o of n)for(let a of function(l,u,c,p,f){l={...l,i:l.i||f};let d=function(g,v){let k=pa.get(g.n);return k?k(g,v):v.r(g.n,g.v[0]=="dark")}(l,u);return d?typeof d=="string"?({r:p,p:c}=bs(l,u,c,p),ga(Li(ji(d),u,c,p,l.i),l.n)):Array.isArray(d)?d.map(g=>{var v,k;return{o:0,...g,r:[...J(p),...J(g.r)],p:(v=c,k=g.p??c,v&~ce.o|k)}}):da(d,l,u,c,p):[{c:_s(l),p:0,o:0,r:[]}]}(o,e,t,i,r))s.splice(fa(s,a),0,a);return s}function xs(n,e,t,i,r,s,o,a){return ga((a?t.flatMap(l=>Li([l],i,r,s,o)):Li(t,i,r,s,o)).map(l=>l.p&ce.o&&(l.n||e==ce.b)?{...l,p:l.p&~ce.o|e,o:0}:l),n)}function jc(n,e,t,i){var r;return r=(s,o)=>{let{n:a,p:l,r:u,i:c}=bs(s,o,e);return t&&xs(a,e,t,o,l,u,c,i)},pa.set(n,r),n}function hs(n,e,t){if(n[n.length-1]!="("){let i=[],r=!1,s=!1,o="";for(let a of n)if(!(a=="("||/[~@]$/.test(a))){if(a[0]=="!"&&(a=a.slice(1),r=!r),a.endsWith(":")){i[a=="dark:"?"unshift":"push"](a.slice(0,-1));continue}a[0]=="-"&&(a=a.slice(1),s=!s),a.endsWith("-")&&(a=a.slice(0,-1)),a&&a!="&"&&(o+=(o&&"-")+a)}o&&(s&&(o="-"+o),e[0].push({n:o,v:i.filter(qc),i:r}))}}function qc(n,e,t){return t.indexOf(n)==e}var aa=new Map;function ji(n){let e=aa.get(n);if(!e){let t=[],i=[[]],r=0,s=0,o=null,a=0,l=(u,c=0)=>{r!=a&&(t.push(n.slice(r,a+c)),u&&hs(t,i)),r=a+1};for(;a<n.length;a++){let u=n[a];if(s)n[a-1]!="\\"&&(s+=+(u=="[")||-(u=="]"));else if(u=="[")s+=1;else if(o)n[a-1]!="\\"&&o.test(n.slice(a))&&(o=null,r=a+RegExp.lastMatch.length);else if(u=="/"&&n[a-1]!="\\"&&(n[a+1]=="*"||n[a+1]=="/"))o=n[a+1]=="*"?/^\*\//:/^[\r\n]/;else if(u=="(")l(),t.push(u);else if(u==":")n[a+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(u)){l(!0);let c=t.lastIndexOf("(");if(u==")"){let p=t[c-1];if(/[~@]$/.test(p)){let f=i.shift();t.length=c,hs([...t,"#"],i);let{v:d}=i[0].pop();for(let g of f)g.v.splice(+(g.v[0]=="dark")-+(d[0]=="dark"),d.length);hs([...t,jc(p.length>1?p.slice(0,-1)+Di(JSON.stringify([p,f])):p+"("+Dc(f)+")",ce.a,f,/@$/.test(p))],i)}c=t.lastIndexOf("(",c-1)}t.length=c+1}else/[~@]/.test(u)&&n[a+1]=="("&&i.unshift([])}l(!0),aa.set(n,e=i[0])}return e}function _(n,e,t){return[n,vs(e,t)]}function vs(n,e){return typeof n=="function"?n:typeof n=="string"&&/^[\w-]+$/.test(n)?(t,i)=>({[n]:e?e(t,i):ms(t,1)}):t=>n||{[t[1]]:ms(t,2)}}function ms(n,e,t=n.slice(e).find(Boolean)||n.$$||n.input){return n.input[0]=="-"?`calc(${t} * -1)`:t}function w(n,e,t,i){return[n,ks(e,t,i)]}function ks(n,e,t){let i=typeof e=="string"?(r,s)=>({[e]:t?t(r,s):r._}):e||(({1:r,_:s},o,a)=>({[r||a]:s}));return(r,s)=>{let o=va(n||r[1]),a=s.theme(o,r.$$)??nt(r.$$,o,s);if(a!=null)return r._=ms(r,0,a),i(r,s,o)}}function pe(n,e={},t){return[n,Nc(e,t)]}function Nc(n={},e){return(t,i)=>{let{section:r=va(t[0]).replace("-","")+"Color"}=n,[s,o]=Uc(t.$$);if(!s)return;let a=i.theme(r,s)||nt(s,r,i);if(!a||typeof a=="object")return;let{opacityVariable:l=`--tw-${t[0].replace(/-$/,"")}-opacity`,opacitySection:u=r.replace("Color","Opacity"),property:c=r,selector:p}=n,f=i.theme(u,o||"DEFAULT")||o&&nt(o,u,i),d=e||(({_:v})=>{let k=Nn(c,v);return p?{[p]:k}:k});t._={value:ze(a,{opacityVariable:l||void 0,opacityValue:f||void 0}),color:v=>ze(a,v),opacityVariable:l||void 0,opacityValue:f||void 0};let g=d(t,i);if(!t.dark){let v=i.d(r,s,a);v&&v!==a&&(t._={value:ze(v,{opacityVariable:l||void 0,opacityValue:f||"1"}),color:k=>ze(v,k),opacityVariable:l||void 0,opacityValue:f||void 0},g={"&":g,[i.v("dark")]:d(t,i)})}return g}}function Uc(n){return(n.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Nn(n,e){let t={};return typeof e=="string"?t[n]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(t[e.opacityVariable]=e.opacityValue||"1"),t[n]=e.value),t}function nt(n,e,t){if(n[0]=="["&&n.slice(-1)=="]"){if(n=an(ws(n.slice(1,-1),t.theme)),!e)return n;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(n)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(n))||/image/i.test(e)&&!(/^image:/.test(n)||/^[a-z-]+\(/.test(n))||/weight/i.test(e)&&!(/^(number|any):/.test(n)||/^\d+$/.test(n))||/position/i.test(e)&&/^(length|size):/.test(n)))return n.replace(/^[a-z-]+:/,"")}}function va(n){return n.replace(/-./g,e=>e[1].toUpperCase())}function an(n){return n.includes("url(")?n.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,t="",i,r="")=>an(t)+i+an(r)):n.replace(/(^|[^\\])_+/g,(e,t)=>t+" ".repeat(e.length-t.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Un({presets:n=[],...e}){let t={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:J(e.variants),rules:J(e.rules),ignorelist:J(e.ignorelist),hash:void 0,stringify:(i,r)=>i+":"+r,finalize:[]};for(let i of J([...n,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&J(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:r,darkMode:s=t.darkMode,darkColor:o=t.darkColor,theme:a,variants:l,rules:u,ignorelist:c,hash:p=t.hash,stringify:f=t.stringify,finalize:d}=typeof i=="function"?i(t):i;t={preflight:t.preflight!==!1&&r!==!1&&[...t.preflight,...J(r)],darkMode:s,darkColor:o,theme:{...t.theme,...a,extend:{...t.theme.extend,...a?.extend}},variants:[...t.variants,...J(l)],rules:[...t.rules,...J(u)],ignorelist:[...t.ignorelist,...J(c)],hash:p,stringify:f,finalize:[...t.finalize,...J(d)]}}return t}function la(n,e,t,i,r,s){for(let o of e){let a=t.get(o);a||t.set(o,a=i(o));let l=a(n,r,s);if(l)return l}}function Bc(n){var e;return ys(n[0],typeof(e=n[1])=="function"?e:()=>e)}function zc(n){var e,t;return Array.isArray(n)?ys(n[0],vs(n[1],n[2])):ys(n,vs(e,t))}function ys(n,e){return ma(n,(t,i,r,s)=>{let o=i.exec(t);if(o)return o.$$=t.slice(o[0].length),o.dark=s,e(o,r)})}function ma(n,e){let t=J(n).map(Hc);return(i,r,s)=>{for(let o of t){let a=e(i,o,r,s);if(a)return a}}}function Hc(n){return typeof n=="string"?RegExp("^"+n+(n.includes("$")||n.slice(-1)=="-"?"":"$")):n}function ya(n,e){let t=Un(n),i=function({theme:l,darkMode:u,darkColor:c=Ni,variants:p,rules:f,hash:d,stringify:g,ignorelist:v,finalize:k}){let L=new Map,E=new Map,F=new Map,U=new Map,G=ma(v,(I,oe)=>oe.test(I));p.push(["dark",Array.isArray(u)||u=="class"?`${J(u)[1]||".dark"} &`:typeof u=="string"&&u!="media"?u:"@media (prefers-color-scheme:dark)"]);let Q=typeof d=="function"?I=>d(I,Di):d?Di:ia;Q!==ia&&k.push(I=>({...I,n:I.n&&Q(I.n),d:I.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(oe,ee)=>"--"+Q(ee).replace("#",""))}));let K={theme:function({extend:I={},...oe}){let ee={},ut={get colors(){return ve("colors")},theme:ve,negative(){return{}},breakpoints(V){let Z={};for(let ae in V)typeof V[ae]=="string"&&(Z["screen-"+ae]=V[ae]);return Z}};return ve;function ve(V,Z,ae,Fe){if(V){if({1:V,2:Fe}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(V)||[,V],/[.[]/.test(V)){let Se=[];V.replace(/\[([^\]]+)\]|([^.[]+)/g,(te,me,Ce=me)=>Se.push(Ce)),V=Se.shift(),ae=Z,Z=Se.join("-")}let ie=ee[V]||Object.assign(Object.assign(ee[V]={},Be(oe,V)),Be(I,V));if(Z==null)return ie;Z||(Z="DEFAULT");let ke=ie[Z]??Z.split("-").reduce((Se,te)=>Se?.[te],ie)??ae;return Fe?ze(ke,{opacityValue:ws(Fe,ve)}):ke}let je={};for(let ie of[...Object.keys(oe),...Object.keys(I)])je[ie]=ve(ie);return je}function Be(V,Z){let ae=V[Z];return typeof ae=="function"&&(ae=ae(ut)),ae&&/color|fill|stroke/i.test(Z)?function Fe(je,ie=[]){let ke={};for(let Se in je){let te=je[Se],me=[...ie,Se];ke[me.join("-")]=te,Se=="DEFAULT"&&(me=ie,ke[ie.join("-")]=te),typeof te=="object"&&Object.assign(ke,Fe(te,me))}return ke}(ae):ae}}(l),e:ua,h:Q,s(I,oe){return g(I,oe,K)},d(I,oe,ee){return c(I,oe,K,ee)},v(I){return L.has(I)||L.set(I,la(I,p,E,Bc,K)||"&:"+I),L.get(I)},r(I,oe){let ee=JSON.stringify([I,oe]);return F.has(ee)||F.set(ee,!G(I,K)&&la(I,f,U,zc,K,oe)),F.get(ee)},f(I){return k.reduce((oe,ee)=>ee(oe,K),I)}};return K}(t),r=new Map,s=[],o=new Set;e.resume(l=>r.set(l,l),(l,u)=>{e.insert(l,s.length,u),s.push(u),o.add(l)});function a(l){let u=i.f(l),c=gs(u);if(c&&!o.has(c)){o.add(c);let p=fa(s,l);e.insert(c,p,l),s.splice(p,0,l)}return u.n}return Object.defineProperties(function(u){if(!r.size)for(let p of J(t.preflight))typeof p=="function"&&(p=p(i)),p&&(typeof p=="string"?xs("",ce.b,ji(p),i,ce.b,[],!1,!0):da(p,{},i,ce.b)).forEach(a);u=""+u;let c=r.get(u);if(!c){let p=new Set;for(let f of Li(ji(u),i))p.add(f.c).add(a(f));c=[...p].filter(Boolean).join(" "),r.set(u,c).set(c,c)}return c},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:i.theme,config:t,snapshot(){let l=e.snapshot(),u=new Set(o),c=new Map(r),p=[...s];return()=>{l(),o=u,r=c,s=p}},clear(){e.clear(),o=new Set,r=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function Wc(n,e){return n!=e&&""+n.split(" ").sort()!=""+e.split(" ").sort()}function _a(n){let e=new MutationObserver(t);return{observe(r){e.observe(r,{attributeFilter:["class"],subtree:!0,childList:!0}),i(r),t([{target:r,type:""}])},disconnect(){e.disconnect()}};function t(r){for(let{type:s,target:o}of r)if(s[0]=="a")i(o);else for(let a of o.querySelectorAll("[class]"))i(a);e.takeRecords()}function i(r){let s,o=r.getAttribute?.("class");o&&Wc(o,s=n(o))&&r.setAttribute("class",s)}}function Gc(n){let e=document.querySelector(n||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function Ui(n){let e=n?.cssRules?n:(n&&typeof n!="string"?n:Gc(n)).sheet;return{target:e,snapshot(){let t=Array.from(e.cssRules,i=>i.cssText);return()=>{this.clear(),t.forEach(this.insert)}},clear(){for(let t=e.cssRules.length;t--;)e.deleteRule(t)},destroy(){e.ownerNode?.remove()},insert(t,i){try{e.insertRule(t,i)}catch{e.insertRule(":root{}",i)}},resume:Ni}}var Vc=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function ba(n){return Vc.get(n)}function wa(n){var e=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(n);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function xa(n,e){var t=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(n);return t?t[1]?/^sti/i.test(e)?1:0:t[2]?/^pat/i.test(e)?1:0:t[3]?/^image-/i.test(e)?1:0:t[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var Xc=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Bi(){return({stringify:n})=>({stringify(e,t,i){let r="",s=ba(e);s&&(r+=n(s,t,i)+";");let o=wa(e),a=xa(e,t);for(let l of Xc)o&l[1]&&(r+=n(l[0]+e,t,i)+";"),a&l[1]&&(r+=n(e,l[0]+t,i)+";");return r+n(e,t,i)}})}function zi(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",ks("lineClamp",({_:n})=>ka(n))],["line-clamp-(\\d+)",({1:n})=>ka(n)]]}}function ka(n){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${n}`}}var zn={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...qe(4,"rem",4,.5,.5),...qe(12,"rem",4,5),14:"3.5rem",...qe(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:B("blur"),backdropBrightness:B("brightness"),backdropContrast:B("contrast"),backdropGrayscale:B("grayscale"),backdropHueRotate:B("hueRotate"),backdropInvert:B("invert"),backdropOpacity:B("opacity"),backdropSaturate:B("saturate"),backdropSepia:B("sepia"),backgroundColor:B("colors"),backgroundImage:{none:"none"},backgroundOpacity:B("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...qe(200,"",100,0,50),...qe(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:n})=>({DEFAULT:n("colors.gray.200","currentColor"),...n("colors")}),borderOpacity:B("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:B("spacing"),borderWidth:{DEFAULT:"1px",...He(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:B("colors"),caretColor:B("colors"),accentColor:({theme:n})=>({auto:"auto",...n("colors")}),contrast:{...qe(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:B("borderColor"),divideOpacity:B("borderOpacity"),divideWidth:B("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:n})=>({...n("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:n})=>({...n("spacing"),...Bn(2,6),...Bn(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:B("spacing"),gradientColorStops:B("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:n})=>({...n("spacing"),...Bn(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:n})=>({...n("spacing"),...Bn(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...qe(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:n})=>({auto:"auto",...n("spacing")}),maxHeight:({theme:n})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...n("spacing")}),maxWidth:({theme:n,breakpoints:e})=>({...e(n("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...qe(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:B("spacing"),placeholderColor:B("colors"),placeholderOpacity:B("opacity"),outlineColor:B("colors"),outlineOffset:He(8,"px"),outlineWidth:He(8,"px"),ringColor:({theme:n})=>({...n("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:B("colors"),ringOffsetWidth:He(8,"px"),ringOpacity:({theme:n})=>({...n("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...He(8,"px")},rotate:{...He(2,"deg"),...He(12,"deg",3),...He(180,"deg",45)},saturate:qe(200,"",100,0,50),scale:{...qe(150,"",100,0,50),...qe(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:B("spacing"),scrollPadding:B("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...He(2,"deg"),...He(12,"deg",3)},space:B("spacing"),stroke:({theme:n})=>({...n("colors"),none:"none"}),strokeWidth:qe(2),textColor:B("colors"),textDecorationColor:B("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...He(8,"px")},textUnderlineOffset:{auto:"auto",...He(8,"px")},textIndent:B("spacing"),textOpacity:B("opacity"),transitionDuration:({theme:n})=>({...n("durations"),DEFAULT:"150ms"}),transitionDelay:B("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:n})=>({...n("spacing"),...Bn(2,4),full:"100%"}),width:({theme:n})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...n("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...qe(50,"",1,0,10),auto:"auto"}};function Bn(n,e){let t={};do for(var i=1;i<n;i++)t[`${i}/${n}`]=Number((i/n*100).toFixed(6))+"%";while(++n<=e);return t}function He(n,e,t=0){let i={};for(;t<=n;t=2*t||1)i[t]=t+e;return i}function qe(n,e="",t=1,i=0,r=1,s={}){for(;i<=n;i+=r)s[i]=i/t+e;return s}function B(n){return({theme:e})=>e(n)}var Sa={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${zn.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${zn.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}};var Ta=[_("\\[([-\\w]+):(.+)]",({1:n,2:e},t)=>({"@layer overrides":{"&":{[n]:nt(`[${e}]`,"",t)}}})),_("(group|peer)([~/][^-[]+)?",({input:n},{h:e})=>[{c:e(n)}]),w("aspect-","aspectRatio"),_("container",(n,{theme:e})=>{let{screens:t=e("screens"),center:i,padding:r}=e("container"),s={width:"100%",marginRight:i&&"auto",marginLeft:i&&"auto",...o("xs")};for(let a in t){let l=t[a];typeof l=="string"&&(s[qi(l)]={"&":{maxWidth:l,...o(a)}})}return s;function o(a){let l=r&&(typeof r=="string"?r:r[a]||r.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),w("content-","content",({_:n})=>({"--tw-content":n,content:"var(--tw-content)"})),_("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),_("box-(border|content)","boxSizing",({1:n})=>n+"-box"),_("hidden",{display:"none"}),_("table-(auto|fixed)","tableLayout"),_(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",_("isolate","isolation"),_("object-(contain|cover|fill|none|scale-down)","objectFit"),w("object-","objectPosition"),_("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Hi),_("overscroll(-[xy])?-(auto|contain|none)",({1:n="",2:e})=>({["overscroll-behavior"+n]:e})),_("(static|fixed|absolute|relative|sticky)","position"),w("-?inset(-[xy])?(?:$|-)","inset",({1:n,_:e})=>({top:n!="-x"&&e,right:n!="-y"&&e,bottom:n!="-x"&&e,left:n!="-y"&&e})),w("-?(top|bottom|left|right)(?:$|-)","inset"),_("(visible|collapse)","visibility"),_("invisible",{visibility:"hidden"}),w("-?z-","zIndex"),_("flex-((row|col)(-reverse)?)","flexDirection",Ea),_("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),w("(flex-(?:grow|shrink))(?:$|-)"),w("(flex)-"),w("grow(?:$|-)","flexGrow"),w("shrink(?:$|-)","flexShrink"),w("basis-","flexBasis"),w("-?(order)-"),"-?(order)-(\\d+)",w("grid-cols-","gridTemplateColumns"),_("grid-cols-(\\d+)","gridTemplateColumns",Ia),w("col-","gridColumn"),_("col-(span)-(\\d+)","gridColumn",Aa),w("col-start-","gridColumnStart"),_("col-start-(auto|\\d+)","gridColumnStart"),w("col-end-","gridColumnEnd"),_("col-end-(auto|\\d+)","gridColumnEnd"),w("grid-rows-","gridTemplateRows"),_("grid-rows-(\\d+)","gridTemplateRows",Ia),w("row-","gridRow"),_("row-(span)-(\\d+)","gridRow",Aa),w("row-start-","gridRowStart"),_("row-start-(auto|\\d+)","gridRowStart"),w("row-end-","gridRowEnd"),_("row-end-(auto|\\d+)","gridRowEnd"),_("grid-flow-((row|col)(-dense)?)","gridAutoFlow",n=>Hi(Ea(n))),_("grid-flow-(dense)","gridAutoFlow"),w("auto-cols-","gridAutoColumns"),w("auto-rows-","gridAutoRows"),w("gap-x(?:$|-)","gap","columnGap"),w("gap-y(?:$|-)","gap","rowGap"),w("gap(?:$|-)","gap"),"(justify-(?:items|self))-",_("justify-","justifyContent",$a),_("(content|items|self)-",n=>({["align-"+n[1]]:$a(n)})),_("(place-(content|items|self))-",({1:n,$$:e})=>({[n]:("wun".includes(e[3])?"space-":"")+e})),w("p([xytrbl])?(?:$|-)","padding",ln("padding")),w("-?m([xytrbl])?(?:$|-)","margin",ln("margin")),w("-?space-(x|y)(?:$|-)","space",({1:n,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${n}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[n]]:`calc(${e} * calc(1 - var(--tw-space-${n}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[n]]:`calc(${e} * var(--tw-space-${n}-reverse))`}})),_("space-(x|y)-reverse",({1:n})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${n}-reverse`]:"1"}})),w("w-","width"),w("min-w-","minWidth"),w("max-w-","maxWidth"),w("h-","height"),w("min-h-","minHeight"),w("max-h-","maxHeight"),w("font-","fontWeight"),w("font-","fontFamily",({_:n})=>typeof(n=J(n))[1]=="string"?{fontFamily:Xe(n)}:{fontFamily:Xe(n[0]),...n[1]}),_("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),_("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),_("italic","fontStyle"),_("not-italic",{fontStyle:"normal"}),_("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:n,2:e="",3:t})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(t?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":n)]:n,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...xt({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),w("tracking-","letterSpacing"),w("leading-","lineHeight"),_("list-(inside|outside)","listStylePosition"),w("list-","listStyleType"),_("list-","listStyleType"),w("placeholder-opacity-","placeholderOpacity",({_:n})=>({"&::placeholder":{"--tw-placeholder-opacity":n}})),pe("placeholder-",{property:"color",selector:"&::placeholder"}),_("text-(left|center|right|justify|start|end)","textAlign"),_("text-(ellipsis|clip)","textOverflow"),w("text-opacity-","textOpacity","--tw-text-opacity"),pe("text-",{property:"color"}),w("text-","fontSize",({_:n})=>typeof n=="string"?{fontSize:n}:{fontSize:n[0],...typeof n[1]=="string"?{lineHeight:n[1]}:n[1]}),w("indent-","textIndent"),_("(overline|underline|line-through)","textDecorationLine"),_("no-underline",{textDecorationLine:"none"}),w("underline-offset-","textUnderlineOffset"),pe("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),w("decoration-","textDecorationThickness"),_("decoration-","textDecorationStyle"),_("(uppercase|lowercase|capitalize)","textTransform"),_("normal-case",{textTransform:"none"}),_("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),_("align-","verticalAlign"),_("whitespace-","whiteSpace"),_("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),_("break-words",{overflowWrap:"break-word"}),_("break-all",{wordBreak:"break-all"}),_("break-keep",{wordBreak:"keep-all"}),pe("caret-",{opacityVariable:!1,opacitySection:"opacity"}),pe("accent-",{opacityVariable:!1,opacitySection:"opacity"}),_("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:n})=>`linear-gradient(to ${Ut(n," ")},var(--tw-gradient-stops))`),pe("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:n})=>({"--tw-gradient-from":n.value,"--tw-gradient-to":n.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),pe("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:n})=>({"--tw-gradient-to":n.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${n.value},var(--tw-gradient-to)`})),pe("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),_("bg-(fixed|local|scroll)","backgroundAttachment"),_("bg-origin-(border|padding|content)","backgroundOrigin",({1:n})=>n+"-box"),_(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),_("bg-blend-","backgroundBlendMode"),_("bg-clip-(border|padding|content|text)","backgroundClip",({1:n})=>n+(n=="text"?"":"-box")),w("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),pe("bg-",{section:"backgroundColor"}),w("bg-","backgroundImage"),w("bg-","backgroundPosition"),_("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Hi),w("bg-","backgroundSize"),w("rounded(?:$|-)","borderRadius"),w("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:n,_:e})=>{let t={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[n]||[n,n];return{[`border-${Ut(t[0])}-radius`]:e,[`border-${Ut(t[1])}-radius`]:e}}),_("border-(collapse|separate)","borderCollapse"),w("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),_("border-(solid|dashed|dotted|double|none)","borderStyle"),w("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:n,_:e})=>({...xt({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(n||"-x")]:e,["--tw-border-spacing"+(n||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),pe("border-([xytrbl])-",{section:"borderColor"},ln("border","Color")),pe("border-"),w("border-([xytrbl])(?:$|-)","borderWidth",ln("border","Width")),w("border(?:$|-)","borderWidth"),w("divide-opacity(?:$|-)","divideOpacity",({_:n})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":n}})),_("divide-(solid|dashed|dotted|double|none)",({1:n})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:n}})),_("divide-([xy]-reverse)",({1:n})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+n]:"1"}})),w("divide-([xy])(?:$|-)","divideWidth",({1:n,_:e})=>{let t={x:"lr",y:"tb"}[n];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${n}-reverse`]:"0",[`border-${Ut(t[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${n}-reverse)))`,[`border-${Ut(t[1])}Width`]:`calc(${e} * var(--tw-divide-${n}-reverse))`}}}),pe("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),w("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),pe("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),w("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),_("ring-inset",{"--tw-ring-inset":"inset"}),pe("ring-",{property:"--tw-ring-color"}),w("ring(?:$|-)","ringWidth",({_:n},{theme:e})=>({...xt({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":ze(e("ringOffsetColor","","#fff")),"--tw-ring-color":ze(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${n} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),pe("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:n})=>({"--tw-shadow-color":n.value,"--tw-shadow":"var(--tw-shadow-colored)"})),w("shadow(?:$|-)","boxShadow",({_:n})=>({...xt({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":Xe(n),"--tw-shadow-colored":Xe(n).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),w("(opacity)-"),_("mix-blend-","mixBlendMode"),...Ca(),...Ca("backdrop-"),w("transition(?:$|-)","transitionProperty",(n,{theme:e})=>({transitionProperty:Xe(n),transitionTimingFunction:n._=="none"?void 0:Xe(e("transitionTimingFunction","")),transitionDuration:n._=="none"?void 0:Xe(e("transitionDuration",""))})),w("duration(?:$|-)","transitionDuration","transitionDuration",Xe),w("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Xe),w("delay(?:$|-)","transitionDelay","transitionDelay",Xe),w("animate(?:$|-)","animation",(n,{theme:e,h:t,e:i})=>{let r=Xe(n),s=r.split(" "),o=e("keyframes",s[0]);return o?{["@keyframes "+(s[0]=i(t(s[0])))]:o,animation:s.join(" ")}:{animation:r}}),"(transform)-(none)",_("transform",Es),_("transform-(cpu|gpu)",({1:n})=>({"--tw-transform":Ra(n=="gpu")})),w("scale(-[xy])?-","scale",({1:n,_:e})=>({["--tw-scale"+(n||"-x")]:e,["--tw-scale"+(n||"-y")]:e,...Es()})),w("-?(rotate)-","rotate",Ss),w("-?(translate-[xy])-","translate",Ss),w("-?(skew-[xy])-","skew",Ss),_("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Hi),"(appearance)-",w("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",w("(cursor)-"),"(cursor)-",_("snap-(none)","scroll-snap-type"),_("snap-(x|y|both)",({1:n})=>({...xt({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":n+" var(--tw-scroll-snap-strictness)"})),_("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),_("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),_("snap-(normal|always)","scroll-snap-stop"),_("scroll-(auto|smooth)","scroll-behavior"),w("scroll-p([xytrbl])?(?:$|-)","padding",ln("scroll-padding")),w("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",ln("scroll-margin")),_("touch-(auto|none|manipulation)","touch-action"),_("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:n,2:e,3:t})=>({...xt({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":t?"pan-y":n}`]:n,"touch-action":"var(--tw-touch-action)"})),_("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),_("outline",{outlineStyle:"solid"}),_("outline-(dashed|dotted|double)","outlineStyle"),w("-?(outline-offset)-"),pe("outline-",{opacityVariable:!1,opacitySection:"opacity"}),w("outline-","outlineWidth"),"(pointer-events)-",w("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:n})=>({x:"horizontal",y:"vertical"})[n]||n||"both"],_("select-(none|text|all|auto)","userSelect"),pe("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),pe("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),w("stroke-","strokeWidth"),_("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),_("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Hi(n){return(typeof n=="string"?n:n[1]).replace(/-/g," ").trim()}function Ea(n){return(typeof n=="string"?n:n[1]).replace("col","column")}function Ut(n,e="-"){let t=[];for(let i of n)t.push({t:"top",r:"right",b:"bottom",l:"left"}[i]);return t.join(e)}function Xe(n){return n&&""+(n._||n)}function $a({$$:n}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[n[3]||""]||"")+n}function ln(n,e=""){return({1:t,_:i})=>{let r={x:"lr",y:"tb"}[t]||t+t;return r?{...Nn(n+"-"+Ut(r[0])+e,i),...Nn(n+"-"+Ut(r[1])+e,i)}:Nn(n+e,i)}}function Ca(n=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",n&&"opacity","saturate","sepia",!n&&"drop-shadow"].filter(Boolean),t={};for(let i of e)t[`--tw-${n}${i}`]="var(--tw-empty,/*!*/ /*!*/)";return t={...xt(t),[`${n}filter`]:e.map(i=>`var(--tw-${n}${i})`).join(" ")},[`(${n}filter)-(none)`,_(`${n}filter`,t),...e.map(i=>w(`${i[0]=="h"?"-?":""}(${n}${i})(?:$|-)`,i,({1:r,_:s})=>({[`--tw-${r}`]:J(s).map(o=>`${i}(${o})`).join(" "),...t})))]}function Ss({1:n,_:e}){return{["--tw-"+n]:e,...Es()}}function Es(){return{...xt({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Ra()}),transform:"var(--tw-transform)"}}function Ra(n){return[n?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(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))"].join(" ")}function Aa({1:n,2:e}){return`${n} ${e} / ${n} ${e}`}function Ia({1:n}){return`repeat(${n},minmax(0,1fr))`}function xt(n){return{"@layer defaults":{"*,::before,::after":n,"::backdrop":n}}}var Pa=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:n})=>`@media (orientation:${n})`],["contrast-(more|less)",({1:n})=>`@media (prefers-contrast:${n})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:n})=>`&::${n}`],["(marker|selection)",({1:n})=>`& *::${n},&::${n}`],["file","&::file-selector-button"],["(first|last|only)",({1:n})=>`&:${n}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:n,$$:e},t)=>e&&`&[${n}-${t.theme(n,e)||nt(e,"",t)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:n,3:e="",4:t,5:i="",6:r=e},{e:s,h:o,v:a})=>{let l=an(i)||(t[0]=="["?t:a(t.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(n+r))})`)}${n[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:n})=>`[dir="${n}"] &`],["supports-",({$$:n},e)=>{if(n&&(n=e.theme("supports",n)||nt(n,"",e)),n)return n.includes(":")||(n+=":var(--tw)"),/^\w*\s*\(/.test(n)||(n=`(${n})`),`@supports ${n.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:n},e)=>{if(n&&(n=e.theme("screens",n)||nt(n,"",e)),typeof n=="string")return`@media not all and (min-width:${n})`}],["min-",({$$:n},e)=>(n&&(n=nt(n,"",e)),n&&`@media (min-width:${n})`)],[/^\[(.+)]$/,({1:n})=>/[&@]/.test(n)&&an(n).replace(/[}]+$/,"").split("{")]];function Oa({colors:n,disablePreflight:e}={}){return{preflight:e?void 0:Sa,theme:{...zn,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...n}},variants:Pa,rules:Ta,finalize(t){return t.n&&t.d&&t.r.some(i=>/^&::(before|after)$/.test(i))&&!/(^|;)content:/.test(t.d)?{...t,d:"content:var(--tw-content);"+t.d}:t}}}var Jc={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Yc={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Kc={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Qc={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Zc={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},ep={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},tp={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},np={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},ip={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},rp={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},sp={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},op={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},ap={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},lp={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},up={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},cp={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},pp={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},fp={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},hp={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},dp={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},gp={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},vp={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},Fa={__proto__:null,slate:Jc,gray:Yc,zinc:Kc,neutral:Qc,stone:Zc,red:ep,orange:tp,amber:np,yellow:ip,lime:rp,green:sp,emerald:op,teal:ap,cyan:lp,sky:up,blue:cp,indigo:pp,violet:fp,purple:hp,fuchsia:dp,pink:gp,rose:vp};function Wi({disablePreflight:n}={}){return Oa({colors:Fa,disablePreflight:n})}function Gi({className:n="prose",defaultColor:e="gray",extend:t={},colors:i={}}={}){return i={body:"700",headings:"900",lead:"600",links:"900",bold:"900",counters:"500",bullets:"300",hr:"200",quotes:"900","quote-borders":"200",captions:"500",code:"900","pre-code":"200","pre-bg":"800","th-borders":"300","td-borders":"200",...i,dark:i.dark===null?null:{body:"300",headings:"#fff",lead:"400",links:"#fff",bold:"#fff",counters:"400",bullets:"600",hr:"700",quotes:"100","quote-borders":"700",captions:"400",code:"#fff","pre-code":"300","pre-bg":"rgb(0 0 0 / 50%)","th-borders":"600","td-borders":"700",...i.dark}},{variants:[["headings","h1,h2,h3,h4,h5,h6,th"],["h1"],["h2"],["h3"],["h4"],["h5"],["h6"],["p"],["a"],["blockquote"],["figure"],["figcaption"],["strong"],["em"],["code"],["pre"],["ol"],["ul"],["li"],["table"],["thead"],["tr"],["th"],["td"],["img"],["video"],["hr"],["lead",".lead"]].map(([s,o=s])=>[`${n}-${s}`,(a,l)=>La(n,o[0]=="."?"."+l.e(l.h(o.slice(1))):o,l,u=>`& :is(${u.trim()})`)]),rules:[[`(lead|not-${n})`,({1:s},{h:o})=>[{c:o(s)}]],[`${n}-invert`,{"@layer base":{"--tw-prose-body":"var(--tw-prose-invert-body)","--tw-prose-headings":"var(--tw-prose-invert-headings)","--tw-prose-lead":"var(--tw-prose-invert-lead)","--tw-prose-links":"var(--tw-prose-invert-links)","--tw-prose-bold":"var(--tw-prose-invert-bold)","--tw-prose-counters":"var(--tw-prose-invert-counters)","--tw-prose-bullets":"var(--tw-prose-invert-bullets)","--tw-prose-hr":"var(--tw-prose-invert-hr)","--tw-prose-quotes":"var(--tw-prose-invert-quotes)","--tw-prose-quote-borders":"var(--tw-prose-invert-quote-borders)","--tw-prose-captions":"var(--tw-prose-invert-captions)","--tw-prose-code":"var(--tw-prose-invert-code)","--tw-prose-pre-code":"var(--tw-prose-invert-pre-code)","--tw-prose-pre-bg":"var(--tw-prose-invert-pre-bg)","--tw-prose-th-borders":"var(--tw-prose-invert-th-borders)","--tw-prose-td-borders":"var(--tw-prose-invert-td-borders)"}}],[n+"-",({$$:s},o)=>{let a=Da(o.theme("fontSize",s));return a&&{"@layer components":a}}],[n+"-",({$$:s},o)=>r(s,o)],[n,(s,o)=>({...r(e,o),"@layer base":[Ma(n,o,{a:{color:"var(--tw-prose-links)",textDecorationLine:"underline",fontWeight:"500"},strong:{color:"var(--tw-prose-bold)",fontWeight:"600"},"a strong,blockquote strong,thead th strong":{color:"inherit"},ul:{listStyleType:"disc"},ol:{listStyleType:"decimal"},'ol[type="A"]':{listStyleType:"upper-alpha"},'ol[type="a"]':{listStyleType:"lower-alpha"},'ol[type="A" s]':{listStyleType:"upper-alpha"},'ol[type="a" s]':{listStyleType:"lower-alpha"},'ol[type="I"]':{listStyleType:"upper-roman"},'ol[type="i"]':{listStyleType:"lower-roman"},'ol[type="I" s]':{listStyleType:"upper-roman"},'ol[type="i" s]':{listStyleType:"lower-roman"},'ol[type="1"]':{listStyleType:"decimal"},"ol,ul":{marginTop:P(20,16),marginBottom:P(20,16),paddingLeft:P(26,16)},li:{marginTop:P(8,16),marginBottom:P(8,16)},"ol>li,ul>li":{paddingLeft:P(6,16)},">ul>li p":{marginTop:P(12,16),marginBottom:P(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:P(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:P(20,16)},"ol>li::marker":{fontWeight:"400",color:"var(--tw-prose-counters)"},"ul>li::marker":{color:"var(--tw-prose-bullets)"},"ul ul,ul ol,ol ul,ol ol":{marginTop:P(12,16),marginBottom:P(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:P(48,16),marginBottom:P(48,16)},blockquote:{marginTop:P(32,20),marginBottom:P(32,20),paddingLeft:P(20,20),fontWeight:"500",fontStyle:"italic",color:"var(--tw-prose-quotes)",borderLeftWidth:"0.25rem",borderLeftColor:"var(--tw-prose-quote-borders)",quotes:'"\\201C""\\201D""\\2018""\\2019"'},"blockquote p:first-of-type::before":{content:"open-quote"},"blockquote p:last-of-type::after":{content:"close-quote"},p:{marginTop:P(20,16),marginBottom:P(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:P(36,16),marginTop:"0",marginBottom:P(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:P(24,16),marginTop:P(48,24),marginBottom:P(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:P(20,16),marginTop:P(32,20),marginBottom:P(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:P(24,16),marginBottom:P(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:P(32,16),marginBottom:P(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:P(14,16),lineHeight:"1.4",marginTop:P(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:P(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:P(21,24)},"h3 code":{fontSize:P(18,20)},"a code,h1 code,h2 code,h3 code,h4 code,blockquote code,thead th code":{color:"inherit"},pre:{color:"var(--tw-prose-pre-code)",backgroundColor:"var(--tw-prose-pre-bg)",overflowX:"auto",fontWeight:"400",fontSize:P(14,16),lineHeight:"1.7",marginTop:P(24,14),marginBottom:P(24,14),borderRadius:"0.375rem",paddingTop:P(12,14),paddingRight:P(16,14),paddingBottom:P(12,14),paddingLeft:P(16,14)},"pre code":{backgroundColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0",fontWeight:"inherit",color:"inherit",fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit"},"pre code::before":{content:"none"},"pre code::after":{content:"none"},table:{width:"100%",tableLayout:"auto",textAlign:"left",marginTop:P(32,16),marginBottom:P(32,16),fontSize:P(14,16),lineHeight:"1.7"},thead:{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-th-borders)"},"thead th":{color:"var(--tw-prose-headings)",fontWeight:"600",verticalAlign:"bottom",paddingRight:P(8,14),paddingBottom:P(8,14),paddingLeft:P(8,14)},"thead th:first-child":{paddingLeft:"0"},"thead th:last-child":{paddingRight:"0"},"tbody tr":{borderBottomWidth:"1px",borderBottomColor:"var(--tw-prose-td-borders)"},"tbody tr:last-child":{borderBottomWidth:"0"},"tbody td,tfoot td":{verticalAlign:"baseline",paddingTop:P(8,14),paddingRight:P(8,14),paddingBottom:P(8,14),paddingLeft:P(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${o.e(o.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:P(20,16),lineHeight:"1.6",marginTop:P(24,20),marginBottom:P(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Ma(n,o,t)],"@layer components":{...Da(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function r(s,o){let a={},l={},u=(c,p,f)=>{let d=o.theme(`colors.${s}.${p}`,p);f["--tw-prose-"+c]=ze(d);let g=f!=l&&o.d("colors",`${s}-${p}`,d);g&&(l["--tw-prose-"+c]=ze(g))};for(let c in i){let p=i[c];c!="dark"&&p&&u(c,p,a)}for(let c in i.dark||{}){let p=i.dark[c];p&&(i.dark?u("invert-"+c,p,a):u(c,p,l))}return Object.keys(a).length?{"@layer defaults":{"&":a,[o.v("dark")]:l}}:void 0}}function Ma(n,e,t){let i={};for(let r in t)i[La(n,r,e,s=>`.${e.e(e.h(n))}${s}`)]=t[r];return i}function La(n,e,{e:t,h:i},r){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",a=s,l="")=>r(`${o}:where(${a}):not(:where(.${t(i("not-"+n))} *))${l}`))}function Da(n){return n?typeof n=="string"?{fontSize:n}:{fontSize:n[0],...typeof n[1]=="string"?{lineHeight:n[1]}:n[1]}:void 0}function P(n,e){return`${(n/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var $s=Un({darkMode:"class",theme:{extend:{fontFamily:{display:["Space Grotesk","sans-serif"],sans:["Open Sans","sans-serif"],serif:["Roboto Slab","serif"],mono:["Roboto Mono","monospace"]},colors:{primary:{50:"#fdffe4",100:"#f9ffc5",200:"#f1ff92",300:"#e2ff54",400:"#d1fa21",500:"#b9e901",600:"#8ab400",700:"#688902",800:"#526b09",900:"#465a0d",950:"#243300"},secondary:{50:"#fff0fc",100:"#ffe3fc",200:"#ffc6f9",300:"#ff98f2",400:"#ff58e5",500:"#ff27d5",600:"#ff0bbb",700:"#df0095",800:"#b8007b",900:"#980368",950:"#5f003b"},tertiary:{50:"#f3f2ff",100:"#eae7ff",200:"#d7d2ff",300:"#baaeff",400:"#9980ff",500:"#784dff",600:"#6829fe",700:"#601feb",800:"#4b12c5",900:"#3f11a1",950:"#25086d"}}}},presets:[Wi(),Bi(),zi(),Gi()],hash:!1});function Vi(n,e=!0){let t=function(){if(mp)try{let l=Ui(new CSSStyleSheet);return l.connect=u=>{let c=Cs(u);c.adoptedStyleSheets=[...c.adoptedStyleSheets,l.target]},l.disconnect=Ni,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[Ui(s)],a=new WeakMap;return{get target(){return o[0].target},snapshot(){let l=o.map(u=>u.snapshot());return()=>l.forEach(u=>u())},clear(){o.forEach(l=>l.clear())},destroy(){o.forEach(l=>l.destroy())},insert(l,u,c){o[0].insert(l,u,c);let p=this.target.cssRules[u];o.forEach((f,d)=>d&&f.target.insertRule(p.cssText,u))},resume(l,u){return o[0].resume(l,u)},connect(l){let u=document.createElement("style");Cs(l).appendChild(u);let c=Ui(u),{cssRules:p}=this.target;for(let f=0;f<p.length;f++)c.target.insertRule(p[f].cssText,f);o.push(c),a.set(l,c)},disconnect(l){let u=o.indexOf(a.get(l));u>=0&&o.splice(u,1)}}}(),i=ya({...n,hash:n.hash??e},t),r=_a(i);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),t.connect(this),r.observe(Cs(this))}disconnectedCallback(){t.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=i}}}}var mp=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Cs(n){return n.shadowRoot||n.attachShadow({mode:"open"})}var As=n=>Vi($s)(n);var Xi=globalThis,Ji=Xi.ShadowRoot&&(Xi.ShadyCSS===void 0||Xi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Is=Symbol(),ja=new WeakMap,Hn=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Is)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Ji&&e===void 0){let i=t!==void 0&&t.length===1;i&&(e=ja.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&ja.set(t,e))}return e}toString(){return this.cssText}},qa=n=>new Hn(typeof n=="string"?n:n+"",void 0,Is),Ts=(n,...e)=>{let t=n.length===1?n[0]:e.reduce((i,r,s)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+n[s+1],n[0]);return new Hn(t,n,Is)},Rs=(n,e)=>{if(Ji)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let i=document.createElement("style"),r=Xi.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=t.cssText,n.appendChild(i)}},Yi=Ji?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let i of e.cssRules)t+=i.cssText;return qa(t)})(n):n;var{is:yp,defineProperty:_p,getOwnPropertyDescriptor:bp,getOwnPropertyNames:wp,getOwnPropertySymbols:xp,getPrototypeOf:kp}=Object,Ki=globalThis,Na=Ki.trustedTypes,Sp=Na?Na.emptyScript:"",Ep=Ki.reactiveElementPolyfillSupport,Wn=(n,e)=>n,Ps={toAttribute(n,e){switch(e){case Boolean:n=n?Sp:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Ba=(n,e)=>!yp(n,e),Ua={attribute:!0,type:String,converter:Ps,reflect:!1,hasChanged:Ba};Symbol.metadata??=Symbol("metadata"),Ki.litPropertyMetadata??=new WeakMap;var ct=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ua){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){let i=Symbol(),r=this.getPropertyDescriptor(e,i,t);r!==void 0&&_p(this.prototype,e,r)}}static getPropertyDescriptor(e,t,i){let{get:r,set:s}=bp(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get(){return r?.call(this)},set(o){let a=r?.call(this);s.call(this,o),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ua}static _$Ei(){if(this.hasOwnProperty(Wn("elementProperties")))return;let e=kp(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Wn("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Wn("properties"))){let t=this.properties,i=[...wp(t),...xp(t)];for(let r of i)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[i,r]of t)this.elementProperties.set(i,r)}this._$Eh=new Map;for(let[t,i]of this.elementProperties){let r=this._$Eu(t,i);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let r of i)t.unshift(Yi(r))}else e!==void 0&&t.push(Yi(e));return t}static _$Eu(e,t){let i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Rs(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){let i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){let s=(i.converter?.toAttribute!==void 0?i.converter:Ps).toAttribute(t,i.type);this._$Em=e,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,t){let i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let s=i.getPropertyOptions(r),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Ps;this._$Em=r,this[r]=o.fromAttribute(t,s.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??=this.constructor.getPropertyOptions(e),!(i.hasChanged??Ba)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[r,s]of i)s.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.P(r,this[r],s)}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(t)):this._$EU()}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach(t=>this._$EC(t,this[t])),this._$EU()}updated(e){}firstUpdated(e){}};ct.elementStyles=[],ct.shadowRootOptions={mode:"open"},ct[Wn("elementProperties")]=new Map,ct[Wn("finalized")]=new Map,Ep?.({ReactiveElement:ct}),(Ki.reactiveElementVersions??=[]).push("2.0.4");var Fs=globalThis,Qi=Fs.trustedTypes,za=Qi?Qi.createPolicy("lit-html",{createHTML:n=>n}):void 0,Ms="$lit$",pt=`lit$${Math.random().toFixed(9).slice(2)}$`,Ds="?"+pt,$p=`<${Ds}>`,Ht=document,Vn=()=>Ht.createComment(""),Xn=n=>n===null||typeof n!="object"&&typeof n!="function",Ja=Array.isArray,Ya=n=>Ja(n)||typeof n?.[Symbol.iterator]=="function",Os=`[
2
+ \f\r]`,Gn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ha=/-->/g,Wa=/>/g,Bt=RegExp(`>|${Os}(?:([^\\s"'>=/]+)(${Os}*=${Os}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ga=/'/g,Va=/"/g,Ka=/^(?:script|style|textarea|title)$/i,Qa=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),O=Qa(1),hd=Qa(2),Je=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),Xa=new WeakMap,zt=Ht.createTreeWalker(Ht,129);function Za(n,e){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return za!==void 0?za.createHTML(e):e}var el=(n,e)=>{let t=n.length-1,i=[],r,s=e===2?"<svg>":"",o=Gn;for(let a=0;a<t;a++){let l=n[a],u,c,p=-1,f=0;for(;f<l.length&&(o.lastIndex=f,c=o.exec(l),c!==null);)f=o.lastIndex,o===Gn?c[1]==="!--"?o=Ha:c[1]!==void 0?o=Wa:c[2]!==void 0?(Ka.test(c[2])&&(r=RegExp("</"+c[2],"g")),o=Bt):c[3]!==void 0&&(o=Bt):o===Bt?c[0]===">"?(o=r??Gn,p=-1):c[1]===void 0?p=-2:(p=o.lastIndex-c[2].length,u=c[1],o=c[3]===void 0?Bt:c[3]==='"'?Va:Ga):o===Va||o===Ga?o=Bt:o===Ha||o===Wa?o=Gn:(o=Bt,r=void 0);let d=o===Bt&&n[a+1].startsWith("/>")?" ":"";s+=o===Gn?l+$p:p>=0?(i.push(u),l.slice(0,p)+Ms+l.slice(p)+pt+d):l+pt+(p===-2?a:d)}return[Za(n,s+(n[t]||"<?>")+(e===2?"</svg>":"")),i]},Jn=class n{constructor({strings:e,_$litType$:t},i){let r;this.parts=[];let s=0,o=0,a=e.length-1,l=this.parts,[u,c]=el(e,t);if(this.el=n.createElement(u,i),zt.currentNode=this.el.content,t===2){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=zt.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let p of r.getAttributeNames())if(p.endsWith(Ms)){let f=c[o++],d=r.getAttribute(p).split(pt),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:s,name:g[2],strings:d,ctor:g[1]==="."?er:g[1]==="?"?tr:g[1]==="@"?nr:Gt}),r.removeAttribute(p)}else p.startsWith(pt)&&(l.push({type:6,index:s}),r.removeAttribute(p));if(Ka.test(r.tagName)){let p=r.textContent.split(pt),f=p.length-1;if(f>0){r.textContent=Qi?Qi.emptyScript:"";for(let d=0;d<f;d++)r.append(p[d],Vn()),zt.nextNode(),l.push({type:2,index:++s});r.append(p[f],Vn())}}}else if(r.nodeType===8)if(r.data===Ds)l.push({type:2,index:s});else{let p=-1;for(;(p=r.data.indexOf(pt,p+1))!==-1;)l.push({type:7,index:s}),p+=pt.length-1}s++}}static createElement(e,t){let i=Ht.createElement("template");return i.innerHTML=e,i}};function Wt(n,e,t=n,i){if(e===Je)return e;let r=i!==void 0?t._$Co?.[i]:t._$Cl,s=Xn(e)?void 0:e._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),s===void 0?r=void 0:(r=new s(n),r._$AT(n,t,i)),i!==void 0?(t._$Co??=[])[i]=r:t._$Cl=r),r!==void 0&&(e=Wt(n,r._$AS(n,e.values),r,i)),e}var Zi=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:i}=this._$AD,r=(e?.creationScope??Ht).importNode(t,!0);zt.currentNode=r;let s=zt.nextNode(),o=0,a=0,l=i[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new un(s,s.nextSibling,this,e):l.type===1?u=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(u=new ir(s,this,e)),this._$AV.push(u),l=i[++a]}o!==l?.index&&(s=zt.nextNode(),o++)}return zt.currentNode=Ht,r}p(e){let t=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}},un=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,r){this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Wt(this,e,t),Xn(e)?e===D||e==null||e===""?(this._$AH!==D&&this._$AR(),this._$AH=D):e!==this._$AH&&e!==Je&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ya(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==D&&Xn(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ht.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Jn.createElement(Za(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(t);else{let s=new Zi(r,this),o=s.u(this.options);s.p(t),this.T(o),this._$AH=s}}_$AC(e){let t=Xa.get(e.strings);return t===void 0&&Xa.set(e.strings,t=new Jn(e)),t}k(e){Ja(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,r=0;for(let s of e)r===t.length?t.push(i=new n(this.S(Vn()),this.S(Vn()),this,this.options)):i=t[r],i._$AI(s),r++;r<t.length&&(this._$AR(i&&i._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){let i=e.nextSibling;e.remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Gt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,r,s){this.type=1,this._$AH=D,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=D}_$AI(e,t=this,i,r){let s=this.strings,o=!1;if(s===void 0)e=Wt(this,e,t,0),o=!Xn(e)||e!==this._$AH&&e!==Je,o&&(this._$AH=e);else{let a=e,l,u;for(e=s[0],l=0;l<s.length-1;l++)u=Wt(this,a[i+l],t,l),u===Je&&(u=this._$AH[l]),o||=!Xn(u)||u!==this._$AH[l],u===D?e=D:e!==D&&(e+=(u??"")+s[l+1]),this._$AH[l]=u}o&&!r&&this.j(e)}j(e){e===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},er=class extends Gt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===D?void 0:e}},tr=class extends Gt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==D)}},nr=class extends Gt{constructor(e,t,i,r,s){super(e,t,i,r,s),this.type=5}_$AI(e,t=this){if((e=Wt(this,e,t,0)??D)===Je)return;let i=this._$AH,r=e===D&&i!==D||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==D&&(i===D||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ir=class{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Wt(this,e)}},tl={P:Ms,A:pt,C:Ds,M:1,L:el,R:Zi,D:Ya,V:Wt,I:un,H:Gt,N:tr,U:nr,B:er,F:ir},Cp=Fs.litHtmlPolyfillSupport;Cp?.(Jn,un),(Fs.litHtmlVersions??=[]).push("3.1.4");var nl=(n,e,t)=>{let i=t?.renderBefore??e,r=i._$litPart$;if(r===void 0){let s=t?.renderBefore??null;i._$litPart$=r=new un(e.insertBefore(Vn(),s),s,void 0,t??{})}return r._$AI(n),r};var j=class extends ct{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=nl(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Je}};j._$litElement$=!0,j.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:j});var Ap=globalThis.litElementPolyfillSupport;Ap?.({LitElement:j});(globalThis.litElementVersions??=[]).push("4.0.6");var Ip="Free",rr,il,Yn=class extends As(j){constructor(){super();b(this,rr);this.planConfigs}render(){return O`
4
4
  <a href="/pricing-plans" target="_blank" class="text-sm text-white">
5
5
  <div class="flex m-3 px-3 py-2 bg-tertiary-500 flex-row rounded-xl items-start">
6
6
  <p class="flex-grow">Upgrade your <span class="font-bold text-[#b9e901]">${this.planConfigs?.title}</span> plan to add more than <span class="font-bold text-[#b9e901]">${this.planConfigs?.maxProducts?.toLocaleString()}</span> products.</p>
7
- <span class="h-full flex-none rounded-full border border-white px-5 py-2 text-sm font-medium text-white transition-colors duration-200 hover:bg-white/10">${this.planConfigs.title!==Cp?"Upgrade":"Try Free"}</span>
8
- <button type="button" @click="${R(this,nr,tl)}" class="ml-1 h-6 rounded-full transition-colors bg-tertiary-500 hover:bg-tertiary-700" aria-label="Close">
7
+ <span class="h-full flex-none rounded-full border border-white px-5 py-2 text-sm font-medium text-white transition-colors duration-200 hover:bg-white/10">${this.planConfigs.title!==Ip?"Upgrade":"Try Free"}</span>
8
+ <button type="button" @click="${R(this,rr,il)}" class="ml-1 h-6 rounded-full transition-colors bg-tertiary-500 hover:bg-tertiary-700" aria-label="Close">
9
9
  <span class="inline-block h-6 w-6 leading-6">✕</span>
10
10
  </button>
11
11
  </div>
12
12
  </a>
13
- `}firstUpdated(){this.planConfigs.slug==="scale"&&(this.style.display="none")}};nr=new WeakSet,tl=function(t){t.preventDefault(),this.style.display="none"},S(Xn,"properties",{planConfigs:{type:Object,attribute:"plan-configs"}});var Ms=qn({darkMode:"class",theme:{extend:{spacing:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},padding:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},lineHeight:{3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px"},maxWidth:{xs:"320px",sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px","3xl":"768px","4xl":"896px","5xl":"1024px","6xl":"1152px","7xl":"1280px"},maxHeight:{.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},borderRadius:{sm:"2px",DEFAULT:"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px"},fontSize:{xs:["12px","16px"],sm:["14px","20px"],base:["16px","24px"],lg:["18px","28px"],xl:["20px","28px"],"2xl":["24px","32px"],"3xl":["30px","36px"],"4xl":["36px","40px"],"5xl":["48px","1"],"6xl":["60px","1"],"7xl":["72px","1"],"8xl":["96px","1"],"9xl":["128px","1"]},fontFamily:{sans:["system-ui","Roboto","Helvetica","Arial","sans-serif"],serif:["ui-serif","Georgia","Cambria","serif"],mono:["ui-monospace","Menlo","Monaco","monospace"]}}},presets:[zi(),Ni(),Ui(),Hi()],hash:!1});var z=n=>Wi(Ms)(n);var Jn=class extends z(j){constructor(){super();S(this,"render",()=>O`
13
+ `}firstUpdated(){this.planConfigs.slug==="scale"&&(this.style.display="none")}};rr=new WeakSet,il=function(t){t.preventDefault(),this.style.display="none"},S(Yn,"properties",{planConfigs:{type:Object,attribute:"plan-configs"}});var Ls=Un({darkMode:"class",theme:{extend:{spacing:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},padding:{px:"1px",0:"0",.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},lineHeight:{3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px"},maxWidth:{xs:"320px",sm:"384px",md:"448px",lg:"512px",xl:"576px","2xl":"672px","3xl":"768px","4xl":"896px","5xl":"1024px","6xl":"1152px","7xl":"1280px"},maxHeight:{.5:"2px",1:"4px",1.5:"6px",2:"8px",2.5:"10px",3:"12px",3.5:"14px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",11:"44px",12:"48px",14:"56px",16:"64px",20:"80px",24:"96px",28:"112px",32:"128px",36:"144px",40:"160px",44:"176px",48:"192px",52:"208px",56:"224px",60:"240px",64:"256px",72:"288px",80:"320px",96:"384px"},borderRadius:{sm:"2px",DEFAULT:"4px",md:"6px",lg:"8px",xl:"12px","2xl":"16px","3xl":"24px"},fontSize:{xs:["12px","16px"],sm:["14px","20px"],base:["16px","24px"],lg:["18px","28px"],xl:["20px","28px"],"2xl":["24px","32px"],"3xl":["30px","36px"],"4xl":["36px","40px"],"5xl":["48px","1"],"6xl":["60px","1"],"7xl":["72px","1"],"8xl":["96px","1"],"9xl":["128px","1"]},fontFamily:{sans:["system-ui","Roboto","Helvetica","Arial","sans-serif"],serif:["ui-serif","Georgia","Cambria","serif"],mono:["ui-monospace","Menlo","Monaco","monospace"]}}},presets:[Wi(),Bi(),zi(),Gi()],hash:!1});var z=n=>Vi(Ls)(n);var Kn=class extends z(j){constructor(){super();S(this,"render",()=>O`
14
14
  <!-- we want the transform transition on the root element so that both the transform transition and state switch transition are continuous and fluid -->
15
15
  <button class="leading-0 relative inline-block h-14 w-14 rounded-full overflow-hidden shadow-xl transition-transform hover:scale-105 active:scale-90 text-sm text-white">
16
16
  <!-- the 'open' state invites the user to open (e.g. the chat window) -->
@@ -34,15 +34,15 @@ var Pc=Object.defineProperty;var Zo=n=>{throw TypeError(n)};var Oc=(n,e,t)=>e in
34
34
  </svg>
35
35
  </div>
36
36
  </button>
37
- `);this.state="open",this.src=""}};S(Jn,"properties",{state:{type:String},src:{type:String}});var ir={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},rr=n=>(...e)=>({_$litDirective$:n,values:e}),cn=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var{I:Ap}=Za;var nl=()=>document.createComment(""),pn=(n,e,t)=>{let i=n._$AA.parentNode,r=e===void 0?n._$AB:e._$AA;if(t===void 0){let s=i.insertBefore(nl(),r),o=i.insertBefore(nl(),r);t=new Ap(s,o,n,n.options)}else{let s=t._$AB.nextSibling,o=t._$AM,a=o!==n;if(a){let l;t._$AQ?.(n),t._$AM=n,t._$AP!==void 0&&(l=n._$AU)!==o._$AU&&t._$AP(l)}if(s!==r||a){let l=t._$AA;for(;l!==s;){let u=l.nextSibling;i.insertBefore(l,r),l=u}}}return t},St=(n,e,t=n)=>(n._$AI(e,t),n),Ip={},il=(n,e=Ip)=>n._$AH=e,rl=n=>n._$AH,sr=n=>{n._$AP?.(!1,!0);let e=n._$AA,t=n._$AB.nextSibling;for(;e!==t;){let i=e.nextSibling;e.remove(),e=i}};var sl=(n,e,t)=>{let i=new Map;for(let r=e;r<=t;r++)i.set(n[r],r);return i},Yn=rr(class extends cn{constructor(n){if(super(n),n.type!==ir.CHILD)throw Error("repeat() can only be used in text expressions")}dt(n,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);let r=[],s=[],o=0;for(let a of n)r[o]=i?i(a,o):o,s[o]=t(a,o),o++;return{values:s,keys:r}}render(n,e,t){return this.dt(n,e,t).values}update(n,[e,t,i]){let r=rl(n),{values:s,keys:o}=this.dt(e,t,i);if(!Array.isArray(r))return this.ut=o,s;let a=this.ut??=[],l=[],u,c,p=0,f=r.length-1,d=0,g=s.length-1;for(;p<=f&&d<=g;)if(r[p]===null)p++;else if(r[f]===null)f--;else if(a[p]===o[d])l[d]=St(r[p],s[d]),p++,d++;else if(a[f]===o[g])l[g]=St(r[f],s[g]),f--,g--;else if(a[p]===o[g])l[g]=St(r[p],s[g]),pn(n,l[g+1],r[p]),p++,g--;else if(a[f]===o[d])l[d]=St(r[f],s[d]),pn(n,r[p],r[f]),f--,d++;else if(u===void 0&&(u=sl(o,d,g),c=sl(a,p,f)),u.has(a[p]))if(u.has(a[f])){let v=c.get(o[d]),k=v!==void 0?r[v]:null;if(k===null){let L=pn(n,r[p]);St(L,s[d]),l[d]=L}else l[d]=St(k,s[d]),pn(n,r[p],k),r[v]=null;d++}else sr(r[f]),f--;else sr(r[p]),p++;for(;d<=g;){let v=pn(n,l[g+1]);St(v,s[d]),l[d++]=v}for(;p<=f;){let v=r[p++];v!==null&&sr(v)}return this.ut=o,il(n,l),Je}});function ol(n,e,t){return n?e(n):t?.(n)}var or,al,ar=class ar extends z(j){constructor(){super();b(this,or);S(this,"render",()=>!this.examples?.title&&!this.examples?.items?.length?D:O`
37
+ `);this.state="open",this.src=""}};S(Kn,"properties",{state:{type:String},src:{type:String}});var sr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},or=n=>(...e)=>({_$litDirective$:n,values:e}),cn=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var{I:Tp}=tl;var rl=()=>document.createComment(""),pn=(n,e,t)=>{let i=n._$AA.parentNode,r=e===void 0?n._$AB:e._$AA;if(t===void 0){let s=i.insertBefore(rl(),r),o=i.insertBefore(rl(),r);t=new Tp(s,o,n,n.options)}else{let s=t._$AB.nextSibling,o=t._$AM,a=o!==n;if(a){let l;t._$AQ?.(n),t._$AM=n,t._$AP!==void 0&&(l=n._$AU)!==o._$AU&&t._$AP(l)}if(s!==r||a){let l=t._$AA;for(;l!==s;){let u=l.nextSibling;i.insertBefore(l,r),l=u}}}return t},kt=(n,e,t=n)=>(n._$AI(e,t),n),Rp={},sl=(n,e=Rp)=>n._$AH=e,ol=n=>n._$AH,ar=n=>{n._$AP?.(!1,!0);let e=n._$AA,t=n._$AB.nextSibling;for(;e!==t;){let i=e.nextSibling;e.remove(),e=i}};var al=(n,e,t)=>{let i=new Map;for(let r=e;r<=t;r++)i.set(n[r],r);return i},Qn=or(class extends cn{constructor(n){if(super(n),n.type!==sr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(n,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);let r=[],s=[],o=0;for(let a of n)r[o]=i?i(a,o):o,s[o]=t(a,o),o++;return{values:s,keys:r}}render(n,e,t){return this.dt(n,e,t).values}update(n,[e,t,i]){let r=ol(n),{values:s,keys:o}=this.dt(e,t,i);if(!Array.isArray(r))return this.ut=o,s;let a=this.ut??=[],l=[],u,c,p=0,f=r.length-1,d=0,g=s.length-1;for(;p<=f&&d<=g;)if(r[p]===null)p++;else if(r[f]===null)f--;else if(a[p]===o[d])l[d]=kt(r[p],s[d]),p++,d++;else if(a[f]===o[g])l[g]=kt(r[f],s[g]),f--,g--;else if(a[p]===o[g])l[g]=kt(r[p],s[g]),pn(n,l[g+1],r[p]),p++,g--;else if(a[f]===o[d])l[d]=kt(r[f],s[d]),pn(n,r[p],r[f]),f--,d++;else if(u===void 0&&(u=al(o,d,g),c=al(a,p,f)),u.has(a[p]))if(u.has(a[f])){let v=c.get(o[d]),k=v!==void 0?r[v]:null;if(k===null){let L=pn(n,r[p]);kt(L,s[d]),l[d]=L}else l[d]=kt(k,s[d]),pn(n,r[p],k),r[v]=null;d++}else ar(r[f]),f--;else ar(r[p]),p++;for(;d<=g;){let v=pn(n,l[g+1]);kt(v,s[d]),l[d++]=v}for(;p<=f;){let v=r[p++];v!==null&&ar(v)}return this.ut=o,sl(n,l),Je}});function ll(n,e,t){return n?e(n):t?.(n)}var lr,ul,ur=class ur extends z(j){constructor(){super();b(this,lr);S(this,"render",()=>!this.examples?.title&&!this.examples?.items?.length?D:O`
38
38
  <div class="h-full w-full flex flex-col font-sans text-base bg-[#FDFDFD] items-stretch justify-center">
39
39
  <!-- examples section -->
40
40
  <div class="m-4">
41
- ${ol(this.examples.title,()=>O`<p class="text-md text-center text-gray-500 font-semibold select-none">${this.examples.title}</p>`)}
41
+ ${ll(this.examples.title,()=>O`<p class="text-md text-center text-gray-500 font-semibold select-none">${this.examples.title}</p>`)}
42
42
  ${this.examples?.items?.length?O`
43
43
  <ul class="prose mt-2 text-left text-gray-400 select-none">
44
- ${Yn(this.examples.items,t=>t,t=>O`
45
- <li class="w-full rounded-2xl bg-white px-4 py-3 text-sm outline outline-1 outline-[#eeedf1] transition-[color,outline] hover:cursor-pointer hover:outline-[#999]" @click="${()=>R(this,or,al).call(this,t)}">
44
+ ${Qn(this.examples.items,t=>t,t=>O`
45
+ <li class="w-full rounded-2xl bg-white px-4 py-3 text-sm outline outline-1 outline-[#eeedf1] transition-[color,outline] hover:cursor-pointer hover:outline-[#999]" @click="${()=>R(this,lr,ul).call(this,t)}">
46
46
  <span>“${t.trim()}” →</span>
47
47
  </li>
48
48
  `)}
@@ -53,7 +53,7 @@ var Pc=Object.defineProperty;var Zo=n=>{throw TypeError(n)};var Oc=(n,e,t)=>e in
53
53
  <!-- spacer for visual alignment -->
54
54
  <div class="h-1/9"></div>
55
55
  </div>
56
- `);this.examples={title:"",items:[]}}};or=new WeakSet,al=function(t){this.dispatchEvent(new ar.ExampleClickEvent({example:t}))},S(ar,"properties",{examples:{type:Object}});var fn=ar,Ds;fn.ExampleClickEvent=(Ds=class extends CustomEvent{constructor(e,t={}){super(fn.ExampleClickEvent.type,{detail:e,...t})}},S(Ds,"type","mw:example-click"),Ds);var hn,ll,ul,Kn=class Kn extends z(j){constructor(){super();b(this,hn);S(this,"render",()=>O`
56
+ `);this.examples={title:"",items:[]}}};lr=new WeakSet,ul=function(t){this.dispatchEvent(new ur.ExampleClickEvent({example:t}))},S(ur,"properties",{examples:{type:Object}});var fn=ur,js;fn.ExampleClickEvent=(js=class extends CustomEvent{constructor(e,t={}){super(fn.ExampleClickEvent.type,{detail:e,...t})}},S(js,"type","mw:example-click"),js);var hn,cl,pl,Zn=class Zn extends z(j){constructor(){super();b(this,hn);S(this,"render",()=>O`
57
57
  <div class="flex items-center justify-between space-x-4 p-4 text-lg bg-white font-sans">
58
58
  <mw-pulse-dot class="contents" position="bottom-right" color="green-500">
59
59
  <div class="h-10 w-10 overflow-hidden rounded">
@@ -71,7 +71,7 @@ var Pc=Object.defineProperty;var Zo=n=>{throw TypeError(n)};var Oc=(n,e,t)=>e in
71
71
 
72
72
  <div class="flex-grow"></div>
73
73
 
74
- <button @click=${R(this,hn,ll)} class="${this.showNewChat?"inline-flex":"hidden"} items-center justify-center rounded-lg bg-gray-100 p-3 text-gray-400 transition-colors hover:bg-gray-50">
74
+ <button @click=${R(this,hn,cl)} class="${this.showNewChat?"inline-flex":"hidden"} items-center justify-center rounded-lg bg-gray-100 p-3 text-gray-400 transition-colors hover:bg-gray-50">
75
75
  <!-- -->
76
76
  <p class="inline-flex h-6 w-6 items-center justify-center">
77
77
  <span class="whitespace-pre text-[11px] font-medium leading-[15px]">${this.content.newChatTitle||`NEW
@@ -79,15 +79,15 @@ CHAT`}</span>
79
79
  </p>
80
80
  </button>
81
81
 
82
- <button @click=${R(this,hn,ul)} class="${this.showClose?"inline-flex":"hidden"} items-center justify-center rounded-lg bg-gray-100 p-3 text-gray-400 transition-colors hover:bg-gray-50 sm:hidden">
82
+ <button @click=${R(this,hn,pl)} class="${this.showClose?"inline-flex":"hidden"} items-center justify-center rounded-lg bg-gray-100 p-3 text-gray-400 transition-colors hover:bg-gray-50 sm:hidden">
83
83
  <!-- x -->
84
84
  <span class="inline-block h-6 w-6 leading-6">✕</span>
85
85
  </button>
86
86
  </div>
87
- `);this.content={logoUrl:"",title:"",status:"",color:"",newChatTitle:""},this.showNewChat=!1,this.showClose=!1}};hn=new WeakSet,ll=function(){this.dispatchEvent(new Kn.NewChatClickEvent)},ul=function(){this.dispatchEvent(new Kn.CloseClickEvent)},S(Kn,"properties",{content:{type:Object},showNewChat:{type:Boolean,attribute:"show-new-chat"},showClose:{type:Boolean,attribute:"show-close"}});var Et=Kn,Ls;Et.NewChatClickEvent=(Ls=class extends CustomEvent{constructor(e={}){super(Et.NewChatClickEvent.type,{...e})}},S(Ls,"type","mw:new-chat-click"),Ls);var js;Et.CloseClickEvent=(js=class extends CustomEvent{constructor(e={}){super(Et.CloseClickEvent.type,{...e})}},S(js,"type","mw:close-click"),js);var We,cl,pl,fl,hl,dl,dn=class dn extends z(j){constructor(){super();b(this,We);S(this,"render",()=>O`
88
- <form class="flex items-center space-x-4 border-t font-sans text-base bg-white px-4" @submit="${R(this,We,hl)}">
87
+ `);this.content={logoUrl:"",title:"",status:"",color:"",newChatTitle:""},this.showNewChat=!1,this.showClose=!1}};hn=new WeakSet,cl=function(){this.dispatchEvent(new Zn.NewChatClickEvent)},pl=function(){this.dispatchEvent(new Zn.CloseClickEvent)},S(Zn,"properties",{content:{type:Object},showNewChat:{type:Boolean,attribute:"show-new-chat"},showClose:{type:Boolean,attribute:"show-close"}});var St=Zn,qs;St.NewChatClickEvent=(qs=class extends CustomEvent{constructor(e={}){super(St.NewChatClickEvent.type,{...e})}},S(qs,"type","mw:new-chat-click"),qs);var Ns;St.CloseClickEvent=(Ns=class extends CustomEvent{constructor(e={}){super(St.CloseClickEvent.type,{...e})}},S(Ns,"type","mw:close-click"),Ns);var We,fl,hl,dl,gl,vl,dn=class dn extends z(j){constructor(){super();b(this,We);S(this,"render",()=>O`
88
+ <form class="flex items-center space-x-4 border-t font-sans text-base bg-white px-4" @submit="${R(this,We,gl)}">
89
89
  <!-- text input -->
90
- <textarea name="input" @input="${R(this,We,dl)}" @keydown="${R(this,We,fl)}" class="bg-white disabled:bg-white my-2 block w-full flex-1 resize-none rounded py-2 text-[16px] text-gray-800 outline-none transition-colors" placeholder="${this.placeholder}" autofocus ?disabled="${this.disabled}"></textarea>
90
+ <textarea name="input" @input="${R(this,We,vl)}" @keydown="${R(this,We,dl)}" class="bg-white disabled:bg-white my-2 block w-full flex-1 resize-none rounded py-2 text-[16px] text-gray-800 outline-none transition-colors" placeholder="${this.placeholder}" autofocus ?disabled="${this.disabled}"></textarea>
91
91
 
92
92
  <!-- send/cancel button -->
93
93
  <div class="py-2">
@@ -106,7 +106,7 @@ CHAT`}</span>
106
106
  </button>
107
107
  </div>
108
108
  </form>
109
- `);this.disabled=!1,this.streaming=!1,this.placeholder="Type a message...",this.color=""}};We=new WeakSet,cl=function(){return this.renderRoot.querySelector('textarea[name="input"]')??null},pl=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},fl=function(t){Tp(t)&&(t.preventDefault(),this.streaming||h(this,We,pl)?.click())},hl=function(t){if(t.preventDefault(),this.streaming){this.dispatchEvent(new dn.CancelEvent);return}let i=h(this,We,cl);if(!i)throw new Error("Expected input element to be present");i.value&&this.dispatchEvent(new dn.SubmitEvent(i.value))&&(i.value="")},dl=function(t){this.dispatchEvent(new dn.ChangeEvent({delta:t.data,full:t.target instanceof HTMLTextAreaElement?t.target.value:""}))},S(dn,"properties",{disabled:{type:Boolean},streaming:{type:Boolean},placeholder:{type:String},color:{type:String}});var it=dn,qs;it.ChangeEvent=(qs=class extends CustomEvent{constructor(e,t={}){super(it.ChangeEvent.type,{detail:e,...t})}},S(qs,"type","mw:change"),qs);var Ns;it.SubmitEvent=(Ns=class extends CustomEvent{constructor(e,t={}){super(it.SubmitEvent.type,{detail:e,...t,cancelable:!0})}},S(Ns,"type","mw:submit"),Ns);var Us;it.CancelEvent=(Us=class extends CustomEvent{constructor(e={}){super(it.CancelEvent.type,{...e})}},S(Us,"type","mw:cancel"),Us);function Tp(n){return n.code==="Enter"&&!n.ctrlKey&&!n.metaKey&&!n.shiftKey}var Qn=class extends z(j){constructor(){super(),this.side="assistant",this.status="",this.color="",this.logoUrl=""}render(){switch(this.side){case"user":return O`
109
+ `);this.disabled=!1,this.streaming=!1,this.placeholder="Type a message...",this.color=""}};We=new WeakSet,fl=function(){return this.renderRoot.querySelector('textarea[name="input"]')??null},hl=function(){return this.renderRoot.querySelector('button[type="submit"]')??null},dl=function(t){Pp(t)&&(t.preventDefault(),this.streaming||h(this,We,hl)?.click())},gl=function(t){if(t.preventDefault(),this.streaming){this.dispatchEvent(new dn.CancelEvent);return}let i=h(this,We,fl);if(!i)throw new Error("Expected input element to be present");i.value&&this.dispatchEvent(new dn.SubmitEvent(i.value))&&(i.value="")},vl=function(t){this.dispatchEvent(new dn.ChangeEvent({delta:t.data,full:t.target instanceof HTMLTextAreaElement?t.target.value:""}))},S(dn,"properties",{disabled:{type:Boolean},streaming:{type:Boolean},placeholder:{type:String},color:{type:String}});var it=dn,Us;it.ChangeEvent=(Us=class extends CustomEvent{constructor(e,t={}){super(it.ChangeEvent.type,{detail:e,...t})}},S(Us,"type","mw:change"),Us);var Bs;it.SubmitEvent=(Bs=class extends CustomEvent{constructor(e,t={}){super(it.SubmitEvent.type,{detail:e,...t,cancelable:!0})}},S(Bs,"type","mw:submit"),Bs);var zs;it.CancelEvent=(zs=class extends CustomEvent{constructor(e={}){super(it.CancelEvent.type,{...e})}},S(zs,"type","mw:cancel"),zs);function Pp(n){return n.code==="Enter"&&!n.ctrlKey&&!n.metaKey&&!n.shiftKey}var ei=class extends z(j){constructor(){super(),this.side="assistant",this.status="",this.color="",this.logoUrl=""}render(){switch(this.side){case"user":return O`
110
110
  <div class="ml-20 flex justify-end font-sans text-base">
111
111
  <div class="max-w-full">
112
112
  <!-- include an invisible border (same color as background) so that this message is the same height as the bot message -->
@@ -141,15 +141,15 @@ CHAT`}</span>
141
141
  </div>
142
142
  </div>
143
143
  </div>
144
- `;default:throw new Error(`Unknown side: ${this.side}`)}}};S(Qn,"properties",{side:{type:String},status:{type:String},color:{type:String},logoUrl:{type:String,attribute:"logo"}});var Zn=class extends cn{constructor(e){if(super(e),this.it=D,e.type!==ir.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===D||e==null)return this._t=void 0,this.it=e;if(e===Je)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Zn.directiveName="unsafeHTML",Zn.resultType=1;var gl=rr(Zn);var Bs;function Rp(n){return{lang:n?.lang??Bs?.lang,message:n?.message,abortEarly:n?.abortEarly??Bs?.abortEarly,abortPipeEarly:n?.abortPipeEarly??Bs?.abortPipeEarly,skipPipe:n?.skipPipe}}var Pp;function Op(n){return Pp?.get(n)}var Fp;function Mp(n){return Fp?.get(n)}var Dp;function Lp(n,e){return Dp?.get(n)?.get(e)}function gn(n){let e=typeof n;return e==="object"&&(e=(n&&Object.getPrototypeOf(n)?.constructor?.name)??"null"),e==="string"?`"${n}"`:e==="number"||e==="bigint"||e==="boolean"?`${n}`:e}function $t(n,e,t,i,r){let s=r&&"input"in r?r.input:t.value,o=r?.expected??n.expects,a=r?.received??gn(s),l={kind:n.kind,type:n.type,input:s,expected:o,received:a,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${a}`,requirement:n.requirement,path:r?.path,issues:r?.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly,skipPipe:i.skipPipe},u=n.kind==="schema",c=n.message??Lp(n.reference,l.lang)??(u?Mp(l.lang):null)??i.message??Op(l.lang);c&&(l.message=typeof c=="function"?c(l):c),u&&(t.typed=!1),t.issues?t.issues.push(l):t.issues=[l]}var jp=class extends Error{constructor(e){super(e[0].message);S(this,"issues");this.name="ValiError",this.issues=e}};function zs(n,e){return{kind:"validation",type:"max_value",reference:zs,async:!1,expects:`<=${n instanceof Date?n.toJSON():gn(n)}`,requirement:n,message:e,_run(t,i){return t.typed&&t.value>this.requirement&&$t(this,"value",t,i,{received:t.value instanceof Date?t.value.toJSON():gn(t.value)}),t}}}function Hs(n,e){return{kind:"validation",type:"min_value",reference:Hs,async:!1,expects:`>=${n instanceof Date?n.toJSON():gn(n)}`,requirement:n,message:e,_run(t,i){return t.typed&&t.value<this.requirement&&$t(this,"value",t,i,{received:t.value instanceof Date?t.value.toJSON():gn(t.value)}),t}}}function qp(n,e,t){return typeof n.default=="function"?n.default(e,t):n.default}function vn(n,e){return{kind:"schema",type:"array",reference:vn,expects:"Array",async:!1,item:n,message:e,_run(t,i){let r=t.value;if(Array.isArray(r)){t.typed=!0,t.value=[];for(let s=0;s<r.length;s++){let o=r[s],a=this.item._run({typed:!1,value:o},i);if(a.issues){let l={type:"array",origin:"value",input:r,key:s,value:o};for(let u of a.issues)u.path?u.path.unshift(l):u.path=[l],t.issues?.push(u);if(t.issues||(t.issues=a.issues),i.abortEarly){t.typed=!1;break}}a.typed||(t.typed=!1),t.value.push(a.value)}}else $t(this,"type",t,i);return t}}}function Ee(n){return{kind:"schema",type:"boolean",reference:Ee,expects:"boolean",async:!1,message:n,_run(e,t){return typeof e.value=="boolean"?e.typed=!0:$t(this,"type",e,t),e}}}function rt(n){return{kind:"schema",type:"number",reference:rt,expects:"number",async:!1,message:n,_run(e,t){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:$t(this,"type",e,t),e}}}function le(n,e){return{kind:"schema",type:"object",reference:le,expects:"Object",async:!1,entries:n,message:e,_run(t,i){let r=t.value;if(r&&typeof r=="object"){t.typed=!0,t.value={};for(let s in this.entries){let o=r[s],a=this.entries[s]._run({typed:!1,value:o},i);if(a.issues){let l={type:"object",origin:"value",input:r,key:s,value:o};for(let u of a.issues)u.path?u.path.unshift(l):u.path=[l],t.issues?.push(u);if(t.issues||(t.issues=a.issues),i.abortEarly){t.typed=!1;break}}a.typed||(t.typed=!1),(a.value!==void 0||s in r)&&(t.value[s]=a.value)}}else $t(this,"type",t,i);return t}}}function I(n,...e){let t={kind:"schema",type:"optional",reference:I,expects:`${n.expects} | undefined`,async:!1,wrapped:n,_run(i,r){return i.value===void 0&&("default"in this&&(i.value=qp(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped._run(i,r)}};return 0 in e&&(t.default=e[0]),t}function lr(n,e){return{kind:"schema",type:"picklist",reference:lr,expects:n.map(gn).join(" | ")||"never",async:!1,options:n,message:e,_run(t,i){return this.options.includes(t.value)?t.typed=!0:$t(this,"type",t,i),t}}}function q(n){return{kind:"schema",type:"string",reference:q,expects:"string",async:!1,message:n,_run(e,t){return typeof e.value=="string"?e.typed=!0:$t(this,"type",e,t),e}}}function vl(n,e,t){let i=n._run({typed:!1,value:e},Rp(t));if(i.issues)throw new jp(i.issues);return i.value}function ml(...n){return{...n[0],pipe:n,_run(e,t){for(let i=0;i<n.length;i++){e=n[i]._run(e,t);let r=n[i+1];if(t.skipPipe||e.issues&&(t.abortEarly||t.abortPipeEarly||r?.kind==="schema"||r?.kind==="transformation")){e.typed=!1;break}}return e}}}var ei,Me,Ye,ti,Ws,ur=class{constructor(e,t){b(this,ti);b(this,ei);b(this,Me);b(this,Ye);if(!e)throw new Error("host is required");if(!t)throw new Error("config is required");T(this,ei,e),h(this,ei).addController(this),T(this,Me,t)}connect(e){T(this,Me,e),T(this,Ye,R(this,ti,Ws).call(this))}hostConnected(){setTimeout(()=>{T(this,Ye,R(this,ti,Ws).call(this))},0)}hostDisconnected(){h(this,Ye)?.close(1e3,"lit_host_disconnected"),T(this,Ye,void 0)}send(e){h(this,Ye)?.send(e)}close(e,t){h(this,Ye)?.close(e,t)}render(e={}){switch(h(this,Ye)?.readyState){case WebSocket.CLOSED:return e.closed?.();case WebSocket.CLOSING:return e.closing?.();case WebSocket.CONNECTING:return e.connecting?.();case WebSocket.OPEN:return e.open?.()}}get isConnected(){return h(this,Ye)?.readyState===WebSocket.OPEN}};ei=new WeakMap,Me=new WeakMap,Ye=new WeakMap,ti=new WeakSet,Ws=function(){let e=new WebSocket(h(this,Me).url());return h(this,Me).onClose&&(e.onclose=h(this,Me).onClose),h(this,Me).onOpen&&(e.onopen=h(this,Me).onOpen),h(this,Me).onError&&(e.onerror=h(this,Me).onError),h(this,Me).onMessage&&(e.onmessage=h(this,Me).onMessage),e};var _l="664df22d-d461-42d6-801e-f70247e2cd7c",ye,$e,Ke,mn,yn,be,Xt,bl,wl,xl,kl,cr=class{constructor(e,t){b(this,be);b(this,ye);b(this,$e);b(this,Ke);S(this,"isStreaming",!1);S(this,"typingIndicator");S(this,"ranOutOfCredits",!1);S(this,"messages",[]);S(this,"conversationId","");b(this,mn,0);b(this,yn);S(this,"isLiveMode",!1);T(this,ye,e),T(this,$e,t),T(this,Ke,this.initWS()),e.addController(this)}sendUserInput(e,{role:t="user",expectStreaming:i=!1}={}){return R(this,be,Xt).call(this,{type:"USER_INPUT",value:e,role:t},{expectStreaming:i})}sendUserCancel(){return R(this,be,Xt).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return R(this,be,Xt).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return R(this,be,Xt).call(this,{type:"USER_TYPING_STOP"})}reloadConfig(){R(this,be,Xt).call(this,{type:"RELOAD_CONFIG"})}close(){h(this,Ke).close(1e3,"closed by user")}retry(){clearTimeout(h(this,yn)),T(this,yn,setTimeout(()=>{h(this,$e).onReconnect?.(),T(this,Ke,this.initWS())},1e3*h(this,mn))),ea(this,mn)._++}initWS(){return new ur(h(this,ye),{url:()=>h(this,$e).url(this.conversationId,{}),onOpen:e=>R(this,be,bl).call(this,e),onMessage:e=>R(this,be,wl).call(this,JSON.parse(e.data)),onError:e=>R(this,be,xl).call(this,e),onClose:e=>R(this,be,kl).call(this,e)})}hostConnected(){this.conversationId=h(this,$e).restoreConversationState?.()?.conversationId||""}reset(){R(this,be,Xt).call(this,{type:"NEW_CHAT"}),h(this,$e).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,h(this,ye).requestUpdate()}hostDisconnected(){clearTimeout(h(this,yn))}reconnectSocket(){h(this,Ke).close(1e3,"destroy"),T(this,Ke,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};ye=new WeakMap,$e=new WeakMap,Ke=new WeakMap,mn=new WeakMap,yn=new WeakMap,be=new WeakSet,Xt=function(e,{expectStreaming:t=!1}={}){return h(this,Ke).isConnected?(t&&!this.isLiveMode&&(this.isStreaming=!0,h(this,ye).requestUpdate()),h(this,Ke).send(JSON.stringify(e)),!0):(console.warn("WebSocket is not connected, message not sent - reconnecting now",e),this.retry(),!1)},bl=function(e){T(this,mn,0)},wl=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,e.message].filter((t,i,r)=>i===r.findIndex(s=>s.id===t.id)),this.typingIndicator=void 0,h(this,ye).requestUpdate(),h(this,$e).onNewMessage?.(e.message);break}case"UPDATE_MESSAGE":{let t=this.messages.find(i=>i.id===e.message.id);if(t)Object.assign(t,e.message),h(this,ye).requestUpdate(),h(this,$e).onUpdateMessage?.(e);else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let t=this.messages.find(i=>i.id===e.message.id);if(t)Object.assign(t,e.message);else throw new Error(`Message with id ${e.message.id} not found`);this.isStreaming=!1,h(this,ye).requestUpdate(),h(this,$e).onMessageDone?.(e,t);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,h(this,ye).requestUpdate();break}case"ERROR":{h(this,$e).onMessageError?.(e);break}case"CONNECTED":{e.messages&&(this.messages=e.messages),this.conversationId=e.conversationId,h(this,$e).onConnect?.(e.conversationId),h(this,$e).persistConversationState?.(e.conversationId),this.isLiveMode=e.metadata?.isLiveMode,h(this,ye).requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},h(this,ye).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,h(this,ye).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.messages.some(t=>t.id===_l)||this.messages.push({id:_l,role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}),this.ranOutOfCredits=!0,h(this,ye).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),h(this,ye).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},xl=function(e){console.error("onError",e),h(this,$e).onError?.(e)},kl=function(e){h(this,ye).isConnected&&!h(this,Ke).isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,h(this,ye).requestUpdate(),h(this,$e).onClose?.()};var ni,_n,Ct,Jt,fr,Sl,pr=class{constructor(e,t,{timeoutMs:i=2e3}={}){b(this,fr);b(this,ni);b(this,_n);b(this,Ct);b(this,Jt,!1);S(this,"timeoutMs");T(this,ni,e),T(this,_n,t),this.timeoutMs=i,e.addController(this)}get isTyping(){return h(this,Jt)}hostDisconnected(){clearTimeout(h(this,Ct)),T(this,Ct,void 0)}onInput(e){if(h(this,ni).isConnected){if(!e.trim()){this.typingStopped();return}clearTimeout(h(this,Ct)),T(this,Ct,setTimeout(()=>this.typingStopped(),this.timeoutMs)),h(this,Jt)||R(this,fr,Sl).call(this)}}typingStopped(){clearTimeout(h(this,Ct)),T(this,Jt,!1),h(this,_n).typingStopped()}};ni=new WeakMap,_n=new WeakMap,Ct=new WeakMap,Jt=new WeakMap,fr=new WeakSet,Sl=function(){T(this,Jt,!0),h(this,_n).typingStarted()};function El(n,e){let t=new Map;for(let i of n){let r=e(i);t.has(r)||t.set(r,[]),(t.get(r)||[]).push(i)}return t}function $l(n,e="en-US"){let t=new Intl.DateTimeFormat(e,{hour:"numeric",minute:"numeric"}).format(n);return`${n.toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric"})}, ${t}`}var Xg=le({wsApiUrl:q(),url:q(),logoUrl:I(q()),title:q(),status:q(),color:q(),showStillLearningBanner:I(Ee()),allowedOrigins:I(vn(q())),input:le({placeholder:q()}),bubble:le({imageUrl:I(q()),position:le({bottom:I(q()),right:I(q()),left:I(q())}),mobilePosition:I(le({bottom:I(q()),right:I(q()),left:I(q())}))}),examples:le({title:q(),items:vn(q())}),instructions:le({items:vn(q())}),popup:I(le({mobileEnabled:I(Ee()),desktopEnabled:I(Ee()),delayMs:I(rt()),text:I(q()),mobileTitleText:I(q()),mobileButtonText:I(q())})),tryItOut:I(le({mobileEnabled:I(Ee()),desktopEnabled:I(Ee()),text:I(q())})),contactDetails:I(le({email:I(q()),phone:I(q()),socialMedia:I(le({facebook:I(q()),instagram:I(q()),twitter:I(q())}))})),neverShowStillLearningBanner:I(Ee()),hidden:I(Ee()),newChatTitle:I(q()),webhookURL:I(q()),automatedResponse:I(le({enabled:I(Ee()),text:I(q()),latencyThresholdMs:I(rt())})),manual:I(Ee()),removePoweredBy:I(Ee()),claimable:I(Ee()),feed:I(q()),scraper:I(lr(["netkazan","jateknet","grandopet","insportline","partocean"])),platform:I(lr(["shopify","shoprenter","unas","scraper"])),workingHours:I(le({dailyAvailability:vn(le({dayOfWeek:ml(rt(),Hs(0),zs(6)),startTime:q(),endTime:q(),isActive:Ee()})),userTimeZone:I(q())})),planOverrides:I(le({maxProducts:I(rt()),conversations:I(rt()),faqs:I(le({max:I(rt()),questionLength:I(rt()),answerLength:I(rt())}))})),omitGeneralGuidelines:I(Ee()),forceStripe:I(Ee())});var Np="\xB7 \xB7 \xB7",Up=le({conversationId:I(q())}),ne,hr,ii,re,Cl,Al,Il,Tl,Rl,Pl,Ol,Vs,dr=class dr extends z(j){constructor(){super();b(this,ne);b(this,ii,new pr(this,{typingStarted:()=>h(this,re).sendUserTypingStart(),typingStopped:()=>h(this,re).sendUserTypingStop()}));b(this,re,new cr(this,{url:(t,{resume:i}={})=>{let r=new URL(this.config.wsApiUrl);return r.searchParams.set("widgetId",this.widgetId),r.searchParams.set("resume",i?"1":""),r.searchParams.set("conversationId",t),r.searchParams.set("pageUrl",window.location.href),r},onReconnect:()=>{},onError:t=>{console.error("ws error",t)},onClose:()=>{},onNewMessage:t=>{t.role==="user"&&h(this,ne,Vs)?.scrollTo(0,h(this,ne,Vs).scrollHeight),t.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:t,conversationId:this.conversationId})},onMessageDone:(t,i)=>{i.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:i.content??"",message:i,usage_TOKENS_COMPLETION:t.message.usage.TOKENS_COMPLETION,conversationId:this.conversationId})},onMessageError:t=>{console.error("ws message error",t),t.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+t.message})},onReset:()=>{localStorage.removeItem(h(this,ne,hr))},onConnect:t=>{},persistConversationState:t=>{localStorage.setItem(h(this,ne,hr),JSON.stringify({conversationId:t}))},restoreConversationState:()=>{try{let t=JSON.parse(localStorage.getItem(h(this,ne,hr))||"{}");return{conversationId:vl(Up,t).conversationId||""}}catch(t){return console.error(t),{conversationId:""}}}}));this.config={},this.callbacks={},this.showClose=!1}get widgetId(){return this.config.widgetId}get conversationId(){return h(this,re).conversationId}get messages(){return h(this,re).messages}render(){let t=El(this.messages,i=>new Date(i.timestamp).setSeconds(0,0).toString());return O`
144
+ `;default:throw new Error(`Unknown side: ${this.side}`)}}};S(ei,"properties",{side:{type:String},status:{type:String},color:{type:String},logoUrl:{type:String,attribute:"logo"}});var ti=class extends cn{constructor(e){if(super(e),this.it=D,e.type!==sr.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===D||e==null)return this._t=void 0,this.it=e;if(e===Je)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};ti.directiveName="unsafeHTML",ti.resultType=1;var ml=or(ti);var Hs;function Op(n){return{lang:n?.lang??Hs?.lang,message:n?.message,abortEarly:n?.abortEarly??Hs?.abortEarly,abortPipeEarly:n?.abortPipeEarly??Hs?.abortPipeEarly,skipPipe:n?.skipPipe}}var Fp;function Mp(n){return Fp?.get(n)}var Dp;function Lp(n){return Dp?.get(n)}var jp;function qp(n,e){return jp?.get(n)?.get(e)}function gn(n){let e=typeof n;return e==="object"&&(e=(n&&Object.getPrototypeOf(n)?.constructor?.name)??"null"),e==="string"?`"${n}"`:e==="number"||e==="bigint"||e==="boolean"?`${n}`:e}function Et(n,e,t,i,r){let s=r&&"input"in r?r.input:t.value,o=r?.expected??n.expects,a=r?.received??gn(s),l={kind:n.kind,type:n.type,input:s,expected:o,received:a,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${a}`,requirement:n.requirement,path:r?.path,issues:r?.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly,skipPipe:i.skipPipe},u=n.kind==="schema",c=n.message??qp(n.reference,l.lang)??(u?Lp(l.lang):null)??i.message??Mp(l.lang);c&&(l.message=typeof c=="function"?c(l):c),u&&(t.typed=!1),t.issues?t.issues.push(l):t.issues=[l]}var Np=class extends Error{constructor(e){super(e[0].message);S(this,"issues");this.name="ValiError",this.issues=e}};function Ws(n,e){return{kind:"validation",type:"max_value",reference:Ws,async:!1,expects:`<=${n instanceof Date?n.toJSON():gn(n)}`,requirement:n,message:e,_run(t,i){return t.typed&&t.value>this.requirement&&Et(this,"value",t,i,{received:t.value instanceof Date?t.value.toJSON():gn(t.value)}),t}}}function Gs(n,e){return{kind:"validation",type:"min_value",reference:Gs,async:!1,expects:`>=${n instanceof Date?n.toJSON():gn(n)}`,requirement:n,message:e,_run(t,i){return t.typed&&t.value<this.requirement&&Et(this,"value",t,i,{received:t.value instanceof Date?t.value.toJSON():gn(t.value)}),t}}}function Up(n,e,t){return typeof n.default=="function"?n.default(e,t):n.default}function vn(n,e){return{kind:"schema",type:"array",reference:vn,expects:"Array",async:!1,item:n,message:e,_run(t,i){let r=t.value;if(Array.isArray(r)){t.typed=!0,t.value=[];for(let s=0;s<r.length;s++){let o=r[s],a=this.item._run({typed:!1,value:o},i);if(a.issues){let l={type:"array",origin:"value",input:r,key:s,value:o};for(let u of a.issues)u.path?u.path.unshift(l):u.path=[l],t.issues?.push(u);if(t.issues||(t.issues=a.issues),i.abortEarly){t.typed=!1;break}}a.typed||(t.typed=!1),t.value.push(a.value)}}else Et(this,"type",t,i);return t}}}function Ee(n){return{kind:"schema",type:"boolean",reference:Ee,expects:"boolean",async:!1,message:n,_run(e,t){return typeof e.value=="boolean"?e.typed=!0:Et(this,"type",e,t),e}}}function rt(n){return{kind:"schema",type:"number",reference:rt,expects:"number",async:!1,message:n,_run(e,t){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:Et(this,"type",e,t),e}}}function le(n,e){return{kind:"schema",type:"object",reference:le,expects:"Object",async:!1,entries:n,message:e,_run(t,i){let r=t.value;if(r&&typeof r=="object"){t.typed=!0,t.value={};for(let s in this.entries){let o=r[s],a=this.entries[s]._run({typed:!1,value:o},i);if(a.issues){let l={type:"object",origin:"value",input:r,key:s,value:o};for(let u of a.issues)u.path?u.path.unshift(l):u.path=[l],t.issues?.push(u);if(t.issues||(t.issues=a.issues),i.abortEarly){t.typed=!1;break}}a.typed||(t.typed=!1),(a.value!==void 0||s in r)&&(t.value[s]=a.value)}}else Et(this,"type",t,i);return t}}}function T(n,...e){let t={kind:"schema",type:"optional",reference:T,expects:`${n.expects} | undefined`,async:!1,wrapped:n,_run(i,r){return i.value===void 0&&("default"in this&&(i.value=Up(this,i,r)),i.value===void 0)?(i.typed=!0,i):this.wrapped._run(i,r)}};return 0 in e&&(t.default=e[0]),t}function cr(n,e){return{kind:"schema",type:"picklist",reference:cr,expects:n.map(gn).join(" | ")||"never",async:!1,options:n,message:e,_run(t,i){return this.options.includes(t.value)?t.typed=!0:Et(this,"type",t,i),t}}}function q(n){return{kind:"schema",type:"string",reference:q,expects:"string",async:!1,message:n,_run(e,t){return typeof e.value=="string"?e.typed=!0:Et(this,"type",e,t),e}}}function yl(n,e,t){let i=n._run({typed:!1,value:e},Op(t));if(i.issues)throw new Np(i.issues);return i.value}function _l(...n){return{...n[0],pipe:n,_run(e,t){for(let i=0;i<n.length;i++){e=n[i]._run(e,t);let r=n[i+1];if(t.skipPipe||e.issues&&(t.abortEarly||t.abortPipeEarly||r?.kind==="schema"||r?.kind==="transformation")){e.typed=!1;break}}return e}}}var ni,Me,Ye,ii,Vs,pr=class{constructor(e,t){b(this,ii);b(this,ni);b(this,Me);b(this,Ye);if(!e)throw new Error("host is required");if(!t)throw new Error("config is required");$(this,ni,e),h(this,ni).addController(this),$(this,Me,t)}connect(e){$(this,Me,e),$(this,Ye,R(this,ii,Vs).call(this))}hostConnected(){setTimeout(()=>{$(this,Ye,R(this,ii,Vs).call(this))},0)}hostDisconnected(){h(this,Ye)?.close(1e3,"lit_host_disconnected"),$(this,Ye,void 0)}send(e){h(this,Ye)?.send(e)}close(e,t){h(this,Ye)?.close(e,t)}render(e={}){switch(h(this,Ye)?.readyState){case WebSocket.CLOSED:return e.closed?.();case WebSocket.CLOSING:return e.closing?.();case WebSocket.CONNECTING:return e.connecting?.();case WebSocket.OPEN:return e.open?.()}}get isConnected(){return h(this,Ye)?.readyState===WebSocket.OPEN}};ni=new WeakMap,Me=new WeakMap,Ye=new WeakMap,ii=new WeakSet,Vs=function(){let e=new WebSocket(h(this,Me).url());return h(this,Me).onClose&&(e.onclose=h(this,Me).onClose),h(this,Me).onOpen&&(e.onopen=h(this,Me).onOpen),h(this,Me).onError&&(e.onerror=h(this,Me).onError),h(this,Me).onMessage&&(e.onmessage=h(this,Me).onMessage),e};var wl="664df22d-d461-42d6-801e-f70247e2cd7c",ye,$e,Ke,mn,yn,be,Vt,xl,kl,Sl,El,fr=class{constructor(e,t){b(this,be);b(this,ye);b(this,$e);b(this,Ke);S(this,"isStreaming",!1);S(this,"typingIndicator");S(this,"ranOutOfCredits",!1);S(this,"messages",[]);S(this,"conversationId","");b(this,mn,0);b(this,yn);S(this,"isLiveMode",!1);$(this,ye,e),$(this,$e,t),$(this,Ke,this.initWS()),e.addController(this)}sendUserInput(e,{role:t="user",expectStreaming:i=!1}={}){return R(this,be,Vt).call(this,{type:"USER_INPUT",value:e,role:t},{expectStreaming:i})}sendUserCancel(){return R(this,be,Vt).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return R(this,be,Vt).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return R(this,be,Vt).call(this,{type:"USER_TYPING_STOP"})}reloadConfig(){R(this,be,Vt).call(this,{type:"RELOAD_CONFIG"})}close(){h(this,Ke).close(1e3,"closed by user")}retry(){clearTimeout(h(this,yn)),$(this,yn,setTimeout(()=>{h(this,$e).onReconnect?.(),$(this,Ke,this.initWS())},1e3*h(this,mn))),na(this,mn)._++}initWS(){return new pr(h(this,ye),{url:()=>h(this,$e).url(this.conversationId,{}),onOpen:e=>R(this,be,xl).call(this,e),onMessage:e=>R(this,be,kl).call(this,JSON.parse(e.data)),onError:e=>R(this,be,Sl).call(this,e),onClose:e=>R(this,be,El).call(this,e)})}hostConnected(){this.conversationId=h(this,$e).restoreConversationState?.()?.conversationId||""}reset(){R(this,be,Vt).call(this,{type:"NEW_CHAT"}),h(this,$e).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,h(this,ye).requestUpdate()}hostDisconnected(){clearTimeout(h(this,yn))}reconnectSocket(){h(this,Ke).close(1e3,"destroy"),$(this,Ke,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};ye=new WeakMap,$e=new WeakMap,Ke=new WeakMap,mn=new WeakMap,yn=new WeakMap,be=new WeakSet,Vt=function(e,{expectStreaming:t=!1}={}){return h(this,Ke).isConnected?(t&&!this.isLiveMode&&(this.isStreaming=!0,h(this,ye).requestUpdate()),h(this,Ke).send(JSON.stringify(e)),!0):(console.warn("WebSocket is not connected, message not sent - reconnecting now",e),this.retry(),!1)},xl=function(e){$(this,mn,0)},kl=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,e.message].filter((t,i,r)=>i===r.findIndex(s=>s.id===t.id)),this.typingIndicator=void 0,h(this,ye).requestUpdate(),h(this,$e).onNewMessage?.(e.message);break}case"UPDATE_MESSAGE":{let t=this.messages.find(i=>i.id===e.message.id);if(t)Object.assign(t,e.message),h(this,ye).requestUpdate(),h(this,$e).onUpdateMessage?.(e);else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let t=this.messages.find(i=>i.id===e.message.id);if(t)Object.assign(t,e.message);else throw new Error(`Message with id ${e.message.id} not found`);this.isStreaming=!1,h(this,ye).requestUpdate(),h(this,$e).onMessageDone?.(e,t);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,h(this,ye).requestUpdate();break}case"ERROR":{h(this,$e).onMessageError?.(e);break}case"CONNECTED":{e.messages&&(this.messages=e.messages),this.conversationId=e.conversationId,h(this,$e).onConnect?.(e.conversationId),h(this,$e).persistConversationState?.(e.conversationId),this.isLiveMode=e.metadata?.isLiveMode,h(this,ye).requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},h(this,ye).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,h(this,ye).requestUpdate();break}case"RAN_OUT_OF_CREDITS":{this.messages.some(t=>t.id===wl)||this.messages.push({id:wl,role:"assistant",content:"Sorry, I've run out of credits. Please contact the shop directly.",timestamp:Date.now()}),this.ranOutOfCredits=!0,h(this,ye).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),h(this,ye).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},Sl=function(e){console.error("onError",e),h(this,$e).onError?.(e)},El=function(e){h(this,ye).isConnected&&!h(this,Ke).isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,h(this,ye).requestUpdate(),h(this,$e).onClose?.()};var ri,_n,$t,Xt,dr,$l,hr=class{constructor(e,t,{timeoutMs:i=2e3}={}){b(this,dr);b(this,ri);b(this,_n);b(this,$t);b(this,Xt,!1);S(this,"timeoutMs");$(this,ri,e),$(this,_n,t),this.timeoutMs=i,e.addController(this)}get isTyping(){return h(this,Xt)}hostDisconnected(){clearTimeout(h(this,$t)),$(this,$t,void 0)}onInput(e){if(h(this,ri).isConnected){if(!e.trim()){this.typingStopped();return}clearTimeout(h(this,$t)),$(this,$t,setTimeout(()=>this.typingStopped(),this.timeoutMs)),h(this,Xt)||R(this,dr,$l).call(this)}}typingStopped(){clearTimeout(h(this,$t)),$(this,Xt,!1),h(this,_n).typingStopped()}};ri=new WeakMap,_n=new WeakMap,$t=new WeakMap,Xt=new WeakMap,dr=new WeakSet,$l=function(){$(this,Xt,!0),h(this,_n).typingStarted()};function Cl(n,e){let t=new Map;for(let i of n){let r=e(i);t.has(r)||t.set(r,[]),(t.get(r)||[]).push(i)}return t}function Al(n,e="en-US"){let t=new Intl.DateTimeFormat(e,{hour:"numeric",minute:"numeric"}).format(n);return`${n.toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric"})}, ${t}`}var Yg=le({wsApiUrl:q(),url:q(),logoUrl:T(q()),title:q(),status:q(),color:q(),showStillLearningBanner:T(Ee()),allowedOrigins:T(vn(q())),input:le({placeholder:q()}),bubble:le({imageUrl:T(q()),position:le({bottom:T(q()),right:T(q()),left:T(q())}),mobilePosition:T(le({bottom:T(q()),right:T(q()),left:T(q())}))}),examples:le({title:q(),items:vn(q())}),instructions:le({items:vn(q())}),popup:T(le({mobileEnabled:T(Ee()),desktopEnabled:T(Ee()),delayMs:T(rt()),text:T(q()),mobileTitleText:T(q()),mobileButtonText:T(q())})),tryItOut:T(le({mobileEnabled:T(Ee()),desktopEnabled:T(Ee()),text:T(q())})),contactDetails:T(le({email:T(q()),phone:T(q()),socialMedia:T(le({facebook:T(q()),instagram:T(q()),twitter:T(q())}))})),neverShowStillLearningBanner:T(Ee()),hidden:T(Ee()),newChatTitle:T(q()),webhookURL:T(q()),automatedResponse:T(le({enabled:T(Ee()),text:T(q()),latencyThresholdMs:T(rt())})),manual:T(Ee()),removePoweredBy:T(Ee()),claimable:T(Ee()),feed:T(q()),scraper:T(cr(["netkazan","jateknet","grandopet","insportline","partocean"])),platform:T(cr(["shopify","shoprenter","unas","scraper"])),workingHours:T(le({dailyAvailability:vn(le({dayOfWeek:_l(rt(),Gs(0),Ws(6)),startTime:q(),endTime:q(),isActive:Ee()})),userTimeZone:T(q())})),planOverrides:T(le({maxProducts:T(rt()),conversations:T(rt()),faqs:T(le({max:T(rt()),questionLength:T(rt()),answerLength:T(rt())}))})),omitGeneralGuidelines:T(Ee()),forceStripe:T(Ee())});var Bp="\xB7 \xB7 \xB7",zp=le({conversationId:T(q())}),ne,gr,si,re,Il,Tl,Rl,Pl,Ol,Fl,Ml,Js,vr=class vr extends z(j){constructor(){super();b(this,ne);b(this,si,new hr(this,{typingStarted:()=>h(this,re).sendUserTypingStart(),typingStopped:()=>h(this,re).sendUserTypingStop()}));b(this,re,new fr(this,{url:(t,{resume:i}={})=>{let r=new URL(this.config.wsApiUrl);return r.searchParams.set("widgetId",this.widgetId),r.searchParams.set("resume",i?"1":""),r.searchParams.set("conversationId",t),r.searchParams.set("pageUrl",window.location.href),r},onReconnect:()=>{},onError:t=>{console.error("ws error",t)},onClose:()=>{},onNewMessage:t=>{t.role==="user"&&h(this,ne,Js)?.scrollTo(0,h(this,ne,Js).scrollHeight),t.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:t,conversationId:this.conversationId})},onMessageDone:(t,i)=>{i.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:i.content??"",message:i,usage_TOKENS_COMPLETION:t.message.usage.TOKENS_COMPLETION,conversationId:this.conversationId})},onMessageError:t=>{console.error("ws message error",t),t.message&&this.callbacks.onError?.({widgetId:this.widgetId,error:"WS: "+t.message})},onReset:()=>{localStorage.removeItem(h(this,ne,gr))},onConnect:t=>{},persistConversationState:t=>{localStorage.setItem(h(this,ne,gr),JSON.stringify({conversationId:t}))},restoreConversationState:()=>{try{let t=JSON.parse(localStorage.getItem(h(this,ne,gr))||"{}");return{conversationId:yl(zp,t).conversationId||""}}catch(t){return console.error(t),{conversationId:""}}}}));this.config={},this.callbacks={},this.showClose=!1}get widgetId(){return this.config.widgetId}get conversationId(){return h(this,re).conversationId}get messages(){return h(this,re).messages}render(){let t=Cl(this.messages,i=>new Date(i.timestamp).setSeconds(0,0).toString());return O`
145
145
  <div class="mx-auto flex h-full w-full flex-col bg-white font-sans text-base">
146
146
  <mw-header
147
147
  class="z-10 border-b"
148
148
  .content="${{logoUrl:this.config.logoUrl,title:this.config.title,status:this.config.status,color:this.config.color,newChatTitle:this.config.newChatTitle}}"
149
149
  ?show-new-chat="${!h(this,re).isLiveMode&&this.messages.length>0}"
150
150
  ?show-close="${this.showClose}"
151
- @mw:new-chat-click="${R(this,ne,Pl)}"
152
- @mw:close-click="${R(this,ne,Ol)}">
151
+ @mw:new-chat-click="${R(this,ne,Fl)}"
152
+ @mw:close-click="${R(this,ne,Ml)}">
153
153
  </mw-header>
154
154
 
155
155
  <!-- used by the dashboard to inject content -->
@@ -175,13 +175,13 @@ CHAT`}</span>
175
175
 
176
176
  <!-- this is the 2nd (inner) div that will natively stick/scroll to bottom -->
177
177
  <div>
178
- ${Yn(Array.from(t),([i])=>i,([i,r])=>O`
179
- <div class="my-2 text-center text-xs text-gray-500">${$l(new Date(Number(i)),window.navigator.language)}</div>
180
- ${Yn(r??[],s=>s.id,(s,o)=>{let l=r[o+1]?.role===s.role,u=h(this,re).isLiveMode&&s.role==="user"&&s.id===h(this,re).lastMsg?.id?"sent":"";return O`
178
+ ${Qn(Array.from(t),([i])=>i,([i,r])=>O`
179
+ <div class="my-2 text-center text-xs text-gray-500">${Al(new Date(Number(i)),window.navigator.language)}</div>
180
+ ${Qn(r??[],s=>s.id,(s,o)=>{let l=r[o+1]?.role===s.role,u=h(this,re).isLiveMode&&s.role==="user"&&s.id===h(this,re).lastMsg?.id?"sent":"";return O`
181
181
  <div class="${l?"mb-[2px]":"mb-3"} mx-4 flex-row">
182
- <mw-chat-message color="${this.config.color}" status="${u}" logo="${s.metadata?.avatar||this.config.logoUrl}" side="${s.role}" @click="${R(this,ne,Cl)}">
182
+ <mw-chat-message color="${this.config.color}" status="${u}" logo="${s.metadata?.avatar||this.config.logoUrl}" side="${s.role}" @click="${R(this,ne,Il)}">
183
183
  <div class="prose break-words text-inherit">
184
- ${s.content===Np?O`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>`:s.content_html?gl(s.content_html):O`<p>${s.content}</p>`}
184
+ ${s.content===Bp?O`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>`:s.content_html?ml(s.content_html):O`<p>${s.content}</p>`}
185
185
  </div>
186
186
  </mw-chat-message>
187
187
  </div>
@@ -201,15 +201,15 @@ CHAT`}</span>
201
201
  <mw-background
202
202
  class="mx-auto max-w-sm flex-grow"
203
203
  .examples="${this.messages.length>0?[]:this.config.examples}"
204
- @mw:example-click="${R(this,ne,Al)}"></mw-background>
204
+ @mw:example-click="${R(this,ne,Tl)}"></mw-background>
205
205
  </div>
206
206
 
207
207
  <div class="flex-shrink-0 flex-grow-0 space-y-2 pb-2">
208
- <mw-chat-input @mw:change="${R(this,ne,Tl)}" @mw:submit="${R(this,ne,Il)}" @mw:cancel="${R(this,ne,Rl)}" placeholder="${this.config.input?.placeholder}" color="${this.config.color}" ?disabled="${h(this,re).ranOutOfCredits}" ?streaming="${h(this,re)?.isStreaming??!0}"></mw-chat-input>
208
+ <mw-chat-input @mw:change="${R(this,ne,Pl)}" @mw:submit="${R(this,ne,Rl)}" @mw:cancel="${R(this,ne,Ol)}" placeholder="${this.config.input?.placeholder}" color="${this.config.color}" ?disabled="${h(this,re).ranOutOfCredits}" ?streaming="${h(this,re)?.isStreaming??!0}"></mw-chat-input>
209
209
  ${this.config.removePoweredBy?D:O`<mw-powered-by></mw-powered-by>`}
210
210
  </div>
211
211
  </div>
212
- `}reloadConfig(){h(this,re).reloadConfig(),this.requestUpdate()}};ne=new WeakSet,hr=function(){if(!this.widgetId)throw new Error("widgetId is not set");return`_molin_${this.widgetId}`},ii=new WeakMap,re=new WeakMap,Cl=function(t){let i=t.target;if(i instanceof HTMLAnchorElement){if(t.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:i.href,conversationId:this.conversationId}),window.self!==window.top){window.open(i.href,"_blank");return}window.open(i.href,i.target)}},Al=function(t){let i=t.detail.example;if(!h(this,re)?.sendUserInput(i)){t.preventDefault();return}this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:i,example:!0,conversationId:this.conversationId})},Il=function(t){let i=t.detail;if(!h(this,re)?.sendUserInput(i)){t.preventDefault();return}h(this,ii).typingStopped(),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:i,example:!1,conversationId:this.conversationId})},Tl=function(t){h(this,ii).onInput(t.detail.full)},Rl=function(){h(this,re)?.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})},Pl=function(){h(this,re).reset()},Ol=function(){this.dispatchEvent(new dr.CloseClickEvent)},Vs=function(){return this.renderRoot.querySelector("#scrollable-content")},S(dr,"properties",{config:{type:Object,attribute:!1},callbacks:{type:Object,attribute:!1},showClose:{type:Boolean,attribute:"show-close"}});var bn=dr,Gs;bn.CloseClickEvent=(Gs=class extends CustomEvent{constructor(e={}){super(bn.CloseClickEvent.type,{...e})}},S(Gs,"type","mw:close-click"),Gs);var gr=class extends z(j){constructor(){super(...arguments);S(this,"render",()=>O`
212
+ `}reloadConfig(){h(this,re).reloadConfig(),this.requestUpdate()}};ne=new WeakSet,gr=function(){if(!this.widgetId)throw new Error("widgetId is not set");return`_molin_${this.widgetId}`},si=new WeakMap,re=new WeakMap,Il=function(t){let i=t.target;if(i instanceof HTMLAnchorElement){if(t.preventDefault(),this.callbacks.onUserClickedLink?.({widgetId:this.widgetId,url:i.href,conversationId:this.conversationId}),window.self!==window.top){window.open(i.href,"_blank");return}window.open(i.href,i.target)}},Tl=function(t){let i=t.detail.example;if(!h(this,re)?.sendUserInput(i)){t.preventDefault();return}this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:i,example:!0,conversationId:this.conversationId})},Rl=function(t){let i=t.detail;if(!h(this,re)?.sendUserInput(i)){t.preventDefault();return}h(this,si).typingStopped(),this.callbacks.onUserSentInput?.({widgetId:this.widgetId,text:i,example:!1,conversationId:this.conversationId})},Pl=function(t){h(this,si).onInput(t.detail.full)},Ol=function(){h(this,re)?.sendUserCancel(),this.callbacks.onUserCanceledStreaming?.({widgetId:this.widgetId})},Fl=function(){h(this,re).reset()},Ml=function(){this.dispatchEvent(new vr.CloseClickEvent)},Js=function(){return this.renderRoot.querySelector("#scrollable-content")},S(vr,"properties",{config:{type:Object,attribute:!1},callbacks:{type:Object,attribute:!1},showClose:{type:Boolean,attribute:"show-close"}});var bn=vr,Xs;bn.CloseClickEvent=(Xs=class extends CustomEvent{constructor(e={}){super(bn.CloseClickEvent.type,{...e})}},S(Xs,"type","mw:close-click"),Xs);var mr=class extends z(j){constructor(){super(...arguments);S(this,"render",()=>O`
213
213
  <svg class="leading-0 inline-block h-full w-full" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" xml:space="preserve">
214
214
  <circle fill="currentFill" stroke="none" cx="27" cy="50" r="6">
215
215
  <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
@@ -221,25 +221,25 @@ CHAT`}</span>
221
221
  <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3" />
222
222
  </circle>
223
223
  </svg>
224
- `)}};var wn,Fl,Ml,ri=class ri extends z(j){constructor(){super();b(this,wn);S(this,"render",()=>O`
224
+ `)}};var wn,Dl,Ll,oi=class oi extends z(j){constructor(){super();b(this,wn);S(this,"render",()=>O`
225
225
  <!-- wrapper -->
226
226
  <div class="group relative z-[2147483647] rounded-t-2xl bg-white font-sans text-base leading-normal shadow-2xl select-none w-[300px] rounded-2xl cursor-pointer">
227
227
  <!-- close button -->
228
- <button class="absolute pb-[2px] -top-2 right-3 inline-flex h-6 w-6 items-center justify-center rounded-full text-gray-700 bg-gray-300 bg-opacity-50 text-center duration-300 ease-in-out opacity-0 shadow transition-opacity group-hover:opacity-100" @click="${R(this,wn,Fl)}" aria-label="Close">×</button>
228
+ <button class="absolute pb-[2px] -top-2 right-3 inline-flex h-6 w-6 items-center justify-center rounded-full text-gray-700 bg-gray-300 bg-opacity-50 text-center duration-300 ease-in-out opacity-0 shadow transition-opacity group-hover:opacity-100" @click="${R(this,wn,Dl)}" aria-label="Close">×</button>
229
229
 
230
230
  <!-- content -->
231
- <div class="p-4 text-left text-gray-800" @click="${R(this,wn,Ml)}">
231
+ <div class="p-4 text-left text-gray-800" @click="${R(this,wn,Ll)}">
232
232
  <p>${this.text}</p>
233
233
  </div>
234
234
  </div>
235
- `);this.text="Hello there. How can we help?"}};wn=new WeakSet,Fl=function(){this.dispatchEvent(new ri.CloseEvent)},Ml=function(){this.dispatchEvent(new ri.ClickEvent)},S(ri,"properties",{text:{type:String}});var At=ri,Xs;At.CloseEvent=(Xs=class extends CustomEvent{constructor(e={}){super(At.CloseEvent.type,{...e})}},S(Xs,"type","mw:close"),Xs);var Js;At.ClickEvent=(Js=class extends CustomEvent{constructor(e={}){super(At.ClickEvent.type,{...e})}},S(Js,"type","mw:click"),Js);var xn,Dl,Ll,si=class si extends z(j){constructor(){super();b(this,xn);S(this,"render",()=>O`
235
+ `);this.text="Hello there. How can we help?"}};wn=new WeakSet,Dl=function(){this.dispatchEvent(new oi.CloseEvent)},Ll=function(){this.dispatchEvent(new oi.ClickEvent)},S(oi,"properties",{text:{type:String}});var Ct=oi,Ys;Ct.CloseEvent=(Ys=class extends CustomEvent{constructor(e={}){super(Ct.CloseEvent.type,{...e})}},S(Ys,"type","mw:close"),Ys);var Ks;Ct.ClickEvent=(Ks=class extends CustomEvent{constructor(e={}){super(Ct.ClickEvent.type,{...e})}},S(Ks,"type","mw:click"),Ks);var xn,jl,ql,ai=class ai extends z(j){constructor(){super();b(this,xn);S(this,"render",()=>O`
236
236
  <!-- wrapper -->
237
237
  <div class="group relative z-[2147483647] rounded-t-2xl text-left bg-white font-sans text-base text-[16px] leading-normal shadow-2xl select-none text-gray-800 transition-all">
238
238
  <!-- close button -->
239
- <button class="absolute pb-[2px] top-[28px] right-4 inline-flex h-6 w-6 items-center justify-center rounded-full bg-gray-300 bg-opacity-50 text-center shadow-none duration-300 ease-in-out focus:outline-none" @click="${R(this,xn,Dl)}" aria-label="Close">×</button>
239
+ <button class="absolute pb-[2px] top-[28px] right-4 inline-flex h-6 w-6 items-center justify-center rounded-full bg-gray-300 bg-opacity-50 text-center shadow-none duration-300 ease-in-out focus:outline-none" @click="${R(this,xn,jl)}" aria-label="Close">×</button>
240
240
 
241
241
  <!-- content -->
242
- <div class="p-4 text-gray-800" @click="${R(this,xn,Ll)}">
242
+ <div class="p-4 text-gray-800" @click="${R(this,xn,ql)}">
243
243
  <h1 class="mr-8 py-2.5 text-left font-display text-lg font-bold">${this.title}</h1>
244
244
  <p class="py-2.5 text-left">${this.text}</p>
245
245
  <div class="h-4"></div>
@@ -252,25 +252,25 @@ CHAT`}</span>
252
252
  <!-- can append any other content -->
253
253
  <slot name="footer"></slot>
254
254
  </div>
255
- `);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};xn=new WeakSet,Dl=function(){this.dispatchEvent(new si.CloseEvent)},Ll=function(){this.dispatchEvent(new si.ClickEvent)},S(si,"properties",{title:{type:String},text:{type:String},button:{type:String},color:{type:String}});var It=si,Ys;It.CloseEvent=(Ys=class extends CustomEvent{constructor(e={}){super(It.CloseEvent.type,{...e})}},S(Ys,"type","mw:close"),Ys);var Ks;It.ClickEvent=(Ks=class extends CustomEvent{constructor(e={}){super(It.ClickEvent.type,{...e})}},S(Ks,"type","mw:click"),Ks);var kn,oi,Yt,vr=class{constructor(e,t){b(this,kn);b(this,oi,!1);b(this,Yt,()=>{h(this,oi)||(h(this,kn).userFirstInteracted?.(),T(this,oi,!0)),h(this,kn).userInteracted?.()});T(this,kn,t),e.addController(this)}hostConnected(){this.startListening()}hostDisconnected(){this.stopListening()}startListening(){window.addEventListener("click",h(this,Yt)),window.addEventListener("keydown",h(this,Yt))}stopListening(){window.removeEventListener("click",h(this,Yt)),window.removeEventListener("keydown",h(this,Yt))}};kn=new WeakMap,oi=new WeakMap,Yt=new WeakMap;var Bp=2*60*60*1e3,Sn,Ne,Kt,ai,Qt,li,yr,jl,mr=class{constructor(e,t,i=Date){b(this,yr);b(this,Sn);b(this,Ne);b(this,Kt);b(this,ai);b(this,Qt,!1);b(this,li,!1);T(this,Sn,e),T(this,Ne,t),T(this,Kt,i),e.addController(this)}get showing(){return h(this,Qt)}hostDisconnected(){this.abortAutoShowTimer()}show({sound:e}={}){if(this.abortAutoShowTimer(),!h(this,Qt)&&(T(this,Qt,!0),h(this,Sn).requestUpdate(),e)){h(this,Ne).playPopupSound();let t=h(this,Ne).getPersistedState();h(this,Ne).setPersistedState({...t,playedSoundOnce:!0})}}hide(){T(this,li,!0),this.abortAutoShowTimer(),T(this,Qt,!1),h(this,Sn).requestUpdate()}abortAutoShowTimer(){clearTimeout(h(this,ai))}onCloseClick(){let e=h(this,Ne).getPersistedState();h(this,Ne).setPersistedState({...e,userDismissedAt:h(this,Kt).now()}),this.hide()}onContentClick(){let e=h(this,Ne).getPersistedState();h(this,Ne).setPersistedState({...e,userDismissedAt:h(this,Kt).now()}),this.hide()}userFirstInteracted(){this.abortAutoShowTimer(),h(this,li)||T(this,ai,setTimeout(()=>R(this,yr,jl).call(this),h(this,Ne).delayMs()))}};Sn=new WeakMap,Ne=new WeakMap,Kt=new WeakMap,ai=new WeakMap,Qt=new WeakMap,li=new WeakMap,yr=new WeakSet,jl=function(){let e=h(this,Ne).getPersistedState(),t=!!e?.playedSoundOnce;e?.userDismissedAt&&h(this,Kt).now()-e.userDismissedAt<Bp||this.show({sound:!t})};var Tt,to,Rt,Zs,eo,_r=class _r extends z(j){constructor(){super();b(this,Rt);b(this,Tt,new mr(this,{delayMs:()=>this.delayMs,playPopupSound:()=>{this.soundUrl&&new Audio(this.soundUrl).play().then(()=>{}).catch(t=>{console.error("Error playing audio:",t)})},setPersistedState:t=>{t?localStorage.setItem("_molin_popup",JSON.stringify(t)):localStorage.removeItem("_molin_popup")},getPersistedState:()=>{let t=localStorage.getItem("_molin_popup");try{return t?JSON.parse(t):null}catch{return null}}}));b(this,to,new vr(this,h(this,Tt)));this.positionClasses="",this.delayMs=0,this.soundUrl="",this.content={desktop:{text:""},mobile:{title:"",text:"",button:"",color:"",poweredBy:!0}}}render(){let t=h(this,Tt).showing?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3",i=this.content;return O`
255
+ `);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};xn=new WeakSet,jl=function(){this.dispatchEvent(new ai.CloseEvent)},ql=function(){this.dispatchEvent(new ai.ClickEvent)},S(ai,"properties",{title:{type:String},text:{type:String},button:{type:String},color:{type:String}});var At=ai,Qs;At.CloseEvent=(Qs=class extends CustomEvent{constructor(e={}){super(At.CloseEvent.type,{...e})}},S(Qs,"type","mw:close"),Qs);var Zs;At.ClickEvent=(Zs=class extends CustomEvent{constructor(e={}){super(At.ClickEvent.type,{...e})}},S(Zs,"type","mw:click"),Zs);var kn,li,Jt,yr=class{constructor(e,t){b(this,kn);b(this,li,!1);b(this,Jt,()=>{h(this,li)||(h(this,kn).userFirstInteracted?.(),$(this,li,!0)),h(this,kn).userInteracted?.()});$(this,kn,t),e.addController(this)}hostConnected(){this.startListening()}hostDisconnected(){this.stopListening()}startListening(){window.addEventListener("click",h(this,Jt)),window.addEventListener("keydown",h(this,Jt))}stopListening(){window.removeEventListener("click",h(this,Jt)),window.removeEventListener("keydown",h(this,Jt))}};kn=new WeakMap,li=new WeakMap,Jt=new WeakMap;var Hp=2*60*60*1e3,Sn,Ne,Yt,ui,Kt,ci,br,Nl,_r=class{constructor(e,t,i=Date){b(this,br);b(this,Sn);b(this,Ne);b(this,Yt);b(this,ui);b(this,Kt,!1);b(this,ci,!1);$(this,Sn,e),$(this,Ne,t),$(this,Yt,i),e.addController(this)}get showing(){return h(this,Kt)}hostDisconnected(){this.abortAutoShowTimer()}show({sound:e}={}){if(this.abortAutoShowTimer(),!h(this,Kt)&&($(this,Kt,!0),h(this,Sn).requestUpdate(),e)){h(this,Ne).playPopupSound();let t=h(this,Ne).getPersistedState();h(this,Ne).setPersistedState({...t,playedSoundOnce:!0})}}hide(){$(this,ci,!0),this.abortAutoShowTimer(),$(this,Kt,!1),h(this,Sn).requestUpdate()}abortAutoShowTimer(){clearTimeout(h(this,ui))}onCloseClick(){let e=h(this,Ne).getPersistedState();h(this,Ne).setPersistedState({...e,userDismissedAt:h(this,Yt).now()}),this.hide()}onContentClick(){let e=h(this,Ne).getPersistedState();h(this,Ne).setPersistedState({...e,userDismissedAt:h(this,Yt).now()}),this.hide()}userFirstInteracted(){this.abortAutoShowTimer(),h(this,ci)||$(this,ui,setTimeout(()=>R(this,br,Nl).call(this),h(this,Ne).delayMs()))}};Sn=new WeakMap,Ne=new WeakMap,Yt=new WeakMap,ui=new WeakMap,Kt=new WeakMap,ci=new WeakMap,br=new WeakSet,Nl=function(){let e=h(this,Ne).getPersistedState(),t=!!e?.playedSoundOnce;e?.userDismissedAt&&h(this,Yt).now()-e.userDismissedAt<Hp||this.show({sound:!t})};var It,io,Tt,to,no,wr=class wr extends z(j){constructor(){super();b(this,Tt);b(this,It,new _r(this,{delayMs:()=>this.delayMs,playPopupSound:()=>{this.soundUrl&&new Audio(this.soundUrl).play().then(()=>{}).catch(t=>{console.error("Error playing audio:",t)})},setPersistedState:t=>{t?localStorage.setItem("_molin_popup",JSON.stringify(t)):localStorage.removeItem("_molin_popup")},getPersistedState:()=>{let t=localStorage.getItem("_molin_popup");try{return t?JSON.parse(t):null}catch{return null}}}));b(this,io,new yr(this,h(this,It)));this.positionClasses="",this.delayMs=0,this.soundUrl="",this.content={desktop:{text:""},mobile:{title:"",text:"",button:"",color:"",poweredBy:!0}}}render(){let t=h(this,It).showing?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3",i=this.content;return O`
256
256
  <!-- mobile shadow backdrop -->
257
257
  <div class="sm:hidden ${t} fixed inset-0 z-[2147483647] bg-black/50 transition-[opacity,visibility]"></div>
258
258
 
259
259
  <!-- mobile overlay -->
260
260
  <div class="sm:hidden ${t} fixed bottom-0 z-[2147483647] left-0 right-0">
261
- <mw-popup-mobile title="${i.mobile.title}" text="${i.mobile.text}" button="${i.mobile.button}" color="${i.mobile.color}" @mw:click="${R(this,Rt,eo)}" @mw:close="${R(this,Rt,Zs)}">
261
+ <mw-popup-mobile title="${i.mobile.title}" text="${i.mobile.text}" button="${i.mobile.button}" color="${i.mobile.color}" @mw:click="${R(this,Tt,no)}" @mw:close="${R(this,Tt,to)}">
262
262
  ${i.mobile.poweredBy?O`<mw-powered-by class="block p-4" slot="footer"></mw-powered-by>`:D}
263
263
  </mw-popup-mobile>
264
264
  </div>
265
265
 
266
266
  <!-- desktop -->
267
267
  <div class="max-sm:hidden ${t} ${this.positionClasses} z-[2147483647] fixed transition-[opacity,translate,visibility]">
268
- <mw-popup-desktop text="${i.desktop.text}" @mw:click="${R(this,Rt,eo)}" @mw:close="${R(this,Rt,Zs)}"></mw-popup-desktop>
268
+ <mw-popup-desktop text="${i.desktop.text}" @mw:click="${R(this,Tt,no)}" @mw:close="${R(this,Tt,to)}"></mw-popup-desktop>
269
269
  </div>
270
- `}hide(){h(this,Tt).hide()}};Tt=new WeakMap,to=new WeakMap,Rt=new WeakSet,Zs=function(){h(this,Tt).onCloseClick()},eo=function(){this.dispatchEvent(new _r.ClickEvent),h(this,Tt).onContentClick()},S(_r,"properties",{positionClasses:{type:String,attribute:"position"},delayMs:{type:Number,attribute:"delay"},soundUrl:{type:String,attribute:"sound"},content:{type:Object}});var En=_r,Qs;En.ClickEvent=(Qs=class extends CustomEvent{constructor(e={}){super(En.ClickEvent.type,{...e})}},S(Qs,"type","mw:click"),Qs);var zp="https://molin.ai/?utm_source=molin-shop-ai&utm_medium=widget&utm_campaign=poweredby",ui=class extends z(j){constructor(){super(...arguments);S(this,"render",()=>O`
270
+ `}hide(){h(this,It).hide()}};It=new WeakMap,io=new WeakMap,Tt=new WeakSet,to=function(){h(this,It).onCloseClick()},no=function(){this.dispatchEvent(new wr.ClickEvent),h(this,It).onContentClick()},S(wr,"properties",{positionClasses:{type:String,attribute:"position"},delayMs:{type:Number,attribute:"delay"},soundUrl:{type:String,attribute:"sound"},content:{type:Object}});var En=wr,eo;En.ClickEvent=(eo=class extends CustomEvent{constructor(e={}){super(En.ClickEvent.type,{...e})}},S(eo,"type","mw:click"),eo);var Wp="https://molin.ai/?utm_source=molin-shop-ai&utm_medium=widget&utm_campaign=poweredby",pi=class extends z(j){constructor(){super(...arguments);S(this,"render",()=>O`
271
271
  <p class="flex items-center justify-center bg-white m-0 space-x-1 text-xs font-sans text-gray-400">
272
272
  <span class="pointer-events-none select-none">Powered by</span>
273
- <a class="inline-flex items-center space-x-1 text-gray-600 underline" href="${zp}" target="_blank">
273
+ <a class="inline-flex items-center space-x-1 text-gray-600 underline" href="${Wp}" target="_blank">
274
274
  <!-- molin logo icon -->
275
275
  <svg class="h-4 w-4 text-gray-600" width="1600" height="1600" viewBox="0 0 1600 1600" fill="none" xmlns="http://www.w3.org/2000/svg">
276
276
  <g clip-path="url(#clip0_1347_2815)">
@@ -286,19 +286,19 @@ CHAT`}</span>
286
286
  <span>Molin AI</span>
287
287
  </a>
288
288
  </p>
289
- `)}};S(ui,"styles",As`
289
+ `)}};S(pi,"styles",Ts`
290
290
  :host {
291
291
  display: block;
292
292
  }
293
- `);var br,ql,ci=class extends z(j){constructor(){super();b(this,br);S(this,"render",()=>O`
293
+ `);var xr,Ul,fi=class extends z(j){constructor(){super();b(this,xr);S(this,"render",()=>O`
294
294
  <span class="relative inline-flex">
295
295
  <slot></slot>
296
- <span class="${h(this,br,ql)} pointer-events-none absolute flex h-3 w-3">
296
+ <span class="${h(this,xr,Ul)} pointer-events-none absolute flex h-3 w-3">
297
297
  <span class="bg-${this.color} absolute inline-flex h-3 w-3 animate-ping rounded-full opacity-75"></span>
298
298
  <span class="bg-${this.color} relative inline-flex h-3 w-3 rounded-full"></span>
299
299
  </span>
300
300
  </span>
301
- `);this.color="sky-500",this.position="top-right"}};br=new WeakSet,ql=function(){switch(this.position){case"top-left":return"top-0 left-0 -mt-1 -ml-1";case"top-right":return"top-0 right-0 -mt-1 -mr-1";case"bottom-left":return"bottom-0 left-0 -mb-1 -ml-1";case"bottom-right":return"bottom-0 right-0 -mb-1 -mr-1";default:throw new Error(`Invalid position: ${this.position}`)}},S(ci,"properties",{color:{type:String,attribute:"color"},position:{type:String,attribute:"position"}});var pi=class extends z(j){constructor(){super();S(this,"render",()=>O`
301
+ `);this.color="sky-500",this.position="top-right"}};xr=new WeakSet,Ul=function(){switch(this.position){case"top-left":return"top-0 left-0 -mt-1 -ml-1";case"top-right":return"top-0 right-0 -mt-1 -mr-1";case"bottom-left":return"bottom-0 left-0 -mb-1 -ml-1";case"bottom-right":return"bottom-0 right-0 -mb-1 -mr-1";default:throw new Error(`Invalid position: ${this.position}`)}},S(fi,"properties",{color:{type:String,attribute:"color"},position:{type:String,attribute:"position"}});var hi=class extends z(j){constructor(){super();S(this,"render",()=>O`
302
302
  <div class="fixed bottom-24 right-6 flex animate-bounce flex-col items-center justify-center font-sans text-base ${this.positionClasses}">
303
303
  <p class="text-md mb-2 -translate-x-4 -rotate-12 transform text-lg font-bold leading-normal text-gray-800">${this.text}</p>
304
304
 
@@ -307,22 +307,22 @@ CHAT`}</span>
307
307
  <path d="M1.41089 1.17749C13.4657 11.874 23.3966 26.992 30.4581 41.4117C31.9751 44.5093 33.1523 47.7224 34.4136 50.9242C34.6288 51.4705 35.4719 52.2988 34.8747 51.5309C33.1064 49.2574 28.9356 48.4966 26.3813 47.9151C23.973 47.3669 17.1432 44.725 19.1984 46.0951C22.9606 48.6033 26.6842 51.3163 30.5552 53.7391C32.8502 55.1756 34.9449 57.9465 37.0101 55.8018C41.8322 50.7943 47.8486 46.2228 53.4629 42.1397" stroke="#303132" stroke-width="2" stroke-linecap="round"></path>
308
308
  </svg>
309
309
  </div>
310
- `);this.positionClasses="",this.text="Try it out"}};S(pi,"properties",{positionClasses:{type:String,attribute:"position"},text:{type:String}});customElements.define("mw-background",fn);customElements.define("mw-bubble",Jn);customElements.define("mw-chat",bn);customElements.define("mw-chat-input",it);customElements.define("mw-chat-message",Qn);customElements.define("mw-header",Et);customElements.define("mw-loading",gr);customElements.define("mw-popup",En);customElements.define("mw-powered-by",ui);customElements.define("mw-pulse-dot",ci);customElements.define("mw-try-it-out",pi);customElements.define("mw-upsell-banner",Xn);customElements.define("mw-popup-desktop",At);customElements.define("mw-popup-mobile",It);window.__INIT_MOLIN_SHOP_AI=function(e){if(Hp(e),e.auto){let t=document.createElement("molin-shop-ai");t.setAttribute("cdn",e.cdn),t.setAttribute("widget",e.widgetId),document.body.appendChild(t)}};function Hp(n){window.__INIT_MOLIN_SHOP_AI_OPTIONS=n}function Nl(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var Zt,fi,Pt,st,xr,Ul,wr=class{constructor(e,t,i){b(this,xr);b(this,Zt);b(this,fi);b(this,Pt);b(this,st,new AbortController);S(this,"isLoading",!1);S(this,"data");T(this,Zt,e),T(this,fi,t),T(this,Pt,i),e.addController(this)}fetch(){h(this,st).abort(),T(this,st,new AbortController),setTimeout(()=>{this.isLoading=!0,this.data=void 0,h(this,Zt).requestUpdate();let e;(async()=>(e=R(this,xr,Ul).call(this),e.signal?.addEventListener("abort",()=>h(this,st).abort(),{signal:h(this,st).signal}),fetch(e,{signal:h(this,st).signal})))().then(async t=>{if(!t.ok)throw new Error(`${t.statusText}: ${await t.text()}`);this.isLoading=!1,this.data=typeof h(this,Pt)?.transform=="function"?await h(this,Pt).transform(t):t,h(this,Zt).requestUpdate()}).catch(t=>{h(this,Pt)?.onError?.(t),this.isLoading=!1,this.data=void 0,h(this,Zt).requestUpdate()}).finally(()=>{h(this,st).abort()})})}hostConnected(){h(this,Pt)?.fetchWhenConnected&&this.fetch()}hostDisconnected(){h(this,st).abort()}};Zt=new WeakMap,fi=new WeakMap,Pt=new WeakMap,st=new WeakMap,xr=new WeakSet,Ul=function(){let e=h(this,fi);if(typeof e=="function"&&(e=e()),!e)throw new Error("missing request");return new Request(e)};var ot,hi,Ot=class{constructor(e,t){S(this,"data");b(this,ot);b(this,hi);T(this,ot,e),T(this,hi,t),e.addController(this)}hostConnected(){let e=Nl();if(e&&e.widgetId===h(this,ot).widgetId)this.data=e.config;else{let t=new wr(h(this,ot),()=>{if(h(this,ot).cdn&&h(this,ot).widgetId)return`${h(this,ot).cdn}/config?w=${h(this,ot).widgetId}`;throw new Error("missing cdn or widgetId")},{fetchWhenConnected:!0,transform:i=>i.json(),onError:h(this,hi)?.onError})}}};ot=new WeakMap,hi=new WeakMap;function Bl(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function $(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Bl(Object(t),!0).forEach(function(i){y(n,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Bl(Object(t)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(t,i))})}return n}function Si(n){return Si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Si(n)}function H(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function zl(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function W(n,e,t){return e&&zl(n.prototype,e),t&&zl(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function y(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Wp(n,e){if(n==null)return{};var t,i,r=function(o,a){if(o==null)return{};var l,u,c={},p=Object.keys(o);for(u=0;u<p.length;u++)l=p[u],a.indexOf(l)>=0||(c[l]=o[l]);return c}(n,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)t=s[i],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(r[t]=n[t])}return r}function Ie(n,e){return function(t){if(Array.isArray(t))return t}(n)||function(t,i){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var s,o,a=[],l=!0,u=!1;try{for(r=r.call(t);!(l=(s=r.next()).done)&&(a.push(s.value),!i||a.length!==i);l=!0);}catch(c){u=!0,o=c}finally{try{l||r.return==null||r.return()}finally{if(u)throw o}}return a}}(n,e)||jo(n,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
311
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function nn(n){return function(e){if(Array.isArray(e))return go(e)}(n)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(n)||jo(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
312
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function jo(n,e){if(n){if(typeof n=="string")return go(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?go(n,e):void 0}}function go(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=n[t];return i}function tt(n,e){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=jo(n))||e&&n&&typeof n.length=="number"){t&&(n=t);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
313
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var l=t.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{o||t.return==null||t.return()}finally{if(a)throw s}}}}var Lt={DEBUG:!1,LIB_VERSION:"1.139.0"},Gp=Array.isArray,Ou=Object.prototype,Fu=Ou.hasOwnProperty,Wr=Ou.toString,de=Gp||function(n){return Wr.call(n)==="[object Array]"},et=function(n){return typeof n=="function"},Ze=function(n){return n===Object(n)&&!de(n)},no=function(n){if(Ze(n)){for(var e in n)if(Fu.call(n,e))return!1;return!0}return!1},M=function(n){return n===void 0},Re=function(n){return Wr.call(n)=="[object String]"},bt=function(n){return n===null},yt=function(n){return M(n)||bt(n)},lt=function(n){return Wr.call(n)=="[object Number]"},Ir=function(n){return Wr.call(n)==="[object Boolean]"},Vp=function(n){return n instanceof FormData},m=typeof window<"u"?window:void 0,Le=typeof globalThis<"u"?globalThis:m,Mu=Array.prototype,Hl=Mu.forEach,Wl=Mu.indexOf,mt=Le?.navigator,C=Le?.document,De=Le?.location,vo=Le?.fetch,mo=Le!=null&&Le.XMLHttpRequest&&"withCredentials"in new Le.XMLHttpRequest?Le.XMLHttpRequest:void 0,Gl=Le?.AbortController,se=mt?.userAgent,he=m??{},Vl="[PostHog.js]",x={_log:function(n){if(m&&(Lt.DEBUG||he.POSTHOG_DEBUG)&&!M(m.console)&&m.console){for(var e=("__rrweb_original__"in m.console[n])?m.console[n].__rrweb_original__:m.console[n],t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];e.apply(void 0,[Vl].concat(i))}},info:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];x._log.apply(x,["log"].concat(e))},warn:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];x._log.apply(x,["warn"].concat(e))},error:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];x._log.apply(x,["error"].concat(e))},critical:function(){for(var n,e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];(n=console).error.apply(n,[Vl].concat(t))},uninitializedWarning:function(n){x.error("You must initialize PostHog before calling ".concat(n))}},Fr={},Gr=function(n){return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function In(n,e,t){if(de(n)){if(Hl&&n.forEach===Hl)n.forEach(e,t);else if("length"in n&&n.length===+n.length){for(var i=0,r=n.length;i<r;i++)if(i in n&&e.call(t,n[i],i)===Fr)return}}}function X(n,e,t){if(!yt(n)){if(de(n))return In(n,e,t);if(Vp(n)){var i,r=tt(n.entries());try{for(r.s();!(i=r.n()).done;){var s=i.value;if(e.call(t,s[1],s[0])===Fr)return}}catch(a){r.e(a)}finally{r.f()}}else for(var o in n)if(Fu.call(n,o)&&e.call(t,n[o],o)===Fr)return}}var Te=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return In(t,function(r){for(var s in r)r[s]!==void 0&&(n[s]=r[s])}),n};function N(n,e){return n.indexOf(e)!==-1}function Tr(n){for(var e=Object.keys(n),t=e.length,i=new Array(t);t--;)i[t]=[e[t],n[e[t]]];return i}var Du=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},Xl=function(n){try{return n()}catch{return}},Xp=function(n){return function(){try{for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.apply(this,t)}catch(r){x.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),x.critical(r)}}},yo=function(n){var e={};return X(n,function(t,i){Re(t)&&t.length>0&&(e[i]=t)}),e},_o=function(n){return n.replace(/^\$/,"")};function Jp(n,e){return t=n,i=function(s){return Re(s)&&!bt(e)?s.slice(0,e):s},r=new Set,function s(o,a){return o!==Object(o)?i?i(o,a):o:r.has(o)?void 0:(r.add(o),de(o)?(l=[],In(o,function(u){l.push(s(u))})):(l={},X(o,function(u,c){r.has(u)||(l[c]=s(u,c))})),l);var l}(t);var t,i,r}var Qe,Yp=function(n){var e,t,i,r,s="";for(e=t=0,i=(n=(n+"").replace(/\r\n/g,`
310
+ `);this.positionClasses="",this.text="Try it out"}};S(hi,"properties",{positionClasses:{type:String,attribute:"position"},text:{type:String}});customElements.define("mw-background",fn);customElements.define("mw-bubble",Kn);customElements.define("mw-chat",bn);customElements.define("mw-chat-input",it);customElements.define("mw-chat-message",ei);customElements.define("mw-header",St);customElements.define("mw-loading",mr);customElements.define("mw-popup",En);customElements.define("mw-powered-by",pi);customElements.define("mw-pulse-dot",fi);customElements.define("mw-try-it-out",hi);customElements.define("mw-upsell-banner",Yn);customElements.define("mw-popup-desktop",Ct);customElements.define("mw-popup-mobile",At);window.__INIT_MOLIN_SHOP_AI=function(e){if(Gp(e),e.auto){let t=document.createElement("molin-shop-ai");t.setAttribute("cdn",e.cdn),t.setAttribute("widget",e.widgetId),document.body.appendChild(t)}};function Gp(n){window.__INIT_MOLIN_SHOP_AI_OPTIONS=n}function Bl(){return window.__INIT_MOLIN_SHOP_AI_OPTIONS}var Qt,di,Rt,Zt,Sr,zl,kr=class{constructor(e,t,i){b(this,Sr);b(this,Qt);b(this,di);b(this,Rt);b(this,Zt);S(this,"isLoading",!1);S(this,"data");$(this,Qt,e),$(this,di,t),$(this,Rt,i),e.addController(this)}fetch(){if(this.isLoading)return;h(this,Zt)?.abort();let e=new AbortController;$(this,Zt,e),this.isLoading=!0,this.data=void 0,h(this,Qt).requestUpdate(),(async()=>{let t=R(this,Sr,zl).call(this);return t.signal?.addEventListener("abort",()=>e.abort(),{signal:e.signal}),fetch(t,{signal:e.signal})})().then(async t=>{if(!t.ok)throw new Error(`${t.statusText}: ${await t.text()}`);this.isLoading=!1,this.data=typeof h(this,Rt)?.transform=="function"?await h(this,Rt).transform(t):t,h(this,Qt).requestUpdate()}).catch(t=>{h(this,Rt)?.onError?.(t),this.isLoading=!1,this.data=void 0,h(this,Qt).requestUpdate()}).finally(()=>{e.abort()})}hostConnected(){this.isLoading||h(this,Rt)?.fetchWhenConnected&&this.fetch()}hostDisconnected(){h(this,Zt)?.abort(),$(this,Zt,void 0)}};Qt=new WeakMap,di=new WeakMap,Rt=new WeakMap,Zt=new WeakMap,Sr=new WeakSet,zl=function(){let e=h(this,di);if(typeof e=="function"&&(e=e()),!e)throw new Error("missing request");return new Request(e)};var st,gi,$n,Cn,Pt=class{constructor(e,t){b(this,st);b(this,gi);b(this,$n);b(this,Cn);$(this,st,e),$(this,gi,t),e.addController(this)}get data(){return h(this,Cn)||h(this,$n)?.data}hostConnected(){if(h(this,$n)||h(this,Cn))return;let e=Bl();e&&e.widgetId===h(this,st).widgetId?$(this,Cn,e.config):$(this,$n,new kr(h(this,st),()=>{if(h(this,st).cdn&&h(this,st).widgetId)return`${h(this,st).cdn}/config?w=${h(this,st).widgetId}`;throw new Error("missing cdn or widgetId")},{fetchWhenConnected:!0,transform:t=>t.json(),onError:h(this,gi)?.onError}))}};st=new WeakMap,gi=new WeakMap,$n=new WeakMap,Cn=new WeakMap;function Hl(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function C(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Hl(Object(t),!0).forEach(function(i){y(n,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Hl(Object(t)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(t,i))})}return n}function $i(n){return $i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$i(n)}function H(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Wl(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function W(n,e,t){return e&&Wl(n.prototype,e),t&&Wl(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function y(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Vp(n,e){if(n==null)return{};var t,i,r=function(o,a){if(o==null)return{};var l,u,c={},p=Object.keys(o);for(u=0;u<p.length;u++)l=p[u],a.indexOf(l)>=0||(c[l]=o[l]);return c}(n,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)t=s[i],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(r[t]=n[t])}return r}function Ie(n,e){return function(t){if(Array.isArray(t))return t}(n)||function(t,i){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var s,o,a=[],l=!0,u=!1;try{for(r=r.call(t);!(l=(s=r.next()).done)&&(a.push(s.value),!i||a.length!==i);l=!0);}catch(c){u=!0,o=c}finally{try{l||r.return==null||r.return()}finally{if(u)throw o}}return a}}(n,e)||No(n,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
311
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function nn(n){return function(e){if(Array.isArray(e))return mo(e)}(n)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(n)||No(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
312
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function No(n,e){if(n){if(typeof n=="string")return mo(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?mo(n,e):void 0}}function mo(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=n[t];return i}function tt(n,e){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=No(n))||e&&n&&typeof n.length=="number"){t&&(n=t);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
313
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var l=t.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{o||t.return==null||t.return()}finally{if(a)throw s}}}}var Dt={DEBUG:!1,LIB_VERSION:"1.139.0"},Xp=Array.isArray,Mu=Object.prototype,Du=Mu.hasOwnProperty,Vr=Mu.toString,de=Xp||function(n){return Vr.call(n)==="[object Array]"},et=function(n){return typeof n=="function"},Ze=function(n){return n===Object(n)&&!de(n)},ro=function(n){if(Ze(n)){for(var e in n)if(Du.call(n,e))return!1;return!0}return!1},M=function(n){return n===void 0},Re=function(n){return Vr.call(n)=="[object String]"},_t=function(n){return n===null},mt=function(n){return M(n)||_t(n)},at=function(n){return Vr.call(n)=="[object Number]"},Rr=function(n){return Vr.call(n)==="[object Boolean]"},Jp=function(n){return n instanceof FormData},m=typeof window<"u"?window:void 0,Le=typeof globalThis<"u"?globalThis:m,Lu=Array.prototype,Gl=Lu.forEach,Vl=Lu.indexOf,vt=Le?.navigator,A=Le?.document,De=Le?.location,yo=Le?.fetch,_o=Le!=null&&Le.XMLHttpRequest&&"withCredentials"in new Le.XMLHttpRequest?Le.XMLHttpRequest:void 0,Xl=Le?.AbortController,se=vt?.userAgent,he=m??{},Jl="[PostHog.js]",x={_log:function(n){if(m&&(Dt.DEBUG||he.POSTHOG_DEBUG)&&!M(m.console)&&m.console){for(var e=("__rrweb_original__"in m.console[n])?m.console[n].__rrweb_original__:m.console[n],t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];e.apply(void 0,[Jl].concat(i))}},info:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];x._log.apply(x,["log"].concat(e))},warn:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];x._log.apply(x,["warn"].concat(e))},error:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];x._log.apply(x,["error"].concat(e))},critical:function(){for(var n,e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];(n=console).error.apply(n,[Jl].concat(t))},uninitializedWarning:function(n){x.error("You must initialize PostHog before calling ".concat(n))}},Dr={},Xr=function(n){return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function Rn(n,e,t){if(de(n)){if(Gl&&n.forEach===Gl)n.forEach(e,t);else if("length"in n&&n.length===+n.length){for(var i=0,r=n.length;i<r;i++)if(i in n&&e.call(t,n[i],i)===Dr)return}}}function X(n,e,t){if(!mt(n)){if(de(n))return Rn(n,e,t);if(Jp(n)){var i,r=tt(n.entries());try{for(r.s();!(i=r.n()).done;){var s=i.value;if(e.call(t,s[1],s[0])===Dr)return}}catch(a){r.e(a)}finally{r.f()}}else for(var o in n)if(Du.call(n,o)&&e.call(t,n[o],o)===Dr)return}}var Te=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return Rn(t,function(r){for(var s in r)r[s]!==void 0&&(n[s]=r[s])}),n};function N(n,e){return n.indexOf(e)!==-1}function Pr(n){for(var e=Object.keys(n),t=e.length,i=new Array(t);t--;)i[t]=[e[t],n[e[t]]];return i}var ju=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},Yl=function(n){try{return n()}catch{return}},Yp=function(n){return function(){try{for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n.apply(this,t)}catch(r){x.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),x.critical(r)}}},bo=function(n){var e={};return X(n,function(t,i){Re(t)&&t.length>0&&(e[i]=t)}),e},wo=function(n){return n.replace(/^\$/,"")};function Kp(n,e){return t=n,i=function(s){return Re(s)&&!_t(e)?s.slice(0,e):s},r=new Set,function s(o,a){return o!==Object(o)?i?i(o,a):o:r.has(o)?void 0:(r.add(o),de(o)?(l=[],Rn(o,function(u){l.push(s(u))})):(l={},X(o,function(u,c){r.has(u)||(l[c]=s(u,c))})),l);var l}(t);var t,i,r}var Qe,Qp=function(n){var e,t,i,r,s="";for(e=t=0,i=(n=(n+"").replace(/\r\n/g,`
314
314
  `).replace(/\r/g,`
315
- `)).length,r=0;r<i;r++){var o=n.charCodeAt(r),a=null;o<128?t++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),bt(a)||(t>e&&(s+=n.substring(e,t)),s+=a,e=t=r+1)}return t>e&&(s+=n.substring(e,n.length)),s},vt=function(){function n(e){return e&&(e.preventDefault=n.preventDefault,e.stopPropagation=n.stopPropagation),e}return n.preventDefault=function(){this.returnValue=!1},n.stopPropagation=function(){this.cancelBubble=!0},function(e,t,i,r,s){if(e)if(e.addEventListener&&!r)e.addEventListener(t,i,!!s);else{var o="on"+t,a=e[o];e[o]=function(l,u,c){return function(p){if(p=p||n(m?.event)){var f,d=!0;et(c)&&(f=c(p));var g=u.call(l,p);return f!==!1&&g!==!1||(d=!1),d}}}(e,i,a)}else x.error("No valid element provided to register_event")}}();function On(n,e){var t=function(){if(!C)return e("document not found");var i=C.createElement("script");i.type="text/javascript",i.src=n,i.onload=function(o){return e(void 0,o)},i.onerror=function(o){return e(o)};var r,s=C.querySelectorAll("body > script");s.length>0?(r=s[0].parentNode)===null||r===void 0||r.insertBefore(i,s[0]):C.body.appendChild(i)};C!=null&&C.body?t():C?.addEventListener("DOMContentLoaded",t)}function Lu(n,e){for(var t=0;t<n.length;t++)if(e(n[t]))return n[t]}(function(n){n.GZipJS="gzip-js",n.Base64="base64"})(Qe||(Qe={}));var ju="$people_distinct_id",mi="__alias",yi="__timers",Jl="$autocapture_disabled_server_side",bo="$heatmaps_enabled_server_side",wo="$session_recording_enabled_server_side",Yl="$console_log_recording_enabled_server_side",Kl="$session_recording_network_payload_capture",Ql="$session_recording_canvas_recording",Zl="$replay_sample_rate",eu="$replay_minimum_duration",Mr="$sesid",bi="$session_is_sampled",Cn="$enabled_feature_flags",xo="$early_access_features",An="$stored_person_properties",Mt="$stored_group_properties",ko="$surveys",io="$surveys_activated",Dr="$flag_call_reported",dt="$user_state",So="$client_session_props",Eo="$capture_rate_limit",$o="$initial_campaign_params",Co="$initial_referrer_info",tu="$initial_person_info",Lr="$epp",Ao="__POSTHOG_TOOLBAR__",Kp=[ju,mi,"__cmpns",yi,wo,bo,Mr,Cn,dt,xo,Mt,An,ko,Dr,So,Eo,$o,Co,Lr],ro="$active_feature_flags",kr="$override_feature_flags",nu="$feature_flag_payloads",iu=function(n){var e,t={},i=tt(Tr(n||{}));try{for(i.s();!(e=i.n()).done;){var r=Ie(e.value,2),s=r[0],o=r[1];o&&(t[s]=o)}}catch(a){i.e(a)}finally{i.f()}return t},Qp=function(){function n(e){H(this,n),this.instance=e,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return W(n,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(Cn),t=this.instance.get_property(kr);if(!t)return e||{};for(var i=Te({},e),r=Object.keys(t),s=0;s<r.length;s++)i[r[s]]=t[r[s]];return this._override_warning||(x.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this._override_warning=!0),i}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(nu)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(e){this.$anon_distinct_id=e}},{key:"setReloadingPaused",value:function(e){this.reloadFeatureFlagsInAction=e}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var e=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!e.reloadFeatureFlagsInAction&&e.reloadFeatureFlagsQueued&&(e.reloadFeatureFlagsQueued=!1,e._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var e=this;if(!this.instance.config.advanced_disable_feature_flags){this.setReloadingPaused(!0);var t=this.instance.config.token,i=this.instance.get_property(An),r=this.instance.get_property(Mt),s={token:t,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:i,group_properties:r,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0};this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:s,compression:this.instance.config.disable_compression?void 0:Qe.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:function(o){var a;e.setReloadingPaused(!1);var l=!0;o.statusCode===200&&(e.$anon_distinct_id=void 0,l=!1),e.receivedFeatureFlags((a=o.json)!==null&&a!==void 0?a:{},l),e._startReloadTimer()}})}}},{key:"getFeatureFlag",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var i,r=this.getFlagVariants()[e],s="".concat(r),o=this.instance.get_property(Dr)||{};return(t.send_event||!("send_event"in t))&&(!(e in o)||!o[e].includes(s))&&(de(o[e])?o[e].push(s):o[e]=[s],(i=this.instance.persistence)===null||i===void 0||i.register(y({},Dr,o)),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:r})),r}x.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}},{key:"getFeatureFlagPayload",value:function(e){return this.getFlagPayloads()[e]}},{key:"isFeatureEnabled",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,t);x.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}},{key:"addFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers.push(e)}},{key:"removeFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(t){return t!==e})}},{key:"receivedFeatureFlags",value:function(e,t){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var i=this.getFlagVariants(),r=this.getFlagPayloads();(function(s,o){var a,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},c=s.featureFlags,p=s.featureFlagPayloads;if(c)if(de(c)){var f,d={};if(c)for(var g=0;g<c.length;g++)d[c[g]]=!0;o&&o.register((y(f={},ro,c),y(f,Cn,d),f))}else{var v=c,k=p;s.errorsWhileComputingFlags&&(v=$($({},l),v),k=$($({},u),k)),o&&o.register((y(a={},ro,Object.keys(iu(v))),y(a,Cn,v||{}),y(a,nu,k||{}),a))}})(e,this.instance.persistence,i,r),this._fireFeatureFlagsCallbacks(t)}}},{key:"override",value:function(e){if(!this.instance.__loaded||!this.instance.persistence)return x.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,e===!1)this.instance.persistence.unregister(kr);else if(de(e)){for(var t={},i=0;i<e.length;i++)t[e[i]]=!0;this.instance.persistence.register(y({},kr,t))}else this.instance.persistence.register(y({},kr,e))}},{key:"onFeatureFlags",value:function(e){var t=this;if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){var i=this._prepareFeatureFlagsForCallbacks(),r=i.flags,s=i.flagVariants;e(r,s)}return function(){return t.removeFeatureFlagsHandler(e)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,t){var i,r,s=y({},"$feature_enrollment/".concat(e),t);this.instance.capture("$feature_enrollment_update",{$feature_flag:e,$feature_enrollment:t,$set:s}),this.setPersonPropertiesForFlags(s,!1);var o=$($({},this.getFlagVariants()),{},y({},e,t));(i=this.instance.persistence)===null||i===void 0||i.register((y(r={},ro,Object.keys(iu(o))),y(r,Cn,o),r)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=this.instance.get_property(xo);if(r&&!i)return e(r);this.instance._send_request({transport:"XHR",url:this.instance.requestRouter.endpointFor("api","/api/early_access_features/?token=".concat(this.instance.config.token)),method:"GET",callback:function(s){var o;if(s.json){var a=s.json.earlyAccessFeatures;return(o=t.instance.persistence)===null||o===void 0||o.register(y({},xo,a)),e(a)}}})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(function(i){return t[i]}),flagVariants:Object.keys(t).filter(function(i){return t[i]}).reduce(function(i,r){return i[r]=t[r],i},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(e){var t=this._prepareFeatureFlagsForCallbacks(),i=t.flags,r=t.flagVariants;this.featureFlagEventHandlers.forEach(function(s){return s(i,r,{errorsLoading:e})})}},{key:"setPersonPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(An)||{};this.instance.register(y({},An,$($({},i),e))),t&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(An)}},{key:"setGroupPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(Mt)||{};Object.keys(i).length!==0&&Object.keys(i).forEach(function(r){i[r]=$($({},i[r]),e[r]),delete e[r]}),this.instance.register(y({},Mt,$($({},i),e))),t&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(e){if(e){var t=this.instance.get_property(Mt)||{};this.instance.register(y({},Mt,$($({},t),{},y({},e,{}))))}else this.instance.unregister(Mt)}}]),n}();Math.trunc||(Math.trunc=function(n){return n<0?Math.ceil(n):Math.floor(n)}),Number.isInteger||(Number.isInteger=function(n){return lt(n)&&isFinite(n)&&Math.floor(n)===n});var ru="0123456789abcdef",Zp=function(){function n(e){if(H(this,n),this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}return W(n,[{key:"toString",value:function(){for(var e="",t=0;t<this.bytes.length;t++)e=e+ru.charAt(this.bytes[t]>>>4)+ru.charAt(15&this.bytes[t]),t!==3&&t!==5&&t!==7&&t!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}},{key:"clone",value:function(){return new n(this.bytes.slice(0))}},{key:"equals",value:function(e){return this.compareTo(e)===0}},{key:"compareTo",value:function(e){for(var t=0;t<16;t++){var i=this.bytes[t]-e.bytes[t];if(i!==0)return Math.sign(i)}return 0}}],[{key:"fromFieldsV7",value:function(e,t,i,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(r)||e<0||t<0||i<0||r<0||e>0xffffffffffff||t>4095||i>1073741823||r>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|t>>>8,s[7]=t,s[8]=128|i>>>24,s[9]=i>>>16,s[10]=i>>>8,s[11]=i,s[12]=r>>>24,s[13]=r>>>16,s[14]=r>>>8,s[15]=r,new n(s)}}]),n}(),ef=function(){function n(){H(this,n),y(this,"timestamp",0),y(this,"counter",0),y(this,"random",new tf)}return W(n,[{key:"generate",value:function(){var e=this.generateOrAbort();if(M(e)){this.timestamp=0;var t=this.generateOrAbort();if(M(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}},{key:"generateOrAbort",value:function(){var e=Date.now();if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return Zp.fromFieldsV7(this.timestamp,Math.trunc(this.counter/Math.pow(2,30)),this.counter&Math.pow(2,30)-1,this.random.nextUint32())}},{key:"resetCounter",value:function(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}}]),n}(),qu=function(n){if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<n.length;e++)n[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return n};m&&!M(m.crypto)&&crypto.getRandomValues&&(qu=function(n){return crypto.getRandomValues(n)});var su,tf=function(){function n(){H(this,n),y(this,"buffer",new Uint32Array(8)),y(this,"cursor",1/0)}return W(n,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(qu(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),n}(),jt=function(){return nf().toString()},nf=function(){return(su||(su=new ef)).generate()},rf="Thu, 01 Jan 1970 00:00:00 GMT",di="",sf=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function of(n,e){if(e){var t=function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C;if(di)return di;if(!s||["localhost","127.0.0.1"].includes(r))return"";for(var o=r.split("."),a=Math.min(o.length,8),l="dmn_chk_"+jt(),u=new RegExp("(^|;)\\s*"+l+"=1");!di&&a--;){var c=o.slice(a).join("."),p=l+"=1;domain=."+c;s.cookie=p,u.test(s.cookie)&&(s.cookie=p+";expires="+rf,di=c)}return di}(n);if(!t){var i=function(r){var s=r.match(sf);return s?s[0]:""}(n);i!==t&&x.info("Warning: cookie subdomain discovery mismatch",i,t),t=i}return t?"; domain=."+t:""}return""}var we,_t={is_supported:function(){return!!C},error:function(n){x.error("cookieStore error: "+n)},get:function(n){if(C){try{for(var e=n+"=",t=C.cookie.split(";").filter(function(s){return s.length}),i=0;i<t.length;i++){for(var r=t[i];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return decodeURIComponent(r.substring(e.length,r.length))}}catch{}return null}},parse:function(n){var e;try{e=JSON.parse(_t.get(n))||{}}catch{}return e},set:function(n,e,t,i,r){if(C)try{var s="",o="",a=of(C.location.hostname,i);if(t){var l=new Date;l.setTime(l.getTime()+24*t*60*60*1e3),s="; expires="+l.toUTCString()}r&&(o="; secure");var u=n+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&x.warn("cookieStore warning: large cookie, len="+u.length),C.cookie=u,u}catch{return}},remove:function(n,e){try{_t.set(n,"",-1,e)}catch{return}}},so=null,fe={is_supported:function(){if(!bt(so))return so;var n=!0;if(M(m))n=!1;else try{var e="__mplssupport__";fe.set(e,"xyz"),fe.get(e)!=='"xyz"'&&(n=!1),fe.remove(e)}catch{n=!1}return n||x.error("localStorage unsupported; falling back to cookie store"),so=n,n},error:function(n){x.error("localStorage error: "+n)},get:function(n){try{return m?.localStorage.getItem(n)}catch(e){fe.error(e)}return null},parse:function(n){try{return JSON.parse(fe.get(n))||{}}catch{}return null},set:function(n,e){try{m?.localStorage.setItem(n,JSON.stringify(e))}catch(t){fe.error(t)}},remove:function(n){try{m?.localStorage.removeItem(n)}catch(e){fe.error(e)}}},af=["distinct_id",Mr,bi,Lr],Sr=$($({},fe),{},{parse:function(n){try{var e={};try{e=_t.parse(n)||{}}catch{}var t=Te(e,JSON.parse(fe.get(n)||"{}"));return fe.set(n,t),t}catch{}return null},set:function(n,e,t,i,r){try{fe.set(n,e);var s={};af.forEach(function(o){e[o]&&(s[o]=e[o])}),Object.keys(s).length&&_t.set(n,s,t,i,r)}catch(o){fe.error(o)}},remove:function(n,e){try{m?.localStorage.removeItem(n),_t.remove(n,e)}catch(t){fe.error(t)}}}),Er={},lf={is_supported:function(){return!0},error:function(n){x.error("memoryStorage error: "+n)},get:function(n){return Er[n]||null},parse:function(n){return Er[n]||null},set:function(n,e){Er[n]=e},remove:function(n){delete Er[n]}},en=null,xe={is_supported:function(){if(!bt(en))return en;if(en=!0,M(m))en=!1;else try{var n="__support__";xe.set(n,"xyz"),xe.get(n)!=='"xyz"'&&(en=!1),xe.remove(n)}catch{en=!1}return en},error:function(n){x.error("sessionStorage error: ",n)},get:function(n){try{return m?.sessionStorage.getItem(n)}catch(e){xe.error(e)}return null},parse:function(n){try{return JSON.parse(xe.get(n))||null}catch{}return null},set:function(n,e){try{m?.sessionStorage.setItem(n,JSON.stringify(e))}catch(t){xe.error(t)}},remove:function(n){try{m?.sessionStorage.removeItem(n)}catch(e){xe.error(e)}}},uf=["localhost","127.0.0.1"],Rr=function(n){var e=C?.createElement("a");return M(e)?null:(e.href=n,e)},cf=function(n,e){return!!function(t){try{new RegExp(t)}catch{return!1}return!0}(e)&&new RegExp(e).test(n)},pf=function(n){var e,t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",r=[];return X(n,function(s,o){M(s)||M(o)||o==="undefined"||(e=encodeURIComponent(function(a){return a instanceof File}(s)?s.name:s.toString()),t=encodeURIComponent(o),r[r.length]=t+"="+e)}),r.join(i)},ou=function(n,e){for(var t,i=((n.split("#")[0]||"").split("?")[1]||"").split("&"),r=0;r<i.length;r++){var s=i[r].split("=");if(s[0]===e){t=s;break}}if(!de(t)||t.length<2)return"";var o=t[1];try{o=decodeURIComponent(o)}catch{x.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},jr=function(n,e){var t=n.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},Ve="Mobile",qr="iOS",ut="Android",Ei="Tablet",Nu=ut+" "+Ei,Uu="iPad",Bu="Apple",zu=Bu+" Watch",$i="Safari",Fn="BlackBerry",Hu="Samsung",Wu=Hu+"Browser",Gu=Hu+" Internet",qt="Chrome",ff=qt+" OS",Vu=qt+" "+qr,qo="Internet Explorer",Xu=qo+" "+Ve,No="Opera",hf=No+" Mini",Uo="Edge",Ju="Microsoft "+Uo,Tn="Firefox",Yu=Tn+" "+qr,Ci="Nintendo",Ai="PlayStation",Rn="Xbox",Ku=ut+" "+Ve,Qu=Ve+" "+$i,_i="Windows",Io=_i+" Phone",au="Nokia",To="Ouya",Zu="Generic",df=Zu+" "+Ve.toLowerCase(),ec=Zu+" "+Ei.toLowerCase(),Ro="Konqueror",Ae="(\\d+(\\.\\d+)?)",oo=new RegExp("Version/"+Ae),gf=new RegExp(Rn,"i"),vf=new RegExp(Ai+" \\w+","i"),mf=new RegExp(Ci+" \\w+","i"),Bo=new RegExp(Fn+"|PlayBook|BB10","i"),yf={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},_f=function(n,e){return e&&N(e,Bu)||function(t){return N(t,$i)&&!N(t,qt)&&!N(t,ut)}(n)},lu=function(n,e){return e=e||"",N(n," OPR/")&&N(n,"Mini")?hf:N(n," OPR/")?No:Bo.test(n)?Fn:N(n,"IE"+Ve)||N(n,"WPDesktop")?Xu:N(n,Wu)?Gu:N(n,Uo)||N(n,"Edg/")?Ju:N(n,"FBIOS")?"Facebook "+Ve:N(n,"UCWEB")||N(n,"UCBrowser")?"UC Browser":N(n,"CriOS")?Vu:N(n,"CrMo")?qt:N(n,ut)&&N(n,$i)?Ku:N(n,qt)?qt:N(n,"FxiOS")?Yu:N(n.toLowerCase(),Ro.toLowerCase())?Ro:_f(n,e)?N(n,Ve)?Qu:$i:N(n,Tn)?Tn:N(n,"MSIE")||N(n,"Trident/")?qo:N(n,"Gecko")?Tn:""},bf=(y(we={},Xu,[new RegExp("rv:"+Ae)]),y(we,Ju,[new RegExp(Uo+"?\\/"+Ae)]),y(we,qt,[new RegExp("("+qt+"|CrMo)\\/"+Ae)]),y(we,Vu,[new RegExp("CriOS\\/"+Ae)]),y(we,"UC Browser",[new RegExp("(UCBrowser|UCWEB)\\/"+Ae)]),y(we,$i,[oo]),y(we,Qu,[oo]),y(we,No,[new RegExp("(Opera|OPR)\\/"+Ae)]),y(we,Tn,[new RegExp(Tn+"\\/"+Ae)]),y(we,Yu,[new RegExp("FxiOS\\/"+Ae)]),y(we,Ro,[new RegExp("Konqueror[:/]?"+Ae,"i")]),y(we,Fn,[new RegExp(Fn+" "+Ae),oo]),y(we,Ku,[new RegExp("android\\s"+Ae,"i")]),y(we,Gu,[new RegExp(Wu+"\\/"+Ae)]),y(we,qo,[new RegExp("(rv:|MSIE )"+Ae)]),y(we,"Mozilla",[new RegExp("rv:"+Ae)]),we),uu=[[new RegExp(Rn+"; "+Rn+" (.*?)[);]","i"),function(n){return[Rn,n&&n[1]||""]}],[new RegExp(Ci,"i"),[Ci,""]],[new RegExp(Ai,"i"),[Ai,""]],[Bo,[Fn,""]],[new RegExp(_i,"i"),function(n,e){if(/Phone/.test(e)||/WPDesktop/.test(e))return[Io,""];if(new RegExp(Ve).test(e)&&!/IEMobile\b/.test(e))return[_i+" "+Ve,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var i=t[1],r=yf[i]||"";return/arm/i.test(e)&&(r="RT"),[_i,r]}return[_i,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,function(n){if(n&&n[3]){var e=[n[3],n[4],n[5]||"0"];return[qr,e.join(".")]}return[qr,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,function(n){var e="";return n&&n.length>=3&&(e=M(n[2])?n[3]:n[2]),["watchOS",e]}],[new RegExp("("+ut+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+ut+")","i"),function(n){if(n&&n[2]){var e=[n[2],n[3],n[4]||"0"];return[ut,e.join(".")]}return[ut,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,function(n){var e=["Mac OS X",""];if(n&&n[1]){var t=[n[1],n[2],n[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ff,""]],[/Linux|debian/i,["Linux",""]]],cu=function(n){return mf.test(n)?Ci:vf.test(n)?Ai:gf.test(n)?Rn:new RegExp(To,"i").test(n)?To:new RegExp("("+Io+"|WPDesktop)","i").test(n)?Io:/iPad/.test(n)?Uu:/iPod/.test(n)?"iPod Touch":/iPhone/.test(n)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(n)?zu:Bo.test(n)?Fn:/(kobo)\s(ereader|touch)/i.test(n)?"Kobo":new RegExp(au,"i").test(n)?au:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(n)||/(kf[a-z]+)( bui|\)).+silk\//i.test(n)?"Kindle Fire":/(Android|ZTE)/i.test(n)?!new RegExp(Ve).test(n)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(n)?/pixel[\daxl ]{1,6}/i.test(n)&&!/pixel c/i.test(n)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(n)||/lmy47v/i.test(n)&&!/QTAQZ3/i.test(n)?ut:Nu:ut:new RegExp("(pda|"+Ve+")","i").test(n)?df:new RegExp(Ei,"i").test(n)&&!new RegExp(Ei+" pc","i").test(n)?ec:""},$r="https?://(.*)",wf=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid"],_e={campaignParams:function(n){return C?this._campaignParamsFromUrl(C.URL,n):{}},_campaignParamsFromUrl:function(n,e){var t=wf.concat(e||[]),i={};return X(t,function(r){var s=ou(n,r);s&&(i[r]=s)}),i},_searchEngine:function(n){return n?n.search($r+"google.([^/?]*)")===0?"google":n.search($r+"bing.com")===0?"bing":n.search($r+"yahoo.com")===0?"yahoo":n.search($r+"duckduckgo.com")===0?"duckduckgo":null:null},_searchInfoFromReferrer:function(n){var e=_e._searchEngine(n),t=e!="yahoo"?"q":"p",i={};if(!bt(e)){i.$search_engine=e;var r=C?ou(C.referrer,t):"";r.length&&(i.ph_keyword=r)}return i},searchInfo:function(){var n=C?.referrer;return n?this._searchInfoFromReferrer(n):{}},browser:lu,browserVersion:function(n,e){var t=lu(n,e),i=bf[t];if(M(i))return null;for(var r=0;r<i.length;r++){var s=i[r],o=n.match(s);if(o)return parseFloat(o[o.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(n){for(var e=0;e<uu.length;e++){var t=Ie(uu[e],2),i=t[0],r=t[1],s=i.exec(n),o=s&&(et(r)?r(s,n):r);if(o)return o}return["",""]},device:cu,deviceType:function(n){var e=cu(n);return e===Uu||e===Nu||e==="Kobo"||e==="Kindle Fire"||e===ec?Ei:e===Ci||e===Rn||e===Ai||e===To?"Console":e===zu?"Wearable":e?Ve:"Desktop"},referrer:function(){return C?.referrer||"$direct"},referringDomain:function(){var n;return C!=null&&C.referrer&&((n=Rr(C.referrer))===null||n===void 0?void 0:n.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer(),u:De?.href}},initialPersonPropsFromInfo:function(n){var e,t=n.r,i=n.u,r={$initial_referrer:t,$initial_referring_domain:t==null?void 0:t=="$direct"?"$direct":(e=Rr(t))===null||e===void 0?void 0:e.host};if(i){r.$initial_current_url=i;var s=Rr(i);r.$initial_host=s?.host,r.$initial_pathname=s?.pathname,X(this._campaignParamsFromUrl(i),function(o,a){r["$initial_"+_o(a)]=o})}return t&&X(this._searchInfoFromReferrer(t),function(o,a){r["$initial_"+_o(a)]=o}),r},properties:function(){if(!se)return{};var n=Ie(_e.os(se),2),e=n[0],t=n[1];return Te(yo({$os:e,$os_version:t,$browser:_e.browser(se,navigator.vendor),$device:_e.device(se),$device_type:_e.deviceType(se)}),{$current_url:De?.href,$host:De?.host,$pathname:De?.pathname,$raw_user_agent:se.length>1e3?se.substring(0,997)+"...":se,$browser_version:_e.browserVersion(se,navigator.vendor),$browser_language:_e.browserLanguage(),$screen_height:m?.screen.height,$screen_width:m?.screen.width,$viewport_height:m?.innerHeight,$viewport_width:m?.innerWidth,$lib:"web",$lib_version:Lt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Du()/1e3})},people_properties:function(){if(!se)return{};var n=Ie(_e.os(se),2),e=n[0],t=n[1];return Te(yo({$os:e,$os_version:t,$browser:_e.browser(se,navigator.vendor)}),{$browser_version:_e.browserVersion(se,navigator.vendor)})}},xf=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],ao=function(){function n(e){H(this,n),this.config=e,this.props={},this.campaign_params_saved=!1,this.name=function(t){var i="";return t.token&&(i=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),t.persistence_name?"ph_"+t.persistence_name:"ph_"+i+"_posthog"}(e),this.storage=this.buildStorage(e),this.load(),this.update_config(e,e),this.save()}return W(n,[{key:"buildStorage",value:function(e){xf.indexOf(e.persistence.toLowerCase())===-1&&(x.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return t==="localstorage"&&fe.is_supported()?fe:t==="localstorage+cookie"&&Sr.is_supported()?Sr:t==="sessionstorage"&&xe.is_supported()?xe:t==="memory"?lf:t==="cookie"?_t:Sr.is_supported()?Sr:_t}},{key:"properties",value:function(){var e={};return X(this.props,function(t,i){if(i===Cn&&Ze(t))for(var r=Object.keys(t),s=0;s<r.length;s++)e["$feature/".concat(r[s])]=t[r[s]];else a=i,l=!1,(bt(o=Kp)?l:Wl&&o.indexOf===Wl?o.indexOf(a)!=-1:(X(o,function(u){if(l||(l=u===a))return Fr}),l))||(e[i]=t);var o,a,l}),e}},{key:"load",value:function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Te({},e))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)}},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(e,t,i){var r=this;if(Ze(e)){M(t)&&(t="None"),this.expire_days=M(i)?this.default_expiry:i;var s=!1;if(X(e,function(o,a){r.props.hasOwnProperty(a)&&r.props[a]!==t||(r.props[a]=o,s=!0)}),s)return this.save(),!0}return!1}},{key:"register",value:function(e,t){var i=this;if(Ze(e)){this.expire_days=M(t)?this.default_expiry:t;var r=!1;if(X(e,function(s,o){e.hasOwnProperty(o)&&i.props[o]!==s&&(i.props[o]=s,r=!0)}),r)return this.save(),!0}return!1}},{key:"unregister",value:function(e){e in this.props&&(delete this.props[e],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(_e.campaignParams(this.config.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(_e.searchInfo())}},{key:"update_referrer_info",value:function(){this.register(_e.referrerInfo())}},{key:"set_initial_person_info",value:function(){this.props[$o]||this.props[Co]||this.register_once(y({},tu,_e.initialPersonInfo()),void 0)}},{key:"get_referrer_info",value:function(){return yo({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"get_initial_props",value:function(){var e=this,t={};X([Co,$o],function(s){var o=e.props[s];o&&X(o,function(a,l){t["$initial_"+_o(l)]=a})});var i=this.props[tu];if(i){var r=_e.initialPersonPropsFromInfo(i);Te(t,r)}return t}},{key:"safe_merge",value:function(e){return X(this.props,function(t,i){i in e||(e[i]=t)}),e}},{key:"update_config",value:function(e,t){if(this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var i=this.buildStorage(e),r=this.props;this.clear(),this.storage=i,this.props=r,this.save()}}},{key:"set_disabled",value:function(e){this.disabled=e,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())}},{key:"set_event_timer",value:function(e,t){var i=this.props[yi]||{};i[e]=t,this.props[yi]=i,this.save()}},{key:"remove_event_timer",value:function(e){var t=(this.props[yi]||{})[e];return M(t)||(delete this.props[yi][e],this.save()),t}},{key:"get_property",value:function(e){return this.props[e]}},{key:"set_property",value:function(e,t){this.props[e]=t,this.save()}}]),n}(),kf=2,Sf=4,Pr=function(n){return n[n.DomContentLoaded=0]="DomContentLoaded",n[n.Load=1]="Load",n[n.FullSnapshot=2]="FullSnapshot",n[n.IncrementalSnapshot=3]="IncrementalSnapshot",n[n.Meta=4]="Meta",n[n.Custom=5]="Custom",n[n.Plugin=6]="Plugin",n}(Pr||{});function zo(n){return n?Gr(n).split(/\s+/):[]}function Nr(n){var e="";switch(Si(n.className)){case"string":e=n.className;break;case"object":e=("baseVal"in n.className?n.className.baseVal:null)||n.getAttribute("class")||"";break;default:e=""}return zo(e)}function tc(n){return yt(n)?null:Gr(n).split(/(\s+)/).filter(function(e){return Pn(e)}).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Ur(n){var e="";return Oo(n)&&!sc(n)&&n.childNodes&&n.childNodes.length&&X(n.childNodes,function(t){var i;nc(t)&&t.textContent&&(e+=(i=tc(t.textContent))!==null&&i!==void 0?i:"")}),Gr(e)}function Ho(n){return!!n&&n.nodeType===1}function Nt(n,e){return!!n&&!!n.tagName&&n.tagName.toLowerCase()===e.toLowerCase()}function nc(n){return!!n&&n.nodeType===3}function ic(n){return!!n&&n.nodeType===11}var Po=["a","button","form","input","select","textarea","label"];function rc(n){var e=n.parentNode;return!(!e||!Ho(e))&&e}function Ef(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;if(!m||!n||Nt(n,"html")||!Ho(n))return!1;if(t!=null&&t.url_allowlist){var s=m.location.href,o=t.url_allowlist;if(o&&!o.some(function(v){return s.match(v)}))return!1}if(t!=null&&t.dom_event_allowlist){var a=t.dom_event_allowlist;if(a&&!a.some(function(v){return e.type===v}))return!1}for(var l=!1,u=[n],c=!0,p=n;p.parentNode&&!Nt(p,"body");)if(ic(p.parentNode))u.push(p.parentNode.host),p=p.parentNode.host;else{if(!(c=rc(p)))break;if(i||Po.indexOf(c.tagName.toLowerCase())>-1)l=!0;else{var f=m.getComputedStyle(c);f&&f.getPropertyValue("cursor")==="pointer"&&(l=!0)}u.push(c),p=c}if(!function(v,k){var L=k?.element_allowlist;if(M(L))return!0;var E,F=tt(v);try{var U=function(){var Q=E.value;if(L.some(function(K){return Q.tagName.toLowerCase()===K}))return{v:!0}};for(F.s();!(E=F.n()).done;){var G=U();if(Si(G)==="object")return G.v}}catch(Q){F.e(Q)}finally{F.f()}return!1}(u,t)||!function(v,k){var L=k?.css_selector_allowlist;if(M(L))return!0;var E,F=tt(v);try{var U=function(){var Q=E.value;if(L.some(function(K){return Q.matches(K)}))return{v:!0}};for(F.s();!(E=F.n()).done;){var G=U();if(Si(G)==="object")return G.v}}catch(Q){F.e(Q)}finally{F.f()}return!1}(u,t))return!1;var d=m.getComputedStyle(n);if(d&&d.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;var g=n.tagName.toLowerCase();switch(g){case"html":return!1;case"form":return(r||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(r||["change","click"]).indexOf(e.type)>=0;default:return l?(r||["click"]).indexOf(e.type)>=0:(r||["click"]).indexOf(e.type)>=0&&(Po.indexOf(g)>-1||n.getAttribute("contenteditable")==="true")}}function Oo(n){for(var e=n;e.parentNode&&!Nt(e,"body");e=e.parentNode){var t=Nr(e);if(N(t,"ph-sensitive")||N(t,"ph-no-capture"))return!1}if(N(Nr(n),"ph-include"))return!0;var i=n.type||"";if(Re(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var r=n.name||n.id||"";return!(Re(r)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,"")))}function sc(n){return!!(Nt(n,"input")&&!["button","checkbox","submit","reset"].includes(n.type)||Nt(n,"select")||Nt(n,"textarea")||n.getAttribute("contenteditable")==="true")}var oc="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",$f=new RegExp("^(?:".concat(oc,")$")),Cf=new RegExp(oc),ac="\\d{3}-?\\d{2}-?\\d{4}",Af=new RegExp("^(".concat(ac,")$")),If=new RegExp("(".concat(ac,")"));function Pn(n){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return!(yt(n)||Re(n)&&(n=Gr(n),(e?$f:Cf).test((n||"").replace(/[- ]/g,""))||(e?Af:If).test(n)))}function pu(n){var e=Ur(n);return Pn(e="".concat(e," ").concat(lc(n)).trim())?e:""}function lc(n){var e="";return n&&n.childNodes&&n.childNodes.length&&X(n.childNodes,function(t){var i;if(t&&((i=t.tagName)===null||i===void 0?void 0:i.toLowerCase())==="span")try{var r=Ur(t);e="".concat(e," ").concat(r).trim(),t.childNodes&&t.childNodes.length&&(e="".concat(e," ").concat(lc(t)).trim())}catch(s){x.error(s)}}),e}function Tf(n){return function(e){var t=e.map(function(i){var r,s,o="";if(i.tag_name&&(o+=i.tag_name),i.attr_class){i.attr_class.sort();var a,l=tt(i.attr_class);try{for(l.s();!(a=l.n()).done;){var u=a.value;o+=".".concat(u.replace(/"/g,""))}}catch(f){l.e(f)}finally{l.f()}}var c=$($($($({},i.text?{text:i.text}:{}),{},{"nth-child":(r=i.nth_child)!==null&&r!==void 0?r:0,"nth-of-type":(s=i.nth_of_type)!==null&&s!==void 0?s:0},i.href?{href:i.href}:{}),i.attr_id?{attr_id:i.attr_id}:{}),i.attributes),p={};return Tr(c).sort(function(f,d){var g=Ie(f,1)[0],v=Ie(d,1)[0];return g.localeCompare(v)}).forEach(function(f){var d=Ie(f,2),g=d[0],v=d[1];return p[fu(g.toString())]=fu(v.toString())}),o+=":",o+=Tr(c).map(function(f){var d=Ie(f,2),g=d[0],v=d[1];return"".concat(g,'="').concat(v,'"')}).join("")});return t.join(";")}(function(e){return e.map(function(t){var i,r,s={text:(i=t.$el_text)===null||i===void 0?void 0:i.slice(0,400),tag_name:t.tag_name,href:(r=t.attr__href)===null||r===void 0?void 0:r.slice(0,2048),attr_class:Rf(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return Tr(t).filter(function(o){return Ie(o,1)[0].indexOf("attr__")===0}).forEach(function(o){var a=Ie(o,2),l=a[0],u=a[1];return s.attributes[l]=u}),s})}(n))}function fu(n){return n.replace(/"|\\"/g,'\\"')}function Rf(n){var e=n.attr__class;return e?de(e)?e:zo(e):void 0}var Fo="[SessionRecording]",Mo="redacted",lo={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:function(n){return n},recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6},Pf=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],Of=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],Ff=["/s/","/e/","/i/"];function hu(n,e,t,i){if(yt(n))return n;var r=e?.["content-length"]||function(s){return new Blob([s]).size}(n);return Re(r)&&(r=parseInt(r)),r>t?Fo+" ".concat(i," body too large to record (").concat(r," bytes)"):n}function du(n,e){if(yt(n))return n;var t=n;return Pn(t,!1)||(t=Fo+" "+e+" body "+Mo),X(Of,function(i){var r,s;(r=t)!==null&&r!==void 0&&r.length&&((s=t)===null||s===void 0?void 0:s.indexOf(i))!==-1&&(t=Fo+" "+e+" body "+Mo+" as might contain: "+i)}),t}var at,Mf=function(n,e){var t,i,r,s={payloadSizeLimitBytes:lo.payloadSizeLimitBytes,performanceEntryTypeToObserve:nn(lo.performanceEntryTypeToObserve)},o=n.session_recording.recordHeaders!==!1&&e.recordHeaders,a=n.session_recording.recordBody!==!1&&e.recordBody,l=n.capture_performance!==!1&&e.recordPerformance,u=(t=s,r=Math.min(1e6,(i=t.payloadSizeLimitBytes)!==null&&i!==void 0?i:1e6),function(f){return f!=null&&f.requestBody&&(f.requestBody=hu(f.requestBody,f.requestHeaders,r,"Request")),f!=null&&f.responseBody&&(f.responseBody=hu(f.responseBody,f.responseHeaders,r,"Response")),f}),c=function(f){return u(function(v){var k=Rr(v.name);if(!(k&&k.pathname&&Ff.some(function(L){return k.pathname.indexOf(L)===0})))return v}((g=(d=f).requestHeaders,yt(g)||X(Object.keys(g??{}),function(v){Pf.includes(v.toLowerCase())&&(g[v]=Mo)}),d)));var d,g},p=et(n.session_recording.maskNetworkRequestFn);return p&&et(n.session_recording.maskCapturedNetworkRequestFn)&&x.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),p&&(n.session_recording.maskCapturedNetworkRequestFn=function(f){var d=n.session_recording.maskNetworkRequestFn({url:f.name});return $($({},f),{},{name:d?.url})}),s.maskRequestFn=et(n.session_recording.maskCapturedNetworkRequestFn)?function(f){var d,g,v,k=c(f);return k&&(d=(g=(v=n.session_recording).maskCapturedNetworkRequestFn)===null||g===void 0?void 0:g.call(v,k))!==null&&d!==void 0?d:void 0}:function(f){return function(d){if(!M(d))return d.requestBody=du(d.requestBody,"Request"),d.responseBody=du(d.responseBody,"Response"),d}(c(f))},$($($({},lo),s),{},{recordHeaders:o,recordBody:a,recordPerformance:l,recordInitialRequests:l})},Df=W(function n(e){var t,i,r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};H(this,n),y(this,"bucketSize",100),y(this,"refillRate",10),y(this,"mutationBuckets",{}),y(this,"loggedTracker",{}),y(this,"refillBuckets",function(){Object.keys(r.mutationBuckets).forEach(function(o){r.mutationBuckets[o]=r.mutationBuckets[o]+r.refillRate,r.mutationBuckets[o]>=r.bucketSize&&delete r.mutationBuckets[o]})}),y(this,"getNodeOrRelevantParent",function(o){var a=r.rrweb.mirror.getNode(o);if(a?.nodeName!=="svg"&&a instanceof Element){var l=a.closest("svg");if(l)return[r.rrweb.mirror.getId(l),l]}return[o,a]}),y(this,"numberOfChanges",function(o){var a,l,u,c,p,f,d,g;return((a=(l=o.removes)===null||l===void 0?void 0:l.length)!==null&&a!==void 0?a:0)+((u=(c=o.attributes)===null||c===void 0?void 0:c.length)!==null&&u!==void 0?u:0)+((p=(f=o.texts)===null||f===void 0?void 0:f.length)!==null&&p!==void 0?p:0)+((d=(g=o.adds)===null||g===void 0?void 0:g.length)!==null&&d!==void 0?d:0)}),y(this,"throttleMutations",function(o){if(o.type!==3||o.data.source!==0)return o;var a=o.data,l=r.numberOfChanges(a);a.attributes&&(a.attributes=a.attributes.filter(function(c){var p,f,d,g=Ie(r.getNodeOrRelevantParent(c.id),2),v=g[0],k=g[1];return r.mutationBuckets[v]===0?!1:(r.mutationBuckets[v]=(p=r.mutationBuckets[v])!==null&&p!==void 0?p:r.bucketSize,r.mutationBuckets[v]=Math.max(r.mutationBuckets[v]-1,0),r.mutationBuckets[v]===0&&(r.loggedTracker[v]||(r.loggedTracker[v]=!0,(f=(d=r.options).onBlockedNode)===null||f===void 0||f.call(d,v,k))),c)}));var u=r.numberOfChanges(a);return u!==0||l===u?o:void 0}),this.rrweb=e,this.options=s,this.refillRate=(t=this.options.refillRate)!==null&&t!==void 0?t:this.refillRate,this.bucketSize=(i=this.options.bucketSize)!==null&&i!==void 0?i:this.bucketSize,setInterval(function(){r.refillBuckets()},1e3)}),uc=3e5,gu=uc;(function(n){n[n.Mutation=0]="Mutation",n[n.MouseMove=1]="MouseMove",n[n.MouseInteraction=2]="MouseInteraction",n[n.Scroll=3]="Scroll",n[n.ViewportResize=4]="ViewportResize",n[n.Input=5]="Input",n[n.TouchMove=6]="TouchMove",n[n.MediaInteraction=7]="MediaInteraction",n[n.StyleSheetRule=8]="StyleSheetRule",n[n.CanvasMutation=9]="CanvasMutation",n[n.Font=10]="Font",n[n.Log=11]="Log",n[n.Drag=12]="Drag",n[n.StyleDeclaration=13]="StyleDeclaration",n[n.Selection=14]="Selection",n[n.AdoptedStyleSheet=15]="AdoptedStyleSheet"})(at||(at={}));var Lf=[at.MouseMove,at.MouseInteraction,at.Scroll,at.ViewportResize,at.Input,at.TouchMove,at.MediaInteraction,at.Drag],vu=function(){function n(e,t){H(this,n),this.size=0,this.data=[],this.sessionId=e,this.windowId=t}return W(n,[{key:"mostRecentSnapshotTimestamp",get:function(){return this.data.length?this.data[this.data.length-1].timestamp:null}},{key:"add",value:function(e){this.size+=e.$snapshot_bytes,this.data.push(e.$snapshot_data)}}]),n}(),mu=function(n){return{rrwebMethod:n,enqueuedAt:Date.now(),attempt:1}},Ge="[SessionRecording]";function jf(n){return JSON.stringify(n,(e=[],function(t,i){if(Ze(i)){for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(i)?"[Circular]":(e.push(i),i)}return i})).length;var e}var gt,qf=function(){function n(e){var t=this;if(H(this,n),y(this,"queuedRRWebEvents",[]),y(this,"isIdle",!1),y(this,"_linkedFlagSeen",!1),y(this,"_lastActivityTimestamp",Date.now()),y(this,"_linkedFlag",null),y(this,"_forceAllowLocalhostNetworkCapture",!1),y(this,"_samplingSessionListener",null),this.instance=e,this._captureStarted=!1,this._endpoint="/s/",this.stopRrweb=void 0,this.receivedDecide=!1,m?.addEventListener("beforeunload",function(){t._flushBuffer()}),m?.addEventListener("offline",function(){t._tryAddCustomEvent("browser offline",{})}),m?.addEventListener("online",function(){t._tryAddCustomEvent("browser online",{})}),m?.addEventListener("visibilitychange",function(){if(C!=null&&C.visibilityState){var o="window "+C.visibilityState;t._tryAddCustomEvent(o,{})}}),!this.instance.sessionManager)throw x.error(Ge+" started without valid sessionManager"),new Error(Ge+" started without valid sessionManager. This is a bug.");var i=this.sessionManager.checkAndGetSessionAndWindowId(),r=i.sessionId,s=i.windowId;this.sessionId=r,this.windowId=s,this.buffer=new vu(this.sessionId,this.windowId),this._setupSampling()}return W(n,[{key:"rrwebRecord",get:function(){var e;return he==null||(e=he.rrweb)===null||e===void 0?void 0:e.record}},{key:"started",get:function(){return this._captureStarted}},{key:"sessionManager",get:function(){if(!this.instance.sessionManager)throw new Error(Ge+" started without valid sessionManager. This is a bug.");return this.instance.sessionManager}},{key:"isSampled",get:function(){var e=this.instance.get_property(bi);return Ir(e)?e:null}},{key:"sessionDuration",get:function(){var e=this.buffer.mostRecentSnapshotTimestamp,t=this.sessionManager.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp;return e?e-t:null}},{key:"isRecordingEnabled",get:function(){var e=!!this.instance.get_property(wo),t=!this.instance.config.disable_session_recording;return m&&e&&t}},{key:"isConsoleLogCaptureEnabled",get:function(){var e=!!this.instance.get_property(Yl),t=this.instance.config.enable_recording_console_log;return t??e}},{key:"canvasRecording",get:function(){var e=this.instance.get_property(Ql);return e&&e.fps&&e.quality?{enabled:e.enabled,fps:e.fps,quality:e.quality}:void 0}},{key:"networkPayloadCapture",get:function(){var e,t,i=this.instance.get_property(Kl),r={recordHeaders:(e=this.instance.config.session_recording)===null||e===void 0?void 0:e.recordHeaders,recordBody:(t=this.instance.config.session_recording)===null||t===void 0?void 0:t.recordBody},s=r?.recordHeaders||i?.recordHeaders,o=r?.recordBody||i?.recordBody,a=this.instance.config.capture_performance||i?.capturePerformance;return s||o||a?{recordHeaders:s,recordBody:o,recordPerformance:a}:void 0}},{key:"sampleRate",get:function(){var e=this.instance.get_property(Zl);return lt(e)?e:null}},{key:"minimumDuration",get:function(){var e=this.instance.get_property(eu);return lt(e)?e:null}},{key:"status",get:function(){return this.receivedDecide?this.isRecordingEnabled?yt(this._linkedFlag)||this._linkedFlagSeen?Ir(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"buffering":"disabled":"buffering"}},{key:"startIfEnabledOrStop",value:function(){this.isRecordingEnabled?(this._startCapture(),x.info(Ge+" started")):(this.stopRecording(),this.clearBuffer())}},{key:"stopRecording",value:function(){this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1,x.info(Ge+" stopped"))}},{key:"makeSamplingDecision",value:function(e){var t,i=this.sessionId!==e,r=this.sampleRate;if(lt(r)){var s,o=this.isSampled,a=i||!Ir(o);a?s=Math.random()<r:s=o,!s&&a&&x.warn(Ge+" Sample rate (".concat(r,") has determined that this sessionId (").concat(e,") will not be sent to the server.")),this._tryAddCustomEvent("samplingDecisionMade",{sampleRate:r}),(t=this.instance.persistence)===null||t===void 0||t.register(y({},bi,s))}else{var l;(l=this.instance.persistence)===null||l===void 0||l.register(y({},bi,null))}}},{key:"afterDecideResponse",value:function(e){var t,i,r,s=this;if(this._persistDecideResponse(e),this._linkedFlag=((t=e.sessionRecording)===null||t===void 0?void 0:t.linkedFlag)||null,(i=e.sessionRecording)!==null&&i!==void 0&&i.endpoint&&(this._endpoint=(r=e.sessionRecording)===null||r===void 0?void 0:r.endpoint),this._setupSampling(),!yt(this._linkedFlag)){var o=Re(this._linkedFlag)?this._linkedFlag:this._linkedFlag.flag,a=Re(this._linkedFlag)?null:this._linkedFlag.variant;this.instance.onFeatureFlags(function(l,u){var c=Ze(u)&&o in u,p=a?u[o]===a:c;if(p){var f={linkedFlag:o,linkedVariant:a},d="linked flag matched";x.info(Ge+" "+d,f),s._tryAddCustomEvent(d,f)}s._linkedFlagSeen=p})}this.receivedDecide=!0,this.startIfEnabledOrStop()}},{key:"_setupSampling",value:function(){var e=this;lt(this.sampleRate)&&bt(this._samplingSessionListener)&&(this._samplingSessionListener=this.sessionManager.onSessionId(function(t){e.makeSamplingDecision(t)}))}},{key:"_persistDecideResponse",value:function(e){if(this.instance.persistence){var t=this.instance.persistence,i=function(){var r,s,o,a,l,u,c,p,f=(r=e.sessionRecording)===null||r===void 0?void 0:r.sampleRate,d=yt(f)?null:parseFloat(f),g=(s=e.sessionRecording)===null||s===void 0?void 0:s.minimumDurationMilliseconds;t.register((y(p={},wo,!!e.sessionRecording),y(p,Yl,(o=e.sessionRecording)===null||o===void 0?void 0:o.consoleLogRecordingEnabled),y(p,Kl,$({capturePerformance:e.capturePerformance},(a=e.sessionRecording)===null||a===void 0?void 0:a.networkPayloadCapture)),y(p,Ql,{enabled:(l=e.sessionRecording)===null||l===void 0?void 0:l.recordCanvas,fps:(u=e.sessionRecording)===null||u===void 0?void 0:u.canvasFps,quality:(c=e.sessionRecording)===null||c===void 0?void 0:c.canvasQuality}),y(p,Zl,d),y(p,eu,M(g)?null:g),p))};i(),this.sessionManager.onSessionId(i)}}},{key:"log",value:function(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(t=this.instance.sessionRecording)===null||t===void 0||t.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:i,trace:[],payload:[JSON.stringify(e)]}},timestamp:Du()})}},{key:"_startCapture",value:function(){var e=this;M(Object.assign)||this._captureStarted||this.instance.config.disable_session_recording||this.instance.consent.isOptedOut()||(this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId(),this.rrwebRecord?this._onScriptLoaded():On(this.instance.requestRouter.endpointFor("assets","/static/recorder.js?v=".concat(Lt.LIB_VERSION)),function(t){if(t)return x.error(Ge+" could not load recorder.js",t);e._onScriptLoaded()}))}},{key:"isInteractiveEvent",value:function(e){var t;return e.type===3&&Lf.indexOf((t=e.data)===null||t===void 0?void 0:t.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(e){var t=this.isInteractiveEvent(e);t||this.isIdle||e.timestamp-this._lastActivityTimestamp>gu&&(this.isIdle=!0,this._tryAddCustomEvent("sessionIdle",{reason:"user inactivity",timeSinceLastActive:e.timestamp-this._lastActivityTimestamp,threshold:gu}),clearTimeout(this._fullSnapshotTimer),this._flushBuffer());var i=!1;if(t&&(this._lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),i=!0)),!this.isIdle){var r=this.sessionManager.checkAndGetSessionAndWindowId(!t,e.timestamp),s=r.windowId,o=r.sessionId,a=this.sessionId!==o,l=this.windowId!==s;this.windowId=s,this.sessionId=o,(i||[kf,Sf].indexOf(e.type)===-1&&(l||a||M(this._fullSnapshotTimer)))&&this._tryTakeFullSnapshot()}}},{key:"_tryRRWebMethod",value:function(e){try{return e.rrwebMethod(),!0}catch(t){return this.queuedRRWebEvents.length<10?this.queuedRRWebEvents.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):x.warn(Ge+" could not emit queued rrweb event.",t,e),!1}}},{key:"_tryAddCustomEvent",value:function(e,t){var i=this;return this._tryRRWebMethod(mu(function(){return i.rrwebRecord.addCustomEvent(e,t)}))}},{key:"_tryTakeFullSnapshot",value:function(){var e=this;return this._tryRRWebMethod(mu(function(){return e.rrwebRecord.takeFullSnapshot()}))}},{key:"_onScriptLoaded",value:function(){for(var e,t=this,i={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},r=this.instance.config.session_recording,s=0,o=Object.entries(r||{});s<o.length;s++){var a=Ie(o[s],2),l=a[0],u=a[1];l in i&&(i[l]=u)}if(this.canvasRecording&&this.canvasRecording.enabled&&(i.recordCanvas=!0,i.sampling={canvas:this.canvasRecording.fps},i.dataURLOptions={type:"image/webp",quality:this.canvasRecording.quality}),this.rrwebRecord){this.mutationRateLimiter=(e=this.mutationRateLimiter)!==null&&e!==void 0?e:new Df(this.rrwebRecord,{onBlockedNode:function(p,f){var d="Too many mutations on node '".concat(p,"'. Rate limiting. This could be due to SVG animations or something similar");x.info(d,{node:f}),t.log(Ge+" "+d,"warn")}});var c=this._gatherRRWebPlugins();this.stopRrweb=this.rrwebRecord($({emit:function(p){t.onRRwebEmit(p)},plugins:c},i)),this.instance._addCaptureHook(function(p){try{if(p==="$pageview"){var f=m?t._maskUrl(m.location.href):"";if(!f)return;t._tryAddCustomEvent("$pageview",{href:f}),t._tryTakeFullSnapshot()}}catch(d){x.error("Could not add $pageview to rrweb session",d)}}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1,this._tryAddCustomEvent("$session_options",{sessionRecordingOptions:i,activePlugins:c.map(function(p){return p?.name})}),this._tryAddCustomEvent("$posthog_config",{config:this.instance.config})}else x.error(Ge+"onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"_scheduleFullSnapshot",value:function(){var e=this;this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),this._fullSnapshotTimer=setInterval(function(){e._tryTakeFullSnapshot()},uc)}},{key:"_gatherRRWebPlugins",value:function(){var e=[];return he.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled&&e.push(he.rrwebConsoleRecord.getRecordConsolePlugin()),this.networkPayloadCapture&&et(he.getRecordNetworkPlugin)&&(!uf.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?e.push(he.getRecordNetworkPlugin(Mf(this.instance.config,this.networkPayloadCapture))):x.info(Ge+" NetworkCapture not started because we are on localhost.")),e}},{key:"onRRwebEmit",value:function(e){if(this._processQueuedEvents(),e&&Ze(e)){if(e.type===Pr.Meta){var t=this._maskUrl(e.data.href);if(this._lastHref=t,!t)return;e.data.href=t}else this._pageViewFallBack();e.type===Pr.FullSnapshot&&this._scheduleFullSnapshot();var i=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(i){var r=function(a){var l=a;if(l&&Ze(l)&&l.type===6&&Ze(l.data)&&l.data.plugin==="rrweb/console@1"){l.data.payload.payload.length>10&&(l.data.payload.payload=l.data.payload.payload.slice(0,10),l.data.payload.payload.push("...[truncated]"));for(var u=[],c=0;c<l.data.payload.payload.length;c++)l.data.payload.payload[c]&&l.data.payload.payload[c].length>2e3?u.push(l.data.payload.payload[c].slice(0,2e3)+"...[truncated]"):u.push(l.data.payload.payload[c]);return l.data.payload.payload=u,a}return a}(i),s=jf(r);if(this._updateWindowAndSessionIds(r),!this.isIdle||r.type===Pr.Custom){var o={$snapshot_bytes:s,$snapshot_data:r,$session_id:this.sessionId,$window_id:this.windowId};this.status!=="disabled"?this._captureSnapshotBuffered(o):this.clearBuffer()}}}}},{key:"_pageViewFallBack",value:function(){if(!this.instance.config.capture_pageview&&m){var e=this._maskUrl(m.location.href);this._lastHref!==e&&(this._tryAddCustomEvent("$url_changed",{href:e}),this._lastHref=e)}}},{key:"_processQueuedEvents",value:function(){var e=this;if(this.queuedRRWebEvents.length){var t=nn(this.queuedRRWebEvents);this.queuedRRWebEvents=[],t.forEach(function(i){Date.now()-i.enqueuedAt>2e3?e._tryAddCustomEvent("rrwebQueueTimeout",{enqueuedAt:i.enqueuedAt,attempt:i.attempt,queueLength:t.length}):e._tryRRWebMethod(i)&&e._tryAddCustomEvent("rrwebQueueSuccess",{enqueuedAt:i.enqueuedAt,attempt:i.attempt,queueLength:t.length})})}}},{key:"_maskUrl",value:function(e){var t=this.instance.config.session_recording;if(t.maskNetworkRequestFn){var i,r={url:e};return(i=r=t.maskNetworkRequestFn(r))===null||i===void 0?void 0:i.url}return e}},{key:"clearBuffer",value:function(){this.buffer=new vu(this.sessionId,this.windowId)}},{key:"_flushBuffer",value:function(){var e=this;this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0);var t=this.minimumDuration,i=this.sessionDuration,r=lt(i)&&i>=0,s=lt(t)&&r&&i<t;this.status==="buffering"||s?this.flushBufferTimer=setTimeout(function(){e._flushBuffer()},2e3):(this.buffer.data.length>0&&this._captureSnapshot({$snapshot_bytes:this.buffer.size,$snapshot_data:this.buffer.data,$session_id:this.buffer.sessionId,$window_id:this.buffer.windowId}),this.clearBuffer())}},{key:"_captureSnapshotBuffered",value:function(e){var t,i=this,r=2+(((t=this.buffer)===null||t===void 0?void 0:t.data.length)||0);(this.buffer.size+e.$snapshot_bytes+r>943718.4||this.buffer.sessionId!==this.sessionId)&&this._flushBuffer(),this.buffer.add(e),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){i._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{_url:this.instance.requestRouter.endpointFor("api",this._endpoint),_noTruncate:!0,_batchKey:"recordings",_noHeatmaps:!0})}}]),n}(),Nf=function(){function n(e){H(this,n),this.instance=e,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return W(n,[{key:"call",value:function(){var e=this,t={token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(An),group_properties:this.instance.get_property(Mt),disable_flags:this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load||void 0};this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:t,compression:this.instance.config.disable_compression?void 0:Qe.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:function(i){return e.parseDecideResponse(i.json)}})}},{key:"parseDecideResponse",value:function(e){var t=this;this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer();var i=!e;if(this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.config.advanced_disable_feature_flags||this.instance.featureFlags.receivedFeatureFlags(e??{},i),i)x.error("Failed to fetch feature flags from PostHog.");else{if(!C||!C.body)return x.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){t.parseDecideResponse(e)},500);this.instance._afterDecideResponse(e);var r=m?.extendPostHogWithExceptionAutoCapture;if(e.autocaptureExceptions&&e.autocaptureExceptions&&M(r)&&On(this.instance.requestRouter.endpointFor("assets","/static/exception-autocapture.js"),function(l){if(l)return x.error("Could not load exception autocapture script",l);m.extendPostHogWithExceptionAutocapture(t.instance,e)}),e.siteApps)if(this.instance.config.opt_in_site_apps){var s,o=tt(e.siteApps);try{var a=function(){var l=s.value,u=l.id,c=l.url,p=t.instance.requestRouter.endpointFor("api",c);he["__$$ph_site_app_".concat(u)]=t.instance,On(p,function(f){f&&x.error("Error while initializing PostHog app with config id ".concat(u),f)})};for(o.s();!(s=o.n()).done;)a()}catch(l){o.e(l)}finally{o.f()}}else e.siteApps.length>0&&x.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}]),n}(),Uf=m!=null&&m.location?jr(m.location.hash,"__posthog")||jr(location.hash,"state"):null,yu="_postHogToolbarParams";(function(n){n[n.UNINITIALIZED=0]="UNINITIALIZED",n[n.LOADING=1]="LOADING",n[n.LOADED=2]="LOADED"})(gt||(gt={}));var Bf=function(){function n(e){H(this,n),this.instance=e}return W(n,[{key:"setToolbarState",value:function(e){he.ph_toolbar_state=e}},{key:"getToolbarState",value:function(){var e;return(e=he.ph_toolbar_state)!==null&&e!==void 0?e:gt.UNINITIALIZED}},{key:"maybeLoadToolbar",value:function(){var e,t,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!m||!C)return!1;i=(e=i)!==null&&e!==void 0?e:m.location,s=(t=s)!==null&&t!==void 0?t:m.history;try{if(!r){try{m.localStorage.setItem("test","test"),m.localStorage.removeItem("test")}catch{return!1}r=m?.localStorage}var o,a=Uf||jr(i.hash,"__posthog")||jr(i.hash,"state"),l=a?Xl(function(){return JSON.parse(atob(decodeURIComponent(a)))})||Xl(function(){return JSON.parse(decodeURIComponent(a))}):null;return l&&l.action==="ph_authorize"?((o=l).source="url",o&&Object.keys(o).length>0&&(l.desiredHash?i.hash=l.desiredHash:s?s.replaceState(s.state,"",i.pathname+i.search):i.hash="")):((o=JSON.parse(r.getItem(yu)||"{}")).source="localstorage",delete o.userIntent),!(!o.token||this.instance.config.token!==o.token)&&(this.loadToolbar(o),!0)}catch{return!1}}},{key:"_callLoadToolbar",value:function(e){(he.ph_load_toolbar||he.ph_load_editor)(e,this.instance)}},{key:"loadToolbar",value:function(e){var t=this,i=!(C==null||!C.getElementById(Ao));if(!m||i)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=$($({token:this.instance.config.token},e),{},{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(m.localStorage.setItem(yu,JSON.stringify($($({},s),{},{source:void 0}))),this.getToolbarState()===gt.LOADED)this._callLoadToolbar(s);else if(this.getToolbarState()===gt.UNINITIALIZED){this.setToolbarState(gt.LOADING);var o=3e5,a=Math.floor(Date.now()/o)*o;On(this.instance.requestRouter.endpointFor("assets","/static/toolbar.js?t=".concat(a)),function(l){if(l)return x.error("Failed to load toolbar",l),void t.setToolbarState(gt.UNINITIALIZED);t.setToolbarState(gt.LOADED),t._callLoadToolbar(s)}),vt(m,"turbolinks:load",function(){t.setToolbarState(gt.UNINITIALIZED),t.loadToolbar(s)})}return!0}},{key:"_loadEditor",value:function(e){return this.loadToolbar(e)}},{key:"maybeLoadEditor",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;return this.maybeLoadToolbar(e,t,i)}}]),n}(),zf=function(){function n(e){H(this,n),y(this,"isPaused",!0),y(this,"queue",[]),y(this,"flushTimeoutMs",3e3),this.sendRequest=e}return W(n,[{key:"enqueue",value:function(e){this.queue.push(e),this.flushTimeout||this.setFlushTimeout()}},{key:"unload",value:function(){var e=this;this.clearFlushTimeout();var t=this.queue.length>0?this.formatQueue():{},i=Object.values(t);[].concat(nn(i.filter(function(r){return r.url.indexOf("/e")===0})),nn(i.filter(function(r){return r.url.indexOf("/e")!==0}))).map(function(r){e.sendRequest($($({},r),{},{transport:"sendBeacon"}))})}},{key:"enable",value:function(){this.isPaused=!1,this.setFlushTimeout()}},{key:"setFlushTimeout",value:function(){var e=this;this.isPaused||(this.flushTimeout=setTimeout(function(){if(e.clearFlushTimeout(),e.queue.length>0){var t=e.formatQueue(),i=function(s){var o=t[s],a=new Date().getTime();o.data&&de(o.data)&&X(o.data,function(l){l.offset=Math.abs(l.timestamp-a),delete l.timestamp}),e.sendRequest(o)};for(var r in t)i(r)}},this.flushTimeoutMs))}},{key:"clearFlushTimeout",value:function(){clearTimeout(this.flushTimeout),this.flushTimeout=void 0}},{key:"formatQueue",value:function(){var e={};return X(this.queue,function(t){var i,r=t,s=(r?r.batchKey:null)||r.url;M(e[s])&&(e[s]=$($({},r),{},{data:[]})),(i=e[s].data)===null||i===void 0||i.push(r.data)}),this.queue=[],e}}]),n}(),Ue=Uint8Array,Pe=Uint16Array,Mn=Uint32Array,Wo=new Ue([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Go=new Ue([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),_u=new Ue([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cc=function(n,e){for(var t=new Pe(31),i=0;i<31;++i)t[i]=e+=1<<n[i-1];var r=new Mn(t[30]);for(i=1;i<30;++i)for(var s=t[i];s<t[i+1];++s)r[s]=s-t[i]<<5|i;return[t,r]},pc=cc(Wo,2),Hf=pc[0],Do=pc[1];Hf[28]=258,Do[258]=28;for(Lo=cc(Go,0)[1],Br=new Pe(32768),Y=0;Y<32768;++Y)Ft=(43690&Y)>>>1|(21845&Y)<<1,Ft=(61680&(Ft=(52428&Ft)>>>2|(13107&Ft)<<2))>>>4|(3855&Ft)<<4,Br[Y]=((65280&Ft)>>>8|(255&Ft)<<8)>>>1;var Ft,Lo,Br,Y,wi=function(n,e,t){for(var i=n.length,r=0,s=new Pe(e);r<i;++r)++s[n[r]-1];var o,a=new Pe(e);for(r=0;r<e;++r)a[r]=a[r-1]+s[r-1]<<1;if(t){o=new Pe(1<<e);var l=15-e;for(r=0;r<i;++r)if(n[r])for(var u=r<<4|n[r],c=e-n[r],p=a[n[r]-1]++<<c,f=p|(1<<c)-1;p<=f;++p)o[Br[p]>>>l]=u}else for(o=new Pe(i),r=0;r<i;++r)o[r]=Br[a[n[r]-1]++]>>>15-n[r];return o},rn=new Ue(288);for(Y=0;Y<144;++Y)rn[Y]=8;for(Y=144;Y<256;++Y)rn[Y]=9;for(Y=256;Y<280;++Y)rn[Y]=7;for(Y=280;Y<288;++Y)rn[Y]=8;var zr=new Ue(32);for(Y=0;Y<32;++Y)zr[Y]=5;var Wf=wi(rn,9,0),Gf=wi(zr,5,0),fc=function(n){return(n/8>>0)+(7&n&&1)},hc=function(n,e,t){(e==null||e<0)&&(e=0),(t==null||t>n.length)&&(t=n.length);var i=new(n instanceof Pe?Pe:n instanceof Mn?Mn:Ue)(t-e);return i.set(n.subarray(e,t)),i},ht=function(n,e,t){t<<=7&e;var i=e/8>>0;n[i]|=t,n[i+1]|=t>>>8},gi=function(n,e,t){t<<=7&e;var i=e/8>>0;n[i]|=t,n[i+1]|=t>>>8,n[i+2]|=t>>>16},uo=function(n,e){for(var t=[],i=0;i<n.length;++i)n[i]&&t.push({s:i,f:n[i]});var r=t.length,s=t.slice();if(!r)return[new Ue(0),0];if(r==1){var o=new Ue(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(G,Q){return G.f-Q.f}),t.push({s:-1,f:25001});var a=t[0],l=t[1],u=0,c=1,p=2;for(t[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=r-1;)a=t[t[u].f<t[p].f?u++:p++],l=t[u!=c&&t[u].f<t[p].f?u++:p++],t[c++]={s:-1,f:a.f+l.f,l:a,r:l};var f=s[0].s;for(i=1;i<r;++i)s[i].s>f&&(f=s[i].s);var d=new Pe(f+1),g=Vf(t[c-1],d,0);if(g>e){i=0;var v=0,k=g-e,L=1<<k;for(s.sort(function(G,Q){return d[Q.s]-d[G.s]||G.f-Q.f});i<r;++i){var E=s[i].s;if(!(d[E]>e))break;v+=L-(1<<g-d[E]),d[E]=e}for(v>>>=k;v>0;){var F=s[i].s;d[F]<e?v-=1<<e-d[F]++-1:++i}for(;i>=0&&v;--i){var U=s[i].s;d[U]==e&&(--d[U],++v)}g=e}return[new Ue(d),g]},Vf=function n(e,t,i){return e.s==-1?Math.max(n(e.l,t,i+1),n(e.r,t,i+1)):t[e.s]=i},bu=function(n){for(var e=n.length;e&&!n[--e];);for(var t=new Pe(++e),i=0,r=n[0],s=1,o=function(l){t[i++]=l},a=1;a<=e;++a)if(n[a]==r&&a!=e)++s;else{if(!r&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(r),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(r);s=1,r=n[a]}return[t.subarray(0,i),e]},vi=function(n,e){for(var t=0,i=0;i<e.length;++i)t+=n[i]*e[i];return t},Or=function(n,e,t){var i=t.length,r=fc(e+2);n[r]=255&i,n[r+1]=i>>>8,n[r+2]=255^n[r],n[r+3]=255^n[r+1];for(var s=0;s<i;++s)n[r+s+4]=t[s];return 8*(r+4+i)},wu=function(n,e,t,i,r,s,o,a,l,u,c){ht(e,c++,t),++r[256];for(var p=uo(r,15),f=p[0],d=p[1],g=uo(s,15),v=g[0],k=g[1],L=bu(f),E=L[0],F=L[1],U=bu(v),G=U[0],Q=U[1],K=new Pe(19),A=0;A<E.length;++A)K[31&E[A]]++;for(A=0;A<G.length;++A)K[31&G[A]]++;for(var oe=uo(K,7),ee=oe[0],ct=oe[1],ve=19;ve>4&&!ee[_u[ve-1]];--ve);var Be,V,Z,ae,Fe=u+5<<3,je=vi(r,rn)+vi(s,zr)+o,ie=vi(r,f)+vi(s,v)+o+14+3*ve+vi(K,ee)+(2*K[16]+3*K[17]+7*K[18]);if(Fe<=je&&Fe<=ie)return Or(e,c,n.subarray(l,l+u));if(ht(e,c,1+(ie<je)),c+=2,ie<je){Be=wi(f,d,0),V=f,Z=wi(v,k,0),ae=v;var ke=wi(ee,ct,0);for(ht(e,c,F-257),ht(e,c+5,Q-1),ht(e,c+10,ve-4),c+=14,A=0;A<ve;++A)ht(e,c+3*A,ee[_u[A]]);c+=3*ve;for(var Se=[E,G],te=0;te<2;++te){var me=Se[te];for(A=0;A<me.length;++A){var Ce=31&me[A];ht(e,c,ke[Ce]),c+=ee[Ce],Ce>15&&(ht(e,c,me[A]>>>5&127),c+=me[A]>>>12)}}}else Be=Wf,V=rn,Z=Gf,ae=zr;for(A=0;A<a;++A)if(i[A]>255){Ce=i[A]>>>18&31,gi(e,c,Be[Ce+257]),c+=V[Ce+257],Ce>7&&(ht(e,c,i[A]>>>23&31),c+=Wo[Ce]);var on=31&i[A];gi(e,c,Z[on]),c+=ae[on],on>3&&(gi(e,c,i[A]>>>5&8191),c+=Go[on])}else gi(e,c,Be[i[A]]),c+=V[i[A]];return gi(e,c,Be[256]),c+V[256]},Xf=new Mn([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Jf=new Ue(0),Yf=function(){for(var n=new Mn(256),e=0;e<256;++e){for(var t=e,i=9;--i;)t=(1&t&&3988292384)^t>>>1;n[e]=t}return n}(),Kf=function(n,e,t,i,r){return function(s,o,a,l,u,c){var p=s.length,f=new Ue(l+p+5*(1+Math.floor(p/7e3))+u),d=f.subarray(l,f.length-u),g=0;if(!o||p<8)for(var v=0;v<=p;v+=65535){var k=v+65535;k<p?g=Or(d,g,s.subarray(v,k)):(d[v]=c,g=Or(d,g,s.subarray(v,p)))}else{for(var L=Xf[o-1],E=L>>>13,F=8191&L,U=(1<<a)-1,G=new Pe(32768),Q=new Pe(U+1),K=Math.ceil(a/3),A=2*K,oe=function(os){return(s[os]^s[os+1]<<K^s[os+2]<<A)&U},ee=new Mn(25e3),ct=new Pe(288),ve=new Pe(32),Be=0,V=0,Z=(v=0,0),ae=0,Fe=0;v<p;++v){var je=oe(v),ie=32767&v,ke=Q[je];if(G[ie]=ke,Q[je]=ie,ae<=v){var Se=p-v;if((Be>7e3||Z>24576)&&Se>423){g=wu(s,d,0,ee,ct,ve,V,Z,Fe,v-Fe,g),Z=Be=V=0,Fe=v;for(var te=0;te<286;++te)ct[te]=0;for(te=0;te<30;++te)ve[te]=0}var me=2,Ce=0,on=F,wt=ie-ke&32767;if(Se>2&&je==oe(v-wt))for(var Ac=Math.min(E,Se)-1,Ic=Math.min(32767,v),Tc=Math.min(258,Se);wt<=Ic&&--on&&ie!=ke;){if(s[v+me]==s[v+me-wt]){for(var xt=0;xt<Tc&&s[v+xt]==s[v+xt-wt];++xt);if(xt>me){if(me=xt,Ce=wt,xt>Ac)break;var Rc=Math.min(wt,xt-2),Jo=0;for(te=0;te<Rc;++te){var ss=v-wt+te+32768&32767,Yo=ss-G[ss]+32768&32767;Yo>Jo&&(Jo=Yo,ke=ss)}}}wt+=(ie=ke)-(ke=G[ie])+32768&32767}if(Ce){ee[Z++]=268435456|Do[me]<<18|Lo[Ce];var Ko=31&Do[me],Qo=31&Lo[Ce];V+=Wo[Ko]+Go[Qo],++ct[257+Ko],++ve[Qo],ae=v+me,++Be}else ee[Z++]=s[v],++ct[s[v]]}}g=wu(s,d,c,ee,ct,ve,V,Z,Fe,v-Fe,g),c||(g=Or(d,g,Jf))}return hc(f,0,l+fc(g)+u)}(n,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(n.length)))):12+e.mem,t,i,!r)},co=function(n,e,t){for(;t;++e)n[e]=t,t>>>=8};function Qf(n,e){e===void 0&&(e={});var t=function(){var a=4294967295;return{p:function(l){for(var u=a,c=0;c<l.length;++c)u=Yf[255&u^l[c]]^u>>>8;a=u},d:function(){return 4294967295^a}}}(),i=n.length;t.p(n);var r,s=Kf(n,e,10+((r=e).filename&&r.filename.length+1||0),8),o=s.length;return function(a,l){var u=l.filename;if(a[0]=31,a[1]=139,a[2]=8,a[8]=l.level<2?4:l.level==9?2:0,a[9]=3,l.mtime!=0&&co(a,4,Math.floor(new Date(l.mtime||Date.now())/1e3)),u){a[3]=8;for(var c=0;c<=u.length;++c)a[c+10]=u.charCodeAt(c)}}(s,e),co(s,o-8,t.d()),co(s,o-4,i),s}var Zf=!!mo||!!vo,xu="text/plain",Hr=function(n,e){var t=Ie(n.split("?"),2),i=t[0],r=t[1],s=$({},e);r?.split("&").forEach(function(a){var l=Ie(a.split("="),1)[0];delete s[l]});var o=pf(s);return o=o?(r?r+"&":"")+o:r,"".concat(i,"?").concat(o)},eh=function(n){return"data="+encodeURIComponent(typeof n=="string"?n:JSON.stringify(n))},po=function(n){var e=n.data,t=n.compression;if(e){if(t===Qe.GZipJS){var i=Qf(function(s,o){var a=s.length;if(!o&&typeof TextEncoder<"u")return new TextEncoder().encode(s);for(var l=new Ue(s.length+(s.length>>>1)),u=0,c=function(g){l[u++]=g},p=0;p<a;++p){if(u+5>l.length){var f=new Ue(u+8+(a-p<<1));f.set(l),l=f}var d=s.charCodeAt(p);d<128||o?c(d):d<2048?(c(192|d>>>6),c(128|63&d)):d>55295&&d<57344?(c(240|(d=65536+(1047552&d)|1023&s.charCodeAt(++p))>>>18),c(128|d>>>12&63),c(128|d>>>6&63),c(128|63&d)):(c(224|d>>>12),c(128|d>>>6&63),c(128|63&d))}return hc(l,0,u)}(JSON.stringify(e)),{mtime:0});return{contentType:xu,body:new Blob([i],{type:xu})}}if(t===Qe.Base64){var r=function(s){var o,a,l,u,c,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f=0,d=0,g="",v=[];if(!s)return s;s=Yp(s);do o=(c=s.charCodeAt(f++)<<16|s.charCodeAt(f++)<<8|s.charCodeAt(f++))>>18&63,a=c>>12&63,l=c>>6&63,u=63&c,v[d++]=p.charAt(o)+p.charAt(a)+p.charAt(l)+p.charAt(u);while(f<s.length);switch(g=v.join(""),s.length%3){case 1:g=g.slice(0,-2)+"==";break;case 2:g=g.slice(0,-1)+"="}return g}(JSON.stringify(e));return{contentType:"application/x-www-form-urlencoded",body:eh(r)}}return{contentType:"application/json",body:JSON.stringify(e)}}},xi=[];mo&&xi.push({transport:"XHR",method:function(n){var e,t=new mo;t.open(n.method||"GET",n.url,!0);var i=(e=po(n))!==null&&e!==void 0?e:{},r=i.contentType,s=i.body;X(n.headers,function(o,a){t.setRequestHeader(a,o)}),r&&t.setRequestHeader("Content-Type",r),n.timeout&&(t.timeout=n.timeout),t.withCredentials=!0,t.onreadystatechange=function(){if(t.readyState===4){var o,a={statusCode:t.status,text:t.responseText};if(t.status===200)try{a.json=JSON.parse(t.responseText)}catch{}(o=n.callback)===null||o===void 0||o.call(n,a)}},t.send(s)}}),vo&&xi.push({transport:"fetch",method:function(n){var e,t,i=(e=po(n))!==null&&e!==void 0?e:{},r=i.contentType,s=i.body,o=new Headers;X(o,function(c,p){o.append(p,c)}),r&&o.append("Content-Type",r);var a=n.url,l=null;if(Gl){var u=new Gl;l={signal:u.signal,timeout:setTimeout(function(){return u.abort()},n.timeout)}}vo(a,{method:n?.method||"GET",headers:o,keepalive:n.method==="POST",body:s,signal:(t=l)===null||t===void 0?void 0:t.signal}).then(function(c){return c.text().then(function(p){var f,d={statusCode:c.status,text:p};if(c.status===200)try{d.json=JSON.parse(p)}catch(g){x.error(g)}(f=n.callback)===null||f===void 0||f.call(n,d)})}).catch(function(c){var p;x.error(c),(p=n.callback)===null||p===void 0||p.call(n,{statusCode:0,text:c})}).finally(function(){return l?clearTimeout(l.timeout):null})}}),mt!=null&&mt.sendBeacon&&xi.push({transport:"sendBeacon",method:function(n){var e=Hr(n.url,{beacon:"1"});try{var t,i=(t=po(n))!==null&&t!==void 0?t:{},r=i.contentType,s=i.body,o=typeof s=="string"?new Blob([s],{type:r}):s;mt.sendBeacon(e,o)}catch{}}});var th=["retriesPerformedSoFar"],tn,nh=function(){function n(e){var t=this;H(this,n),y(this,"isPolling",!1),y(this,"pollIntervalMs",3e3),y(this,"queue",[]),this.instance=e,this.queue=[],this.areWeOnline=!0,!M(m)&&"onLine"in m.navigator&&(this.areWeOnline=m.navigator.onLine,m.addEventListener("online",function(){t.areWeOnline=!0,t.flush()}),m.addEventListener("offline",function(){t.areWeOnline=!1}))}return W(n,[{key:"retriableRequest",value:function(e){var t=this,i=e.retriesPerformedSoFar,r=Wp(e,th);lt(i)&&i>0&&(r.url=Hr(r.url,{retry_count:i})),this.instance._send_request($($({},r),{},{callback:function(s){var o;s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(i??0)<10?t.enqueue($({retriesPerformedSoFar:i},r)):(o=r.callback)===null||o===void 0||o.call(r,s)}}))}},{key:"enqueue",value:function(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var i=function(o){var a=3e3*Math.pow(2,o),l=a/2,u=Math.min(18e5,a),c=(Math.random()-.5)*(u-l);return Math.ceil(u+c)}(t),r=Date.now()+i;this.queue.push({retryAt:r,requestOptions:e});var s="Enqueued failed request for retry in ".concat(i);navigator.onLine||(s+=" (Browser is offline)"),x.warn(s),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var e=this;this.poller&&clearTimeout(this.poller),this.poller=setTimeout(function(){e.areWeOnline&&e.queue.length>0&&e.flush(),e.poll()},this.pollIntervalMs)}},{key:"flush",value:function(){var e=Date.now(),t=[],i=this.queue.filter(function(a){return a.retryAt<e||(t.push(a),!1)});if(this.queue=t,i.length>0){var r,s=tt(i);try{for(s.s();!(r=s.n()).done;){var o=r.value.requestOptions;this.retriableRequest(o)}}catch(a){s.e(a)}finally{s.f()}}}},{key:"unload",value:function(){this.poller&&(clearTimeout(this.poller),this.poller=void 0);var e,t=tt(this.queue);try{for(t.s();!(e=t.n()).done;){var i=e.value.requestOptions;try{this.instance._send_request($($({},i),{},{transport:"sendBeacon"}))}catch(r){x.error(r)}}}catch(r){t.e(r)}finally{t.f()}this.queue=[]}}]),n}(),Cr=1800,ih=function(){function n(e,t,i,r){H(this,n),y(this,"_sessionIdChangedHandlers",[]),this.config=e,this.persistence=t,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=i||jt,this._windowIdGenerator=r||jt;var s=e.persistence_name||e.token,o=e.session_idle_timeout_seconds||Cr;if(lt(o)?o>Cr?x.warn("session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):o<60&&x.warn("session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."):(x.warn("session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),o=Cr),this._sessionTimeoutMs=1e3*Math.min(Math.max(o,60),Cr),this._window_id_storage_key="ph_"+s+"_window_id",this._primary_window_exists_storage_key="ph_"+s+"_primary_window_exists",this._canUseSessionStorage()){var a=xe.parse(this._window_id_storage_key),l=xe.parse(this._primary_window_exists_storage_key);a&&!l?this._windowId=a:xe.remove(this._window_id_storage_key),xe.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return W(n,[{key:"onSessionId",value:function(e){var t=this;return M(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),function(){t._sessionIdChangedHandlers=t._sessionIdChangedHandlers.filter(function(i){return i!==e})}}},{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&xe.is_supported()}},{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&xe.set(this._window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?xe.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(e,t,i){e===this._sessionId&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register(y({},Mr,[t,e,i])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[Mr];return de(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var e=this;m?.addEventListener("beforeunload",function(){e._canUseSessionStorage()&&xe.remove(e._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),i=Ie(this._getSessionId(),3),r=i[0],s=i[1],o=i[2],a=this._getWindowId(),l=o&&o>0&&Math.abs(t-o)>864e5,u=!1,c=!s,p=!e&&Math.abs(t-r)>this._sessionTimeoutMs;c||p||l?(s=this._sessionIdGenerator(),a=this._windowIdGenerator(),x.info("[SessionId] new session ID generated",{sessionId:s,windowId:a,changeReason:{noSessionId:c,activityTimeout:p,sessionPastMaximumLength:l}}),o=t,u=!0):a||(a=this._windowIdGenerator(),u=!0);var f=r===0||!e||l?t:r,d=o===0?new Date().getTime():o;return this._setWindowId(a),this._setSessionId(s,f,d),u&&this._sessionIdChangedHandlers.forEach(function(g){return g(s,a)}),{sessionId:s,windowId:a,sessionStartTimestamp:d}}}]),n}();(function(n){n.US="us",n.EU="eu",n.CUSTOM="custom"})(tn||(tn={}));var ku="i.posthog.com",rh=function(){function n(e){H(this,n),y(this,"_regionCache",{}),this.instance=e}return W(n,[{key:"apiHost",get:function(){return this.instance.config.api_host.trim().replace(/\/$/,"")}},{key:"uiHost",get:function(){var e,t=(e=this.instance.config.ui_host)===null||e===void 0?void 0:e.replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.posthog.com":t}},{key:"region",get:function(){return this._regionCache[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=tn.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=tn.EU:this._regionCache[this.apiHost]=tn.CUSTOM),this._regionCache[this.apiHost]}},{key:"endpointFor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t&&(t=t[0]==="/"?t:"/".concat(t)),e==="ui")return(this.uiHost||this.apiHost.replace(".".concat(ku),".posthog.com"))+t;if(this.region===tn.CUSTOM)return this.apiHost+t;var i=ku+t;switch(e){case"assets":return"https://".concat(this.region,"-assets.").concat(i);case"api":return"https://".concat(this.region,".").concat(i)}}}]),n}(),dc="posthog-js";function gc(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.organization,i=e.projectId,r=e.prefix,s=e.severityAllowList,o=s===void 0?["error"]:s;return function(a){var l,u,c,p,f;if(!(o==="*"||o.includes(a.level))||!n.__loaded)return a;a.tags||(a.tags={});var d=n.requestRouter.endpointFor("ui","/project/".concat(n.config.token,"/person/").concat(n.get_distinct_id()));a.tags["PostHog Person URL"]=d,n.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=n.get_session_replay_url({withTimestamp:!0}));var g=((l=a.exception)===null||l===void 0?void 0:l.values)||[],v={$exception_message:((u=g[0])===null||u===void 0?void 0:u.value)||a.message,$exception_type:(c=g[0])===null||c===void 0?void 0:c.type,$exception_personURL:d,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((p=g[0])===null||p===void 0?void 0:p.value)||a.message,$sentry_exception_type:(f=g[0])===null||f===void 0?void 0:f.type,$sentry_tags:a.tags,$level:a.level};return t&&i&&(v.$sentry_url=(r||"https://sentry.io/organizations/")+t+"/issues/?project="+i+"&query="+a.event_id),n.capture("$exception",v),a}}var sh=W(function n(e,t,i,r,s){H(this,n),this.name=dc,this.setupOnce=function(o){o(gc(e,{organization:t,projectId:i,prefix:r,severityAllowList:s}))}});function oh(n,e){var t=n.config.segment;if(!t)return e();(function(i,r){var s=i.config.segment;if(!s)return r();var o=function(l){var u=function(){return l.anonymousId()||jt()};i.config.get_device_id=u,l.id()&&(i.register({distinct_id:l.id(),$device_id:u()}),i.persistence.set_property(dt,"identified")),r()},a=s.user();"then"in a&&et(a.then)?a.then(function(l){return o(l)}):o(a)})(n,function(){t.register(function(i){Promise&&Promise.resolve||x.warn("This browser does not have Promise support, and can not use the segment integration");var r=function(s,o){var a;if(!o)return s;s.event.userId||s.event.anonymousId===i.get_distinct_id()||i.reset(),s.event.userId&&s.event.userId!==i.get_distinct_id()&&(i.register({distinct_id:s.event.userId}),i.reloadFeatureFlags());var l=i._calculate_event_properties(o,(a=s.event.properties)!==null&&a!==void 0?a:{});return s.event.properties=Object.assign({},l,s.event.properties),s};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(s){return r(s,s.event.event)},page:function(s){return r(s,"$pageview")},identify:function(s){return r(s,"$identify")},screen:function(s){return r(s,"$screen")}}}(n)).then(function(){e()})})}var ah=function(){function n(e){H(this,n),this._instance=e}return W(n,[{key:"doPageView",value:function(){var e,t=this._previousScrollProperties();return this._currentPath=(e=m?.location.pathname)!==null&&e!==void 0?e:"",this._instance.scrollManager.resetContext(),t}},{key:"doPageLeave",value:function(){return this._previousScrollProperties()}},{key:"_previousScrollProperties",value:function(){var e=this._currentPath,t=this._instance.scrollManager.getContext();if(!e||!t)return{};var i=t.maxScrollHeight,r=t.lastScrollY,s=t.maxScrollY,o=t.maxContentHeight,a=t.lastContentY,l=t.maxContentY;return M(i)||M(r)||M(s)||M(o)||M(a)||M(l)?{}:(i=Math.ceil(i),r=Math.ceil(r),s=Math.ceil(s),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),{$prev_pageview_pathname:e,$prev_pageview_last_scroll:r,$prev_pageview_last_scroll_percentage:i<=1?1:Ar(r/i,0,1),$prev_pageview_max_scroll:s,$prev_pageview_max_scroll_percentage:i<=1?1:Ar(s/i,0,1),$prev_pageview_last_content:a,$prev_pageview_last_content_percentage:o<=1?1:Ar(a/o,0,1),$prev_pageview_max_content:l,$prev_pageview_max_content_percentage:o<=1?1:Ar(l/o,0,1)})}}]),n}();function Ar(n,e,t){return Math.max(e,Math.min(n,t))}var Su=function(){function n(e){H(this,n),this.persistence=e,this.eventRegistry=new Map}return W(n,[{key:"register",value:function(e){var t=this;e.forEach(function(i){var r,s,o,a,l;(r=i.conditions)!==null&&r!==void 0&&r.events&&(s=i.conditions)!==null&&s!==void 0&&(o=s.events)!==null&&o!==void 0&&o.values&&((a=i.conditions)===null||a===void 0?void 0:a.events.values.length)>0&&t.eventRegistry.set(i.id,(l=i.conditions)===null||l===void 0?void 0:l.events.values.map(function(u){return u.name}))})}},{key:"on",value:function(e){var t,i=[];this.eventRegistry.forEach(function(o,a){o.includes(e)&&i.push(a)});var r=(t=this.persistence)===null||t===void 0?void 0:t.props[io],s=(r||[]).concat(i);this._saveSurveysToStorage(s)}},{key:"getSurveys",value:function(){var e,t=(e=this.persistence)===null||e===void 0?void 0:e.props[io];return t||[]}},{key:"getEventRegistry",value:function(){return this.eventRegistry}},{key:"_saveSurveysToStorage",value:function(e){var t;(t=this.persistence)===null||t===void 0||t.register(y({},io,nn(new Set(e))))}}]),n}(),lh={icontains:function(n){return!!m&&m.location.href.toLowerCase().indexOf(n.toLowerCase())>-1},regex:function(n){return!!m&&cf(m.location.href,n)},exact:function(n){return m?.location.href===n}},uh=function(){function n(e){H(this,n),this.instance=e,this._surveyEventReceiver=null}return W(n,[{key:"afterDecideResponse",value:function(e){this._decideServerResponse=!!e.surveys,this.loadIfEnabled()}},{key:"loadIfEnabled",value:function(){var e=this,t=he?.extendPostHogWithSurveys;this.instance.config.disable_surveys||!this._decideServerResponse||t||(this._surveyEventReceiver==null&&(this._surveyEventReceiver=new Su(this.instance.persistence)),On(this.instance.requestRouter.endpointFor("assets","/static/surveys.js"),function(i){if(i)return x.error("Could not load surveys script",i);he.extendPostHogWithSurveys(e.instance)}))}},{key:"getSurveys",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(this.instance.config.disable_surveys)return e([]);this._surveyEventReceiver==null&&(this._surveyEventReceiver=new Su(this.instance.persistence));var r=this.instance.get_property(ko);if(r&&!i)return e(r);this.instance._send_request({url:this.instance.requestRouter.endpointFor("api","/api/surveys/?token=".concat(this.instance.config.token)),method:"GET",transport:"XHR",callback:function(s){var o;if(s.statusCode!==200||!s.json)return e([]);var a=s.json.surveys||[],l=a.filter(function(c){var p,f,d,g,v,k;return((p=c.conditions)===null||p===void 0?void 0:p.events)&&((f=c.conditions)===null||f===void 0||(d=f.events)===null||d===void 0?void 0:d.values)&&((g=c.conditions)===null||g===void 0||(v=g.events)===null||v===void 0||(k=v.values)===null||k===void 0?void 0:k.length)>0});if(l.length>0&&!M(t.instance._addCaptureHook)){var u;(u=t._surveyEventReceiver)===null||u===void 0||u.register(l),t.instance._addCaptureHook(function(c){var p;(p=t._surveyEventReceiver)===null||p===void 0||p.on(c)})}return(o=t.instance.persistence)===null||o===void 0||o.register(y({},ko,a)),e(a)}})}},{key:"getActiveMatchingSurveys",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(function(r){var s,o=r.filter(function(u){return!(!u.start_date||u.end_date)}).filter(function(u){var c,p,f,d;if(!u.conditions)return!0;var g=(c=u.conditions)===null||c===void 0||!c.url||lh[(p=(f=u.conditions)===null||f===void 0?void 0:f.urlMatchType)!==null&&p!==void 0?p:"icontains"](u.conditions.url),v=(d=u.conditions)===null||d===void 0||!d.selector||C?.querySelector(u.conditions.selector);return g&&v}),a=(s=t._surveyEventReceiver)===null||s===void 0?void 0:s.getSurveys(),l=o.filter(function(u){var c,p,f,d,g;if(!u.linked_flag_key&&!u.targeting_flag_key&&!u.internal_targeting_flag_key)return!0;var v=!u.linked_flag_key||t.instance.featureFlags.isFeatureEnabled(u.linked_flag_key),k=!u.targeting_flag_key||t.instance.featureFlags.isFeatureEnabled(u.targeting_flag_key),L=!u.internal_targeting_flag_key||t.instance.featureFlags.isFeatureEnabled(u.internal_targeting_flag_key),E=!(!((c=u.conditions)===null||c===void 0)&&c.events&&(!((p=u.conditions)===null||p===void 0||(f=p.events)===null||f===void 0)&&f.values)&&((d=u.conditions)===null||d===void 0||(g=d.events)===null||g===void 0?void 0:g.values.length)>0)||a?.includes(u.id);return v&&k&&L&&E});return e(l)},i)}}]),n}(),ch=function(){function n(e){var t,i,r=this;H(this,n),y(this,"serverLimits",{}),y(this,"lastEventRateLimited",!1),y(this,"checkForLimiting",function(s){var o=s.text;if(o&&o.length)try{(JSON.parse(o).quota_limited||[]).forEach(function(a){x.info("[RateLimiter] ".concat(a||"events"," is quota limited.")),r.serverLimits[a]=new Date().getTime()+6e4})}catch(a){return void x.warn('[RateLimiter] could not rate limit - continuing. Error: "'.concat(a?.message,'"'),{text:o})}}),this.instance=e,this.captureEventsPerSecond=((t=e.config.rate_limiting)===null||t===void 0?void 0:t.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((i=e.config.rate_limiting)===null||i===void 0?void 0:i.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}return W(n,[{key:"clientRateLimitContext",value:function(){var e,t,i,r=arguments.length>0&&arguments[0]!==void 0&&arguments[0],s=new Date().getTime(),o=(e=(t=this.instance.persistence)===null||t===void 0?void 0:t.get_property(Eo))!==null&&e!==void 0?e:{tokens:this.captureEventsBurstLimit,last:s};o.tokens+=(s-o.last)/1e3*this.captureEventsPerSecond,o.last=s,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);var a=o.tokens<1;return a||r||(o.tokens=Math.max(0,o.tokens-1)),!a||this.lastEventRateLimited||r||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to ".concat(this.captureEventsPerSecond," events per second and ").concat(this.captureEventsBurstLimit," events burst limit.")},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=a,(i=this.instance.persistence)===null||i===void 0||i.set_property(Eo,o),{isRateLimited:a,remainingTokens:o.tokens}}},{key:"isServerRateLimited",value:function(e){var t=this.serverLimits[e||"events"]||!1;return t!==!1&&new Date().getTime()<t}}]),n}(),ph=function(){return $({initialPathName:De?.pathname||"",referringDomain:_e.referringDomain()},_e.campaignParams())},fh=function(){function n(e,t,i){var r=this;H(this,n),y(this,"_onSessionIdCallback",function(s){var o=r._getStoredProps();if(!o||o.sessionId!==s){var a={sessionId:s,props:r._sessionSourceParamGenerator()};r._persistence.register(y({},So,a))}}),this._sessionIdManager=e,this._persistence=t,this._sessionSourceParamGenerator=i||ph,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}return W(n,[{key:"_getStoredProps",value:function(){return this._persistence.props[So]}},{key:"getSessionProps",value:function(){var e,t=(e=this._getStoredProps())===null||e===void 0?void 0:e.props;return t?{$client_session_initial_referring_host:t.referringDomain,$client_session_initial_pathname:t.initialPathName,$client_session_initial_utm_source:t.utm_source,$client_session_initial_utm_campaign:t.utm_campaign,$client_session_initial_utm_medium:t.utm_medium,$client_session_initial_utm_content:t.utm_content,$client_session_initial_utm_term:t.utm_term}:{}}}]),n}(),hh=["ahrefsbot","ahrefssiteaudit","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","deepscan","duckduckbot","facebookexternal","facebookcatalog","gptbot","http://yandex.com/bots","hubspot","ia_archiver","linkedinbot","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","slurp","turnitin","twitterbot","vercelbot","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google","Bytespider;"],Eu=function(n,e){if(!n)return!1;var t=n.toLowerCase();return hh.concat(e||[]).some(function(i){var r=i.toLowerCase();return t.indexOf(r)!==-1})},vc=function(){function n(){H(this,n),this.clicks=[]}return W(n,[{key:"isRageClick",value:function(e,t,i){var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<30&&i-r.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}]),n}();function $u(n){var e;return n.id===Ao||!((e=n.closest)===null||e===void 0||!e.call(n,"#"+Ao))}var dh=function(){function n(e){var t;H(this,n),y(this,"rageclicks",new vc),y(this,"_enabledServerSide",!1),y(this,"_initialized",!1),this.instance=e,this._enabledServerSide=!((t=this.instance.persistence)===null||t===void 0||!t.props[bo])}return W(n,[{key:"startIfEnabled",value:function(){this.isEnabled&&!this._initialized&&(x.info("[heatmaps] Heatmaps enabled, starting..."),this._setupListeners())}},{key:"isEnabled",get:function(){return M(this.instance.config.enable_heatmaps)?this._enabledServerSide:this.instance.config.enable_heatmaps}},{key:"afterDecideResponse",value:function(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register(y({},bo,t)),this._enabledServerSide=t,this.startIfEnabled()}},{key:"getAndClearBuffer",value:function(){var e=this.buffer;return this.buffer=void 0,e}},{key:"_setupListeners",value:function(){var e=this;m&&C&&(vt(C,"click",function(t){return e._onClick(t||m?.event)},!1,!0),vt(C,"mousemove",function(t){return e._onMouseMove(t||m?.event)},!1,!0),this._initialized=!0)}},{key:"_getProperties",value:function(e,t){var i=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),o=function(a,l,u){for(var c=a;c&&!Nt(c,"body");){if(c===u)return!1;if(N(l,m?.getComputedStyle(c).position))return!0;c=rc(c)}return!1}(e.target,["fixed","sticky"],s);return{x:e.clientX+(o?0:r),y:e.clientY+(o?0:i),target_fixed:o,type:t}}},{key:"_onClick",value:function(e){var t;if(!$u(e.target)){var i=this._getProperties(e,"click");(t=this.rageclicks)!==null&&t!==void 0&&t.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._capture($($({},i),{},{type:"rageclick"})),this._capture(i)}}},{key:"_onMouseMove",value:function(e){var t=this;$u(e.target)||(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout(function(){t._capture(t._getProperties(e,"mousemove"))},500))}},{key:"_capture",value:function(e){if(m){var t=m.location.href;this.buffer=this.buffer||{},this.buffer[t]||(this.buffer[t]=[]),this.buffer[t].push(e)}}}]),n}(),gh=function(){function n(e){var t=this;H(this,n),y(this,"_updateScrollData",function(){var i,r,s,o;t.context||(t.context={});var a=t.scrollElement(),l=t.scrollY(),u=a?Math.max(0,a.scrollHeight-a.clientHeight):0,c=l+(a?.clientHeight||0),p=a?.scrollHeight||0;t.context.lastScrollY=Math.ceil(l),t.context.maxScrollY=Math.max(l,(i=t.context.maxScrollY)!==null&&i!==void 0?i:0),t.context.maxScrollHeight=Math.max(u,(r=t.context.maxScrollHeight)!==null&&r!==void 0?r:0),t.context.lastContentY=c,t.context.maxContentY=Math.max(c,(s=t.context.maxContentY)!==null&&s!==void 0?s:0),t.context.maxContentHeight=Math.max(p,(o=t.context.maxContentHeight)!==null&&o!==void 0?o:0)}),this.instance=e}return W(n,[{key:"getContext",value:function(){return this.context}},{key:"resetContext",value:function(){var e=this.context;return setTimeout(this._updateScrollData,0),e}},{key:"startMeasuringScrollPosition",value:function(){m?.addEventListener("scroll",this._updateScrollData,!0),m?.addEventListener("scrollend",this._updateScrollData,!0),m?.addEventListener("resize",this._updateScrollData)}},{key:"scrollElement",value:function(){if(!this.instance.config.scroll_root_selector)return m?.document.documentElement;var e,t=tt(de(this.instance.config.scroll_root_selector)?this.instance.config.scroll_root_selector:[this.instance.config.scroll_root_selector]);try{for(t.s();!(e=t.n()).done;){var i=e.value,r=m?.document.querySelector(i);if(r)return r}}catch(s){t.e(s)}finally{t.f()}}},{key:"scrollY",value:function(){if(this.instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return m&&(m.scrollY||m.pageYOffset||m.document.documentElement.scrollTop)||0}},{key:"scrollX",value:function(){if(this.instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return m&&(m.scrollX||m.pageXOffset||m.document.documentElement.scrollLeft)||0}}]),n}(),vh=function(){function n(){H(this,n),y(this,"events",{}),this.events={}}return W(n,[{key:"on",value:function(e,t){var i=this;return this.events[e]||(this.events[e]=[]),this.events[e].push(t),function(){i.events[e]=i.events[e].filter(function(r){return r!==t})}}},{key:"emit",value:function(e,t){var i,r=tt(this.events[e]||[]);try{for(r.s();!(i=r.n()).done;)(0,i.value)(t)}catch(a){r.e(a)}finally{r.f()}var s,o=tt(this.events["*"]||[]);try{for(o.s();!(s=o.n()).done;)(0,s.value)(e,t)}catch(a){o.e(a)}finally{o.f()}}}]),n}(),fo="$copy_autocapture";function ho(n,e){return e.length>n?e.slice(0,n)+"...":e}var Dt,mh=function(){function n(e){H(this,n),y(this,"_initialized",!1),y(this,"_isDisabledServerSide",null),y(this,"rageclicks",new vc),y(this,"_elementsChainAsString",!1),this.instance=e}return W(n,[{key:"config",get:function(){var e,t=Ze(this.instance.config.autocapture)?this.instance.config.autocapture:{};return t.url_allowlist=(e=t.url_allowlist)===null||e===void 0?void 0:e.map(function(i){return new RegExp(i)}),t}},{key:"_addDomEventHandlers",value:function(){var e=this;if(this.isBrowserSupported()){if(m&&C){var t=function(r){r=r||m?.event;try{e._captureEvent(r)}catch(s){x.error("Failed to capture event",s)}},i=function(r){r=r||m?.event,e._captureEvent(r,fo)};vt(C,"submit",t,!1,!0),vt(C,"change",t,!1,!0),vt(C,"click",t,!1,!0),this.config.capture_copied_text&&(vt(C,"copy",i,!1,!0),vt(C,"cut",i,!1,!0))}}else x.info("Disabling Automatic Event Collection because this browser is not supported")}},{key:"startIfEnabled",value:function(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)}},{key:"afterDecideResponse",value:function(e){e.elementsChainAsString&&(this._elementsChainAsString=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register(y({},Jl,!!e.autocapture_opt_out)),this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()}},{key:"isEnabled",get:function(){var e,t,i=(e=this.instance.persistence)===null||e===void 0?void 0:e.props[Jl],r=this._isDisabledServerSide;if(bt(r)&&!Ir(i)&&!this.instance.config.advanced_disable_decide)return!1;var s=(t=this._isDisabledServerSide)!==null&&t!==void 0?t:!!i;return!!this.instance.config.autocapture&&!s}},{key:"_previousElementSibling",value:function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Ho(t));return t}},{key:"_getAugmentPropertiesFromElement",value:function(e){if(!Oo(e))return{};var t={};return X(e.attributes,function(i){if(i.name&&i.name.indexOf("data-ph-capture-attribute")===0){var r=i.name.replace("data-ph-capture-attribute-",""),s=i.value;r&&s&&Pn(s)&&(t[r]=s)}}),t}},{key:"_getPropertiesFromElement",value:function(e,t,i){var r,s=e.tagName.toLowerCase(),o={tag_name:s};Po.indexOf(s)>-1&&!i&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?o.$el_text=ho(1024,pu(e)):o.$el_text=ho(1024,Ur(e)));var a=Nr(e);a.length>0&&(o.classes=a.filter(function(f){return f!==""}));var l=(r=this.config)===null||r===void 0?void 0:r.element_attribute_ignorelist;X(e.attributes,function(f){var d;if((!sc(e)||["name","id","class","aria-label"].indexOf(f.name)!==-1)&&(l==null||!l.includes(f.name))&&!t&&Pn(f.value)&&(d=f.name,!Re(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var g=f.value;f.name==="class"&&(g=zo(g).join(" ")),o["attr__"+f.name]=ho(1024,g)}});for(var u=1,c=1,p=e;p=this._previousElementSibling(p);)u++,p.tagName===e.tagName&&c++;return o.nth_child=u,o.nth_of_type=c,o}},{key:"_getDefaultProperties",value:function(e){return{$event_type:e,$ce_version:1}}},{key:"_getEventTarget",value:function(e){return M(e.target)?e.srcElement||null:(t=e.target)!==null&&t!==void 0&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}},{key:"_captureEvent",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$autocapture";if(this.isEnabled){var r,s=this._getEventTarget(e);nc(s)&&(s=s.parentNode||null),i==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!==null&&r!==void 0&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._captureEvent(e,"$rageclick");var o=i===fo;if(s&&Ef(s,e,this.config,o,o?["copy","cut"]:void 0)){for(var a,l,u=[s],c=s;c.parentNode&&!Nt(c,"body");)ic(c.parentNode)?(u.push(c.parentNode.host),c=c.parentNode.host):(u.push(c.parentNode),c=c.parentNode);var p,f=[],d={},g=!1;if(X(u,function(F){var U=Oo(F);F.tagName.toLowerCase()==="a"&&(p=F.getAttribute("href"),p=U&&Pn(p)&&p),N(Nr(F),"ph-no-capture")&&(g=!0),f.push(t._getPropertiesFromElement(F,t.instance.config.mask_all_element_attributes,t.instance.config.mask_all_text));var G=t._getAugmentPropertiesFromElement(F);Te(d,G)}),this.instance.config.mask_all_text||(s.tagName.toLowerCase()==="a"||s.tagName.toLowerCase()==="button"?f[0].$el_text=pu(s):f[0].$el_text=Ur(s)),p&&(f[0].attr__href=p),g)return!1;var v=Te(this._getDefaultProperties(e.type),this._elementsChainAsString?{$elements_chain:Tf(f)}:{$elements:f},(a=f[0])!==null&&a!==void 0&&a.$el_text?{$el_text:(l=f[0])===null||l===void 0?void 0:l.$el_text}:{},d);if(i===fo){var k,L=tc(m==null||(k=m.getSelection())===null||k===void 0?void 0:k.toString()),E=e.type||"clipboard";if(!L)return!1;v.$selected_content=L,v.$copy_type=E}return this.instance.capture(i,v),!0}}}},{key:"isBrowserSupported",value:function(){return et(C?.querySelectorAll)}}]),n}(),yh=function(){function n(e){var t=this;H(this,n),y(this,"_restoreXHRPatch",void 0),y(this,"_restoreFetchPatch",void 0),y(this,"_startCapturing",function(){M(t._restoreXHRPatch)&&he.postHogTracingHeadersPatchFns._patchXHR(t.instance.sessionManager),M(t._restoreFetchPatch)&&he.postHogTracingHeadersPatchFns._patchFetch(t.instance.sessionManager)}),this.instance=e}return W(n,[{key:"_loadScript",value:function(e){he.postHogTracingHeadersPatchFns&&e(),On(this.instance.requestRouter.endpointFor("assets","/static/tracing-headers.js?v=".concat(Lt.LIB_VERSION)),function(t){t&&x.error("[TRACING-HEADERS] failed to load script",t),e()})}},{key:"startIfEnabledOrStop",value:function(){var e,t;this.instance.config.__add_tracing_headers?this._loadScript(this._startCapturing):((e=this._restoreXHRPatch)===null||e===void 0||e.call(this),(t=this._restoreFetchPatch)===null||t===void 0||t.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)}}]),n}();(function(n){n[n.PENDING=-1]="PENDING",n[n.DENIED=0]="DENIED",n[n.GRANTED=1]="GRANTED"})(Dt||(Dt={}));var _h=function(){function n(e){H(this,n),this.instance=e}return W(n,[{key:"config",get:function(){return this.instance.config}},{key:"consent",get:function(){return this.getDnt()?Dt.DENIED:this.storedConsent}},{key:"isOptedOut",value:function(){return this.consent===Dt.DENIED||this.consent===Dt.PENDING&&this.config.opt_out_capturing_by_default}},{key:"isOptedIn",value:function(){return!this.isOptedOut()}},{key:"optInOut",value:function(e){this.storage.set(this.storageKey,e?1:0,this.config.cookie_expiration,this.config.cross_subdomain_cookie,this.config.secure_cookie)}},{key:"reset",value:function(){this.storage.remove(this.storageKey,this.config.cross_subdomain_cookie)}},{key:"storageKey",get:function(){var e=this.instance.config,t=e.token;return(e.opt_out_capturing_cookie_prefix||"__ph_opt_in_out_")+t}},{key:"storedConsent",get:function(){var e=this.storage.get(this.storageKey);return e==="1"?Dt.GRANTED:e==="0"?Dt.DENIED:Dt.PENDING}},{key:"storage",get:function(){if(!this._storage){var e=this.config.opt_out_capturing_persistence_type;this._storage=e==="localStorage"?fe:_t;var t=e==="localStorage"?_t:fe;t.get(this.storageKey)&&(this._storage.get(this.storageKey)||this.optInOut(t.get(this.storageKey)==="1"),t.remove(this.storageKey,this.config.cross_subdomain_cookie))}return this._storage}},{key:"getDnt",value:function(){return!!this.config.respect_dnt&&!!Lu([mt?.doNotTrack,mt?.msDoNotTrack,he.doNotTrack],function(e){return N([!0,1,"1","yes"],e)})}}]),n}(),ki={},Cu=function(){},$n="posthog",mc=!Zf&&se?.indexOf("MSIE")===-1&&se?.indexOf("Mozilla")===-1,Au=function(){var n,e,t;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(e=C?.location,t=e?.hostname,!!Re(t)&&t.split(".").slice(-2).join(".")!=="herokuapp.com"),persistence:"localStorage+cookie",persistence_name:"",loaded:Cu,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:"if_capture_pageview",debug:De&&Re(De?.search)&&De.search.indexOf("__posthog_debug=true")!==-1||!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_surveys:!1,enable_recording_console_log:void 0,secure_cookie:(m==null||(n=m.location)===null||n===void 0?void 0:n.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,on_request_error:function(i){var r="Bad HTTP status: "+i.statusCode+" "+i.text;x.error(r)},get_device_id:function(i){return i},_onCapture:Cu,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"always",__add_tracing_headers:!1}},Iu=function(n){var e={};M(n.process_person)||(e.person_profiles=n.process_person),M(n.xhr_headers)||(e.request_headers=n.xhr_headers),M(n.cookie_name)||(e.persistence_name=n.cookie_name),M(n.disable_cookie)||(e.disable_persistence=n.disable_cookie);var t=Te({},e,n);return de(n.property_blacklist)&&(M(n.property_denylist)?t.property_denylist=n.property_blacklist:de(n.property_denylist)?t.property_denylist=[].concat(nn(n.property_blacklist),nn(n.property_denylist)):x.error("Invalid value for property_denylist config: "+n.property_denylist)),t},bh=function(){function n(){H(this,n),y(this,"__forceAllowLocalhost",!1)}return W(n,[{key:"_forceAllowLocalhost",get:function(){return this.__forceAllowLocalhost},set:function(e){x.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}]),n}(),yc=function(){function n(){var e=this;H(this,n),y(this,"webPerformance",new bh),y(this,"_debugEventEmitter",new vh),this.config=Au(),this.decideEndpointWasHit=!1,this.SentryIntegration=sh,this.sentryIntegration=function(t){return function(i,r){var s=gc(i,r);return{name:dc,processEvent:function(o){return s(o)}}}(e,t)},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.featureFlags=new Qp(this),this.toolbar=new Bf(this),this.scrollManager=new gh(this),this.pageViewManager=new ah(this),this.surveys=new uh(this),this.rateLimiter=new ch(this),this.requestRouter=new rh(this),this.consent=new _h(this),this.people={set:function(t,i,r){var s=Re(t)?y({},t,i):t;e.setPersonProperties(s),r?.({})},set_once:function(t,i,r){var s=Re(t)?y({},t,i):t;e.setPersonProperties(void 0,s),r?.({})}},this.on("eventCaptured",function(t){return x.info("send",t)})}return W(n,[{key:"init",value:function(e,t,i){if(i&&i!==$n){var r,s=(r=ki[i])!==null&&r!==void 0?r:new n;return s._init(e,t,i),ki[i]=s,ki[$n][i]=s,s}return this._init(e,t,i)}},{key:"_init",value:function(e){var t,i,r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(M(e)||function(k){return Re(k)&&k.trim().length===0}(e))return x.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return x.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;if(this.__loaded=!0,this.config={},this._triggered_notifs=[],this.set_config(Te({},Au(),Iu(s),{name:o,token:e})),this.compression=s.disable_compression?void 0:Qe.Base64,this.persistence=new ao(this.config),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new ao($($({},this.config),{},{persistence:"sessionStorage"})),this._requestQueue=new zf(function(k){return r._send_retriable_request(k)}),this._retryQueue=new nh(this),this.__request_queue=[],this.sessionManager=new ih(this.config,this.persistence),this.sessionPropsManager=new fh(this.sessionManager,this.persistence),new yh(this).startIfEnabledOrStop(),this.sessionRecording=new qf(this),this.sessionRecording.startIfEnabledOrStop(),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new mh(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new dh(this),this.heatmaps.startIfEnabled(),Lt.DEBUG=Lt.DEBUG||this.config.debug,this._sync_opt_out_with_persistence(),((t=s.bootstrap)===null||t===void 0?void 0:t.distinctID)!==void 0){var a,l,u=this.config.get_device_id(jt()),c=(a=s.bootstrap)!==null&&a!==void 0&&a.isIdentifiedID?u:s.bootstrap.distinctID;this.persistence.set_property(dt,(l=s.bootstrap)!==null&&l!==void 0&&l.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:c})}if(this._hasBootstrappedFeatureFlags()){var p,f,d=Object.keys(((p=s.bootstrap)===null||p===void 0?void 0:p.featureFlags)||{}).filter(function(k){var L,E;return!((L=s.bootstrap)===null||L===void 0||(E=L.featureFlags)===null||E===void 0||!E[k])}).reduce(function(k,L){var E,F;return k[L]=((E=s.bootstrap)===null||E===void 0||(F=E.featureFlags)===null||F===void 0?void 0:F[L])||!1,k},{}),g=Object.keys(((f=s.bootstrap)===null||f===void 0?void 0:f.featureFlagPayloads)||{}).filter(function(k){return d[k]}).reduce(function(k,L){var E,F,U,G;return(E=s.bootstrap)!==null&&E!==void 0&&(F=E.featureFlagPayloads)!==null&&F!==void 0&&F[L]&&(k[L]=(U=s.bootstrap)===null||U===void 0||(G=U.featureFlagPayloads)===null||G===void 0?void 0:G[L]),k},{});this.featureFlags.receivedFeatureFlags({featureFlags:d,featureFlagPayloads:g})}if(!this.get_distinct_id()){var v=this.config.get_device_id(jt());this.register_once({distinct_id:v,$device_id:v},""),this.persistence.set_property(dt,"anonymous")}return m==null||(i=m.addEventListener)===null||i===void 0||i.call(m,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),this.toolbar.maybeLoadToolbar(),s.segment?oh(this,function(){return r._loaded()}):this._loaded(),et(this.config._onCapture)&&this.on("eventCaptured",function(k){return r.config._onCapture(k.event,k)}),this}},{key:"_afterDecideResponse",value:function(e){var t,i,r,s,o;this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=N(e.supportedCompression,Qe.GZipJS)?Qe.GZipJS:N(e.supportedCompression,Qe.Base64)?Qe.Base64:void 0),(t=e.analytics)!==null&&t!==void 0&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),(i=this.sessionRecording)===null||i===void 0||i.afterDecideResponse(e),(r=this.autocapture)===null||r===void 0||r.afterDecideResponse(e),(s=this.heatmaps)===null||s===void 0||s.afterDecideResponse(e),(o=this.surveys)===null||o===void 0||o.afterDecideResponse(e)}},{key:"_loaded",value:function(){var e=this,t=this.config.advanced_disable_decide;t||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(i){x.critical("`loaded` function failed",i)}this._start_queue_if_opted_in(),this.config.capture_pageview&&setTimeout(function(){C&&e.capture("$pageview",{title:C.title},{send_instantly:!0})},1),t||(new Nf(this).call(),this.featureFlags.resetRequestQueue())}},{key:"_start_queue_if_opted_in",value:function(){var e;this.has_opted_out_capturing()||this.config.request_batching&&((e=this._requestQueue)===null||e===void 0||e.enable())}},{key:"_dom_loaded",value:function(){var e=this;this.has_opted_out_capturing()||In(this.__request_queue,function(t){return e._send_retriable_request(t)}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_handle_unload",value:function(){var e,t;this.config.request_batching?(this._shouldCapturePageleave()&&this.capture("$pageleave"),(e=this._requestQueue)===null||e===void 0||e.unload(),(t=this._retryQueue)===null||t===void 0||t.unload()):this._shouldCapturePageleave()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_send_request",value:function(e){var t=this;this.__loaded&&(mc?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Hr(e.url,{ip:this.config.ip?1:0}),e.headers=this.config.request_headers,e.compression=e.compression==="best-available"?this.compression:e.compression,function(i){var r,s,o,a=$({},i);a.timeout=a.timeout||6e4,a.url=Hr(a.url,{_:new Date().getTime().toString(),ver:Lt.LIB_VERSION,compression:a.compression});var l=(r=a.transport)!==null&&r!==void 0?r:"XHR",u=(s=(o=Lu(xi,function(c){return c.transport===l}))===null||o===void 0?void 0:o.method)!==null&&s!==void 0?s:xi[0].method;if(!u)throw new Error("No available transport method");u(a)}($($({},e),{},{callback:function(i){var r,s,o;t.rateLimiter.checkForLimiting(i),i.statusCode>=400&&((s=(o=t.config).on_request_error)===null||s===void 0||s.call(o,i)),(r=e.callback)===null||r===void 0||r.call(e,i)}}))))}},{key:"_send_retriable_request",value:function(e){this._retryQueue?this._retryQueue.retriableRequest(e):this._send_request(e)}},{key:"_execute_array",value:function(e){var t,i=this,r=[],s=[],o=[];In(e,function(l){l&&(t=l[0],de(t)?o.push(l):et(l)?l.call(i):de(l)&&t==="alias"?r.push(l):de(l)&&t.indexOf("capture")!==-1&&et(i[t])?o.push(l):s.push(l))});var a=function(l,u){In(l,function(c){if(de(c[0])){var p=u;X(c,function(f){p=p[f[0]].apply(p,f.slice(1))})}else this[c[0]].apply(this,c.slice(1))},u)};a(r,this),a(s,this),a(o,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var e,t;return((e=this.config.bootstrap)===null||e===void 0?void 0:e.featureFlags)&&Object.keys((t=this.config.bootstrap)===null||t===void 0?void 0:t.featureFlags).length>0||!1}},{key:"push",value:function(e){this._execute_array([e])}},{key:"capture",value:function(e,t,i){var r;if(!(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue))return x.uninitializedWarning("posthog.capture");if(!this.consent.isOptedOut())if(!M(e)&&Re(e)){if(!se||this.config.opt_out_useragent_filter||!Eu(se,this.config.custom_blocked_useragents)){var s=i!=null&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(s==null||!s.isRateLimited){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.store_google||this.config.save_referrer)&&this.persistence.set_initial_person_info();var o={uuid:jt(),event:e,properties:this._calculate_event_properties(e,t||{},i)};s&&(o.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),i?.$set&&(o.$set=i?.$set);var a=this._calculate_set_once_properties(i?.$set_once);a&&(o.$set_once=a),(o=Jp(o,i!=null&&i._noTruncate?null:this.config.properties_string_max_length)).timestamp=i?.timestamp||new Date,M(i?.timestamp)||(o.properties.$event_time_override_provided=!0,o.properties.$event_time_override_system_time=new Date);var l=$($({},o.properties.$set),o.$set);no(l)||this.setPersonPropertiesForFlags(l),this._debugEventEmitter.emit("eventCaptured",o);var u={method:"POST",url:(r=i?._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:o,compression:"best-available",batchKey:i?._batchKey};return!this.config.request_batching||i&&(i==null||!i._batchKey)||i!=null&&i.send_instantly?this._send_retriable_request(u):this._requestQueue.enqueue(u),o}x.critical("This capture call is ignored due to client rate limiting.")}}else x.error("No event name provided to posthog.capture")}},{key:"_addCaptureHook",value:function(e){this.on("eventCaptured",function(t){return e(t.event)})}},{key:"_calculate_event_properties",value:function(e,t,i){if(!this.persistence||!this.sessionPersistence)return t;var r=this.persistence.remove_event_timer(e),s=$({},t);if(s.token=this.config.token,e==="$snapshot"){var o=$($({},this.persistence.properties()),this.sessionPersistence.properties());return s.distinct_id=o.distinct_id,s}var a=_e.properties();if(this.sessionManager){var l=this.sessionManager.checkAndGetSessionAndWindowId(),u=l.sessionId,c=l.windowId;s.$session_id=u,s.$window_id=c}if(this.requestRouter.region===tn.CUSTOM&&(s.$lib_custom_api_host=this.config.api_host),this.sessionPropsManager&&this.config.__preview_send_client_session_params&&(e==="$pageview"||e==="$pageleave"||e==="$autocapture")){var p=this.sessionPropsManager.getSessionProps();s=Te(s,p)}if(!this.config.disable_scroll_properties){var f={};e==="$pageview"?f=this.pageViewManager.doPageView():e==="$pageleave"&&(f=this.pageViewManager.doPageLeave()),s=Te(s,f)}if(e==="$pageview"&&C&&(s.title=C.title),!M(r)){var d=new Date().getTime()-r;s.$duration=parseFloat((d/1e3).toFixed(3))}if(se&&this.config.opt_out_useragent_filter&&(s.$browser_type=Eu(se,this.config.custom_blocked_useragents)?"bot":"browser"),(s=Te({},a,this.persistence.properties(),this.sessionPersistence.properties(),s)).$is_identified=this._isIdentified(),i==null||!i._noHeatmaps){var g,v=(g=this.heatmaps)===null||g===void 0?void 0:g.getAndClearBuffer();v&&(s.$heatmap_data=v)}de(this.config.property_denylist)?X(this.config.property_denylist,function(L){delete s[L]}):x.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var k=this.config.sanitize_properties;return k&&(s=k(s,e)),s.$process_person_profile=this._hasPersonProcessing(),s}},{key:"_calculate_set_once_properties",value:function(e){if(!this.persistence||!this._hasPersonProcessing())return e;var t=Te({},this.persistence.get_initial_props(),e||{});return no(t)?void 0:t}},{key:"register",value:function(e,t){var i;(i=this.persistence)===null||i===void 0||i.register(e,t)}},{key:"register_once",value:function(e,t,i){var r;(r=this.persistence)===null||r===void 0||r.register_once(e,t,i)}},{key:"register_for_session",value:function(e){var t;(t=this.sessionPersistence)===null||t===void 0||t.register(e)}},{key:"unregister",value:function(e){var t;(t=this.persistence)===null||t===void 0||t.unregister(e)}},{key:"unregister_for_session",value:function(e){var t;(t=this.sessionPersistence)===null||t===void 0||t.unregister(e)}},{key:"_register_single",value:function(e,t){this.register(y({},e,t))}},{key:"getFeatureFlag",value:function(e,t){return this.featureFlags.getFeatureFlag(e,t)}},{key:"getFeatureFlagPayload",value:function(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch{return t}}},{key:"isFeatureEnabled",value:function(e,t){return this.featureFlags.isFeatureEnabled(e,t)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,t){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t)}},{key:"getEarlyAccessFeatures",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(e,t)}},{key:"on",value:function(e,t){return this._debugEventEmitter.on(e,t)}},{key:"onFeatureFlags",value:function(e){return this.featureFlags.onFeatureFlags(e)}},{key:"onSessionId",value:function(e){var t,i;return(t=(i=this.sessionManager)===null||i===void 0?void 0:i.onSessionId(e))!==null&&t!==void 0?t:function(){}}},{key:"getSurveys",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(e,t)}},{key:"getActiveMatchingSurveys",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(e,t)}},{key:"identify",value:function(e,t,i){if(!this.__loaded||!this.persistence)return x.uninitializedWarning("posthog.identify");if(lt(e)&&(e=e.toString(),x.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e){if(["distinct_id","distinctid"].includes(e.toLowerCase()))x.critical('The string "'.concat(e,'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'));else if(this._requirePersonProcessing("posthog.identify")){var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==r&&e!==this.get_property(mi)&&(this.unregister(mi),this.register({distinct_id:e}));var o=(this.persistence.get_property(dt)||"anonymous")==="anonymous";e!==r&&o?(this.persistence.set_property(dt,"identified"),this.setPersonPropertiesForFlags(t||{},!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:i||{}}),this.featureFlags.setAnonymousDistinctId(r)):(t||i)&&this.setPersonProperties(t,i),e!==r&&(this.reloadFeatureFlags(),this.unregister(Dr))}}else x.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(e,t){(e||t)&&this._requirePersonProcessing("posthog.setPersonProperties")&&(this.setPersonPropertiesForFlags(e||{}),this.capture("$set",{$set:e||{},$set_once:t||{}}))}},{key:"group",value:function(e,t,i){if(e&&t){if(this._requirePersonProcessing("posthog.group")){var r=this.getGroups();r[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:$($({},r),{},y({},e,t))}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:i}),this.setGroupPropertiesForFlags(y({},e,i))),r[e]===t||i||this.reloadFeatureFlags()}}else x.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this._requirePersonProcessing("posthog.setPersonPropertiesForFlags")&&this.featureFlags.setPersonPropertiesForFlags(e,t)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this._requirePersonProcessing("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}},{key:"resetGroupPropertiesForFlags",value:function(e){this.featureFlags.resetGroupPropertiesForFlags(e)}},{key:"reset",value:function(e){var t,i,r,s;if(!this.__loaded)return x.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");this.consent.reset(),(t=this.persistence)===null||t===void 0||t.clear(),(i=this.sessionPersistence)===null||i===void 0||i.clear(),(r=this.persistence)===null||r===void 0||r.set_property(dt,"anonymous"),(s=this.sessionManager)===null||s===void 0||s.resetSessionId();var a=this.config.get_device_id(jt());this.register_once({distinct_id:a,$device_id:e?a:o},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"get_session_id",value:function(){var e,t;return(e=(t=this.sessionManager)===null||t===void 0?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}},{key:"get_session_replay_url",value:function(e){if(!this.sessionManager)return"";var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=t.sessionId,r=t.sessionStartTimestamp,s=this.requestRouter.endpointFor("ui","/project/".concat(this.config.token,"/replay/").concat(i));if(e!=null&&e.withTimestamp&&r){var o,a=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!r)return s;var l=Math.max(Math.floor((new Date().getTime()-r)/1e3)-a,0);s+="?t=".concat(l)}return s}},{key:"alias",value:function(e,t){return e===this.get_property(ju)?(x.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(M(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(mi,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(x.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}},{key:"set_config",value:function(e){var t,i,r,s,o=$({},this.config);Ze(e)&&(Te(this.config,Iu(e)),(t=this.persistence)===null||t===void 0||t.update_config(this.config,o),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new ao($($({},this.config),{},{persistence:"sessionStorage"})),fe.is_supported()&&fe.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(Lt.DEBUG=!0),(i=this.sessionRecording)===null||i===void 0||i.startIfEnabledOrStop(),(r=this.autocapture)===null||r===void 0||r.startIfEnabled(),(s=this.heatmaps)===null||s===void 0||s.startIfEnabled(),this.surveys.loadIfEnabled(),this._sync_opt_out_with_persistence())}},{key:"startSessionRecording",value:function(e){if(e!=null&&e.sampling){var t,i,r=(t=this.sessionManager)===null||t===void 0?void 0:t.checkAndGetSessionAndWindowId();(i=this.persistence)===null||i===void 0||i.register(y({},bi,!0)),x.info("Session recording started with sampling override for session: ",r?.sessionId)}this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var e;return!((e=this.sessionRecording)===null||e===void 0||!e.started)}},{key:"loadToolbar",value:function(e){return this.toolbar.loadToolbar(e)}},{key:"get_property",value:function(e){var t;return(t=this.persistence)===null||t===void 0?void 0:t.props[e]}},{key:"getSessionProperty",value:function(e){var t;return(t=this.sessionPersistence)===null||t===void 0?void 0:t.props[e]}},{key:"toString",value:function(){var e,t=(e=this.config.name)!==null&&e!==void 0?e:$n;return t!==$n&&(t=$n+"."+t),t}},{key:"_isIdentified",value:function(){var e,t;return((e=this.persistence)===null||e===void 0?void 0:e.get_property(dt))==="identified"||((t=this.sessionPersistence)===null||t===void 0?void 0:t.get_property(dt))==="identified"}},{key:"_hasPersonProcessing",value:function(){var e,t,i,r;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&no(this.getGroups())&&((e=this.persistence)===null||e===void 0||(t=e.props)===null||t===void 0||!t[mi])&&((i=this.persistence)===null||i===void 0||(r=i.props)===null||r===void 0||!r[Lr]))}},{key:"_shouldCapturePageleave",value:function(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&this.config.capture_pageview}},{key:"createPersonProfile",value:function(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.setPersonProperties({},{})}},{key:"_requirePersonProcessing",value:function(e){return this.config.person_profiles==="never"?(x.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._register_single(Lr,!0),!0)}},{key:"_sync_opt_out_with_persistence",value:function(){var e,t,i,r,s=this.consent.isOptedOut(),o=this.config.opt_out_persistence_by_default,a=this.config.disable_persistence||s&&!!o;((e=this.persistence)===null||e===void 0?void 0:e.disabled)!==a&&((i=this.persistence)===null||i===void 0||i.set_disabled(a)),((t=this.sessionPersistence)===null||t===void 0?void 0:t.disabled)!==a&&((r=this.sessionPersistence)===null||r===void 0||r.set_disabled(a))}},{key:"opt_in_capturing",value:function(e){var t;this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),this.capture((t=e?.captureEventName)!==null&&t!==void 0?t:"$opt_in",e?.captureProperties,{send_instantly:!0})}},{key:"opt_out_capturing",value:function(){this.consent.optInOut(!1),this._sync_opt_out_with_persistence()}},{key:"has_opted_in_capturing",value:function(){return this.consent.isOptedIn()}},{key:"has_opted_out_capturing",value:function(){return this.consent.isOptedOut()}},{key:"clear_opt_in_out_capturing",value:function(){this.consent.reset(),this._sync_opt_out_with_persistence()}},{key:"debug",value:function(e){e===!1?(m?.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(m?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}}]),n}();(function(n,e){for(var t=0;t<e.length;t++)n.prototype[e[t]]=Xp(n.prototype[e[t]])})(yc,["identify"]);var Tu,Ru;(function(n){n.Popover="popover",n.API="api",n.Widget="widget"})(Tu||(Tu={})),function(n){n.Open="open",n.MultipleChoice="multiple_choice",n.SingleChoice="single_choice",n.Rating="rating",n.Link="link"}(Ru||(Ru={}));var Pu,_c=(Pu=ki[$n]=new yc,function(){function n(){n.done||(n.done=!0,mc=!1,X(ki,function(e){e._dom_loaded()}))}C!=null&&C.addEventListener&&(C.readyState==="complete"?n():C.addEventListener("DOMContentLoaded",n,!1)),m&&vt(m,"load",n,!0)}(),Pu);var bc=_c.init("phc_OTZ3wJ6VemgVupCRKS5Sbqb9Ks0JYe0hMYZPtLwl0nu",{api_host:"https://pheu.molin.ai",ui_host:"https://eu.posthog.com",secure_cookie:document.location.protocol==="https:",persistence:"cookie",autocapture:!1,rageclick:!1,capture_pageview:!1,capture_pageleave:!1,disable_session_recording:!0,advanced_disable_decide:!0},"MolinShopAI");function ue(n,e){if(!bc)throw new Error("Failed to initialize PostHog");bc.capture(n,e)}var Xr,Ti,Jr,Ut,xc,Vr,Yr=class Yr extends z(j){constructor(){super();b(this,Ut);b(this,Xr,new Ot(this,{onError:console.error}));b(this,Ti);b(this,Jr,{onError:t=>{alert(t.error),console.error(t.widgetId,t.error),ue("ShopAssistant: error",t)},onNewMessageStartedStreaming:t=>ue("ShopAssistant: user received bot message (streaming started)",t),onMessageEndedStreaming:t=>ue("ShopAssistant: user received bot message (streaming ended)",t),onUserCanceledStreaming:t=>ue("ShopAssistant: user canceled streaming",t),onUserClickedLink:t=>ue("ShopAssistant: user clicked link",t),onUserSentInput:t=>ue("ShopAssistant: user sent input",t)});this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1}get config(){return h(this,Ti)||h(this,Xr).data}render(){return this.config?O`
315
+ `)).length,r=0;r<i;r++){var o=n.charCodeAt(r),a=null;o<128?t++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),_t(a)||(t>e&&(s+=n.substring(e,t)),s+=a,e=t=r+1)}return t>e&&(s+=n.substring(e,n.length)),s},gt=function(){function n(e){return e&&(e.preventDefault=n.preventDefault,e.stopPropagation=n.stopPropagation),e}return n.preventDefault=function(){this.returnValue=!1},n.stopPropagation=function(){this.cancelBubble=!0},function(e,t,i,r,s){if(e)if(e.addEventListener&&!r)e.addEventListener(t,i,!!s);else{var o="on"+t,a=e[o];e[o]=function(l,u,c){return function(p){if(p=p||n(m?.event)){var f,d=!0;et(c)&&(f=c(p));var g=u.call(l,p);return f!==!1&&g!==!1||(d=!1),d}}}(e,i,a)}else x.error("No valid element provided to register_event")}}();function Mn(n,e){var t=function(){if(!A)return e("document not found");var i=A.createElement("script");i.type="text/javascript",i.src=n,i.onload=function(o){return e(void 0,o)},i.onerror=function(o){return e(o)};var r,s=A.querySelectorAll("body > script");s.length>0?(r=s[0].parentNode)===null||r===void 0||r.insertBefore(i,s[0]):A.body.appendChild(i)};A!=null&&A.body?t():A?.addEventListener("DOMContentLoaded",t)}function qu(n,e){for(var t=0;t<n.length;t++)if(e(n[t]))return n[t]}(function(n){n.GZipJS="gzip-js",n.Base64="base64"})(Qe||(Qe={}));var Nu="$people_distinct_id",_i="__alias",bi="__timers",Kl="$autocapture_disabled_server_side",xo="$heatmaps_enabled_server_side",ko="$session_recording_enabled_server_side",Ql="$console_log_recording_enabled_server_side",Zl="$session_recording_network_payload_capture",eu="$session_recording_canvas_recording",tu="$replay_sample_rate",nu="$replay_minimum_duration",Lr="$sesid",xi="$session_is_sampled",In="$enabled_feature_flags",So="$early_access_features",Tn="$stored_person_properties",Ft="$stored_group_properties",Eo="$surveys",so="$surveys_activated",jr="$flag_call_reported",ht="$user_state",$o="$client_session_props",Co="$capture_rate_limit",Ao="$initial_campaign_params",Io="$initial_referrer_info",iu="$initial_person_info",qr="$epp",To="__POSTHOG_TOOLBAR__",Zp=[Nu,_i,"__cmpns",bi,ko,xo,Lr,In,ht,So,Ft,Tn,Eo,jr,$o,Co,Ao,Io,qr],oo="$active_feature_flags",Er="$override_feature_flags",ru="$feature_flag_payloads",su=function(n){var e,t={},i=tt(Pr(n||{}));try{for(i.s();!(e=i.n()).done;){var r=Ie(e.value,2),s=r[0],o=r[1];o&&(t[s]=o)}}catch(a){i.e(a)}finally{i.f()}return t},ef=function(){function n(e){H(this,n),this.instance=e,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return W(n,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(In),t=this.instance.get_property(Er);if(!t)return e||{};for(var i=Te({},e),r=Object.keys(t),s=0;s<r.length;s++)i[r[s]]=t[r[s]];return this._override_warning||(x.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this._override_warning=!0),i}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(ru)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(e){this.$anon_distinct_id=e}},{key:"setReloadingPaused",value:function(e){this.reloadFeatureFlagsInAction=e}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var e=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!e.reloadFeatureFlagsInAction&&e.reloadFeatureFlagsQueued&&(e.reloadFeatureFlagsQueued=!1,e._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var e=this;if(!this.instance.config.advanced_disable_feature_flags){this.setReloadingPaused(!0);var t=this.instance.config.token,i=this.instance.get_property(Tn),r=this.instance.get_property(Ft),s={token:t,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:i,group_properties:r,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0};this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:s,compression:this.instance.config.disable_compression?void 0:Qe.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:function(o){var a;e.setReloadingPaused(!1);var l=!0;o.statusCode===200&&(e.$anon_distinct_id=void 0,l=!1),e.receivedFeatureFlags((a=o.json)!==null&&a!==void 0?a:{},l),e._startReloadTimer()}})}}},{key:"getFeatureFlag",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var i,r=this.getFlagVariants()[e],s="".concat(r),o=this.instance.get_property(jr)||{};return(t.send_event||!("send_event"in t))&&(!(e in o)||!o[e].includes(s))&&(de(o[e])?o[e].push(s):o[e]=[s],(i=this.instance.persistence)===null||i===void 0||i.register(y({},jr,o)),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:r})),r}x.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}},{key:"getFeatureFlagPayload",value:function(e){return this.getFlagPayloads()[e]}},{key:"isFeatureEnabled",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,t);x.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}},{key:"addFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers.push(e)}},{key:"removeFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(t){return t!==e})}},{key:"receivedFeatureFlags",value:function(e,t){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var i=this.getFlagVariants(),r=this.getFlagPayloads();(function(s,o){var a,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},c=s.featureFlags,p=s.featureFlagPayloads;if(c)if(de(c)){var f,d={};if(c)for(var g=0;g<c.length;g++)d[c[g]]=!0;o&&o.register((y(f={},oo,c),y(f,In,d),f))}else{var v=c,k=p;s.errorsWhileComputingFlags&&(v=C(C({},l),v),k=C(C({},u),k)),o&&o.register((y(a={},oo,Object.keys(su(v))),y(a,In,v||{}),y(a,ru,k||{}),a))}})(e,this.instance.persistence,i,r),this._fireFeatureFlagsCallbacks(t)}}},{key:"override",value:function(e){if(!this.instance.__loaded||!this.instance.persistence)return x.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,e===!1)this.instance.persistence.unregister(Er);else if(de(e)){for(var t={},i=0;i<e.length;i++)t[e[i]]=!0;this.instance.persistence.register(y({},Er,t))}else this.instance.persistence.register(y({},Er,e))}},{key:"onFeatureFlags",value:function(e){var t=this;if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){var i=this._prepareFeatureFlagsForCallbacks(),r=i.flags,s=i.flagVariants;e(r,s)}return function(){return t.removeFeatureFlagsHandler(e)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,t){var i,r,s=y({},"$feature_enrollment/".concat(e),t);this.instance.capture("$feature_enrollment_update",{$feature_flag:e,$feature_enrollment:t,$set:s}),this.setPersonPropertiesForFlags(s,!1);var o=C(C({},this.getFlagVariants()),{},y({},e,t));(i=this.instance.persistence)===null||i===void 0||i.register((y(r={},oo,Object.keys(su(o))),y(r,In,o),r)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=this.instance.get_property(So);if(r&&!i)return e(r);this.instance._send_request({transport:"XHR",url:this.instance.requestRouter.endpointFor("api","/api/early_access_features/?token=".concat(this.instance.config.token)),method:"GET",callback:function(s){var o;if(s.json){var a=s.json.earlyAccessFeatures;return(o=t.instance.persistence)===null||o===void 0||o.register(y({},So,a)),e(a)}}})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(function(i){return t[i]}),flagVariants:Object.keys(t).filter(function(i){return t[i]}).reduce(function(i,r){return i[r]=t[r],i},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(e){var t=this._prepareFeatureFlagsForCallbacks(),i=t.flags,r=t.flagVariants;this.featureFlagEventHandlers.forEach(function(s){return s(i,r,{errorsLoading:e})})}},{key:"setPersonPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(Tn)||{};this.instance.register(y({},Tn,C(C({},i),e))),t&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(Tn)}},{key:"setGroupPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(Ft)||{};Object.keys(i).length!==0&&Object.keys(i).forEach(function(r){i[r]=C(C({},i[r]),e[r]),delete e[r]}),this.instance.register(y({},Ft,C(C({},i),e))),t&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(e){if(e){var t=this.instance.get_property(Ft)||{};this.instance.register(y({},Ft,C(C({},t),{},y({},e,{}))))}else this.instance.unregister(Ft)}}]),n}();Math.trunc||(Math.trunc=function(n){return n<0?Math.ceil(n):Math.floor(n)}),Number.isInteger||(Number.isInteger=function(n){return at(n)&&isFinite(n)&&Math.floor(n)===n});var ou="0123456789abcdef",tf=function(){function n(e){if(H(this,n),this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}return W(n,[{key:"toString",value:function(){for(var e="",t=0;t<this.bytes.length;t++)e=e+ou.charAt(this.bytes[t]>>>4)+ou.charAt(15&this.bytes[t]),t!==3&&t!==5&&t!==7&&t!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}},{key:"clone",value:function(){return new n(this.bytes.slice(0))}},{key:"equals",value:function(e){return this.compareTo(e)===0}},{key:"compareTo",value:function(e){for(var t=0;t<16;t++){var i=this.bytes[t]-e.bytes[t];if(i!==0)return Math.sign(i)}return 0}}],[{key:"fromFieldsV7",value:function(e,t,i,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(r)||e<0||t<0||i<0||r<0||e>0xffffffffffff||t>4095||i>1073741823||r>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|t>>>8,s[7]=t,s[8]=128|i>>>24,s[9]=i>>>16,s[10]=i>>>8,s[11]=i,s[12]=r>>>24,s[13]=r>>>16,s[14]=r>>>8,s[15]=r,new n(s)}}]),n}(),nf=function(){function n(){H(this,n),y(this,"timestamp",0),y(this,"counter",0),y(this,"random",new rf)}return W(n,[{key:"generate",value:function(){var e=this.generateOrAbort();if(M(e)){this.timestamp=0;var t=this.generateOrAbort();if(M(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e}},{key:"generateOrAbort",value:function(){var e=Date.now();if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return tf.fromFieldsV7(this.timestamp,Math.trunc(this.counter/Math.pow(2,30)),this.counter&Math.pow(2,30)-1,this.random.nextUint32())}},{key:"resetCounter",value:function(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}}]),n}(),Uu=function(n){if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<n.length;e++)n[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return n};m&&!M(m.crypto)&&crypto.getRandomValues&&(Uu=function(n){return crypto.getRandomValues(n)});var au,rf=function(){function n(){H(this,n),y(this,"buffer",new Uint32Array(8)),y(this,"cursor",1/0)}return W(n,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(Uu(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),n}(),Lt=function(){return sf().toString()},sf=function(){return(au||(au=new nf)).generate()},of="Thu, 01 Jan 1970 00:00:00 GMT",vi="",af=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function lf(n,e){if(e){var t=function(r){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A;if(vi)return vi;if(!s||["localhost","127.0.0.1"].includes(r))return"";for(var o=r.split("."),a=Math.min(o.length,8),l="dmn_chk_"+Lt(),u=new RegExp("(^|;)\\s*"+l+"=1");!vi&&a--;){var c=o.slice(a).join("."),p=l+"=1;domain=."+c;s.cookie=p,u.test(s.cookie)&&(s.cookie=p+";expires="+of,vi=c)}return vi}(n);if(!t){var i=function(r){var s=r.match(af);return s?s[0]:""}(n);i!==t&&x.info("Warning: cookie subdomain discovery mismatch",i,t),t=i}return t?"; domain=."+t:""}return""}var we,yt={is_supported:function(){return!!A},error:function(n){x.error("cookieStore error: "+n)},get:function(n){if(A){try{for(var e=n+"=",t=A.cookie.split(";").filter(function(s){return s.length}),i=0;i<t.length;i++){for(var r=t[i];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return decodeURIComponent(r.substring(e.length,r.length))}}catch{}return null}},parse:function(n){var e;try{e=JSON.parse(yt.get(n))||{}}catch{}return e},set:function(n,e,t,i,r){if(A)try{var s="",o="",a=lf(A.location.hostname,i);if(t){var l=new Date;l.setTime(l.getTime()+24*t*60*60*1e3),s="; expires="+l.toUTCString()}r&&(o="; secure");var u=n+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&x.warn("cookieStore warning: large cookie, len="+u.length),A.cookie=u,u}catch{return}},remove:function(n,e){try{yt.set(n,"",-1,e)}catch{return}}},ao=null,fe={is_supported:function(){if(!_t(ao))return ao;var n=!0;if(M(m))n=!1;else try{var e="__mplssupport__";fe.set(e,"xyz"),fe.get(e)!=='"xyz"'&&(n=!1),fe.remove(e)}catch{n=!1}return n||x.error("localStorage unsupported; falling back to cookie store"),ao=n,n},error:function(n){x.error("localStorage error: "+n)},get:function(n){try{return m?.localStorage.getItem(n)}catch(e){fe.error(e)}return null},parse:function(n){try{return JSON.parse(fe.get(n))||{}}catch{}return null},set:function(n,e){try{m?.localStorage.setItem(n,JSON.stringify(e))}catch(t){fe.error(t)}},remove:function(n){try{m?.localStorage.removeItem(n)}catch(e){fe.error(e)}}},uf=["distinct_id",Lr,xi,qr],$r=C(C({},fe),{},{parse:function(n){try{var e={};try{e=yt.parse(n)||{}}catch{}var t=Te(e,JSON.parse(fe.get(n)||"{}"));return fe.set(n,t),t}catch{}return null},set:function(n,e,t,i,r){try{fe.set(n,e);var s={};uf.forEach(function(o){e[o]&&(s[o]=e[o])}),Object.keys(s).length&&yt.set(n,s,t,i,r)}catch(o){fe.error(o)}},remove:function(n,e){try{m?.localStorage.removeItem(n),yt.remove(n,e)}catch(t){fe.error(t)}}}),Cr={},cf={is_supported:function(){return!0},error:function(n){x.error("memoryStorage error: "+n)},get:function(n){return Cr[n]||null},parse:function(n){return Cr[n]||null},set:function(n,e){Cr[n]=e},remove:function(n){delete Cr[n]}},en=null,xe={is_supported:function(){if(!_t(en))return en;if(en=!0,M(m))en=!1;else try{var n="__support__";xe.set(n,"xyz"),xe.get(n)!=='"xyz"'&&(en=!1),xe.remove(n)}catch{en=!1}return en},error:function(n){x.error("sessionStorage error: ",n)},get:function(n){try{return m?.sessionStorage.getItem(n)}catch(e){xe.error(e)}return null},parse:function(n){try{return JSON.parse(xe.get(n))||null}catch{}return null},set:function(n,e){try{m?.sessionStorage.setItem(n,JSON.stringify(e))}catch(t){xe.error(t)}},remove:function(n){try{m?.sessionStorage.removeItem(n)}catch(e){xe.error(e)}}},pf=["localhost","127.0.0.1"],Or=function(n){var e=A?.createElement("a");return M(e)?null:(e.href=n,e)},ff=function(n,e){return!!function(t){try{new RegExp(t)}catch{return!1}return!0}(e)&&new RegExp(e).test(n)},hf=function(n){var e,t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",r=[];return X(n,function(s,o){M(s)||M(o)||o==="undefined"||(e=encodeURIComponent(function(a){return a instanceof File}(s)?s.name:s.toString()),t=encodeURIComponent(o),r[r.length]=t+"="+e)}),r.join(i)},lu=function(n,e){for(var t,i=((n.split("#")[0]||"").split("?")[1]||"").split("&"),r=0;r<i.length;r++){var s=i[r].split("=");if(s[0]===e){t=s;break}}if(!de(t)||t.length<2)return"";var o=t[1];try{o=decodeURIComponent(o)}catch{x.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},Nr=function(n,e){var t=n.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},Ve="Mobile",Ur="iOS",lt="Android",Ci="Tablet",Bu=lt+" "+Ci,zu="iPad",Hu="Apple",Wu=Hu+" Watch",Ai="Safari",Dn="BlackBerry",Gu="Samsung",Vu=Gu+"Browser",Xu=Gu+" Internet",jt="Chrome",df=jt+" OS",Ju=jt+" "+Ur,Uo="Internet Explorer",Yu=Uo+" "+Ve,Bo="Opera",gf=Bo+" Mini",zo="Edge",Ku="Microsoft "+zo,Pn="Firefox",Qu=Pn+" "+Ur,Ii="Nintendo",Ti="PlayStation",On="Xbox",Zu=lt+" "+Ve,ec=Ve+" "+Ai,wi="Windows",Ro=wi+" Phone",uu="Nokia",Po="Ouya",tc="Generic",vf=tc+" "+Ve.toLowerCase(),nc=tc+" "+Ci.toLowerCase(),Oo="Konqueror",Ae="(\\d+(\\.\\d+)?)",lo=new RegExp("Version/"+Ae),mf=new RegExp(On,"i"),yf=new RegExp(Ti+" \\w+","i"),_f=new RegExp(Ii+" \\w+","i"),Ho=new RegExp(Dn+"|PlayBook|BB10","i"),bf={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},wf=function(n,e){return e&&N(e,Hu)||function(t){return N(t,Ai)&&!N(t,jt)&&!N(t,lt)}(n)},cu=function(n,e){return e=e||"",N(n," OPR/")&&N(n,"Mini")?gf:N(n," OPR/")?Bo:Ho.test(n)?Dn:N(n,"IE"+Ve)||N(n,"WPDesktop")?Yu:N(n,Vu)?Xu:N(n,zo)||N(n,"Edg/")?Ku:N(n,"FBIOS")?"Facebook "+Ve:N(n,"UCWEB")||N(n,"UCBrowser")?"UC Browser":N(n,"CriOS")?Ju:N(n,"CrMo")?jt:N(n,lt)&&N(n,Ai)?Zu:N(n,jt)?jt:N(n,"FxiOS")?Qu:N(n.toLowerCase(),Oo.toLowerCase())?Oo:wf(n,e)?N(n,Ve)?ec:Ai:N(n,Pn)?Pn:N(n,"MSIE")||N(n,"Trident/")?Uo:N(n,"Gecko")?Pn:""},xf=(y(we={},Yu,[new RegExp("rv:"+Ae)]),y(we,Ku,[new RegExp(zo+"?\\/"+Ae)]),y(we,jt,[new RegExp("("+jt+"|CrMo)\\/"+Ae)]),y(we,Ju,[new RegExp("CriOS\\/"+Ae)]),y(we,"UC Browser",[new RegExp("(UCBrowser|UCWEB)\\/"+Ae)]),y(we,Ai,[lo]),y(we,ec,[lo]),y(we,Bo,[new RegExp("(Opera|OPR)\\/"+Ae)]),y(we,Pn,[new RegExp(Pn+"\\/"+Ae)]),y(we,Qu,[new RegExp("FxiOS\\/"+Ae)]),y(we,Oo,[new RegExp("Konqueror[:/]?"+Ae,"i")]),y(we,Dn,[new RegExp(Dn+" "+Ae),lo]),y(we,Zu,[new RegExp("android\\s"+Ae,"i")]),y(we,Xu,[new RegExp(Vu+"\\/"+Ae)]),y(we,Uo,[new RegExp("(rv:|MSIE )"+Ae)]),y(we,"Mozilla",[new RegExp("rv:"+Ae)]),we),pu=[[new RegExp(On+"; "+On+" (.*?)[);]","i"),function(n){return[On,n&&n[1]||""]}],[new RegExp(Ii,"i"),[Ii,""]],[new RegExp(Ti,"i"),[Ti,""]],[Ho,[Dn,""]],[new RegExp(wi,"i"),function(n,e){if(/Phone/.test(e)||/WPDesktop/.test(e))return[Ro,""];if(new RegExp(Ve).test(e)&&!/IEMobile\b/.test(e))return[wi+" "+Ve,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var i=t[1],r=bf[i]||"";return/arm/i.test(e)&&(r="RT"),[wi,r]}return[wi,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,function(n){if(n&&n[3]){var e=[n[3],n[4],n[5]||"0"];return[Ur,e.join(".")]}return[Ur,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,function(n){var e="";return n&&n.length>=3&&(e=M(n[2])?n[3]:n[2]),["watchOS",e]}],[new RegExp("("+lt+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+lt+")","i"),function(n){if(n&&n[2]){var e=[n[2],n[3],n[4]||"0"];return[lt,e.join(".")]}return[lt,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,function(n){var e=["Mac OS X",""];if(n&&n[1]){var t=[n[1],n[2],n[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[df,""]],[/Linux|debian/i,["Linux",""]]],fu=function(n){return _f.test(n)?Ii:yf.test(n)?Ti:mf.test(n)?On:new RegExp(Po,"i").test(n)?Po:new RegExp("("+Ro+"|WPDesktop)","i").test(n)?Ro:/iPad/.test(n)?zu:/iPod/.test(n)?"iPod Touch":/iPhone/.test(n)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(n)?Wu:Ho.test(n)?Dn:/(kobo)\s(ereader|touch)/i.test(n)?"Kobo":new RegExp(uu,"i").test(n)?uu:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(n)||/(kf[a-z]+)( bui|\)).+silk\//i.test(n)?"Kindle Fire":/(Android|ZTE)/i.test(n)?!new RegExp(Ve).test(n)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(n)?/pixel[\daxl ]{1,6}/i.test(n)&&!/pixel c/i.test(n)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(n)||/lmy47v/i.test(n)&&!/QTAQZ3/i.test(n)?lt:Bu:lt:new RegExp("(pda|"+Ve+")","i").test(n)?vf:new RegExp(Ci,"i").test(n)&&!new RegExp(Ci+" pc","i").test(n)?nc:""},Ar="https?://(.*)",kf=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid"],_e={campaignParams:function(n){return A?this._campaignParamsFromUrl(A.URL,n):{}},_campaignParamsFromUrl:function(n,e){var t=kf.concat(e||[]),i={};return X(t,function(r){var s=lu(n,r);s&&(i[r]=s)}),i},_searchEngine:function(n){return n?n.search(Ar+"google.([^/?]*)")===0?"google":n.search(Ar+"bing.com")===0?"bing":n.search(Ar+"yahoo.com")===0?"yahoo":n.search(Ar+"duckduckgo.com")===0?"duckduckgo":null:null},_searchInfoFromReferrer:function(n){var e=_e._searchEngine(n),t=e!="yahoo"?"q":"p",i={};if(!_t(e)){i.$search_engine=e;var r=A?lu(A.referrer,t):"";r.length&&(i.ph_keyword=r)}return i},searchInfo:function(){var n=A?.referrer;return n?this._searchInfoFromReferrer(n):{}},browser:cu,browserVersion:function(n,e){var t=cu(n,e),i=xf[t];if(M(i))return null;for(var r=0;r<i.length;r++){var s=i[r],o=n.match(s);if(o)return parseFloat(o[o.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(n){for(var e=0;e<pu.length;e++){var t=Ie(pu[e],2),i=t[0],r=t[1],s=i.exec(n),o=s&&(et(r)?r(s,n):r);if(o)return o}return["",""]},device:fu,deviceType:function(n){var e=fu(n);return e===zu||e===Bu||e==="Kobo"||e==="Kindle Fire"||e===nc?Ci:e===Ii||e===On||e===Ti||e===Po?"Console":e===Wu?"Wearable":e?Ve:"Desktop"},referrer:function(){return A?.referrer||"$direct"},referringDomain:function(){var n;return A!=null&&A.referrer&&((n=Or(A.referrer))===null||n===void 0?void 0:n.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer(),u:De?.href}},initialPersonPropsFromInfo:function(n){var e,t=n.r,i=n.u,r={$initial_referrer:t,$initial_referring_domain:t==null?void 0:t=="$direct"?"$direct":(e=Or(t))===null||e===void 0?void 0:e.host};if(i){r.$initial_current_url=i;var s=Or(i);r.$initial_host=s?.host,r.$initial_pathname=s?.pathname,X(this._campaignParamsFromUrl(i),function(o,a){r["$initial_"+wo(a)]=o})}return t&&X(this._searchInfoFromReferrer(t),function(o,a){r["$initial_"+wo(a)]=o}),r},properties:function(){if(!se)return{};var n=Ie(_e.os(se),2),e=n[0],t=n[1];return Te(bo({$os:e,$os_version:t,$browser:_e.browser(se,navigator.vendor),$device:_e.device(se),$device_type:_e.deviceType(se)}),{$current_url:De?.href,$host:De?.host,$pathname:De?.pathname,$raw_user_agent:se.length>1e3?se.substring(0,997)+"...":se,$browser_version:_e.browserVersion(se,navigator.vendor),$browser_language:_e.browserLanguage(),$screen_height:m?.screen.height,$screen_width:m?.screen.width,$viewport_height:m?.innerHeight,$viewport_width:m?.innerWidth,$lib:"web",$lib_version:Dt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:ju()/1e3})},people_properties:function(){if(!se)return{};var n=Ie(_e.os(se),2),e=n[0],t=n[1];return Te(bo({$os:e,$os_version:t,$browser:_e.browser(se,navigator.vendor)}),{$browser_version:_e.browserVersion(se,navigator.vendor)})}},Sf=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],uo=function(){function n(e){H(this,n),this.config=e,this.props={},this.campaign_params_saved=!1,this.name=function(t){var i="";return t.token&&(i=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),t.persistence_name?"ph_"+t.persistence_name:"ph_"+i+"_posthog"}(e),this.storage=this.buildStorage(e),this.load(),this.update_config(e,e),this.save()}return W(n,[{key:"buildStorage",value:function(e){Sf.indexOf(e.persistence.toLowerCase())===-1&&(x.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return t==="localstorage"&&fe.is_supported()?fe:t==="localstorage+cookie"&&$r.is_supported()?$r:t==="sessionstorage"&&xe.is_supported()?xe:t==="memory"?cf:t==="cookie"?yt:$r.is_supported()?$r:yt}},{key:"properties",value:function(){var e={};return X(this.props,function(t,i){if(i===In&&Ze(t))for(var r=Object.keys(t),s=0;s<r.length;s++)e["$feature/".concat(r[s])]=t[r[s]];else a=i,l=!1,(_t(o=Zp)?l:Vl&&o.indexOf===Vl?o.indexOf(a)!=-1:(X(o,function(u){if(l||(l=u===a))return Dr}),l))||(e[i]=t);var o,a,l}),e}},{key:"load",value:function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Te({},e))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)}},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(e,t,i){var r=this;if(Ze(e)){M(t)&&(t="None"),this.expire_days=M(i)?this.default_expiry:i;var s=!1;if(X(e,function(o,a){r.props.hasOwnProperty(a)&&r.props[a]!==t||(r.props[a]=o,s=!0)}),s)return this.save(),!0}return!1}},{key:"register",value:function(e,t){var i=this;if(Ze(e)){this.expire_days=M(t)?this.default_expiry:t;var r=!1;if(X(e,function(s,o){e.hasOwnProperty(o)&&i.props[o]!==s&&(i.props[o]=s,r=!0)}),r)return this.save(),!0}return!1}},{key:"unregister",value:function(e){e in this.props&&(delete this.props[e],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(_e.campaignParams(this.config.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(_e.searchInfo())}},{key:"update_referrer_info",value:function(){this.register(_e.referrerInfo())}},{key:"set_initial_person_info",value:function(){this.props[Ao]||this.props[Io]||this.register_once(y({},iu,_e.initialPersonInfo()),void 0)}},{key:"get_referrer_info",value:function(){return bo({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"get_initial_props",value:function(){var e=this,t={};X([Io,Ao],function(s){var o=e.props[s];o&&X(o,function(a,l){t["$initial_"+wo(l)]=a})});var i=this.props[iu];if(i){var r=_e.initialPersonPropsFromInfo(i);Te(t,r)}return t}},{key:"safe_merge",value:function(e){return X(this.props,function(t,i){i in e||(e[i]=t)}),e}},{key:"update_config",value:function(e,t){if(this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var i=this.buildStorage(e),r=this.props;this.clear(),this.storage=i,this.props=r,this.save()}}},{key:"set_disabled",value:function(e){this.disabled=e,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())}},{key:"set_event_timer",value:function(e,t){var i=this.props[bi]||{};i[e]=t,this.props[bi]=i,this.save()}},{key:"remove_event_timer",value:function(e){var t=(this.props[bi]||{})[e];return M(t)||(delete this.props[bi][e],this.save()),t}},{key:"get_property",value:function(e){return this.props[e]}},{key:"set_property",value:function(e,t){this.props[e]=t,this.save()}}]),n}(),Ef=2,$f=4,Fr=function(n){return n[n.DomContentLoaded=0]="DomContentLoaded",n[n.Load=1]="Load",n[n.FullSnapshot=2]="FullSnapshot",n[n.IncrementalSnapshot=3]="IncrementalSnapshot",n[n.Meta=4]="Meta",n[n.Custom=5]="Custom",n[n.Plugin=6]="Plugin",n}(Fr||{});function Wo(n){return n?Xr(n).split(/\s+/):[]}function Br(n){var e="";switch($i(n.className)){case"string":e=n.className;break;case"object":e=("baseVal"in n.className?n.className.baseVal:null)||n.getAttribute("class")||"";break;default:e=""}return Wo(e)}function ic(n){return mt(n)?null:Xr(n).split(/(\s+)/).filter(function(e){return Fn(e)}).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function zr(n){var e="";return Mo(n)&&!ac(n)&&n.childNodes&&n.childNodes.length&&X(n.childNodes,function(t){var i;rc(t)&&t.textContent&&(e+=(i=ic(t.textContent))!==null&&i!==void 0?i:"")}),Xr(e)}function Go(n){return!!n&&n.nodeType===1}function qt(n,e){return!!n&&!!n.tagName&&n.tagName.toLowerCase()===e.toLowerCase()}function rc(n){return!!n&&n.nodeType===3}function sc(n){return!!n&&n.nodeType===11}var Fo=["a","button","form","input","select","textarea","label"];function oc(n){var e=n.parentNode;return!(!e||!Go(e))&&e}function Cf(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;if(!m||!n||qt(n,"html")||!Go(n))return!1;if(t!=null&&t.url_allowlist){var s=m.location.href,o=t.url_allowlist;if(o&&!o.some(function(v){return s.match(v)}))return!1}if(t!=null&&t.dom_event_allowlist){var a=t.dom_event_allowlist;if(a&&!a.some(function(v){return e.type===v}))return!1}for(var l=!1,u=[n],c=!0,p=n;p.parentNode&&!qt(p,"body");)if(sc(p.parentNode))u.push(p.parentNode.host),p=p.parentNode.host;else{if(!(c=oc(p)))break;if(i||Fo.indexOf(c.tagName.toLowerCase())>-1)l=!0;else{var f=m.getComputedStyle(c);f&&f.getPropertyValue("cursor")==="pointer"&&(l=!0)}u.push(c),p=c}if(!function(v,k){var L=k?.element_allowlist;if(M(L))return!0;var E,F=tt(v);try{var U=function(){var Q=E.value;if(L.some(function(K){return Q.tagName.toLowerCase()===K}))return{v:!0}};for(F.s();!(E=F.n()).done;){var G=U();if($i(G)==="object")return G.v}}catch(Q){F.e(Q)}finally{F.f()}return!1}(u,t)||!function(v,k){var L=k?.css_selector_allowlist;if(M(L))return!0;var E,F=tt(v);try{var U=function(){var Q=E.value;if(L.some(function(K){return Q.matches(K)}))return{v:!0}};for(F.s();!(E=F.n()).done;){var G=U();if($i(G)==="object")return G.v}}catch(Q){F.e(Q)}finally{F.f()}return!1}(u,t))return!1;var d=m.getComputedStyle(n);if(d&&d.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;var g=n.tagName.toLowerCase();switch(g){case"html":return!1;case"form":return(r||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(r||["change","click"]).indexOf(e.type)>=0;default:return l?(r||["click"]).indexOf(e.type)>=0:(r||["click"]).indexOf(e.type)>=0&&(Fo.indexOf(g)>-1||n.getAttribute("contenteditable")==="true")}}function Mo(n){for(var e=n;e.parentNode&&!qt(e,"body");e=e.parentNode){var t=Br(e);if(N(t,"ph-sensitive")||N(t,"ph-no-capture"))return!1}if(N(Br(n),"ph-include"))return!0;var i=n.type||"";if(Re(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var r=n.name||n.id||"";return!(Re(r)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,"")))}function ac(n){return!!(qt(n,"input")&&!["button","checkbox","submit","reset"].includes(n.type)||qt(n,"select")||qt(n,"textarea")||n.getAttribute("contenteditable")==="true")}var lc="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Af=new RegExp("^(?:".concat(lc,")$")),If=new RegExp(lc),uc="\\d{3}-?\\d{2}-?\\d{4}",Tf=new RegExp("^(".concat(uc,")$")),Rf=new RegExp("(".concat(uc,")"));function Fn(n){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return!(mt(n)||Re(n)&&(n=Xr(n),(e?Af:If).test((n||"").replace(/[- ]/g,""))||(e?Tf:Rf).test(n)))}function hu(n){var e=zr(n);return Fn(e="".concat(e," ").concat(cc(n)).trim())?e:""}function cc(n){var e="";return n&&n.childNodes&&n.childNodes.length&&X(n.childNodes,function(t){var i;if(t&&((i=t.tagName)===null||i===void 0?void 0:i.toLowerCase())==="span")try{var r=zr(t);e="".concat(e," ").concat(r).trim(),t.childNodes&&t.childNodes.length&&(e="".concat(e," ").concat(cc(t)).trim())}catch(s){x.error(s)}}),e}function Pf(n){return function(e){var t=e.map(function(i){var r,s,o="";if(i.tag_name&&(o+=i.tag_name),i.attr_class){i.attr_class.sort();var a,l=tt(i.attr_class);try{for(l.s();!(a=l.n()).done;){var u=a.value;o+=".".concat(u.replace(/"/g,""))}}catch(f){l.e(f)}finally{l.f()}}var c=C(C(C(C({},i.text?{text:i.text}:{}),{},{"nth-child":(r=i.nth_child)!==null&&r!==void 0?r:0,"nth-of-type":(s=i.nth_of_type)!==null&&s!==void 0?s:0},i.href?{href:i.href}:{}),i.attr_id?{attr_id:i.attr_id}:{}),i.attributes),p={};return Pr(c).sort(function(f,d){var g=Ie(f,1)[0],v=Ie(d,1)[0];return g.localeCompare(v)}).forEach(function(f){var d=Ie(f,2),g=d[0],v=d[1];return p[du(g.toString())]=du(v.toString())}),o+=":",o+=Pr(c).map(function(f){var d=Ie(f,2),g=d[0],v=d[1];return"".concat(g,'="').concat(v,'"')}).join("")});return t.join(";")}(function(e){return e.map(function(t){var i,r,s={text:(i=t.$el_text)===null||i===void 0?void 0:i.slice(0,400),tag_name:t.tag_name,href:(r=t.attr__href)===null||r===void 0?void 0:r.slice(0,2048),attr_class:Of(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return Pr(t).filter(function(o){return Ie(o,1)[0].indexOf("attr__")===0}).forEach(function(o){var a=Ie(o,2),l=a[0],u=a[1];return s.attributes[l]=u}),s})}(n))}function du(n){return n.replace(/"|\\"/g,'\\"')}function Of(n){var e=n.attr__class;return e?de(e)?e:Wo(e):void 0}var Do="[SessionRecording]",Lo="redacted",co={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:function(n){return n},recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6},Ff=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],Mf=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],Df=["/s/","/e/","/i/"];function gu(n,e,t,i){if(mt(n))return n;var r=e?.["content-length"]||function(s){return new Blob([s]).size}(n);return Re(r)&&(r=parseInt(r)),r>t?Do+" ".concat(i," body too large to record (").concat(r," bytes)"):n}function vu(n,e){if(mt(n))return n;var t=n;return Fn(t,!1)||(t=Do+" "+e+" body "+Lo),X(Mf,function(i){var r,s;(r=t)!==null&&r!==void 0&&r.length&&((s=t)===null||s===void 0?void 0:s.indexOf(i))!==-1&&(t=Do+" "+e+" body "+Lo+" as might contain: "+i)}),t}var ot,Lf=function(n,e){var t,i,r,s={payloadSizeLimitBytes:co.payloadSizeLimitBytes,performanceEntryTypeToObserve:nn(co.performanceEntryTypeToObserve)},o=n.session_recording.recordHeaders!==!1&&e.recordHeaders,a=n.session_recording.recordBody!==!1&&e.recordBody,l=n.capture_performance!==!1&&e.recordPerformance,u=(t=s,r=Math.min(1e6,(i=t.payloadSizeLimitBytes)!==null&&i!==void 0?i:1e6),function(f){return f!=null&&f.requestBody&&(f.requestBody=gu(f.requestBody,f.requestHeaders,r,"Request")),f!=null&&f.responseBody&&(f.responseBody=gu(f.responseBody,f.responseHeaders,r,"Response")),f}),c=function(f){return u(function(v){var k=Or(v.name);if(!(k&&k.pathname&&Df.some(function(L){return k.pathname.indexOf(L)===0})))return v}((g=(d=f).requestHeaders,mt(g)||X(Object.keys(g??{}),function(v){Ff.includes(v.toLowerCase())&&(g[v]=Lo)}),d)));var d,g},p=et(n.session_recording.maskNetworkRequestFn);return p&&et(n.session_recording.maskCapturedNetworkRequestFn)&&x.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),p&&(n.session_recording.maskCapturedNetworkRequestFn=function(f){var d=n.session_recording.maskNetworkRequestFn({url:f.name});return C(C({},f),{},{name:d?.url})}),s.maskRequestFn=et(n.session_recording.maskCapturedNetworkRequestFn)?function(f){var d,g,v,k=c(f);return k&&(d=(g=(v=n.session_recording).maskCapturedNetworkRequestFn)===null||g===void 0?void 0:g.call(v,k))!==null&&d!==void 0?d:void 0}:function(f){return function(d){if(!M(d))return d.requestBody=vu(d.requestBody,"Request"),d.responseBody=vu(d.responseBody,"Response"),d}(c(f))},C(C(C({},co),s),{},{recordHeaders:o,recordBody:a,recordPerformance:l,recordInitialRequests:l})},jf=W(function n(e){var t,i,r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};H(this,n),y(this,"bucketSize",100),y(this,"refillRate",10),y(this,"mutationBuckets",{}),y(this,"loggedTracker",{}),y(this,"refillBuckets",function(){Object.keys(r.mutationBuckets).forEach(function(o){r.mutationBuckets[o]=r.mutationBuckets[o]+r.refillRate,r.mutationBuckets[o]>=r.bucketSize&&delete r.mutationBuckets[o]})}),y(this,"getNodeOrRelevantParent",function(o){var a=r.rrweb.mirror.getNode(o);if(a?.nodeName!=="svg"&&a instanceof Element){var l=a.closest("svg");if(l)return[r.rrweb.mirror.getId(l),l]}return[o,a]}),y(this,"numberOfChanges",function(o){var a,l,u,c,p,f,d,g;return((a=(l=o.removes)===null||l===void 0?void 0:l.length)!==null&&a!==void 0?a:0)+((u=(c=o.attributes)===null||c===void 0?void 0:c.length)!==null&&u!==void 0?u:0)+((p=(f=o.texts)===null||f===void 0?void 0:f.length)!==null&&p!==void 0?p:0)+((d=(g=o.adds)===null||g===void 0?void 0:g.length)!==null&&d!==void 0?d:0)}),y(this,"throttleMutations",function(o){if(o.type!==3||o.data.source!==0)return o;var a=o.data,l=r.numberOfChanges(a);a.attributes&&(a.attributes=a.attributes.filter(function(c){var p,f,d,g=Ie(r.getNodeOrRelevantParent(c.id),2),v=g[0],k=g[1];return r.mutationBuckets[v]===0?!1:(r.mutationBuckets[v]=(p=r.mutationBuckets[v])!==null&&p!==void 0?p:r.bucketSize,r.mutationBuckets[v]=Math.max(r.mutationBuckets[v]-1,0),r.mutationBuckets[v]===0&&(r.loggedTracker[v]||(r.loggedTracker[v]=!0,(f=(d=r.options).onBlockedNode)===null||f===void 0||f.call(d,v,k))),c)}));var u=r.numberOfChanges(a);return u!==0||l===u?o:void 0}),this.rrweb=e,this.options=s,this.refillRate=(t=this.options.refillRate)!==null&&t!==void 0?t:this.refillRate,this.bucketSize=(i=this.options.bucketSize)!==null&&i!==void 0?i:this.bucketSize,setInterval(function(){r.refillBuckets()},1e3)}),pc=3e5,mu=pc;(function(n){n[n.Mutation=0]="Mutation",n[n.MouseMove=1]="MouseMove",n[n.MouseInteraction=2]="MouseInteraction",n[n.Scroll=3]="Scroll",n[n.ViewportResize=4]="ViewportResize",n[n.Input=5]="Input",n[n.TouchMove=6]="TouchMove",n[n.MediaInteraction=7]="MediaInteraction",n[n.StyleSheetRule=8]="StyleSheetRule",n[n.CanvasMutation=9]="CanvasMutation",n[n.Font=10]="Font",n[n.Log=11]="Log",n[n.Drag=12]="Drag",n[n.StyleDeclaration=13]="StyleDeclaration",n[n.Selection=14]="Selection",n[n.AdoptedStyleSheet=15]="AdoptedStyleSheet"})(ot||(ot={}));var qf=[ot.MouseMove,ot.MouseInteraction,ot.Scroll,ot.ViewportResize,ot.Input,ot.TouchMove,ot.MediaInteraction,ot.Drag],yu=function(){function n(e,t){H(this,n),this.size=0,this.data=[],this.sessionId=e,this.windowId=t}return W(n,[{key:"mostRecentSnapshotTimestamp",get:function(){return this.data.length?this.data[this.data.length-1].timestamp:null}},{key:"add",value:function(e){this.size+=e.$snapshot_bytes,this.data.push(e.$snapshot_data)}}]),n}(),_u=function(n){return{rrwebMethod:n,enqueuedAt:Date.now(),attempt:1}},Ge="[SessionRecording]";function Nf(n){return JSON.stringify(n,(e=[],function(t,i){if(Ze(i)){for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(i)?"[Circular]":(e.push(i),i)}return i})).length;var e}var dt,Uf=function(){function n(e){var t=this;if(H(this,n),y(this,"queuedRRWebEvents",[]),y(this,"isIdle",!1),y(this,"_linkedFlagSeen",!1),y(this,"_lastActivityTimestamp",Date.now()),y(this,"_linkedFlag",null),y(this,"_forceAllowLocalhostNetworkCapture",!1),y(this,"_samplingSessionListener",null),this.instance=e,this._captureStarted=!1,this._endpoint="/s/",this.stopRrweb=void 0,this.receivedDecide=!1,m?.addEventListener("beforeunload",function(){t._flushBuffer()}),m?.addEventListener("offline",function(){t._tryAddCustomEvent("browser offline",{})}),m?.addEventListener("online",function(){t._tryAddCustomEvent("browser online",{})}),m?.addEventListener("visibilitychange",function(){if(A!=null&&A.visibilityState){var o="window "+A.visibilityState;t._tryAddCustomEvent(o,{})}}),!this.instance.sessionManager)throw x.error(Ge+" started without valid sessionManager"),new Error(Ge+" started without valid sessionManager. This is a bug.");var i=this.sessionManager.checkAndGetSessionAndWindowId(),r=i.sessionId,s=i.windowId;this.sessionId=r,this.windowId=s,this.buffer=new yu(this.sessionId,this.windowId),this._setupSampling()}return W(n,[{key:"rrwebRecord",get:function(){var e;return he==null||(e=he.rrweb)===null||e===void 0?void 0:e.record}},{key:"started",get:function(){return this._captureStarted}},{key:"sessionManager",get:function(){if(!this.instance.sessionManager)throw new Error(Ge+" started without valid sessionManager. This is a bug.");return this.instance.sessionManager}},{key:"isSampled",get:function(){var e=this.instance.get_property(xi);return Rr(e)?e:null}},{key:"sessionDuration",get:function(){var e=this.buffer.mostRecentSnapshotTimestamp,t=this.sessionManager.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp;return e?e-t:null}},{key:"isRecordingEnabled",get:function(){var e=!!this.instance.get_property(ko),t=!this.instance.config.disable_session_recording;return m&&e&&t}},{key:"isConsoleLogCaptureEnabled",get:function(){var e=!!this.instance.get_property(Ql),t=this.instance.config.enable_recording_console_log;return t??e}},{key:"canvasRecording",get:function(){var e=this.instance.get_property(eu);return e&&e.fps&&e.quality?{enabled:e.enabled,fps:e.fps,quality:e.quality}:void 0}},{key:"networkPayloadCapture",get:function(){var e,t,i=this.instance.get_property(Zl),r={recordHeaders:(e=this.instance.config.session_recording)===null||e===void 0?void 0:e.recordHeaders,recordBody:(t=this.instance.config.session_recording)===null||t===void 0?void 0:t.recordBody},s=r?.recordHeaders||i?.recordHeaders,o=r?.recordBody||i?.recordBody,a=this.instance.config.capture_performance||i?.capturePerformance;return s||o||a?{recordHeaders:s,recordBody:o,recordPerformance:a}:void 0}},{key:"sampleRate",get:function(){var e=this.instance.get_property(tu);return at(e)?e:null}},{key:"minimumDuration",get:function(){var e=this.instance.get_property(nu);return at(e)?e:null}},{key:"status",get:function(){return this.receivedDecide?this.isRecordingEnabled?mt(this._linkedFlag)||this._linkedFlagSeen?Rr(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"buffering":"disabled":"buffering"}},{key:"startIfEnabledOrStop",value:function(){this.isRecordingEnabled?(this._startCapture(),x.info(Ge+" started")):(this.stopRecording(),this.clearBuffer())}},{key:"stopRecording",value:function(){this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1,x.info(Ge+" stopped"))}},{key:"makeSamplingDecision",value:function(e){var t,i=this.sessionId!==e,r=this.sampleRate;if(at(r)){var s,o=this.isSampled,a=i||!Rr(o);a?s=Math.random()<r:s=o,!s&&a&&x.warn(Ge+" Sample rate (".concat(r,") has determined that this sessionId (").concat(e,") will not be sent to the server.")),this._tryAddCustomEvent("samplingDecisionMade",{sampleRate:r}),(t=this.instance.persistence)===null||t===void 0||t.register(y({},xi,s))}else{var l;(l=this.instance.persistence)===null||l===void 0||l.register(y({},xi,null))}}},{key:"afterDecideResponse",value:function(e){var t,i,r,s=this;if(this._persistDecideResponse(e),this._linkedFlag=((t=e.sessionRecording)===null||t===void 0?void 0:t.linkedFlag)||null,(i=e.sessionRecording)!==null&&i!==void 0&&i.endpoint&&(this._endpoint=(r=e.sessionRecording)===null||r===void 0?void 0:r.endpoint),this._setupSampling(),!mt(this._linkedFlag)){var o=Re(this._linkedFlag)?this._linkedFlag:this._linkedFlag.flag,a=Re(this._linkedFlag)?null:this._linkedFlag.variant;this.instance.onFeatureFlags(function(l,u){var c=Ze(u)&&o in u,p=a?u[o]===a:c;if(p){var f={linkedFlag:o,linkedVariant:a},d="linked flag matched";x.info(Ge+" "+d,f),s._tryAddCustomEvent(d,f)}s._linkedFlagSeen=p})}this.receivedDecide=!0,this.startIfEnabledOrStop()}},{key:"_setupSampling",value:function(){var e=this;at(this.sampleRate)&&_t(this._samplingSessionListener)&&(this._samplingSessionListener=this.sessionManager.onSessionId(function(t){e.makeSamplingDecision(t)}))}},{key:"_persistDecideResponse",value:function(e){if(this.instance.persistence){var t=this.instance.persistence,i=function(){var r,s,o,a,l,u,c,p,f=(r=e.sessionRecording)===null||r===void 0?void 0:r.sampleRate,d=mt(f)?null:parseFloat(f),g=(s=e.sessionRecording)===null||s===void 0?void 0:s.minimumDurationMilliseconds;t.register((y(p={},ko,!!e.sessionRecording),y(p,Ql,(o=e.sessionRecording)===null||o===void 0?void 0:o.consoleLogRecordingEnabled),y(p,Zl,C({capturePerformance:e.capturePerformance},(a=e.sessionRecording)===null||a===void 0?void 0:a.networkPayloadCapture)),y(p,eu,{enabled:(l=e.sessionRecording)===null||l===void 0?void 0:l.recordCanvas,fps:(u=e.sessionRecording)===null||u===void 0?void 0:u.canvasFps,quality:(c=e.sessionRecording)===null||c===void 0?void 0:c.canvasQuality}),y(p,tu,d),y(p,nu,M(g)?null:g),p))};i(),this.sessionManager.onSessionId(i)}}},{key:"log",value:function(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(t=this.instance.sessionRecording)===null||t===void 0||t.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:i,trace:[],payload:[JSON.stringify(e)]}},timestamp:ju()})}},{key:"_startCapture",value:function(){var e=this;M(Object.assign)||this._captureStarted||this.instance.config.disable_session_recording||this.instance.consent.isOptedOut()||(this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId(),this.rrwebRecord?this._onScriptLoaded():Mn(this.instance.requestRouter.endpointFor("assets","/static/recorder.js?v=".concat(Dt.LIB_VERSION)),function(t){if(t)return x.error(Ge+" could not load recorder.js",t);e._onScriptLoaded()}))}},{key:"isInteractiveEvent",value:function(e){var t;return e.type===3&&qf.indexOf((t=e.data)===null||t===void 0?void 0:t.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(e){var t=this.isInteractiveEvent(e);t||this.isIdle||e.timestamp-this._lastActivityTimestamp>mu&&(this.isIdle=!0,this._tryAddCustomEvent("sessionIdle",{reason:"user inactivity",timeSinceLastActive:e.timestamp-this._lastActivityTimestamp,threshold:mu}),clearTimeout(this._fullSnapshotTimer),this._flushBuffer());var i=!1;if(t&&(this._lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),i=!0)),!this.isIdle){var r=this.sessionManager.checkAndGetSessionAndWindowId(!t,e.timestamp),s=r.windowId,o=r.sessionId,a=this.sessionId!==o,l=this.windowId!==s;this.windowId=s,this.sessionId=o,(i||[Ef,$f].indexOf(e.type)===-1&&(l||a||M(this._fullSnapshotTimer)))&&this._tryTakeFullSnapshot()}}},{key:"_tryRRWebMethod",value:function(e){try{return e.rrwebMethod(),!0}catch(t){return this.queuedRRWebEvents.length<10?this.queuedRRWebEvents.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):x.warn(Ge+" could not emit queued rrweb event.",t,e),!1}}},{key:"_tryAddCustomEvent",value:function(e,t){var i=this;return this._tryRRWebMethod(_u(function(){return i.rrwebRecord.addCustomEvent(e,t)}))}},{key:"_tryTakeFullSnapshot",value:function(){var e=this;return this._tryRRWebMethod(_u(function(){return e.rrwebRecord.takeFullSnapshot()}))}},{key:"_onScriptLoaded",value:function(){for(var e,t=this,i={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},r=this.instance.config.session_recording,s=0,o=Object.entries(r||{});s<o.length;s++){var a=Ie(o[s],2),l=a[0],u=a[1];l in i&&(i[l]=u)}if(this.canvasRecording&&this.canvasRecording.enabled&&(i.recordCanvas=!0,i.sampling={canvas:this.canvasRecording.fps},i.dataURLOptions={type:"image/webp",quality:this.canvasRecording.quality}),this.rrwebRecord){this.mutationRateLimiter=(e=this.mutationRateLimiter)!==null&&e!==void 0?e:new jf(this.rrwebRecord,{onBlockedNode:function(p,f){var d="Too many mutations on node '".concat(p,"'. Rate limiting. This could be due to SVG animations or something similar");x.info(d,{node:f}),t.log(Ge+" "+d,"warn")}});var c=this._gatherRRWebPlugins();this.stopRrweb=this.rrwebRecord(C({emit:function(p){t.onRRwebEmit(p)},plugins:c},i)),this.instance._addCaptureHook(function(p){try{if(p==="$pageview"){var f=m?t._maskUrl(m.location.href):"";if(!f)return;t._tryAddCustomEvent("$pageview",{href:f}),t._tryTakeFullSnapshot()}}catch(d){x.error("Could not add $pageview to rrweb session",d)}}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1,this._tryAddCustomEvent("$session_options",{sessionRecordingOptions:i,activePlugins:c.map(function(p){return p?.name})}),this._tryAddCustomEvent("$posthog_config",{config:this.instance.config})}else x.error(Ge+"onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"_scheduleFullSnapshot",value:function(){var e=this;this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),this._fullSnapshotTimer=setInterval(function(){e._tryTakeFullSnapshot()},pc)}},{key:"_gatherRRWebPlugins",value:function(){var e=[];return he.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled&&e.push(he.rrwebConsoleRecord.getRecordConsolePlugin()),this.networkPayloadCapture&&et(he.getRecordNetworkPlugin)&&(!pf.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?e.push(he.getRecordNetworkPlugin(Lf(this.instance.config,this.networkPayloadCapture))):x.info(Ge+" NetworkCapture not started because we are on localhost.")),e}},{key:"onRRwebEmit",value:function(e){if(this._processQueuedEvents(),e&&Ze(e)){if(e.type===Fr.Meta){var t=this._maskUrl(e.data.href);if(this._lastHref=t,!t)return;e.data.href=t}else this._pageViewFallBack();e.type===Fr.FullSnapshot&&this._scheduleFullSnapshot();var i=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(i){var r=function(a){var l=a;if(l&&Ze(l)&&l.type===6&&Ze(l.data)&&l.data.plugin==="rrweb/console@1"){l.data.payload.payload.length>10&&(l.data.payload.payload=l.data.payload.payload.slice(0,10),l.data.payload.payload.push("...[truncated]"));for(var u=[],c=0;c<l.data.payload.payload.length;c++)l.data.payload.payload[c]&&l.data.payload.payload[c].length>2e3?u.push(l.data.payload.payload[c].slice(0,2e3)+"...[truncated]"):u.push(l.data.payload.payload[c]);return l.data.payload.payload=u,a}return a}(i),s=Nf(r);if(this._updateWindowAndSessionIds(r),!this.isIdle||r.type===Fr.Custom){var o={$snapshot_bytes:s,$snapshot_data:r,$session_id:this.sessionId,$window_id:this.windowId};this.status!=="disabled"?this._captureSnapshotBuffered(o):this.clearBuffer()}}}}},{key:"_pageViewFallBack",value:function(){if(!this.instance.config.capture_pageview&&m){var e=this._maskUrl(m.location.href);this._lastHref!==e&&(this._tryAddCustomEvent("$url_changed",{href:e}),this._lastHref=e)}}},{key:"_processQueuedEvents",value:function(){var e=this;if(this.queuedRRWebEvents.length){var t=nn(this.queuedRRWebEvents);this.queuedRRWebEvents=[],t.forEach(function(i){Date.now()-i.enqueuedAt>2e3?e._tryAddCustomEvent("rrwebQueueTimeout",{enqueuedAt:i.enqueuedAt,attempt:i.attempt,queueLength:t.length}):e._tryRRWebMethod(i)&&e._tryAddCustomEvent("rrwebQueueSuccess",{enqueuedAt:i.enqueuedAt,attempt:i.attempt,queueLength:t.length})})}}},{key:"_maskUrl",value:function(e){var t=this.instance.config.session_recording;if(t.maskNetworkRequestFn){var i,r={url:e};return(i=r=t.maskNetworkRequestFn(r))===null||i===void 0?void 0:i.url}return e}},{key:"clearBuffer",value:function(){this.buffer=new yu(this.sessionId,this.windowId)}},{key:"_flushBuffer",value:function(){var e=this;this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0);var t=this.minimumDuration,i=this.sessionDuration,r=at(i)&&i>=0,s=at(t)&&r&&i<t;this.status==="buffering"||s?this.flushBufferTimer=setTimeout(function(){e._flushBuffer()},2e3):(this.buffer.data.length>0&&this._captureSnapshot({$snapshot_bytes:this.buffer.size,$snapshot_data:this.buffer.data,$session_id:this.buffer.sessionId,$window_id:this.buffer.windowId}),this.clearBuffer())}},{key:"_captureSnapshotBuffered",value:function(e){var t,i=this,r=2+(((t=this.buffer)===null||t===void 0?void 0:t.data.length)||0);(this.buffer.size+e.$snapshot_bytes+r>943718.4||this.buffer.sessionId!==this.sessionId)&&this._flushBuffer(),this.buffer.add(e),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){i._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{_url:this.instance.requestRouter.endpointFor("api",this._endpoint),_noTruncate:!0,_batchKey:"recordings",_noHeatmaps:!0})}}]),n}(),Bf=function(){function n(e){H(this,n),this.instance=e,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return W(n,[{key:"call",value:function(){var e=this,t={token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(Tn),group_properties:this.instance.get_property(Ft),disable_flags:this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load||void 0};this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:t,compression:this.instance.config.disable_compression?void 0:Qe.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:function(i){return e.parseDecideResponse(i.json)}})}},{key:"parseDecideResponse",value:function(e){var t=this;this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer();var i=!e;if(this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.config.advanced_disable_feature_flags||this.instance.featureFlags.receivedFeatureFlags(e??{},i),i)x.error("Failed to fetch feature flags from PostHog.");else{if(!A||!A.body)return x.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){t.parseDecideResponse(e)},500);this.instance._afterDecideResponse(e);var r=m?.extendPostHogWithExceptionAutoCapture;if(e.autocaptureExceptions&&e.autocaptureExceptions&&M(r)&&Mn(this.instance.requestRouter.endpointFor("assets","/static/exception-autocapture.js"),function(l){if(l)return x.error("Could not load exception autocapture script",l);m.extendPostHogWithExceptionAutocapture(t.instance,e)}),e.siteApps)if(this.instance.config.opt_in_site_apps){var s,o=tt(e.siteApps);try{var a=function(){var l=s.value,u=l.id,c=l.url,p=t.instance.requestRouter.endpointFor("api",c);he["__$$ph_site_app_".concat(u)]=t.instance,Mn(p,function(f){f&&x.error("Error while initializing PostHog app with config id ".concat(u),f)})};for(o.s();!(s=o.n()).done;)a()}catch(l){o.e(l)}finally{o.f()}}else e.siteApps.length>0&&x.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}]),n}(),zf=m!=null&&m.location?Nr(m.location.hash,"__posthog")||Nr(location.hash,"state"):null,bu="_postHogToolbarParams";(function(n){n[n.UNINITIALIZED=0]="UNINITIALIZED",n[n.LOADING=1]="LOADING",n[n.LOADED=2]="LOADED"})(dt||(dt={}));var Hf=function(){function n(e){H(this,n),this.instance=e}return W(n,[{key:"setToolbarState",value:function(e){he.ph_toolbar_state=e}},{key:"getToolbarState",value:function(){var e;return(e=he.ph_toolbar_state)!==null&&e!==void 0?e:dt.UNINITIALIZED}},{key:"maybeLoadToolbar",value:function(){var e,t,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!m||!A)return!1;i=(e=i)!==null&&e!==void 0?e:m.location,s=(t=s)!==null&&t!==void 0?t:m.history;try{if(!r){try{m.localStorage.setItem("test","test"),m.localStorage.removeItem("test")}catch{return!1}r=m?.localStorage}var o,a=zf||Nr(i.hash,"__posthog")||Nr(i.hash,"state"),l=a?Yl(function(){return JSON.parse(atob(decodeURIComponent(a)))})||Yl(function(){return JSON.parse(decodeURIComponent(a))}):null;return l&&l.action==="ph_authorize"?((o=l).source="url",o&&Object.keys(o).length>0&&(l.desiredHash?i.hash=l.desiredHash:s?s.replaceState(s.state,"",i.pathname+i.search):i.hash="")):((o=JSON.parse(r.getItem(bu)||"{}")).source="localstorage",delete o.userIntent),!(!o.token||this.instance.config.token!==o.token)&&(this.loadToolbar(o),!0)}catch{return!1}}},{key:"_callLoadToolbar",value:function(e){(he.ph_load_toolbar||he.ph_load_editor)(e,this.instance)}},{key:"loadToolbar",value:function(e){var t=this,i=!(A==null||!A.getElementById(To));if(!m||i)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,s=C(C({token:this.instance.config.token},e),{},{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(m.localStorage.setItem(bu,JSON.stringify(C(C({},s),{},{source:void 0}))),this.getToolbarState()===dt.LOADED)this._callLoadToolbar(s);else if(this.getToolbarState()===dt.UNINITIALIZED){this.setToolbarState(dt.LOADING);var o=3e5,a=Math.floor(Date.now()/o)*o;Mn(this.instance.requestRouter.endpointFor("assets","/static/toolbar.js?t=".concat(a)),function(l){if(l)return x.error("Failed to load toolbar",l),void t.setToolbarState(dt.UNINITIALIZED);t.setToolbarState(dt.LOADED),t._callLoadToolbar(s)}),gt(m,"turbolinks:load",function(){t.setToolbarState(dt.UNINITIALIZED),t.loadToolbar(s)})}return!0}},{key:"_loadEditor",value:function(e){return this.loadToolbar(e)}},{key:"maybeLoadEditor",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;return this.maybeLoadToolbar(e,t,i)}}]),n}(),Wf=function(){function n(e){H(this,n),y(this,"isPaused",!0),y(this,"queue",[]),y(this,"flushTimeoutMs",3e3),this.sendRequest=e}return W(n,[{key:"enqueue",value:function(e){this.queue.push(e),this.flushTimeout||this.setFlushTimeout()}},{key:"unload",value:function(){var e=this;this.clearFlushTimeout();var t=this.queue.length>0?this.formatQueue():{},i=Object.values(t);[].concat(nn(i.filter(function(r){return r.url.indexOf("/e")===0})),nn(i.filter(function(r){return r.url.indexOf("/e")!==0}))).map(function(r){e.sendRequest(C(C({},r),{},{transport:"sendBeacon"}))})}},{key:"enable",value:function(){this.isPaused=!1,this.setFlushTimeout()}},{key:"setFlushTimeout",value:function(){var e=this;this.isPaused||(this.flushTimeout=setTimeout(function(){if(e.clearFlushTimeout(),e.queue.length>0){var t=e.formatQueue(),i=function(s){var o=t[s],a=new Date().getTime();o.data&&de(o.data)&&X(o.data,function(l){l.offset=Math.abs(l.timestamp-a),delete l.timestamp}),e.sendRequest(o)};for(var r in t)i(r)}},this.flushTimeoutMs))}},{key:"clearFlushTimeout",value:function(){clearTimeout(this.flushTimeout),this.flushTimeout=void 0}},{key:"formatQueue",value:function(){var e={};return X(this.queue,function(t){var i,r=t,s=(r?r.batchKey:null)||r.url;M(e[s])&&(e[s]=C(C({},r),{},{data:[]})),(i=e[s].data)===null||i===void 0||i.push(r.data)}),this.queue=[],e}}]),n}(),Ue=Uint8Array,Pe=Uint16Array,Ln=Uint32Array,Vo=new Ue([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xo=new Ue([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),wu=new Ue([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),fc=function(n,e){for(var t=new Pe(31),i=0;i<31;++i)t[i]=e+=1<<n[i-1];var r=new Ln(t[30]);for(i=1;i<30;++i)for(var s=t[i];s<t[i+1];++s)r[s]=s-t[i]<<5|i;return[t,r]},hc=fc(Vo,2),Gf=hc[0],jo=hc[1];Gf[28]=258,jo[258]=28;for(qo=fc(Xo,0)[1],Hr=new Pe(32768),Y=0;Y<32768;++Y)Ot=(43690&Y)>>>1|(21845&Y)<<1,Ot=(61680&(Ot=(52428&Ot)>>>2|(13107&Ot)<<2))>>>4|(3855&Ot)<<4,Hr[Y]=((65280&Ot)>>>8|(255&Ot)<<8)>>>1;var Ot,qo,Hr,Y,ki=function(n,e,t){for(var i=n.length,r=0,s=new Pe(e);r<i;++r)++s[n[r]-1];var o,a=new Pe(e);for(r=0;r<e;++r)a[r]=a[r-1]+s[r-1]<<1;if(t){o=new Pe(1<<e);var l=15-e;for(r=0;r<i;++r)if(n[r])for(var u=r<<4|n[r],c=e-n[r],p=a[n[r]-1]++<<c,f=p|(1<<c)-1;p<=f;++p)o[Hr[p]>>>l]=u}else for(o=new Pe(i),r=0;r<i;++r)o[r]=Hr[a[n[r]-1]++]>>>15-n[r];return o},rn=new Ue(288);for(Y=0;Y<144;++Y)rn[Y]=8;for(Y=144;Y<256;++Y)rn[Y]=9;for(Y=256;Y<280;++Y)rn[Y]=7;for(Y=280;Y<288;++Y)rn[Y]=8;var Wr=new Ue(32);for(Y=0;Y<32;++Y)Wr[Y]=5;var Vf=ki(rn,9,0),Xf=ki(Wr,5,0),dc=function(n){return(n/8>>0)+(7&n&&1)},gc=function(n,e,t){(e==null||e<0)&&(e=0),(t==null||t>n.length)&&(t=n.length);var i=new(n instanceof Pe?Pe:n instanceof Ln?Ln:Ue)(t-e);return i.set(n.subarray(e,t)),i},ft=function(n,e,t){t<<=7&e;var i=e/8>>0;n[i]|=t,n[i+1]|=t>>>8},mi=function(n,e,t){t<<=7&e;var i=e/8>>0;n[i]|=t,n[i+1]|=t>>>8,n[i+2]|=t>>>16},po=function(n,e){for(var t=[],i=0;i<n.length;++i)n[i]&&t.push({s:i,f:n[i]});var r=t.length,s=t.slice();if(!r)return[new Ue(0),0];if(r==1){var o=new Ue(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(G,Q){return G.f-Q.f}),t.push({s:-1,f:25001});var a=t[0],l=t[1],u=0,c=1,p=2;for(t[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=r-1;)a=t[t[u].f<t[p].f?u++:p++],l=t[u!=c&&t[u].f<t[p].f?u++:p++],t[c++]={s:-1,f:a.f+l.f,l:a,r:l};var f=s[0].s;for(i=1;i<r;++i)s[i].s>f&&(f=s[i].s);var d=new Pe(f+1),g=Jf(t[c-1],d,0);if(g>e){i=0;var v=0,k=g-e,L=1<<k;for(s.sort(function(G,Q){return d[Q.s]-d[G.s]||G.f-Q.f});i<r;++i){var E=s[i].s;if(!(d[E]>e))break;v+=L-(1<<g-d[E]),d[E]=e}for(v>>>=k;v>0;){var F=s[i].s;d[F]<e?v-=1<<e-d[F]++-1:++i}for(;i>=0&&v;--i){var U=s[i].s;d[U]==e&&(--d[U],++v)}g=e}return[new Ue(d),g]},Jf=function n(e,t,i){return e.s==-1?Math.max(n(e.l,t,i+1),n(e.r,t,i+1)):t[e.s]=i},xu=function(n){for(var e=n.length;e&&!n[--e];);for(var t=new Pe(++e),i=0,r=n[0],s=1,o=function(l){t[i++]=l},a=1;a<=e;++a)if(n[a]==r&&a!=e)++s;else{if(!r&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(r),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(r);s=1,r=n[a]}return[t.subarray(0,i),e]},yi=function(n,e){for(var t=0,i=0;i<e.length;++i)t+=n[i]*e[i];return t},Mr=function(n,e,t){var i=t.length,r=dc(e+2);n[r]=255&i,n[r+1]=i>>>8,n[r+2]=255^n[r],n[r+3]=255^n[r+1];for(var s=0;s<i;++s)n[r+s+4]=t[s];return 8*(r+4+i)},ku=function(n,e,t,i,r,s,o,a,l,u,c){ft(e,c++,t),++r[256];for(var p=po(r,15),f=p[0],d=p[1],g=po(s,15),v=g[0],k=g[1],L=xu(f),E=L[0],F=L[1],U=xu(v),G=U[0],Q=U[1],K=new Pe(19),I=0;I<E.length;++I)K[31&E[I]]++;for(I=0;I<G.length;++I)K[31&G[I]]++;for(var oe=po(K,7),ee=oe[0],ut=oe[1],ve=19;ve>4&&!ee[wu[ve-1]];--ve);var Be,V,Z,ae,Fe=u+5<<3,je=yi(r,rn)+yi(s,Wr)+o,ie=yi(r,f)+yi(s,v)+o+14+3*ve+yi(K,ee)+(2*K[16]+3*K[17]+7*K[18]);if(Fe<=je&&Fe<=ie)return Mr(e,c,n.subarray(l,l+u));if(ft(e,c,1+(ie<je)),c+=2,ie<je){Be=ki(f,d,0),V=f,Z=ki(v,k,0),ae=v;var ke=ki(ee,ut,0);for(ft(e,c,F-257),ft(e,c+5,Q-1),ft(e,c+10,ve-4),c+=14,I=0;I<ve;++I)ft(e,c+3*I,ee[wu[I]]);c+=3*ve;for(var Se=[E,G],te=0;te<2;++te){var me=Se[te];for(I=0;I<me.length;++I){var Ce=31&me[I];ft(e,c,ke[Ce]),c+=ee[Ce],Ce>15&&(ft(e,c,me[I]>>>5&127),c+=me[I]>>>12)}}}else Be=Vf,V=rn,Z=Xf,ae=Wr;for(I=0;I<a;++I)if(i[I]>255){Ce=i[I]>>>18&31,mi(e,c,Be[Ce+257]),c+=V[Ce+257],Ce>7&&(ft(e,c,i[I]>>>23&31),c+=Vo[Ce]);var on=31&i[I];mi(e,c,Z[on]),c+=ae[on],on>3&&(mi(e,c,i[I]>>>5&8191),c+=Xo[on])}else mi(e,c,Be[i[I]]),c+=V[i[I]];return mi(e,c,Be[256]),c+V[256]},Yf=new Ln([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Kf=new Ue(0),Qf=function(){for(var n=new Ln(256),e=0;e<256;++e){for(var t=e,i=9;--i;)t=(1&t&&3988292384)^t>>>1;n[e]=t}return n}(),Zf=function(n,e,t,i,r){return function(s,o,a,l,u,c){var p=s.length,f=new Ue(l+p+5*(1+Math.floor(p/7e3))+u),d=f.subarray(l,f.length-u),g=0;if(!o||p<8)for(var v=0;v<=p;v+=65535){var k=v+65535;k<p?g=Mr(d,g,s.subarray(v,k)):(d[v]=c,g=Mr(d,g,s.subarray(v,p)))}else{for(var L=Yf[o-1],E=L>>>13,F=8191&L,U=(1<<a)-1,G=new Pe(32768),Q=new Pe(U+1),K=Math.ceil(a/3),I=2*K,oe=function(ls){return(s[ls]^s[ls+1]<<K^s[ls+2]<<I)&U},ee=new Ln(25e3),ut=new Pe(288),ve=new Pe(32),Be=0,V=0,Z=(v=0,0),ae=0,Fe=0;v<p;++v){var je=oe(v),ie=32767&v,ke=Q[je];if(G[ie]=ke,Q[je]=ie,ae<=v){var Se=p-v;if((Be>7e3||Z>24576)&&Se>423){g=ku(s,d,0,ee,ut,ve,V,Z,Fe,v-Fe,g),Z=Be=V=0,Fe=v;for(var te=0;te<286;++te)ut[te]=0;for(te=0;te<30;++te)ve[te]=0}var me=2,Ce=0,on=F,bt=ie-ke&32767;if(Se>2&&je==oe(v-bt))for(var Tc=Math.min(E,Se)-1,Rc=Math.min(32767,v),Pc=Math.min(258,Se);bt<=Rc&&--on&&ie!=ke;){if(s[v+me]==s[v+me-bt]){for(var wt=0;wt<Pc&&s[v+wt]==s[v+wt-bt];++wt);if(wt>me){if(me=wt,Ce=bt,wt>Tc)break;var Oc=Math.min(bt,wt-2),Ko=0;for(te=0;te<Oc;++te){var as=v-bt+te+32768&32767,Qo=as-G[as]+32768&32767;Qo>Ko&&(Ko=Qo,ke=as)}}}bt+=(ie=ke)-(ke=G[ie])+32768&32767}if(Ce){ee[Z++]=268435456|jo[me]<<18|qo[Ce];var Zo=31&jo[me],ea=31&qo[Ce];V+=Vo[Zo]+Xo[ea],++ut[257+Zo],++ve[ea],ae=v+me,++Be}else ee[Z++]=s[v],++ut[s[v]]}}g=ku(s,d,c,ee,ut,ve,V,Z,Fe,v-Fe,g),c||(g=Mr(d,g,Kf))}return gc(f,0,l+dc(g)+u)}(n,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(n.length)))):12+e.mem,t,i,!r)},fo=function(n,e,t){for(;t;++e)n[e]=t,t>>>=8};function eh(n,e){e===void 0&&(e={});var t=function(){var a=4294967295;return{p:function(l){for(var u=a,c=0;c<l.length;++c)u=Qf[255&u^l[c]]^u>>>8;a=u},d:function(){return 4294967295^a}}}(),i=n.length;t.p(n);var r,s=Zf(n,e,10+((r=e).filename&&r.filename.length+1||0),8),o=s.length;return function(a,l){var u=l.filename;if(a[0]=31,a[1]=139,a[2]=8,a[8]=l.level<2?4:l.level==9?2:0,a[9]=3,l.mtime!=0&&fo(a,4,Math.floor(new Date(l.mtime||Date.now())/1e3)),u){a[3]=8;for(var c=0;c<=u.length;++c)a[c+10]=u.charCodeAt(c)}}(s,e),fo(s,o-8,t.d()),fo(s,o-4,i),s}var th=!!_o||!!yo,Su="text/plain",Gr=function(n,e){var t=Ie(n.split("?"),2),i=t[0],r=t[1],s=C({},e);r?.split("&").forEach(function(a){var l=Ie(a.split("="),1)[0];delete s[l]});var o=hf(s);return o=o?(r?r+"&":"")+o:r,"".concat(i,"?").concat(o)},nh=function(n){return"data="+encodeURIComponent(typeof n=="string"?n:JSON.stringify(n))},ho=function(n){var e=n.data,t=n.compression;if(e){if(t===Qe.GZipJS){var i=eh(function(s,o){var a=s.length;if(!o&&typeof TextEncoder<"u")return new TextEncoder().encode(s);for(var l=new Ue(s.length+(s.length>>>1)),u=0,c=function(g){l[u++]=g},p=0;p<a;++p){if(u+5>l.length){var f=new Ue(u+8+(a-p<<1));f.set(l),l=f}var d=s.charCodeAt(p);d<128||o?c(d):d<2048?(c(192|d>>>6),c(128|63&d)):d>55295&&d<57344?(c(240|(d=65536+(1047552&d)|1023&s.charCodeAt(++p))>>>18),c(128|d>>>12&63),c(128|d>>>6&63),c(128|63&d)):(c(224|d>>>12),c(128|d>>>6&63),c(128|63&d))}return gc(l,0,u)}(JSON.stringify(e)),{mtime:0});return{contentType:Su,body:new Blob([i],{type:Su})}}if(t===Qe.Base64){var r=function(s){var o,a,l,u,c,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f=0,d=0,g="",v=[];if(!s)return s;s=Qp(s);do o=(c=s.charCodeAt(f++)<<16|s.charCodeAt(f++)<<8|s.charCodeAt(f++))>>18&63,a=c>>12&63,l=c>>6&63,u=63&c,v[d++]=p.charAt(o)+p.charAt(a)+p.charAt(l)+p.charAt(u);while(f<s.length);switch(g=v.join(""),s.length%3){case 1:g=g.slice(0,-2)+"==";break;case 2:g=g.slice(0,-1)+"="}return g}(JSON.stringify(e));return{contentType:"application/x-www-form-urlencoded",body:nh(r)}}return{contentType:"application/json",body:JSON.stringify(e)}}},Si=[];_o&&Si.push({transport:"XHR",method:function(n){var e,t=new _o;t.open(n.method||"GET",n.url,!0);var i=(e=ho(n))!==null&&e!==void 0?e:{},r=i.contentType,s=i.body;X(n.headers,function(o,a){t.setRequestHeader(a,o)}),r&&t.setRequestHeader("Content-Type",r),n.timeout&&(t.timeout=n.timeout),t.withCredentials=!0,t.onreadystatechange=function(){if(t.readyState===4){var o,a={statusCode:t.status,text:t.responseText};if(t.status===200)try{a.json=JSON.parse(t.responseText)}catch{}(o=n.callback)===null||o===void 0||o.call(n,a)}},t.send(s)}}),yo&&Si.push({transport:"fetch",method:function(n){var e,t,i=(e=ho(n))!==null&&e!==void 0?e:{},r=i.contentType,s=i.body,o=new Headers;X(o,function(c,p){o.append(p,c)}),r&&o.append("Content-Type",r);var a=n.url,l=null;if(Xl){var u=new Xl;l={signal:u.signal,timeout:setTimeout(function(){return u.abort()},n.timeout)}}yo(a,{method:n?.method||"GET",headers:o,keepalive:n.method==="POST",body:s,signal:(t=l)===null||t===void 0?void 0:t.signal}).then(function(c){return c.text().then(function(p){var f,d={statusCode:c.status,text:p};if(c.status===200)try{d.json=JSON.parse(p)}catch(g){x.error(g)}(f=n.callback)===null||f===void 0||f.call(n,d)})}).catch(function(c){var p;x.error(c),(p=n.callback)===null||p===void 0||p.call(n,{statusCode:0,text:c})}).finally(function(){return l?clearTimeout(l.timeout):null})}}),vt!=null&&vt.sendBeacon&&Si.push({transport:"sendBeacon",method:function(n){var e=Gr(n.url,{beacon:"1"});try{var t,i=(t=ho(n))!==null&&t!==void 0?t:{},r=i.contentType,s=i.body,o=typeof s=="string"?new Blob([s],{type:r}):s;vt.sendBeacon(e,o)}catch{}}});var ih=["retriesPerformedSoFar"],tn,rh=function(){function n(e){var t=this;H(this,n),y(this,"isPolling",!1),y(this,"pollIntervalMs",3e3),y(this,"queue",[]),this.instance=e,this.queue=[],this.areWeOnline=!0,!M(m)&&"onLine"in m.navigator&&(this.areWeOnline=m.navigator.onLine,m.addEventListener("online",function(){t.areWeOnline=!0,t.flush()}),m.addEventListener("offline",function(){t.areWeOnline=!1}))}return W(n,[{key:"retriableRequest",value:function(e){var t=this,i=e.retriesPerformedSoFar,r=Vp(e,ih);at(i)&&i>0&&(r.url=Gr(r.url,{retry_count:i})),this.instance._send_request(C(C({},r),{},{callback:function(s){var o;s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(i??0)<10?t.enqueue(C({retriesPerformedSoFar:i},r)):(o=r.callback)===null||o===void 0||o.call(r,s)}}))}},{key:"enqueue",value:function(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var i=function(o){var a=3e3*Math.pow(2,o),l=a/2,u=Math.min(18e5,a),c=(Math.random()-.5)*(u-l);return Math.ceil(u+c)}(t),r=Date.now()+i;this.queue.push({retryAt:r,requestOptions:e});var s="Enqueued failed request for retry in ".concat(i);navigator.onLine||(s+=" (Browser is offline)"),x.warn(s),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var e=this;this.poller&&clearTimeout(this.poller),this.poller=setTimeout(function(){e.areWeOnline&&e.queue.length>0&&e.flush(),e.poll()},this.pollIntervalMs)}},{key:"flush",value:function(){var e=Date.now(),t=[],i=this.queue.filter(function(a){return a.retryAt<e||(t.push(a),!1)});if(this.queue=t,i.length>0){var r,s=tt(i);try{for(s.s();!(r=s.n()).done;){var o=r.value.requestOptions;this.retriableRequest(o)}}catch(a){s.e(a)}finally{s.f()}}}},{key:"unload",value:function(){this.poller&&(clearTimeout(this.poller),this.poller=void 0);var e,t=tt(this.queue);try{for(t.s();!(e=t.n()).done;){var i=e.value.requestOptions;try{this.instance._send_request(C(C({},i),{},{transport:"sendBeacon"}))}catch(r){x.error(r)}}}catch(r){t.e(r)}finally{t.f()}this.queue=[]}}]),n}(),Ir=1800,sh=function(){function n(e,t,i,r){H(this,n),y(this,"_sessionIdChangedHandlers",[]),this.config=e,this.persistence=t,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=i||Lt,this._windowIdGenerator=r||Lt;var s=e.persistence_name||e.token,o=e.session_idle_timeout_seconds||Ir;if(at(o)?o>Ir?x.warn("session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):o<60&&x.warn("session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."):(x.warn("session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),o=Ir),this._sessionTimeoutMs=1e3*Math.min(Math.max(o,60),Ir),this._window_id_storage_key="ph_"+s+"_window_id",this._primary_window_exists_storage_key="ph_"+s+"_primary_window_exists",this._canUseSessionStorage()){var a=xe.parse(this._window_id_storage_key),l=xe.parse(this._primary_window_exists_storage_key);a&&!l?this._windowId=a:xe.remove(this._window_id_storage_key),xe.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return W(n,[{key:"onSessionId",value:function(e){var t=this;return M(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),function(){t._sessionIdChangedHandlers=t._sessionIdChangedHandlers.filter(function(i){return i!==e})}}},{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&xe.is_supported()}},{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&xe.set(this._window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?xe.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(e,t,i){e===this._sessionId&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register(y({},Lr,[t,e,i])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[Lr];return de(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var e=this;m?.addEventListener("beforeunload",function(){e._canUseSessionStorage()&&xe.remove(e._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),i=Ie(this._getSessionId(),3),r=i[0],s=i[1],o=i[2],a=this._getWindowId(),l=o&&o>0&&Math.abs(t-o)>864e5,u=!1,c=!s,p=!e&&Math.abs(t-r)>this._sessionTimeoutMs;c||p||l?(s=this._sessionIdGenerator(),a=this._windowIdGenerator(),x.info("[SessionId] new session ID generated",{sessionId:s,windowId:a,changeReason:{noSessionId:c,activityTimeout:p,sessionPastMaximumLength:l}}),o=t,u=!0):a||(a=this._windowIdGenerator(),u=!0);var f=r===0||!e||l?t:r,d=o===0?new Date().getTime():o;return this._setWindowId(a),this._setSessionId(s,f,d),u&&this._sessionIdChangedHandlers.forEach(function(g){return g(s,a)}),{sessionId:s,windowId:a,sessionStartTimestamp:d}}}]),n}();(function(n){n.US="us",n.EU="eu",n.CUSTOM="custom"})(tn||(tn={}));var Eu="i.posthog.com",oh=function(){function n(e){H(this,n),y(this,"_regionCache",{}),this.instance=e}return W(n,[{key:"apiHost",get:function(){return this.instance.config.api_host.trim().replace(/\/$/,"")}},{key:"uiHost",get:function(){var e,t=(e=this.instance.config.ui_host)===null||e===void 0?void 0:e.replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.posthog.com":t}},{key:"region",get:function(){return this._regionCache[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=tn.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=tn.EU:this._regionCache[this.apiHost]=tn.CUSTOM),this._regionCache[this.apiHost]}},{key:"endpointFor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t&&(t=t[0]==="/"?t:"/".concat(t)),e==="ui")return(this.uiHost||this.apiHost.replace(".".concat(Eu),".posthog.com"))+t;if(this.region===tn.CUSTOM)return this.apiHost+t;var i=Eu+t;switch(e){case"assets":return"https://".concat(this.region,"-assets.").concat(i);case"api":return"https://".concat(this.region,".").concat(i)}}}]),n}(),vc="posthog-js";function mc(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.organization,i=e.projectId,r=e.prefix,s=e.severityAllowList,o=s===void 0?["error"]:s;return function(a){var l,u,c,p,f;if(!(o==="*"||o.includes(a.level))||!n.__loaded)return a;a.tags||(a.tags={});var d=n.requestRouter.endpointFor("ui","/project/".concat(n.config.token,"/person/").concat(n.get_distinct_id()));a.tags["PostHog Person URL"]=d,n.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=n.get_session_replay_url({withTimestamp:!0}));var g=((l=a.exception)===null||l===void 0?void 0:l.values)||[],v={$exception_message:((u=g[0])===null||u===void 0?void 0:u.value)||a.message,$exception_type:(c=g[0])===null||c===void 0?void 0:c.type,$exception_personURL:d,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((p=g[0])===null||p===void 0?void 0:p.value)||a.message,$sentry_exception_type:(f=g[0])===null||f===void 0?void 0:f.type,$sentry_tags:a.tags,$level:a.level};return t&&i&&(v.$sentry_url=(r||"https://sentry.io/organizations/")+t+"/issues/?project="+i+"&query="+a.event_id),n.capture("$exception",v),a}}var ah=W(function n(e,t,i,r,s){H(this,n),this.name=vc,this.setupOnce=function(o){o(mc(e,{organization:t,projectId:i,prefix:r,severityAllowList:s}))}});function lh(n,e){var t=n.config.segment;if(!t)return e();(function(i,r){var s=i.config.segment;if(!s)return r();var o=function(l){var u=function(){return l.anonymousId()||Lt()};i.config.get_device_id=u,l.id()&&(i.register({distinct_id:l.id(),$device_id:u()}),i.persistence.set_property(ht,"identified")),r()},a=s.user();"then"in a&&et(a.then)?a.then(function(l){return o(l)}):o(a)})(n,function(){t.register(function(i){Promise&&Promise.resolve||x.warn("This browser does not have Promise support, and can not use the segment integration");var r=function(s,o){var a;if(!o)return s;s.event.userId||s.event.anonymousId===i.get_distinct_id()||i.reset(),s.event.userId&&s.event.userId!==i.get_distinct_id()&&(i.register({distinct_id:s.event.userId}),i.reloadFeatureFlags());var l=i._calculate_event_properties(o,(a=s.event.properties)!==null&&a!==void 0?a:{});return s.event.properties=Object.assign({},l,s.event.properties),s};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(s){return r(s,s.event.event)},page:function(s){return r(s,"$pageview")},identify:function(s){return r(s,"$identify")},screen:function(s){return r(s,"$screen")}}}(n)).then(function(){e()})})}var uh=function(){function n(e){H(this,n),this._instance=e}return W(n,[{key:"doPageView",value:function(){var e,t=this._previousScrollProperties();return this._currentPath=(e=m?.location.pathname)!==null&&e!==void 0?e:"",this._instance.scrollManager.resetContext(),t}},{key:"doPageLeave",value:function(){return this._previousScrollProperties()}},{key:"_previousScrollProperties",value:function(){var e=this._currentPath,t=this._instance.scrollManager.getContext();if(!e||!t)return{};var i=t.maxScrollHeight,r=t.lastScrollY,s=t.maxScrollY,o=t.maxContentHeight,a=t.lastContentY,l=t.maxContentY;return M(i)||M(r)||M(s)||M(o)||M(a)||M(l)?{}:(i=Math.ceil(i),r=Math.ceil(r),s=Math.ceil(s),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),{$prev_pageview_pathname:e,$prev_pageview_last_scroll:r,$prev_pageview_last_scroll_percentage:i<=1?1:Tr(r/i,0,1),$prev_pageview_max_scroll:s,$prev_pageview_max_scroll_percentage:i<=1?1:Tr(s/i,0,1),$prev_pageview_last_content:a,$prev_pageview_last_content_percentage:o<=1?1:Tr(a/o,0,1),$prev_pageview_max_content:l,$prev_pageview_max_content_percentage:o<=1?1:Tr(l/o,0,1)})}}]),n}();function Tr(n,e,t){return Math.max(e,Math.min(n,t))}var $u=function(){function n(e){H(this,n),this.persistence=e,this.eventRegistry=new Map}return W(n,[{key:"register",value:function(e){var t=this;e.forEach(function(i){var r,s,o,a,l;(r=i.conditions)!==null&&r!==void 0&&r.events&&(s=i.conditions)!==null&&s!==void 0&&(o=s.events)!==null&&o!==void 0&&o.values&&((a=i.conditions)===null||a===void 0?void 0:a.events.values.length)>0&&t.eventRegistry.set(i.id,(l=i.conditions)===null||l===void 0?void 0:l.events.values.map(function(u){return u.name}))})}},{key:"on",value:function(e){var t,i=[];this.eventRegistry.forEach(function(o,a){o.includes(e)&&i.push(a)});var r=(t=this.persistence)===null||t===void 0?void 0:t.props[so],s=(r||[]).concat(i);this._saveSurveysToStorage(s)}},{key:"getSurveys",value:function(){var e,t=(e=this.persistence)===null||e===void 0?void 0:e.props[so];return t||[]}},{key:"getEventRegistry",value:function(){return this.eventRegistry}},{key:"_saveSurveysToStorage",value:function(e){var t;(t=this.persistence)===null||t===void 0||t.register(y({},so,nn(new Set(e))))}}]),n}(),ch={icontains:function(n){return!!m&&m.location.href.toLowerCase().indexOf(n.toLowerCase())>-1},regex:function(n){return!!m&&ff(m.location.href,n)},exact:function(n){return m?.location.href===n}},ph=function(){function n(e){H(this,n),this.instance=e,this._surveyEventReceiver=null}return W(n,[{key:"afterDecideResponse",value:function(e){this._decideServerResponse=!!e.surveys,this.loadIfEnabled()}},{key:"loadIfEnabled",value:function(){var e=this,t=he?.extendPostHogWithSurveys;this.instance.config.disable_surveys||!this._decideServerResponse||t||(this._surveyEventReceiver==null&&(this._surveyEventReceiver=new $u(this.instance.persistence)),Mn(this.instance.requestRouter.endpointFor("assets","/static/surveys.js"),function(i){if(i)return x.error("Could not load surveys script",i);he.extendPostHogWithSurveys(e.instance)}))}},{key:"getSurveys",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(this.instance.config.disable_surveys)return e([]);this._surveyEventReceiver==null&&(this._surveyEventReceiver=new $u(this.instance.persistence));var r=this.instance.get_property(Eo);if(r&&!i)return e(r);this.instance._send_request({url:this.instance.requestRouter.endpointFor("api","/api/surveys/?token=".concat(this.instance.config.token)),method:"GET",transport:"XHR",callback:function(s){var o;if(s.statusCode!==200||!s.json)return e([]);var a=s.json.surveys||[],l=a.filter(function(c){var p,f,d,g,v,k;return((p=c.conditions)===null||p===void 0?void 0:p.events)&&((f=c.conditions)===null||f===void 0||(d=f.events)===null||d===void 0?void 0:d.values)&&((g=c.conditions)===null||g===void 0||(v=g.events)===null||v===void 0||(k=v.values)===null||k===void 0?void 0:k.length)>0});if(l.length>0&&!M(t.instance._addCaptureHook)){var u;(u=t._surveyEventReceiver)===null||u===void 0||u.register(l),t.instance._addCaptureHook(function(c){var p;(p=t._surveyEventReceiver)===null||p===void 0||p.on(c)})}return(o=t.instance.persistence)===null||o===void 0||o.register(y({},Eo,a)),e(a)}})}},{key:"getActiveMatchingSurveys",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(function(r){var s,o=r.filter(function(u){return!(!u.start_date||u.end_date)}).filter(function(u){var c,p,f,d;if(!u.conditions)return!0;var g=(c=u.conditions)===null||c===void 0||!c.url||ch[(p=(f=u.conditions)===null||f===void 0?void 0:f.urlMatchType)!==null&&p!==void 0?p:"icontains"](u.conditions.url),v=(d=u.conditions)===null||d===void 0||!d.selector||A?.querySelector(u.conditions.selector);return g&&v}),a=(s=t._surveyEventReceiver)===null||s===void 0?void 0:s.getSurveys(),l=o.filter(function(u){var c,p,f,d,g;if(!u.linked_flag_key&&!u.targeting_flag_key&&!u.internal_targeting_flag_key)return!0;var v=!u.linked_flag_key||t.instance.featureFlags.isFeatureEnabled(u.linked_flag_key),k=!u.targeting_flag_key||t.instance.featureFlags.isFeatureEnabled(u.targeting_flag_key),L=!u.internal_targeting_flag_key||t.instance.featureFlags.isFeatureEnabled(u.internal_targeting_flag_key),E=!(!((c=u.conditions)===null||c===void 0)&&c.events&&(!((p=u.conditions)===null||p===void 0||(f=p.events)===null||f===void 0)&&f.values)&&((d=u.conditions)===null||d===void 0||(g=d.events)===null||g===void 0?void 0:g.values.length)>0)||a?.includes(u.id);return v&&k&&L&&E});return e(l)},i)}}]),n}(),fh=function(){function n(e){var t,i,r=this;H(this,n),y(this,"serverLimits",{}),y(this,"lastEventRateLimited",!1),y(this,"checkForLimiting",function(s){var o=s.text;if(o&&o.length)try{(JSON.parse(o).quota_limited||[]).forEach(function(a){x.info("[RateLimiter] ".concat(a||"events"," is quota limited.")),r.serverLimits[a]=new Date().getTime()+6e4})}catch(a){return void x.warn('[RateLimiter] could not rate limit - continuing. Error: "'.concat(a?.message,'"'),{text:o})}}),this.instance=e,this.captureEventsPerSecond=((t=e.config.rate_limiting)===null||t===void 0?void 0:t.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((i=e.config.rate_limiting)===null||i===void 0?void 0:i.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}return W(n,[{key:"clientRateLimitContext",value:function(){var e,t,i,r=arguments.length>0&&arguments[0]!==void 0&&arguments[0],s=new Date().getTime(),o=(e=(t=this.instance.persistence)===null||t===void 0?void 0:t.get_property(Co))!==null&&e!==void 0?e:{tokens:this.captureEventsBurstLimit,last:s};o.tokens+=(s-o.last)/1e3*this.captureEventsPerSecond,o.last=s,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);var a=o.tokens<1;return a||r||(o.tokens=Math.max(0,o.tokens-1)),!a||this.lastEventRateLimited||r||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to ".concat(this.captureEventsPerSecond," events per second and ").concat(this.captureEventsBurstLimit," events burst limit.")},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=a,(i=this.instance.persistence)===null||i===void 0||i.set_property(Co,o),{isRateLimited:a,remainingTokens:o.tokens}}},{key:"isServerRateLimited",value:function(e){var t=this.serverLimits[e||"events"]||!1;return t!==!1&&new Date().getTime()<t}}]),n}(),hh=function(){return C({initialPathName:De?.pathname||"",referringDomain:_e.referringDomain()},_e.campaignParams())},dh=function(){function n(e,t,i){var r=this;H(this,n),y(this,"_onSessionIdCallback",function(s){var o=r._getStoredProps();if(!o||o.sessionId!==s){var a={sessionId:s,props:r._sessionSourceParamGenerator()};r._persistence.register(y({},$o,a))}}),this._sessionIdManager=e,this._persistence=t,this._sessionSourceParamGenerator=i||hh,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}return W(n,[{key:"_getStoredProps",value:function(){return this._persistence.props[$o]}},{key:"getSessionProps",value:function(){var e,t=(e=this._getStoredProps())===null||e===void 0?void 0:e.props;return t?{$client_session_initial_referring_host:t.referringDomain,$client_session_initial_pathname:t.initialPathName,$client_session_initial_utm_source:t.utm_source,$client_session_initial_utm_campaign:t.utm_campaign,$client_session_initial_utm_medium:t.utm_medium,$client_session_initial_utm_content:t.utm_content,$client_session_initial_utm_term:t.utm_term}:{}}}]),n}(),gh=["ahrefsbot","ahrefssiteaudit","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","deepscan","duckduckbot","facebookexternal","facebookcatalog","gptbot","http://yandex.com/bots","hubspot","ia_archiver","linkedinbot","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","slurp","turnitin","twitterbot","vercelbot","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google","Bytespider;"],Cu=function(n,e){if(!n)return!1;var t=n.toLowerCase();return gh.concat(e||[]).some(function(i){var r=i.toLowerCase();return t.indexOf(r)!==-1})},yc=function(){function n(){H(this,n),this.clicks=[]}return W(n,[{key:"isRageClick",value:function(e,t,i){var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<30&&i-r.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}]),n}();function Au(n){var e;return n.id===To||!((e=n.closest)===null||e===void 0||!e.call(n,"#"+To))}var vh=function(){function n(e){var t;H(this,n),y(this,"rageclicks",new yc),y(this,"_enabledServerSide",!1),y(this,"_initialized",!1),this.instance=e,this._enabledServerSide=!((t=this.instance.persistence)===null||t===void 0||!t.props[xo])}return W(n,[{key:"startIfEnabled",value:function(){this.isEnabled&&!this._initialized&&(x.info("[heatmaps] Heatmaps enabled, starting..."),this._setupListeners())}},{key:"isEnabled",get:function(){return M(this.instance.config.enable_heatmaps)?this._enabledServerSide:this.instance.config.enable_heatmaps}},{key:"afterDecideResponse",value:function(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register(y({},xo,t)),this._enabledServerSide=t,this.startIfEnabled()}},{key:"getAndClearBuffer",value:function(){var e=this.buffer;return this.buffer=void 0,e}},{key:"_setupListeners",value:function(){var e=this;m&&A&&(gt(A,"click",function(t){return e._onClick(t||m?.event)},!1,!0),gt(A,"mousemove",function(t){return e._onMouseMove(t||m?.event)},!1,!0),this._initialized=!0)}},{key:"_getProperties",value:function(e,t){var i=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),o=function(a,l,u){for(var c=a;c&&!qt(c,"body");){if(c===u)return!1;if(N(l,m?.getComputedStyle(c).position))return!0;c=oc(c)}return!1}(e.target,["fixed","sticky"],s);return{x:e.clientX+(o?0:r),y:e.clientY+(o?0:i),target_fixed:o,type:t}}},{key:"_onClick",value:function(e){var t;if(!Au(e.target)){var i=this._getProperties(e,"click");(t=this.rageclicks)!==null&&t!==void 0&&t.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._capture(C(C({},i),{},{type:"rageclick"})),this._capture(i)}}},{key:"_onMouseMove",value:function(e){var t=this;Au(e.target)||(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout(function(){t._capture(t._getProperties(e,"mousemove"))},500))}},{key:"_capture",value:function(e){if(m){var t=m.location.href;this.buffer=this.buffer||{},this.buffer[t]||(this.buffer[t]=[]),this.buffer[t].push(e)}}}]),n}(),mh=function(){function n(e){var t=this;H(this,n),y(this,"_updateScrollData",function(){var i,r,s,o;t.context||(t.context={});var a=t.scrollElement(),l=t.scrollY(),u=a?Math.max(0,a.scrollHeight-a.clientHeight):0,c=l+(a?.clientHeight||0),p=a?.scrollHeight||0;t.context.lastScrollY=Math.ceil(l),t.context.maxScrollY=Math.max(l,(i=t.context.maxScrollY)!==null&&i!==void 0?i:0),t.context.maxScrollHeight=Math.max(u,(r=t.context.maxScrollHeight)!==null&&r!==void 0?r:0),t.context.lastContentY=c,t.context.maxContentY=Math.max(c,(s=t.context.maxContentY)!==null&&s!==void 0?s:0),t.context.maxContentHeight=Math.max(p,(o=t.context.maxContentHeight)!==null&&o!==void 0?o:0)}),this.instance=e}return W(n,[{key:"getContext",value:function(){return this.context}},{key:"resetContext",value:function(){var e=this.context;return setTimeout(this._updateScrollData,0),e}},{key:"startMeasuringScrollPosition",value:function(){m?.addEventListener("scroll",this._updateScrollData,!0),m?.addEventListener("scrollend",this._updateScrollData,!0),m?.addEventListener("resize",this._updateScrollData)}},{key:"scrollElement",value:function(){if(!this.instance.config.scroll_root_selector)return m?.document.documentElement;var e,t=tt(de(this.instance.config.scroll_root_selector)?this.instance.config.scroll_root_selector:[this.instance.config.scroll_root_selector]);try{for(t.s();!(e=t.n()).done;){var i=e.value,r=m?.document.querySelector(i);if(r)return r}}catch(s){t.e(s)}finally{t.f()}}},{key:"scrollY",value:function(){if(this.instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return m&&(m.scrollY||m.pageYOffset||m.document.documentElement.scrollTop)||0}},{key:"scrollX",value:function(){if(this.instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return m&&(m.scrollX||m.pageXOffset||m.document.documentElement.scrollLeft)||0}}]),n}(),yh=function(){function n(){H(this,n),y(this,"events",{}),this.events={}}return W(n,[{key:"on",value:function(e,t){var i=this;return this.events[e]||(this.events[e]=[]),this.events[e].push(t),function(){i.events[e]=i.events[e].filter(function(r){return r!==t})}}},{key:"emit",value:function(e,t){var i,r=tt(this.events[e]||[]);try{for(r.s();!(i=r.n()).done;)(0,i.value)(t)}catch(a){r.e(a)}finally{r.f()}var s,o=tt(this.events["*"]||[]);try{for(o.s();!(s=o.n()).done;)(0,s.value)(e,t)}catch(a){o.e(a)}finally{o.f()}}}]),n}(),go="$copy_autocapture";function vo(n,e){return e.length>n?e.slice(0,n)+"...":e}var Mt,_h=function(){function n(e){H(this,n),y(this,"_initialized",!1),y(this,"_isDisabledServerSide",null),y(this,"rageclicks",new yc),y(this,"_elementsChainAsString",!1),this.instance=e}return W(n,[{key:"config",get:function(){var e,t=Ze(this.instance.config.autocapture)?this.instance.config.autocapture:{};return t.url_allowlist=(e=t.url_allowlist)===null||e===void 0?void 0:e.map(function(i){return new RegExp(i)}),t}},{key:"_addDomEventHandlers",value:function(){var e=this;if(this.isBrowserSupported()){if(m&&A){var t=function(r){r=r||m?.event;try{e._captureEvent(r)}catch(s){x.error("Failed to capture event",s)}},i=function(r){r=r||m?.event,e._captureEvent(r,go)};gt(A,"submit",t,!1,!0),gt(A,"change",t,!1,!0),gt(A,"click",t,!1,!0),this.config.capture_copied_text&&(gt(A,"copy",i,!1,!0),gt(A,"cut",i,!1,!0))}}else x.info("Disabling Automatic Event Collection because this browser is not supported")}},{key:"startIfEnabled",value:function(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)}},{key:"afterDecideResponse",value:function(e){e.elementsChainAsString&&(this._elementsChainAsString=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register(y({},Kl,!!e.autocapture_opt_out)),this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()}},{key:"isEnabled",get:function(){var e,t,i=(e=this.instance.persistence)===null||e===void 0?void 0:e.props[Kl],r=this._isDisabledServerSide;if(_t(r)&&!Rr(i)&&!this.instance.config.advanced_disable_decide)return!1;var s=(t=this._isDisabledServerSide)!==null&&t!==void 0?t:!!i;return!!this.instance.config.autocapture&&!s}},{key:"_previousElementSibling",value:function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Go(t));return t}},{key:"_getAugmentPropertiesFromElement",value:function(e){if(!Mo(e))return{};var t={};return X(e.attributes,function(i){if(i.name&&i.name.indexOf("data-ph-capture-attribute")===0){var r=i.name.replace("data-ph-capture-attribute-",""),s=i.value;r&&s&&Fn(s)&&(t[r]=s)}}),t}},{key:"_getPropertiesFromElement",value:function(e,t,i){var r,s=e.tagName.toLowerCase(),o={tag_name:s};Fo.indexOf(s)>-1&&!i&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?o.$el_text=vo(1024,hu(e)):o.$el_text=vo(1024,zr(e)));var a=Br(e);a.length>0&&(o.classes=a.filter(function(f){return f!==""}));var l=(r=this.config)===null||r===void 0?void 0:r.element_attribute_ignorelist;X(e.attributes,function(f){var d;if((!ac(e)||["name","id","class","aria-label"].indexOf(f.name)!==-1)&&(l==null||!l.includes(f.name))&&!t&&Fn(f.value)&&(d=f.name,!Re(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var g=f.value;f.name==="class"&&(g=Wo(g).join(" ")),o["attr__"+f.name]=vo(1024,g)}});for(var u=1,c=1,p=e;p=this._previousElementSibling(p);)u++,p.tagName===e.tagName&&c++;return o.nth_child=u,o.nth_of_type=c,o}},{key:"_getDefaultProperties",value:function(e){return{$event_type:e,$ce_version:1}}},{key:"_getEventTarget",value:function(e){return M(e.target)?e.srcElement||null:(t=e.target)!==null&&t!==void 0&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}},{key:"_captureEvent",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$autocapture";if(this.isEnabled){var r,s=this._getEventTarget(e);rc(s)&&(s=s.parentNode||null),i==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!==null&&r!==void 0&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._captureEvent(e,"$rageclick");var o=i===go;if(s&&Cf(s,e,this.config,o,o?["copy","cut"]:void 0)){for(var a,l,u=[s],c=s;c.parentNode&&!qt(c,"body");)sc(c.parentNode)?(u.push(c.parentNode.host),c=c.parentNode.host):(u.push(c.parentNode),c=c.parentNode);var p,f=[],d={},g=!1;if(X(u,function(F){var U=Mo(F);F.tagName.toLowerCase()==="a"&&(p=F.getAttribute("href"),p=U&&Fn(p)&&p),N(Br(F),"ph-no-capture")&&(g=!0),f.push(t._getPropertiesFromElement(F,t.instance.config.mask_all_element_attributes,t.instance.config.mask_all_text));var G=t._getAugmentPropertiesFromElement(F);Te(d,G)}),this.instance.config.mask_all_text||(s.tagName.toLowerCase()==="a"||s.tagName.toLowerCase()==="button"?f[0].$el_text=hu(s):f[0].$el_text=zr(s)),p&&(f[0].attr__href=p),g)return!1;var v=Te(this._getDefaultProperties(e.type),this._elementsChainAsString?{$elements_chain:Pf(f)}:{$elements:f},(a=f[0])!==null&&a!==void 0&&a.$el_text?{$el_text:(l=f[0])===null||l===void 0?void 0:l.$el_text}:{},d);if(i===go){var k,L=ic(m==null||(k=m.getSelection())===null||k===void 0?void 0:k.toString()),E=e.type||"clipboard";if(!L)return!1;v.$selected_content=L,v.$copy_type=E}return this.instance.capture(i,v),!0}}}},{key:"isBrowserSupported",value:function(){return et(A?.querySelectorAll)}}]),n}(),bh=function(){function n(e){var t=this;H(this,n),y(this,"_restoreXHRPatch",void 0),y(this,"_restoreFetchPatch",void 0),y(this,"_startCapturing",function(){M(t._restoreXHRPatch)&&he.postHogTracingHeadersPatchFns._patchXHR(t.instance.sessionManager),M(t._restoreFetchPatch)&&he.postHogTracingHeadersPatchFns._patchFetch(t.instance.sessionManager)}),this.instance=e}return W(n,[{key:"_loadScript",value:function(e){he.postHogTracingHeadersPatchFns&&e(),Mn(this.instance.requestRouter.endpointFor("assets","/static/tracing-headers.js?v=".concat(Dt.LIB_VERSION)),function(t){t&&x.error("[TRACING-HEADERS] failed to load script",t),e()})}},{key:"startIfEnabledOrStop",value:function(){var e,t;this.instance.config.__add_tracing_headers?this._loadScript(this._startCapturing):((e=this._restoreXHRPatch)===null||e===void 0||e.call(this),(t=this._restoreFetchPatch)===null||t===void 0||t.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)}}]),n}();(function(n){n[n.PENDING=-1]="PENDING",n[n.DENIED=0]="DENIED",n[n.GRANTED=1]="GRANTED"})(Mt||(Mt={}));var wh=function(){function n(e){H(this,n),this.instance=e}return W(n,[{key:"config",get:function(){return this.instance.config}},{key:"consent",get:function(){return this.getDnt()?Mt.DENIED:this.storedConsent}},{key:"isOptedOut",value:function(){return this.consent===Mt.DENIED||this.consent===Mt.PENDING&&this.config.opt_out_capturing_by_default}},{key:"isOptedIn",value:function(){return!this.isOptedOut()}},{key:"optInOut",value:function(e){this.storage.set(this.storageKey,e?1:0,this.config.cookie_expiration,this.config.cross_subdomain_cookie,this.config.secure_cookie)}},{key:"reset",value:function(){this.storage.remove(this.storageKey,this.config.cross_subdomain_cookie)}},{key:"storageKey",get:function(){var e=this.instance.config,t=e.token;return(e.opt_out_capturing_cookie_prefix||"__ph_opt_in_out_")+t}},{key:"storedConsent",get:function(){var e=this.storage.get(this.storageKey);return e==="1"?Mt.GRANTED:e==="0"?Mt.DENIED:Mt.PENDING}},{key:"storage",get:function(){if(!this._storage){var e=this.config.opt_out_capturing_persistence_type;this._storage=e==="localStorage"?fe:yt;var t=e==="localStorage"?yt:fe;t.get(this.storageKey)&&(this._storage.get(this.storageKey)||this.optInOut(t.get(this.storageKey)==="1"),t.remove(this.storageKey,this.config.cross_subdomain_cookie))}return this._storage}},{key:"getDnt",value:function(){return!!this.config.respect_dnt&&!!qu([vt?.doNotTrack,vt?.msDoNotTrack,he.doNotTrack],function(e){return N([!0,1,"1","yes"],e)})}}]),n}(),Ei={},Iu=function(){},An="posthog",_c=!th&&se?.indexOf("MSIE")===-1&&se?.indexOf("Mozilla")===-1,Tu=function(){var n,e,t;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(e=A?.location,t=e?.hostname,!!Re(t)&&t.split(".").slice(-2).join(".")!=="herokuapp.com"),persistence:"localStorage+cookie",persistence_name:"",loaded:Iu,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:"if_capture_pageview",debug:De&&Re(De?.search)&&De.search.indexOf("__posthog_debug=true")!==-1||!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_surveys:!1,enable_recording_console_log:void 0,secure_cookie:(m==null||(n=m.location)===null||n===void 0?void 0:n.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,on_request_error:function(i){var r="Bad HTTP status: "+i.statusCode+" "+i.text;x.error(r)},get_device_id:function(i){return i},_onCapture:Iu,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"always",__add_tracing_headers:!1}},Ru=function(n){var e={};M(n.process_person)||(e.person_profiles=n.process_person),M(n.xhr_headers)||(e.request_headers=n.xhr_headers),M(n.cookie_name)||(e.persistence_name=n.cookie_name),M(n.disable_cookie)||(e.disable_persistence=n.disable_cookie);var t=Te({},e,n);return de(n.property_blacklist)&&(M(n.property_denylist)?t.property_denylist=n.property_blacklist:de(n.property_denylist)?t.property_denylist=[].concat(nn(n.property_blacklist),nn(n.property_denylist)):x.error("Invalid value for property_denylist config: "+n.property_denylist)),t},xh=function(){function n(){H(this,n),y(this,"__forceAllowLocalhost",!1)}return W(n,[{key:"_forceAllowLocalhost",get:function(){return this.__forceAllowLocalhost},set:function(e){x.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}]),n}(),bc=function(){function n(){var e=this;H(this,n),y(this,"webPerformance",new xh),y(this,"_debugEventEmitter",new yh),this.config=Tu(),this.decideEndpointWasHit=!1,this.SentryIntegration=ah,this.sentryIntegration=function(t){return function(i,r){var s=mc(i,r);return{name:vc,processEvent:function(o){return s(o)}}}(e,t)},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.featureFlags=new ef(this),this.toolbar=new Hf(this),this.scrollManager=new mh(this),this.pageViewManager=new uh(this),this.surveys=new ph(this),this.rateLimiter=new fh(this),this.requestRouter=new oh(this),this.consent=new wh(this),this.people={set:function(t,i,r){var s=Re(t)?y({},t,i):t;e.setPersonProperties(s),r?.({})},set_once:function(t,i,r){var s=Re(t)?y({},t,i):t;e.setPersonProperties(void 0,s),r?.({})}},this.on("eventCaptured",function(t){return x.info("send",t)})}return W(n,[{key:"init",value:function(e,t,i){if(i&&i!==An){var r,s=(r=Ei[i])!==null&&r!==void 0?r:new n;return s._init(e,t,i),Ei[i]=s,Ei[An][i]=s,s}return this._init(e,t,i)}},{key:"_init",value:function(e){var t,i,r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(M(e)||function(k){return Re(k)&&k.trim().length===0}(e))return x.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return x.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;if(this.__loaded=!0,this.config={},this._triggered_notifs=[],this.set_config(Te({},Tu(),Ru(s),{name:o,token:e})),this.compression=s.disable_compression?void 0:Qe.Base64,this.persistence=new uo(this.config),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new uo(C(C({},this.config),{},{persistence:"sessionStorage"})),this._requestQueue=new Wf(function(k){return r._send_retriable_request(k)}),this._retryQueue=new rh(this),this.__request_queue=[],this.sessionManager=new sh(this.config,this.persistence),this.sessionPropsManager=new dh(this.sessionManager,this.persistence),new bh(this).startIfEnabledOrStop(),this.sessionRecording=new Uf(this),this.sessionRecording.startIfEnabledOrStop(),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new _h(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new vh(this),this.heatmaps.startIfEnabled(),Dt.DEBUG=Dt.DEBUG||this.config.debug,this._sync_opt_out_with_persistence(),((t=s.bootstrap)===null||t===void 0?void 0:t.distinctID)!==void 0){var a,l,u=this.config.get_device_id(Lt()),c=(a=s.bootstrap)!==null&&a!==void 0&&a.isIdentifiedID?u:s.bootstrap.distinctID;this.persistence.set_property(ht,(l=s.bootstrap)!==null&&l!==void 0&&l.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:c})}if(this._hasBootstrappedFeatureFlags()){var p,f,d=Object.keys(((p=s.bootstrap)===null||p===void 0?void 0:p.featureFlags)||{}).filter(function(k){var L,E;return!((L=s.bootstrap)===null||L===void 0||(E=L.featureFlags)===null||E===void 0||!E[k])}).reduce(function(k,L){var E,F;return k[L]=((E=s.bootstrap)===null||E===void 0||(F=E.featureFlags)===null||F===void 0?void 0:F[L])||!1,k},{}),g=Object.keys(((f=s.bootstrap)===null||f===void 0?void 0:f.featureFlagPayloads)||{}).filter(function(k){return d[k]}).reduce(function(k,L){var E,F,U,G;return(E=s.bootstrap)!==null&&E!==void 0&&(F=E.featureFlagPayloads)!==null&&F!==void 0&&F[L]&&(k[L]=(U=s.bootstrap)===null||U===void 0||(G=U.featureFlagPayloads)===null||G===void 0?void 0:G[L]),k},{});this.featureFlags.receivedFeatureFlags({featureFlags:d,featureFlagPayloads:g})}if(!this.get_distinct_id()){var v=this.config.get_device_id(Lt());this.register_once({distinct_id:v,$device_id:v},""),this.persistence.set_property(ht,"anonymous")}return m==null||(i=m.addEventListener)===null||i===void 0||i.call(m,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),this.toolbar.maybeLoadToolbar(),s.segment?lh(this,function(){return r._loaded()}):this._loaded(),et(this.config._onCapture)&&this.on("eventCaptured",function(k){return r.config._onCapture(k.event,k)}),this}},{key:"_afterDecideResponse",value:function(e){var t,i,r,s,o;this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=N(e.supportedCompression,Qe.GZipJS)?Qe.GZipJS:N(e.supportedCompression,Qe.Base64)?Qe.Base64:void 0),(t=e.analytics)!==null&&t!==void 0&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),(i=this.sessionRecording)===null||i===void 0||i.afterDecideResponse(e),(r=this.autocapture)===null||r===void 0||r.afterDecideResponse(e),(s=this.heatmaps)===null||s===void 0||s.afterDecideResponse(e),(o=this.surveys)===null||o===void 0||o.afterDecideResponse(e)}},{key:"_loaded",value:function(){var e=this,t=this.config.advanced_disable_decide;t||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(i){x.critical("`loaded` function failed",i)}this._start_queue_if_opted_in(),this.config.capture_pageview&&setTimeout(function(){A&&e.capture("$pageview",{title:A.title},{send_instantly:!0})},1),t||(new Bf(this).call(),this.featureFlags.resetRequestQueue())}},{key:"_start_queue_if_opted_in",value:function(){var e;this.has_opted_out_capturing()||this.config.request_batching&&((e=this._requestQueue)===null||e===void 0||e.enable())}},{key:"_dom_loaded",value:function(){var e=this;this.has_opted_out_capturing()||Rn(this.__request_queue,function(t){return e._send_retriable_request(t)}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_handle_unload",value:function(){var e,t;this.config.request_batching?(this._shouldCapturePageleave()&&this.capture("$pageleave"),(e=this._requestQueue)===null||e===void 0||e.unload(),(t=this._retryQueue)===null||t===void 0||t.unload()):this._shouldCapturePageleave()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_send_request",value:function(e){var t=this;this.__loaded&&(_c?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Gr(e.url,{ip:this.config.ip?1:0}),e.headers=this.config.request_headers,e.compression=e.compression==="best-available"?this.compression:e.compression,function(i){var r,s,o,a=C({},i);a.timeout=a.timeout||6e4,a.url=Gr(a.url,{_:new Date().getTime().toString(),ver:Dt.LIB_VERSION,compression:a.compression});var l=(r=a.transport)!==null&&r!==void 0?r:"XHR",u=(s=(o=qu(Si,function(c){return c.transport===l}))===null||o===void 0?void 0:o.method)!==null&&s!==void 0?s:Si[0].method;if(!u)throw new Error("No available transport method");u(a)}(C(C({},e),{},{callback:function(i){var r,s,o;t.rateLimiter.checkForLimiting(i),i.statusCode>=400&&((s=(o=t.config).on_request_error)===null||s===void 0||s.call(o,i)),(r=e.callback)===null||r===void 0||r.call(e,i)}}))))}},{key:"_send_retriable_request",value:function(e){this._retryQueue?this._retryQueue.retriableRequest(e):this._send_request(e)}},{key:"_execute_array",value:function(e){var t,i=this,r=[],s=[],o=[];Rn(e,function(l){l&&(t=l[0],de(t)?o.push(l):et(l)?l.call(i):de(l)&&t==="alias"?r.push(l):de(l)&&t.indexOf("capture")!==-1&&et(i[t])?o.push(l):s.push(l))});var a=function(l,u){Rn(l,function(c){if(de(c[0])){var p=u;X(c,function(f){p=p[f[0]].apply(p,f.slice(1))})}else this[c[0]].apply(this,c.slice(1))},u)};a(r,this),a(s,this),a(o,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var e,t;return((e=this.config.bootstrap)===null||e===void 0?void 0:e.featureFlags)&&Object.keys((t=this.config.bootstrap)===null||t===void 0?void 0:t.featureFlags).length>0||!1}},{key:"push",value:function(e){this._execute_array([e])}},{key:"capture",value:function(e,t,i){var r;if(!(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue))return x.uninitializedWarning("posthog.capture");if(!this.consent.isOptedOut())if(!M(e)&&Re(e)){if(!se||this.config.opt_out_useragent_filter||!Cu(se,this.config.custom_blocked_useragents)){var s=i!=null&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(s==null||!s.isRateLimited){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.store_google||this.config.save_referrer)&&this.persistence.set_initial_person_info();var o={uuid:Lt(),event:e,properties:this._calculate_event_properties(e,t||{},i)};s&&(o.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),i?.$set&&(o.$set=i?.$set);var a=this._calculate_set_once_properties(i?.$set_once);a&&(o.$set_once=a),(o=Kp(o,i!=null&&i._noTruncate?null:this.config.properties_string_max_length)).timestamp=i?.timestamp||new Date,M(i?.timestamp)||(o.properties.$event_time_override_provided=!0,o.properties.$event_time_override_system_time=new Date);var l=C(C({},o.properties.$set),o.$set);ro(l)||this.setPersonPropertiesForFlags(l),this._debugEventEmitter.emit("eventCaptured",o);var u={method:"POST",url:(r=i?._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:o,compression:"best-available",batchKey:i?._batchKey};return!this.config.request_batching||i&&(i==null||!i._batchKey)||i!=null&&i.send_instantly?this._send_retriable_request(u):this._requestQueue.enqueue(u),o}x.critical("This capture call is ignored due to client rate limiting.")}}else x.error("No event name provided to posthog.capture")}},{key:"_addCaptureHook",value:function(e){this.on("eventCaptured",function(t){return e(t.event)})}},{key:"_calculate_event_properties",value:function(e,t,i){if(!this.persistence||!this.sessionPersistence)return t;var r=this.persistence.remove_event_timer(e),s=C({},t);if(s.token=this.config.token,e==="$snapshot"){var o=C(C({},this.persistence.properties()),this.sessionPersistence.properties());return s.distinct_id=o.distinct_id,s}var a=_e.properties();if(this.sessionManager){var l=this.sessionManager.checkAndGetSessionAndWindowId(),u=l.sessionId,c=l.windowId;s.$session_id=u,s.$window_id=c}if(this.requestRouter.region===tn.CUSTOM&&(s.$lib_custom_api_host=this.config.api_host),this.sessionPropsManager&&this.config.__preview_send_client_session_params&&(e==="$pageview"||e==="$pageleave"||e==="$autocapture")){var p=this.sessionPropsManager.getSessionProps();s=Te(s,p)}if(!this.config.disable_scroll_properties){var f={};e==="$pageview"?f=this.pageViewManager.doPageView():e==="$pageleave"&&(f=this.pageViewManager.doPageLeave()),s=Te(s,f)}if(e==="$pageview"&&A&&(s.title=A.title),!M(r)){var d=new Date().getTime()-r;s.$duration=parseFloat((d/1e3).toFixed(3))}if(se&&this.config.opt_out_useragent_filter&&(s.$browser_type=Cu(se,this.config.custom_blocked_useragents)?"bot":"browser"),(s=Te({},a,this.persistence.properties(),this.sessionPersistence.properties(),s)).$is_identified=this._isIdentified(),i==null||!i._noHeatmaps){var g,v=(g=this.heatmaps)===null||g===void 0?void 0:g.getAndClearBuffer();v&&(s.$heatmap_data=v)}de(this.config.property_denylist)?X(this.config.property_denylist,function(L){delete s[L]}):x.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var k=this.config.sanitize_properties;return k&&(s=k(s,e)),s.$process_person_profile=this._hasPersonProcessing(),s}},{key:"_calculate_set_once_properties",value:function(e){if(!this.persistence||!this._hasPersonProcessing())return e;var t=Te({},this.persistence.get_initial_props(),e||{});return ro(t)?void 0:t}},{key:"register",value:function(e,t){var i;(i=this.persistence)===null||i===void 0||i.register(e,t)}},{key:"register_once",value:function(e,t,i){var r;(r=this.persistence)===null||r===void 0||r.register_once(e,t,i)}},{key:"register_for_session",value:function(e){var t;(t=this.sessionPersistence)===null||t===void 0||t.register(e)}},{key:"unregister",value:function(e){var t;(t=this.persistence)===null||t===void 0||t.unregister(e)}},{key:"unregister_for_session",value:function(e){var t;(t=this.sessionPersistence)===null||t===void 0||t.unregister(e)}},{key:"_register_single",value:function(e,t){this.register(y({},e,t))}},{key:"getFeatureFlag",value:function(e,t){return this.featureFlags.getFeatureFlag(e,t)}},{key:"getFeatureFlagPayload",value:function(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch{return t}}},{key:"isFeatureEnabled",value:function(e,t){return this.featureFlags.isFeatureEnabled(e,t)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,t){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t)}},{key:"getEarlyAccessFeatures",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(e,t)}},{key:"on",value:function(e,t){return this._debugEventEmitter.on(e,t)}},{key:"onFeatureFlags",value:function(e){return this.featureFlags.onFeatureFlags(e)}},{key:"onSessionId",value:function(e){var t,i;return(t=(i=this.sessionManager)===null||i===void 0?void 0:i.onSessionId(e))!==null&&t!==void 0?t:function(){}}},{key:"getSurveys",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(e,t)}},{key:"getActiveMatchingSurveys",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(e,t)}},{key:"identify",value:function(e,t,i){if(!this.__loaded||!this.persistence)return x.uninitializedWarning("posthog.identify");if(at(e)&&(e=e.toString(),x.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e){if(["distinct_id","distinctid"].includes(e.toLowerCase()))x.critical('The string "'.concat(e,'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'));else if(this._requirePersonProcessing("posthog.identify")){var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==r&&e!==this.get_property(_i)&&(this.unregister(_i),this.register({distinct_id:e}));var o=(this.persistence.get_property(ht)||"anonymous")==="anonymous";e!==r&&o?(this.persistence.set_property(ht,"identified"),this.setPersonPropertiesForFlags(t||{},!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:i||{}}),this.featureFlags.setAnonymousDistinctId(r)):(t||i)&&this.setPersonProperties(t,i),e!==r&&(this.reloadFeatureFlags(),this.unregister(jr))}}else x.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(e,t){(e||t)&&this._requirePersonProcessing("posthog.setPersonProperties")&&(this.setPersonPropertiesForFlags(e||{}),this.capture("$set",{$set:e||{},$set_once:t||{}}))}},{key:"group",value:function(e,t,i){if(e&&t){if(this._requirePersonProcessing("posthog.group")){var r=this.getGroups();r[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:C(C({},r),{},y({},e,t))}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:i}),this.setGroupPropertiesForFlags(y({},e,i))),r[e]===t||i||this.reloadFeatureFlags()}}else x.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this._requirePersonProcessing("posthog.setPersonPropertiesForFlags")&&this.featureFlags.setPersonPropertiesForFlags(e,t)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this._requirePersonProcessing("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}},{key:"resetGroupPropertiesForFlags",value:function(e){this.featureFlags.resetGroupPropertiesForFlags(e)}},{key:"reset",value:function(e){var t,i,r,s;if(!this.__loaded)return x.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");this.consent.reset(),(t=this.persistence)===null||t===void 0||t.clear(),(i=this.sessionPersistence)===null||i===void 0||i.clear(),(r=this.persistence)===null||r===void 0||r.set_property(ht,"anonymous"),(s=this.sessionManager)===null||s===void 0||s.resetSessionId();var a=this.config.get_device_id(Lt());this.register_once({distinct_id:a,$device_id:e?a:o},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"get_session_id",value:function(){var e,t;return(e=(t=this.sessionManager)===null||t===void 0?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}},{key:"get_session_replay_url",value:function(e){if(!this.sessionManager)return"";var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=t.sessionId,r=t.sessionStartTimestamp,s=this.requestRouter.endpointFor("ui","/project/".concat(this.config.token,"/replay/").concat(i));if(e!=null&&e.withTimestamp&&r){var o,a=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!r)return s;var l=Math.max(Math.floor((new Date().getTime()-r)/1e3)-a,0);s+="?t=".concat(l)}return s}},{key:"alias",value:function(e,t){return e===this.get_property(Nu)?(x.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(M(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(_i,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(x.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}},{key:"set_config",value:function(e){var t,i,r,s,o=C({},this.config);Ze(e)&&(Te(this.config,Ru(e)),(t=this.persistence)===null||t===void 0||t.update_config(this.config,o),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new uo(C(C({},this.config),{},{persistence:"sessionStorage"})),fe.is_supported()&&fe.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(Dt.DEBUG=!0),(i=this.sessionRecording)===null||i===void 0||i.startIfEnabledOrStop(),(r=this.autocapture)===null||r===void 0||r.startIfEnabled(),(s=this.heatmaps)===null||s===void 0||s.startIfEnabled(),this.surveys.loadIfEnabled(),this._sync_opt_out_with_persistence())}},{key:"startSessionRecording",value:function(e){if(e!=null&&e.sampling){var t,i,r=(t=this.sessionManager)===null||t===void 0?void 0:t.checkAndGetSessionAndWindowId();(i=this.persistence)===null||i===void 0||i.register(y({},xi,!0)),x.info("Session recording started with sampling override for session: ",r?.sessionId)}this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var e;return!((e=this.sessionRecording)===null||e===void 0||!e.started)}},{key:"loadToolbar",value:function(e){return this.toolbar.loadToolbar(e)}},{key:"get_property",value:function(e){var t;return(t=this.persistence)===null||t===void 0?void 0:t.props[e]}},{key:"getSessionProperty",value:function(e){var t;return(t=this.sessionPersistence)===null||t===void 0?void 0:t.props[e]}},{key:"toString",value:function(){var e,t=(e=this.config.name)!==null&&e!==void 0?e:An;return t!==An&&(t=An+"."+t),t}},{key:"_isIdentified",value:function(){var e,t;return((e=this.persistence)===null||e===void 0?void 0:e.get_property(ht))==="identified"||((t=this.sessionPersistence)===null||t===void 0?void 0:t.get_property(ht))==="identified"}},{key:"_hasPersonProcessing",value:function(){var e,t,i,r;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&ro(this.getGroups())&&((e=this.persistence)===null||e===void 0||(t=e.props)===null||t===void 0||!t[_i])&&((i=this.persistence)===null||i===void 0||(r=i.props)===null||r===void 0||!r[qr]))}},{key:"_shouldCapturePageleave",value:function(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&this.config.capture_pageview}},{key:"createPersonProfile",value:function(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.setPersonProperties({},{})}},{key:"_requirePersonProcessing",value:function(e){return this.config.person_profiles==="never"?(x.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._register_single(qr,!0),!0)}},{key:"_sync_opt_out_with_persistence",value:function(){var e,t,i,r,s=this.consent.isOptedOut(),o=this.config.opt_out_persistence_by_default,a=this.config.disable_persistence||s&&!!o;((e=this.persistence)===null||e===void 0?void 0:e.disabled)!==a&&((i=this.persistence)===null||i===void 0||i.set_disabled(a)),((t=this.sessionPersistence)===null||t===void 0?void 0:t.disabled)!==a&&((r=this.sessionPersistence)===null||r===void 0||r.set_disabled(a))}},{key:"opt_in_capturing",value:function(e){var t;this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),this.capture((t=e?.captureEventName)!==null&&t!==void 0?t:"$opt_in",e?.captureProperties,{send_instantly:!0})}},{key:"opt_out_capturing",value:function(){this.consent.optInOut(!1),this._sync_opt_out_with_persistence()}},{key:"has_opted_in_capturing",value:function(){return this.consent.isOptedIn()}},{key:"has_opted_out_capturing",value:function(){return this.consent.isOptedOut()}},{key:"clear_opt_in_out_capturing",value:function(){this.consent.reset(),this._sync_opt_out_with_persistence()}},{key:"debug",value:function(e){e===!1?(m?.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(m?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}}]),n}();(function(n,e){for(var t=0;t<e.length;t++)n.prototype[e[t]]=Yp(n.prototype[e[t]])})(bc,["identify"]);var Pu,Ou;(function(n){n.Popover="popover",n.API="api",n.Widget="widget"})(Pu||(Pu={})),function(n){n.Open="open",n.MultipleChoice="multiple_choice",n.SingleChoice="single_choice",n.Rating="rating",n.Link="link"}(Ou||(Ou={}));var Fu,wc=(Fu=Ei[An]=new bc,function(){function n(){n.done||(n.done=!0,_c=!1,X(Ei,function(e){e._dom_loaded()}))}A!=null&&A.addEventListener&&(A.readyState==="complete"?n():A.addEventListener("DOMContentLoaded",n,!1)),m&&gt(m,"load",n,!0)}(),Fu);var xc=wc.init("phc_OTZ3wJ6VemgVupCRKS5Sbqb9Ks0JYe0hMYZPtLwl0nu",{api_host:"https://pheu.molin.ai",ui_host:"https://eu.posthog.com",secure_cookie:document.location.protocol==="https:",persistence:"cookie",autocapture:!1,rageclick:!1,capture_pageview:!1,capture_pageleave:!1,disable_session_recording:!0,advanced_disable_decide:!0},"MolinShopAI");function ue(n,e){if(!xc)throw new Error("Failed to initialize PostHog");xc.capture(n,e)}var Yr,Pi,Kr,Nt,Sc,Jr,Qr=class Qr extends z(j){constructor(){super();b(this,Nt);b(this,Yr,new Pt(this,{onError:console.error}));b(this,Pi);b(this,Kr,{onError:t=>{alert(t.error),console.error(t.widgetId,t.error),ue("ShopAssistant: error",t)},onNewMessageStartedStreaming:t=>ue("ShopAssistant: user received bot message (streaming started)",t),onMessageEndedStreaming:t=>ue("ShopAssistant: user received bot message (streaming ended)",t),onUserCanceledStreaming:t=>ue("ShopAssistant: user canceled streaming",t),onUserClickedLink:t=>ue("ShopAssistant: user clicked link",t),onUserSentInput:t=>ue("ShopAssistant: user sent input",t)});this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1}get config(){return h(this,Pi)||h(this,Yr).data}render(){return this.config?O`
316
316
  <!-- embed our chat component forwarding props -->
317
- <mw-chat .config="${{...this.config,widgetId:this.widgetId}}" .callbacks="${h(this,Jr)}" ?show-close="${this.showClose}" @mw:close-click="${R(this,Ut,xc)}">
317
+ <mw-chat .config="${{...this.config,widgetId:this.widgetId}}" .callbacks="${h(this,Kr)}" ?show-close="${this.showClose}" @mw:close-click="${R(this,Nt,Sc)}">
318
318
  <slot name="banner" slot="banner"></slot>
319
319
  </mw-chat>
320
- `:D}injectConfig(t){T(this,Ti,t),this.requestUpdate()}reloadConfig(){h(this,Ut,Vr)?.reloadConfig()}get conversationId(){return h(this,Ut,Vr)?.conversationId??""}get messages(){return h(this,Ut,Vr)?.messages??[]}};Xr=new WeakMap,Ti=new WeakMap,Jr=new WeakMap,Ut=new WeakSet,xc=function(){this.dispatchEvent(new Yr.CloseClickEvent)},Vr=function(){return this.renderRoot.querySelector("mw-chat")||null},S(Yr,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},showClose:{type:Boolean,attribute:"show-close"}});var Ii=Yr;customElements.define("molin-shop-ai-chat",Ii);var Vo;Ii.CloseClickEvent=(Vo=class extends CustomEvent{constructor(e={}){super(Ii.CloseClickEvent.type,{...e})}},S(Vo,"type","mw:close-click"),Vo);var kc=n=>n??D;var Qr,Kr=class extends z(j){constructor(){super();b(this,Qr,new Ot(this,{onError:console.error}));this.cdn="https://widget.molin.ai",this.widgetId="",this.state="open"}get config(){return h(this,Qr).data}render(){return this.config?O`
320
+ `:D}injectConfig(t){$(this,Pi,t),this.requestUpdate()}reloadConfig(){h(this,Nt,Jr)?.reloadConfig()}get conversationId(){return h(this,Nt,Jr)?.conversationId??""}get messages(){return h(this,Nt,Jr)?.messages??[]}};Yr=new WeakMap,Pi=new WeakMap,Kr=new WeakMap,Nt=new WeakSet,Sc=function(){this.dispatchEvent(new Qr.CloseClickEvent)},Jr=function(){return this.renderRoot.querySelector("mw-chat")||null},S(Qr,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},showClose:{type:Boolean,attribute:"show-close"}});var Ri=Qr;customElements.define("molin-shop-ai-chat",Ri);var Jo;Ri.CloseClickEvent=(Jo=class extends CustomEvent{constructor(e={}){super(Ri.CloseClickEvent.type,{...e})}},S(Jo,"type","mw:close-click"),Jo);var Ec=n=>n??D;var es,Zr=class extends z(j){constructor(){super();b(this,es,new Pt(this,{onError:console.error}));this.cdn="https://widget.molin.ai",this.widgetId="",this.state="open"}get config(){return h(this,es).data}render(){return this.config?O`
321
321
  <!-- embed our bubble component forwarding props -->
322
322
  <!-- these props are never internally updated by mw-bubble so we pass them down only one way -->
323
- <mw-bubble state="${this.state}" src="${kc(this.config?.bubble?.imageUrl)}"></mw-bubble>
324
- `:D}};Qr=new WeakMap,S(Kr,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}});customElements.define("molin-shop-ai-launcher",Kr);var es,Dn,Ln,sn,Ri,Pi,Zr=class{constructor(e,t,i,r=window.history){b(this,es);b(this,Dn);b(this,Ln);b(this,sn);b(this,Ri,!1);b(this,Pi,()=>{h(this,Dn).test(window.location.pathname)&&h(this,Ln).navigated()});T(this,es,e),T(this,Dn,t),T(this,Ln,i),T(this,sn,r),e.addController(this)}hostConnected(){window.addEventListener("pageshow",h(this,Pi));let e=h(this,sn).pushState;h(this,sn).pushState=(...t)=>{if(e.call(h(this,sn),...t),!h(this,Ri))try{let i=new URL(t[2],window.location.origin);h(this,Dn).test(i.pathname)&&h(this,Ln).navigated()}catch{}}}hostDisconnected(){window.removeEventListener("pageshow",h(this,Pi)),T(this,Ri,!0)}};es=new WeakMap,Dn=new WeakMap,Ln=new WeakMap,sn=new WeakMap,Ri=new WeakMap,Pi=new WeakMap;function ts(n,e=""){return Object.entries(n).filter(([t,i])=>i).map(([t,i])=>`${e}${t}-[${i}]`).join(" ")}var is,Xo,ge,rs,Oe,Oi,Sc,Ec,$c,Cc,ns=class extends z(j){constructor(){super();b(this,Oe);b(this,is,new Ot(this,{onError:console.error}));b(this,Xo,new Zr(this,/checkout|order|thank-you|thank_you/i,{navigated:()=>{let t=h(this,Oe,Sc);t&&ue("ShopAssistant: user visited checkout page",{widgetId:this.widgetId,conversationId:t.conversationId,hasSentMessage:t.messages.length>0})}}));b(this,ge,!1);b(this,rs,{onError:t=>{alert(t.error),console.error(t.widgetId,t.error),ue("ShopAssistant: error",t)},onNewMessageStartedStreaming:t=>ue("ShopAssistant: user received bot message (streaming started)",t),onMessageEndedStreaming:t=>ue("ShopAssistant: user received bot message (streaming ended)",t),onUserCanceledStreaming:t=>ue("ShopAssistant: user canceled streaming",t),onUserClickedLink:t=>ue("ShopAssistant: user clicked link",t),onUserSentInput:t=>ue("ShopAssistant: user sent input",t)});this.cdn="https://widget.molin.ai",this.widgetId="",this._dialogAlreadyShown=!1}get config(){return h(this,is).data}render(){if(!this.config)return D;let t=[ts(this.config.bubble.position),ts(this.config.bubble.mobilePosition||{},"max-sm:")].join(" "),i=ts(this.config.bubble.position),r={bottom:"72px"},s=Object.entries(this.config.bubble.position).filter(([a,l])=>l).map(([a,l])=>{let u=`sm:${a}-[calc(${[r[a],l].filter(c=>!!c).join("+")})]`;return a==="left"&&(u+=" sm:right-auto"),a==="right"&&(u+=" sm:left-auto"),u}).join(" "),o=s;return this.config.hidden?D:O`
325
- <mw-bubble class="${t} fixed z-[2147483647]" @click=${R(this,Oe,$c)} state="${h(this,ge)?"close":"open"}" src="${this.config.bubble?.imageUrl||""}"></mw-bubble>
323
+ <mw-bubble state="${this.state}" src="${Ec(this.config?.bubble?.imageUrl)}"></mw-bubble>
324
+ `:D}};es=new WeakMap,S(Zr,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},state:{type:String}});customElements.define("molin-shop-ai-launcher",Zr);var ns,jn,qn,sn,Oi,Fi,ts=class{constructor(e,t,i,r=window.history){b(this,ns);b(this,jn);b(this,qn);b(this,sn);b(this,Oi,!1);b(this,Fi,()=>{h(this,jn).test(window.location.pathname)&&h(this,qn).navigated()});$(this,ns,e),$(this,jn,t),$(this,qn,i),$(this,sn,r),e.addController(this)}hostConnected(){window.addEventListener("pageshow",h(this,Fi));let e=h(this,sn).pushState;h(this,sn).pushState=(...t)=>{if(e.call(h(this,sn),...t),!h(this,Oi))try{let i=new URL(t[2],window.location.origin);h(this,jn).test(i.pathname)&&h(this,qn).navigated()}catch{}}}hostDisconnected(){window.removeEventListener("pageshow",h(this,Fi)),$(this,Oi,!0)}};ns=new WeakMap,jn=new WeakMap,qn=new WeakMap,sn=new WeakMap,Oi=new WeakMap,Fi=new WeakMap;function is(n,e=""){return Object.entries(n).filter(([t,i])=>i).map(([t,i])=>`${e}${t}-[${i}]`).join(" ")}var ss,Yo,ge,os,Oe,Mi,$c,Cc,Ac,Ic,rs=class extends z(j){constructor(){super();b(this,Oe);b(this,ss,new Pt(this,{onError:console.error}));b(this,Yo,new ts(this,/checkout|order|thank-you|thank_you/i,{navigated:()=>{let t=h(this,Oe,$c);t&&ue("ShopAssistant: user visited checkout page",{widgetId:this.widgetId,conversationId:t.conversationId,hasSentMessage:t.messages.length>0})}}));b(this,ge,!1);b(this,os,{onError:t=>{alert(t.error),console.error(t.widgetId,t.error),ue("ShopAssistant: error",t)},onNewMessageStartedStreaming:t=>ue("ShopAssistant: user received bot message (streaming started)",t),onMessageEndedStreaming:t=>ue("ShopAssistant: user received bot message (streaming ended)",t),onUserCanceledStreaming:t=>ue("ShopAssistant: user canceled streaming",t),onUserClickedLink:t=>ue("ShopAssistant: user clicked link",t),onUserSentInput:t=>ue("ShopAssistant: user sent input",t)});this.cdn="https://widget.molin.ai",this.widgetId="",this._dialogAlreadyShown=!1}get config(){return h(this,ss).data}render(){if(!this.config)return D;let t=[is(this.config.bubble.position),is(this.config.bubble.mobilePosition||{},"max-sm:")].join(" "),i=is(this.config.bubble.position),r={bottom:"72px"},s=Object.entries(this.config.bubble.position).filter(([a,l])=>l).map(([a,l])=>{let u=`sm:${a}-[calc(${[r[a],l].filter(c=>!!c).join("+")})]`;return a==="left"&&(u+=" sm:right-auto"),a==="right"&&(u+=" sm:left-auto"),u}).join(" "),o=s;return this.config.hidden?D:O`
325
+ <mw-bubble class="${t} fixed z-[2147483647]" @click=${R(this,Oe,Ac)} state="${h(this,ge)?"close":"open"}" src="${this.config.bubble?.imageUrl||""}"></mw-bubble>
326
326
 
327
327
  <!-- only load the component if enabled on any platform -->
328
328
  ${this.config?.popup?.mobileEnabled||this.config?.popup?.desktopEnabled?O`<mw-popup
@@ -330,7 +330,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
330
330
  delay="${this.config.popup?.delayMs||0}"
331
331
  sound="https://molin.ai/sounds/widget/popup.aac"
332
332
  .content="${{desktop:{text:this.config.popup?.text||"Hello there. How can we help?"},mobile:{title:this.config.popup?.mobileTitleText??`Chat with ${this.config.title}`,text:this.config.popup?.text||"Hello there. How can we help?",button:this.config.popup?.mobileButtonText??`Chat with ${this.config.title}`,color:this.config.color,poweredBy:!this.config.removePoweredBy}}}"
333
- @mw:click="${R(this,Oe,Ec)}"></mw-popup>`:D}
333
+ @mw:click="${R(this,Oe,Cc)}"></mw-popup>`:D}
334
334
 
335
335
  <!-- show "Try it out" if enabled (even if the chat window is showing) -->
336
336
  ${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?O`<mw-try-it-out class="${this.config?.tryItOut?.mobileEnabled?"visible":"invisible"} ${this.config?.tryItOut?.desktopEnabled?"sm:visible":"sm:invisible"}" position="${i}" text="${this.config.tryItOut?.text||""}"></mw-try-it-out>`:D}
@@ -338,12 +338,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
338
338
  <!-- On first render, do not render the dialog, so it does not connect to backend. Once it's rendered once, it's never removed from the DOM. -->
339
339
  ${this._dialogAlreadyShown?O`
340
340
  <div class="${h(this,ge)?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${s} fixed inset-0 z-[2147483647] overflow-hidden bg-white font-sans text-[16px] leading-normal text-gray-800 shadow-2xl transition-all sm:top-auto sm:h-4/5 sm:max-h-[800px] sm:w-[calc(100dvh*0.45)] sm:min-w-[300px] sm:max-w-[400px] sm:rounded-2xl 2xl:max-w-[420px]">
341
- <mw-chat .config="${{...this.config,widgetId:this.widgetId}}" .callbacks="${h(this,rs)}" ?show-close="${!0}" @mw:close-click="${R(this,Oe,Cc)}">
341
+ <mw-chat .config="${{...this.config,widgetId:this.widgetId}}" .callbacks="${h(this,os)}" ?show-close="${!0}" @mw:close-click="${R(this,Oe,Ic)}">
342
342
  <slot name="banner" slot="banner"></slot>
343
343
  </mw-chat>
344
344
  </div>
345
345
  `:D}
346
- `}updated(){h(this,ge)&&h(this,Oe,Oi)?.hide()}openChat(){h(this,ge)||(T(this,ge,!0),this._dialogAlreadyShown=!0,this.requestUpdate(),h(this,Oe,Oi)?.hide(),ue("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:h(this,ge)?"open":"close"}))}closeChat(){h(this,ge)&&(T(this,ge,!1),this.requestUpdate(),h(this,Oe,Oi)?.hide(),ue("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:h(this,ge)?"open":"close"}))}};is=new WeakMap,Xo=new WeakMap,ge=new WeakMap,rs=new WeakMap,Oe=new WeakSet,Oi=function(){return this.renderRoot.querySelector("mw-popup")||null},Sc=function(){return this.renderRoot.querySelector("mw-chat")||null},Ec=function(){T(this,ge,!0),this._dialogAlreadyShown=!0,this.requestUpdate(),ue("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:h(this,ge)?"open":"close"})},$c=function(){T(this,ge,!h(this,ge)),this._dialogAlreadyShown=!0,this.requestUpdate(),h(this,Oe,Oi)?.hide(),ue("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:h(this,ge)?"open":"close"})},Cc=function(){T(this,ge,!1),this.requestUpdate(),ue("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:h(this,ge)?"open":"close"})},S(ns,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},_dialogAlreadyShown:{type:Boolean,state:!0}});customElements.define("molin-shop-ai",ns);
346
+ `}updated(){h(this,ge)&&h(this,Oe,Mi)?.hide()}openChat(){h(this,ge)||($(this,ge,!0),this._dialogAlreadyShown=!0,this.requestUpdate(),h(this,Oe,Mi)?.hide(),ue("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:h(this,ge)?"open":"close"}))}closeChat(){h(this,ge)&&($(this,ge,!1),this.requestUpdate(),h(this,Oe,Mi)?.hide(),ue("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:h(this,ge)?"open":"close"}))}};ss=new WeakMap,Yo=new WeakMap,ge=new WeakMap,os=new WeakMap,Oe=new WeakSet,Mi=function(){return this.renderRoot.querySelector("mw-popup")||null},$c=function(){return this.renderRoot.querySelector("mw-chat")||null},Cc=function(){$(this,ge,!0),this._dialogAlreadyShown=!0,this.requestUpdate(),ue("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:h(this,ge)?"open":"close"})},Ac=function(){$(this,ge,!h(this,ge)),this._dialogAlreadyShown=!0,this.requestUpdate(),h(this,Oe,Mi)?.hide(),ue("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:h(this,ge)?"open":"close"})},Ic=function(){$(this,ge,!1),this.requestUpdate(),ue("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:h(this,ge)?"open":"close"})},S(rs,"properties",{cdn:{type:String},widgetId:{type:String,attribute:"widget"},_dialogAlreadyShown:{type:Boolean,state:!0}});customElements.define("molin-shop-ai",rs);
347
347
  /*! Bundled license information:
348
348
 
349
349
  @lit/reactive-element/css-tag.js: