@molin.ai/shop-ai 0.6.15 → 0.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/molin-shop-ai.min.js +84 -83
- package/package.json +1 -1
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
var Ru=Object.defineProperty;var Qo=r=>{throw TypeError(r)};var Pu=(r,e,t)=>e in r?Ru(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var S=(r,e,t)=>Pu(r,typeof e!="symbol"?e+"":e,t),as=(r,e,t)=>e.has(r)||Qo("Cannot "+t);var h=(r,e,t)=>(as(r,e,"read from private field"),t?t.call(r):e.get(r)),k=(r,e,t)=>e.has(r)?Qo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),P=(r,e,t,n)=>(as(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),I=(r,e,t)=>(as(r,e,"access private method"),t);var Zo=(r,e,t,n)=>({set _(i){P(r,e,i,t)},get _(){return h(r,e,n)}});function vs(r){return[...r.v,(r.i?"!":"")+r.n].join(":")}function Ou(r,e=","){return r.map(vs).join(e)}var sa=typeof CSS<"u"&&CSS.escape||(r=>r.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Fn(r){for(var e=9,t=r.length;t--;)e=Math.imul(e^r.charCodeAt(t),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function qn(r,e="@media "){return e+V(r).map(t=>(typeof t=="string"&&(t={min:t}),t.raw||Object.keys(t).map(n=>`(${n}-width:${t[n]})`).join(" and "))).join(",")}function V(r=[]){return Array.isArray(r)?r:r==null?[]:[r]}function Ko(r){return r}function jn(){}var ue={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function oa(r){return r.match(/[-=:;]/g)?.length||0}function ps(r){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(r)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(oa(r),15)<<18}var Fu=["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:r,i:e,v:t=[]},n,i,s){r&&(r=vs({n:r,i:e,v:t})),s=[...V(s)];for(let a of t){let l=n.theme("screens",a);for(let u of V(l&&qn(l)||n.v(a))){var o;s.push(u),i|=l?67108864|ps(u):a=="dark"?1073741824:u[0]=="@"?ps(u):(o=u,1<<~(/:([a-z-]+)/.test(o)&&~Fu.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:r,p:i,r:s,i:e}}var aa=new Map;function fs(r){if(r.d){let e=[],t=ls(r.r.reduce((n,i)=>i[0]=="@"?(e.push(i),n):i?ls(n,s=>ls(i,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):cs(s,o)}return cs(o,s)})):n,"&"),n=>cs(n,r.n?"."+sa(r.n):""));return t&&e.push(t.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((n,i)=>i+"{"+n+"}",r.d)}}function ls(r,e){return r.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(t,n,i)=>e(n)+i)}function cs(r,e){return r.replace(/&/g,e)}var ea=new Intl.Collator("en",{numeric:!0});function la(r,e){for(var t=0,n=r.length;t<n;){let i=n+t>>1;0>=ca(r[i],e)?t=i+1:n=i}return n}function ca(r,e){let t=r.p&ue.o;return t==(e.p&ue.o)&&(t==ue.b||t==ue.o)?0:r.p-e.p||r.o-e.o||ea.compare(ta(r.n),ta(e.n))||ea.compare(ra(r.n),ra(e.n))}function ta(r){return(r||"").split(/:/).pop().split("/").pop()||"\0"}function ra(r){return(r||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function us(r,e){return Math.round(parseInt(r,16)*e)}function ze(r,e={}){if(typeof r=="function")return r(e);let{opacityValue:t="1",opacityVariable:n}=e,i=n?`var(${n})`:t;if(r.includes("<alpha-value>"))return r.replace("<alpha-value>",i);if(r[0]=="#"&&(r.length==4||r.length==7)){let s=(r.length-1)/3,o=[17,1,.062272][s-1];return`rgba(${[us(r.substr(1,s),o),us(r.substr(1+s,s),o),us(r.substr(1+2*s,s),o),i]})`}return i=="1"?r:i=="0"?"#0000":r.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${i})`)}function ua(r,e,t,n,i=[]){return function s(o,{n:a,p:l,r:u=[],i:c},d){let p=[],f="",g=0,v=0;for(let E in o||{}){var b,M;let F=o[E];if(E[0]=="@"){if(!F)continue;if(E[1]=="a"){p.push(...bs(a,l,Ln(""+F),d,l,u,c,!0));continue}if(E[1]=="l"){for(let N of V(F))p.push(...s(N,{n:a,p:(b=ue[E[7]],l&~ue.o|b),r:E[7]=="d"?[]:u,i:c},d));continue}if(E[1]=="i"){p.push(...V(F).map(N=>({p:-1,o:0,r:[],d:E+" "+N})));continue}if(E[1]=="k"){p.push({p:ue.d,o:0,r:[E],d:s(F,{p:ue.d},d).map(fs).join("")});continue}if(E[1]=="f"){p.push(...V(F).map(N=>({p:ue.d,o:0,r:[E],d:s(N,{p:ue.d},d).map(fs).join("")})));continue}}if(typeof F!="object"||Array.isArray(F))E=="label"&&F?a=F+Fn(JSON.stringify([l,c,o])):(F||F===0)&&(E=E.replace(/[A-Z]/g,N=>"-"+N.toLowerCase()),v+=1,g=Math.max(g,(M=E)[0]=="-"?0:oa(M)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(M)?+!!RegExp.$1||-!!RegExp.$2:0)+1),f+=(f?";":"")+V(F).map(N=>d.s(E,_s(""+N,d.theme)+(c?" !important":""))).join(";"));else if(E[0]=="@"||E.includes("&")){let N=l;E[0]=="@"&&(E=E.replace(/\bscreen\(([^)]+)\)/g,(H,Z)=>{let X=d.theme("screens",Z);return X?(N|=67108864,qn(X,"")):H}),N|=ps(E)),p.push(...s(F,{n:a,p:N,r:[...u,E],i:c},d))}else p.push(...s(F,{p:l,r:[...u,E]},d))}return p.unshift({n:a,p:l,o:Math.max(0,15-v)+1.5*Math.min(g||15,15),r:u,d:f}),p.sort(ca)}(r,ys(e,t,n,i),t)}function _s(r,e){return r.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(t,n,i,s,o="")=>{let a=e(i,o);return typeof a=="function"&&/color|fill|stroke/i.test(i)?ze(a):""+V(a).filter(l=>Object(l)!==l)})}function da(r,e){let t,n=[];for(let i of r)i.d&&i.n?t?.p==i.p&&""+t.r==""+i.r?(t.c=[t.c,i.c].filter(Boolean).join(" "),t.d=t.d+";"+i.d):n.push(t={...i,n:i.n&&e}):n.push({...i,n:i.n&&e});return n}function Mn(r,e,t=ue.u,n,i){let s=[];for(let o of r)for(let a of function(l,u,c,d,p){l={...l,i:l.i||p};let f=function(g,v){let b=aa.get(g.n);return b?b(g,v):v.r(g.n,g.v[0]=="dark")}(l,u);return f?typeof f=="string"?({r:d,p:c}=ys(l,u,c,d),da(Mn(Ln(f),u,c,d,l.i),l.n)):Array.isArray(f)?f.map(g=>{var v,b;return{o:0,...g,r:[...V(d),...V(g.r)],p:(v=c,b=g.p??c,v&~ue.o|b)}}):ua(f,l,u,c,d):[{c:vs(l),p:0,o:0,r:[]}]}(o,e,t,n,i))s.splice(la(s,a),0,a);return s}function bs(r,e,t,n,i,s,o,a){return da((a?t.flatMap(l=>Mn([l],n,i,s,o)):Mn(t,n,i,s,o)).map(l=>l.p&ue.o&&(l.n||e==ue.b)?{...l,p:l.p&~ue.o|e,o:0}:l),r)}function Mu(r,e,t,n){var i;return i=(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,n)},aa.set(r,i),r}function ds(r,e,t){if(r[r.length-1]!="("){let n=[],i=!1,s=!1,o="";for(let a of r)if(!(a=="("||/[~@]$/.test(a))){if(a[0]=="!"&&(a=a.slice(1),i=!i),a.endsWith(":")){n[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:n.filter(Lu),i}))}}function Lu(r,e,t){return t.indexOf(r)==e}var na=new Map;function Ln(r){let e=na.get(r);if(!e){let t=[],n=[[]],i=0,s=0,o=null,a=0,l=(u,c=0)=>{i!=a&&(t.push(r.slice(i,a+c)),u&&ds(t,n)),i=a+1};for(;a<r.length;a++){let u=r[a];if(s)r[a-1]!="\\"&&(s+=+(u=="[")||-(u=="]"));else if(u=="[")s+=1;else if(o)r[a-1]!="\\"&&o.test(r.slice(a))&&(o=null,i=a+RegExp.lastMatch.length);else if(u=="/"&&r[a-1]!="\\"&&(r[a+1]=="*"||r[a+1]=="/"))o=r[a+1]=="*"?/^\*\//:/^[\r\n]/;else if(u=="(")l(),t.push(u);else if(u==":")r[a+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(u)){l(!0);let c=t.lastIndexOf("(");if(u==")"){let d=t[c-1];if(/[~@]$/.test(d)){let p=n.shift();t.length=c,ds([...t,"#"],n);let{v:f}=n[0].pop();for(let g of p)g.v.splice(+(g.v[0]=="dark")-+(f[0]=="dark"),f.length);ds([...t,Mu(d.length>1?d.slice(0,-1)+Fn(JSON.stringify([d,p])):d+"("+Ou(p)+")",ue.a,p,/@$/.test(d))],n)}c=t.lastIndexOf("(",c-1)}t.length=c+1}else/[~@]/.test(u)&&r[a+1]=="("&&n.unshift([])}l(!0),na.set(r,e=n[0])}return e}function _(r,e,t){return[r,hs(e,t)]}function hs(r,e){return typeof r=="function"?r:typeof r=="string"&&/^[\w-]+$/.test(r)?(t,n)=>({[r]:e?e(t,n):gs(t,1)}):t=>r||{[t[1]]:gs(t,2)}}function gs(r,e,t=r.slice(e).find(Boolean)||r.$$||r.input){return r.input[0]=="-"?`calc(${t} * -1)`:t}function w(r,e,t,n){return[r,ws(e,t,n)]}function ws(r,e,t){let n=typeof e=="string"?(i,s)=>({[e]:t?t(i,s):i._}):e||(({1:i,_:s},o,a)=>({[i||a]:s}));return(i,s)=>{let o=pa(r||i[1]),a=s.theme(o,i.$$)??nt(i.$$,o,s);if(a!=null)return i._=gs(i,0,a),n(i,s,o)}}function de(r,e={},t){return[r,qu(e,t)]}function qu(r={},e){return(t,n)=>{let{section:i=pa(t[0]).replace("-","")+"Color"}=r,[s,o]=ju(t.$$);if(!s)return;let a=n.theme(i,s)||nt(s,i,n);if(!a||typeof a=="object")return;let{opacityVariable:l=`--tw-${t[0].replace(/-$/,"")}-opacity`,opacitySection:u=i.replace("Color","Opacity"),property:c=i,selector:d}=r,p=n.theme(u,o||"DEFAULT")||o&&nt(o,u,n),f=e||(({_:v})=>{let b=Fr(c,v);return d?{[d]:b}:b});t._={value:ze(a,{opacityVariable:l||void 0,opacityValue:p||void 0}),color:v=>ze(a,v),opacityVariable:l||void 0,opacityValue:p||void 0};let g=f(t,n);if(!t.dark){let v=n.d(i,s,a);v&&v!==a&&(t._={value:ze(v,{opacityVariable:l||void 0,opacityValue:p||"1"}),color:b=>ze(v,b),opacityVariable:l||void 0,opacityValue:p||void 0},g={"&":g,[n.v("dark")]:f(t,n)})}return g}}function ju(r){return(r.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Fr(r,e){let t={};return typeof e=="string"?t[r]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(t[e.opacityVariable]=e.opacityValue||"1"),t[r]=e.value),t}function nt(r,e,t){if(r[0]=="["&&r.slice(-1)=="]"){if(r=rr(_s(r.slice(1,-1),t.theme)),!e)return r;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(r)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(r))||/image/i.test(e)&&!(/^image:/.test(r)||/^[a-z-]+\(/.test(r))||/weight/i.test(e)&&!(/^(number|any):/.test(r)||/^\d+$/.test(r))||/position/i.test(e)&&/^(length|size):/.test(r)))return r.replace(/^[a-z-]+:/,"")}}function pa(r){return r.replace(/-./g,e=>e[1].toUpperCase())}function rr(r){return r.includes("url(")?r.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,t="",n,i="")=>rr(t)+n+rr(i)):r.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 Mr({presets:r=[],...e}){let t={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:V(e.variants),rules:V(e.rules),ignorelist:V(e.ignorelist),hash:void 0,stringify:(n,i)=>n+":"+i,finalize:[]};for(let n of V([...r,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&V(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:i,darkMode:s=t.darkMode,darkColor:o=t.darkColor,theme:a,variants:l,rules:u,ignorelist:c,hash:d=t.hash,stringify:p=t.stringify,finalize:f}=typeof n=="function"?n(t):n;t={preflight:t.preflight!==!1&&i!==!1&&[...t.preflight,...V(i)],darkMode:s,darkColor:o,theme:{...t.theme,...a,extend:{...t.theme.extend,...a?.extend}},variants:[...t.variants,...V(l)],rules:[...t.rules,...V(u)],ignorelist:[...t.ignorelist,...V(c)],hash:d,stringify:p,finalize:[...t.finalize,...V(f)]}}return t}function ia(r,e,t,n,i,s){for(let o of e){let a=t.get(o);a||t.set(o,a=n(o));let l=a(r,i,s);if(l)return l}}function Du(r){var e;return ms(r[0],typeof(e=r[1])=="function"?e:()=>e)}function Nu(r){var e,t;return Array.isArray(r)?ms(r[0],hs(r[1],r[2])):ms(r,hs(e,t))}function ms(r,e){return fa(r,(t,n,i,s)=>{let o=n.exec(t);if(o)return o.$$=t.slice(o[0].length),o.dark=s,e(o,i)})}function fa(r,e){let t=V(r).map(Uu);return(n,i,s)=>{for(let o of t){let a=e(n,o,i,s);if(a)return a}}}function Uu(r){return typeof r=="string"?RegExp("^"+r+(r.includes("$")||r.slice(-1)=="-"?"":"$")):r}function ha(r,e){let t=Mr(r),n=function({theme:l,darkMode:u,darkColor:c=jn,variants:d,rules:p,hash:f,stringify:g,ignorelist:v,finalize:b}){let M=new Map,E=new Map,F=new Map,N=new Map,H=fa(v,(A,oe)=>oe.test(A));d.push(["dark",Array.isArray(u)||u=="class"?`${V(u)[1]||".dark"} &`:typeof u=="string"&&u!="media"?u:"@media (prefers-color-scheme:dark)"]);let Z=typeof f=="function"?A=>f(A,Fn):f?Fn:Ko;Z!==Ko&&b.push(A=>({...A,n:A.n&&Z(A.n),d:A.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(oe,ee)=>"--"+Z(ee).replace("#",""))}));let X={theme:function({extend:A={},...oe}){let ee={},ut={get colors(){return ge("colors")},theme:ge,negative(){return{}},breakpoints(W){let K={};for(let ae in W)typeof W[ae]=="string"&&(K["screen-"+ae]=W[ae]);return K}};return ge;function ge(W,K,ae,Fe){if(W){if({1:W,2:Fe}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(W)||[,W],/[.[]/.test(W)){let Se=[];W.replace(/\[([^\]]+)\]|([^.[]+)/g,(te,me,Ce=me)=>Se.push(Ce)),W=Se.shift(),ae=K,K=Se.join("-")}let ne=ee[W]||Object.assign(Object.assign(ee[W]={},Be(oe,W)),Be(A,W));if(K==null)return ne;K||(K="DEFAULT");let ke=ne[K]??K.split("-").reduce((Se,te)=>Se?.[te],ne)??ae;return Fe?ze(ke,{opacityValue:_s(Fe,ge)}):ke}let qe={};for(let ne of[...Object.keys(oe),...Object.keys(A)])qe[ne]=ge(ne);return qe}function Be(W,K){let ae=W[K];return typeof ae=="function"&&(ae=ae(ut)),ae&&/color|fill|stroke/i.test(K)?function Fe(qe,ne=[]){let ke={};for(let Se in qe){let te=qe[Se],me=[...ne,Se];ke[me.join("-")]=te,Se=="DEFAULT"&&(me=ne,ke[ne.join("-")]=te),typeof te=="object"&&Object.assign(ke,Fe(te,me))}return ke}(ae):ae}}(l),e:sa,h:Z,s(A,oe){return g(A,oe,X)},d(A,oe,ee){return c(A,oe,X,ee)},v(A){return M.has(A)||M.set(A,ia(A,d,E,Du,X)||"&:"+A),M.get(A)},r(A,oe){let ee=JSON.stringify([A,oe]);return F.has(ee)||F.set(ee,!H(A,X)&&ia(A,p,N,Nu,X,oe)),F.get(ee)},f(A){return b.reduce((oe,ee)=>ee(oe,X),A)}};return X}(t),i=new Map,s=[],o=new Set;e.resume(l=>i.set(l,l),(l,u)=>{e.insert(l,s.length,u),s.push(u),o.add(l)});function a(l){let u=n.f(l),c=fs(u);if(c&&!o.has(c)){o.add(c);let d=la(s,l);e.insert(c,d,l),s.splice(d,0,l)}return u.n}return Object.defineProperties(function(u){if(!i.size)for(let d of V(t.preflight))typeof d=="function"&&(d=d(n)),d&&(typeof d=="string"?bs("",ue.b,Ln(d),n,ue.b,[],!1,!0):ua(d,{},n,ue.b)).forEach(a);u=""+u;let c=i.get(u);if(!c){let d=new Set;for(let p of Mn(Ln(u),n))d.add(p.c).add(a(p));c=[...d].filter(Boolean).join(" "),i.set(u,c).set(c,c)}return c},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:n.theme,config:t,snapshot(){let l=e.snapshot(),u=new Set(o),c=new Map(i),d=[...s];return()=>{l(),o=u,i=c,s=d}},clear(){e.clear(),o=new Set,i=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function Bu(r,e){return r!=e&&""+r.split(" ").sort()!=""+e.split(" ").sort()}function ga(r){let e=new MutationObserver(t);return{observe(i){e.observe(i,{attributeFilter:["class"],subtree:!0,childList:!0}),n(i),t([{target:i,type:""}])},disconnect(){e.disconnect()}};function t(i){for(let{type:s,target:o}of i)if(s[0]=="a")n(o);else for(let a of o.querySelectorAll("[class]"))n(a);e.takeRecords()}function n(i){let s,o=i.getAttribute?.("class");o&&Bu(o,s=r(o))&&i.setAttribute("class",s)}}function zu(r){let e=document.querySelector(r||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function Dn(r){let e=r?.cssRules?r:(r&&typeof r!="string"?r:zu(r)).sheet;return{target:e,snapshot(){let t=Array.from(e.cssRules,n=>n.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,n){try{e.insertRule(t,n)}catch{e.insertRule(":root{}",n)}},resume:jn}}var Hu=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 ma(r){return Hu.get(r)}function va(r){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(r);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function ya(r,e){var t=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(r);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 Wu=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Nn(){return({stringify:r})=>({stringify(e,t,n){let i="",s=ma(e);s&&(i+=r(s,t,n)+";");let o=va(e),a=ya(e,t);for(let l of Wu)o&l[1]&&(i+=r(l[0]+e,t,n)+";"),a&l[1]&&(i+=r(e,l[0]+t,n)+";");return i+r(e,t,n)}})}function Un(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",ws("lineClamp",({_:r})=>_a(r))],["line-clamp-(\\d+)",({1:r})=>_a(r)]]}}function _a(r){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${r}`}}var qr={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",...je(4,"rem",4,.5,.5),...je(12,"rem",4,5),14:"3.5rem",...je(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:U("blur"),backdropBrightness:U("brightness"),backdropContrast:U("contrast"),backdropGrayscale:U("grayscale"),backdropHueRotate:U("hueRotate"),backdropInvert:U("invert"),backdropOpacity:U("opacity"),backdropSaturate:U("saturate"),backdropSepia:U("sepia"),backgroundColor:U("colors"),backgroundImage:{none:"none"},backgroundOpacity:U("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:{...je(200,"",100,0,50),...je(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:r})=>({DEFAULT:r("colors.gray.200","currentColor"),...r("colors")}),borderOpacity:U("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:U("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:U("colors"),caretColor:U("colors"),accentColor:({theme:r})=>({auto:"auto",...r("colors")}),contrast:{...je(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:U("borderColor"),divideOpacity:U("borderOpacity"),divideWidth:U("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:r})=>({...r("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:r})=>({...r("spacing"),...Lr(2,6),...Lr(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:U("spacing"),gradientColorStops:U("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:r})=>({...r("spacing"),...Lr(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:r})=>({...r("spacing"),...Lr(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:{...je(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:r})=>({auto:"auto",...r("spacing")}),maxHeight:({theme:r})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...r("spacing")}),maxWidth:({theme:r,breakpoints:e})=>({...e(r("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:{...je(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:U("spacing"),placeholderColor:U("colors"),placeholderOpacity:U("opacity"),outlineColor:U("colors"),outlineOffset:He(8,"px"),outlineWidth:He(8,"px"),ringColor:({theme:r})=>({...r("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:U("colors"),ringOffsetWidth:He(8,"px"),ringOpacity:({theme:r})=>({...r("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...He(8,"px")},rotate:{...He(2,"deg"),...He(12,"deg",3),...He(180,"deg",45)},saturate:je(200,"",100,0,50),scale:{...je(150,"",100,0,50),...je(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:U("spacing"),scrollPadding:U("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...He(2,"deg"),...He(12,"deg",3)},space:U("spacing"),stroke:({theme:r})=>({...r("colors"),none:"none"}),strokeWidth:je(2),textColor:U("colors"),textDecorationColor:U("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...He(8,"px")},textUnderlineOffset:{auto:"auto",...He(8,"px")},textIndent:U("spacing"),textOpacity:U("opacity"),transitionDuration:({theme:r})=>({...r("durations"),DEFAULT:"150ms"}),transitionDelay:U("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:r})=>({...r("spacing"),...Lr(2,4),full:"100%"}),width:({theme:r})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...r("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...je(50,"",1,0,10),auto:"auto"}};function Lr(r,e){let t={};do for(var n=1;n<r;n++)t[`${n}/${r}`]=Number((n/r*100).toFixed(6))+"%";while(++r<=e);return t}function He(r,e,t=0){let n={};for(;t<=r;t=2*t||1)n[t]=t+e;return n}function je(r,e="",t=1,n=0,i=1,s={}){for(;n<=r;n+=i)s[n]=n/t+e;return s}function U(r){return({theme:e})=>e(r)}var ba={"*,::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, ${qr.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, ${qr.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 $a=[_("\\[([-\\w]+):(.+)]",({1:r,2:e},t)=>({"@layer overrides":{"&":{[r]:nt(`[${e}]`,"",t)}}})),_("(group|peer)([~/][^-[]+)?",({input:r},{h:e})=>[{c:e(r)}]),w("aspect-","aspectRatio"),_("container",(r,{theme:e})=>{let{screens:t=e("screens"),center:n,padding:i}=e("container"),s={width:"100%",marginRight:n&&"auto",marginLeft:n&&"auto",...o("xs")};for(let a in t){let l=t[a];typeof l=="string"&&(s[qn(l)]={"&":{maxWidth:l,...o(a)}})}return s;function o(a){let l=i&&(typeof i=="string"?i:i[a]||i.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),w("content-","content",({_:r})=>({"--tw-content":r,content:"var(--tw-content)"})),_("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),_("box-(border|content)","boxSizing",({1:r})=>r+"-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",Bn),_("overscroll(-[xy])?-(auto|contain|none)",({1:r="",2:e})=>({["overscroll-behavior"+r]:e})),_("(static|fixed|absolute|relative|sticky)","position"),w("-?inset(-[xy])?(?:$|-)","inset",({1:r,_:e})=>({top:r!="-x"&&e,right:r!="-y"&&e,bottom:r!="-x"&&e,left:r!="-y"&&e})),w("-?(top|bottom|left|right)(?:$|-)","inset"),_("(visible|collapse)","visibility"),_("invisible",{visibility:"hidden"}),w("-?z-","zIndex"),_("flex-((row|col)(-reverse)?)","flexDirection",wa),_("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",Ea),w("col-","gridColumn"),_("col-(span)-(\\d+)","gridColumn",Sa),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",Ea),w("row-","gridRow"),_("row-(span)-(\\d+)","gridRow",Sa),w("row-start-","gridRowStart"),_("row-start-(auto|\\d+)","gridRowStart"),w("row-end-","gridRowEnd"),_("row-end-(auto|\\d+)","gridRowEnd"),_("grid-flow-((row|col)(-dense)?)","gridAutoFlow",r=>Bn(wa(r))),_("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",xa),_("(content|items|self)-",r=>({["align-"+r[1]]:xa(r)})),_("(place-(content|items|self))-",({1:r,$$:e})=>({[r]:("wun".includes(e[3])?"space-":"")+e})),w("p([xytrbl])?(?:$|-)","padding",nr("padding")),w("-?m([xytrbl])?(?:$|-)","margin",nr("margin")),w("-?space-(x|y)(?:$|-)","space",({1:r,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${r}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[r]]:`calc(${e} * calc(1 - var(--tw-space-${r}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[r]]:`calc(${e} * var(--tw-space-${r}-reverse))`}})),_("space-(x|y)-reverse",({1:r})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${r}-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",({_:r})=>typeof(r=V(r))[1]=="string"?{fontFamily:Je(r)}:{fontFamily:Je(r[0]),...r[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:r,2:e="",3:t})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(t?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":r)]:r,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",..._t({"--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",({_:r})=>({"&::placeholder":{"--tw-placeholder-opacity":r}})),de("placeholder-",{property:"color",selector:"&::placeholder"}),_("text-(left|center|right|justify|start|end)","textAlign"),_("text-(ellipsis|clip)","textOverflow"),w("text-opacity-","textOpacity","--tw-text-opacity"),de("text-",{property:"color"}),w("text-","fontSize",({_:r})=>typeof r=="string"?{fontSize:r}:{fontSize:r[0],...typeof r[1]=="string"?{lineHeight:r[1]}:r[1]}),w("indent-","textIndent"),_("(overline|underline|line-through)","textDecorationLine"),_("no-underline",{textDecorationLine:"none"}),w("underline-offset-","textUnderlineOffset"),de("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"}),de("caret-",{opacityVariable:!1,opacitySection:"opacity"}),de("accent-",{opacityVariable:!1,opacitySection:"opacity"}),_("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:r})=>`linear-gradient(to ${Mt(r," ")},var(--tw-gradient-stops))`),de("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:r})=>({"--tw-gradient-from":r.value,"--tw-gradient-to":r.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),de("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:r})=>({"--tw-gradient-to":r.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${r.value},var(--tw-gradient-to)`})),de("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),_("bg-(fixed|local|scroll)","backgroundAttachment"),_("bg-origin-(border|padding|content)","backgroundOrigin",({1:r})=>r+"-box"),_(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),_("bg-blend-","backgroundBlendMode"),_("bg-clip-(border|padding|content|text)","backgroundClip",({1:r})=>r+(r=="text"?"":"-box")),w("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),de("bg-",{section:"backgroundColor"}),w("bg-","backgroundImage"),w("bg-","backgroundPosition"),_("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Bn),w("bg-","backgroundSize"),w("rounded(?:$|-)","borderRadius"),w("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:r,_:e})=>{let t={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[r]||[r,r];return{[`border-${Mt(t[0])}-radius`]:e,[`border-${Mt(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:r,_:e})=>({..._t({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(r||"-x")]:e,["--tw-border-spacing"+(r||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),de("border-([xytrbl])-",{section:"borderColor"},nr("border","Color")),de("border-"),w("border-([xytrbl])(?:$|-)","borderWidth",nr("border","Width")),w("border(?:$|-)","borderWidth"),w("divide-opacity(?:$|-)","divideOpacity",({_:r})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":r}})),_("divide-(solid|dashed|dotted|double|none)",({1:r})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:r}})),_("divide-([xy]-reverse)",({1:r})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+r]:"1"}})),w("divide-([xy])(?:$|-)","divideWidth",({1:r,_:e})=>{let t={x:"lr",y:"tb"}[r];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${r}-reverse`]:"0",[`border-${Mt(t[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${r}-reverse)))`,[`border-${Mt(t[1])}Width`]:`calc(${e} * var(--tw-divide-${r}-reverse))`}}}),de("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),w("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),de("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),w("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),_("ring-inset",{"--tw-ring-inset":"inset"}),de("ring-",{property:"--tw-ring-color"}),w("ring(?:$|-)","ringWidth",({_:r},{theme:e})=>({..._t({"--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(${r} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),de("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:r})=>({"--tw-shadow-color":r.value,"--tw-shadow":"var(--tw-shadow-colored)"})),w("shadow(?:$|-)","boxShadow",({_:r})=>({..._t({"--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":Je(r),"--tw-shadow-colored":Je(r).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"),...ka(),...ka("backdrop-"),w("transition(?:$|-)","transitionProperty",(r,{theme:e})=>({transitionProperty:Je(r),transitionTimingFunction:r._=="none"?void 0:Je(e("transitionTimingFunction","")),transitionDuration:r._=="none"?void 0:Je(e("transitionDuration",""))})),w("duration(?:$|-)","transitionDuration","transitionDuration",Je),w("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Je),w("delay(?:$|-)","transitionDelay","transitionDelay",Je),w("animate(?:$|-)","animation",(r,{theme:e,h:t,e:n})=>{let i=Je(r),s=i.split(" "),o=e("keyframes",s[0]);return o?{["@keyframes "+(s[0]=n(t(s[0])))]:o,animation:s.join(" ")}:{animation:i}}),"(transform)-(none)",_("transform",ks),_("transform-(cpu|gpu)",({1:r})=>({"--tw-transform":Ca(r=="gpu")})),w("scale(-[xy])?-","scale",({1:r,_:e})=>({["--tw-scale"+(r||"-x")]:e,["--tw-scale"+(r||"-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",Bn),"(appearance)-",w("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",w("(cursor)-"),"(cursor)-",_("snap-(none)","scroll-snap-type"),_("snap-(x|y|both)",({1:r})=>({..._t({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":r+" 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",nr("scroll-padding")),w("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",nr("scroll-margin")),_("touch-(auto|none|manipulation)","touch-action"),_("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:r,2:e,3:t})=>({..._t({"--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":r}`]:r,"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)-"),de("outline-",{opacityVariable:!1,opacitySection:"opacity"}),w("outline-","outlineWidth"),"(pointer-events)-",w("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:r})=>({x:"horizontal",y:"vertical"})[r]||r||"both"],_("select-(none|text|all|auto)","userSelect"),de("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),de("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 Bn(r){return(typeof r=="string"?r:r[1]).replace(/-/g," ").trim()}function wa(r){return(typeof r=="string"?r:r[1]).replace("col","column")}function Mt(r,e="-"){let t=[];for(let n of r)t.push({t:"top",r:"right",b:"bottom",l:"left"}[n]);return t.join(e)}function Je(r){return r&&""+(r._||r)}function xa({$$:r}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[r[3]||""]||"")+r}function nr(r,e=""){return({1:t,_:n})=>{let i={x:"lr",y:"tb"}[t]||t+t;return i?{...Fr(r+"-"+Mt(i[0])+e,n),...Fr(r+"-"+Mt(i[1])+e,n)}:Fr(r+e,n)}}function ka(r=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",r&&"opacity","saturate","sepia",!r&&"drop-shadow"].filter(Boolean),t={};for(let n of e)t[`--tw-${r}${n}`]="var(--tw-empty,/*!*/ /*!*/)";return t={..._t(t),[`${r}filter`]:e.map(n=>`var(--tw-${r}${n})`).join(" ")},[`(${r}filter)-(none)`,_(`${r}filter`,t),...e.map(n=>w(`${n[0]=="h"?"-?":""}(${r}${n})(?:$|-)`,n,({1:i,_:s})=>({[`--tw-${i}`]:V(s).map(o=>`${n}(${o})`).join(" "),...t})))]}function xs({1:r,_:e}){return{["--tw-"+r]:e,...ks()}}function ks(){return{..._t({"--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":Ca()}),transform:"var(--tw-transform)"}}function Ca(r){return[r?"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 Sa({1:r,2:e}){return`${r} ${e} / ${r} ${e}`}function Ea({1:r}){return`repeat(${r},minmax(0,1fr))`}function _t(r){return{"@layer defaults":{"*,::before,::after":r,"::backdrop":r}}}var Aa=[["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:r})=>`@media (orientation:${r})`],["contrast-(more|less)",({1:r})=>`@media (prefers-contrast:${r})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:r})=>`&::${r}`],["(marker|selection)",({1:r})=>`& *::${r},&::${r}`],["file","&::file-selector-button"],["(first|last|only)",({1:r})=>`&:${r}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:r,$$:e},t)=>e&&`&[${r}-${t.theme(r,e)||nt(e,"",t)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:r,3:e="",4:t,5:n="",6:i=e},{e:s,h:o,v:a})=>{let l=rr(n)||(t[0]=="["?t:a(t.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(o(r+i))})`)}${r[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:r})=>`[dir="${r}"] &`],["supports-",({$$:r},e)=>{if(r&&(r=e.theme("supports",r)||nt(r,"",e)),r)return r.includes(":")||(r+=":var(--tw)"),/^\w*\s*\(/.test(r)||(r=`(${r})`),`@supports ${r.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:r},e)=>{if(r&&(r=e.theme("screens",r)||nt(r,"",e)),typeof r=="string")return`@media not all and (min-width:${r})`}],["min-",({$$:r},e)=>(r&&(r=nt(r,"",e)),r&&`@media (min-width:${r})`)],[/^\[(.+)]$/,({1:r})=>/[&@]/.test(r)&&rr(r).replace(/[}]+$/,"").split("{")]];function Ia({colors:r,disablePreflight:e}={}){return{preflight:e?void 0:ba,theme:{...qr,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...r}},variants:Aa,rules:$a,finalize(t){return t.n&&t.d&&t.r.some(n=>/^&::(before|after)$/.test(n))&&!/(^|;)content:/.test(t.d)?{...t,d:"content:var(--tw-content);"+t.d}:t}}}var Vu={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Gu={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Ju={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Xu={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Yu={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Qu={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},Zu={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},Ku={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},ed={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},td={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},rd={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},nd={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},id={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},sd={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},od={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},ad={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},ld={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},cd={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},ud={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},dd={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},pd={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},fd={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},Ta={__proto__:null,slate:Vu,gray:Gu,zinc:Ju,neutral:Xu,stone:Yu,red:Qu,orange:Zu,amber:Ku,yellow:ed,lime:td,green:rd,emerald:nd,teal:id,cyan:sd,sky:od,blue:ad,indigo:ld,violet:cd,purple:ud,fuchsia:dd,pink:pd,rose:fd};function zn({disablePreflight:r}={}){return Ia({colors:Ta,disablePreflight:r})}function Hn({className:r="prose",defaultColor:e="gray",extend:t={},colors:n={}}={}){return n={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",...n,dark:n.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",...n.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])=>[`${r}-${s}`,(a,l)=>Oa(r,o[0]=="."?"."+l.e(l.h(o.slice(1))):o,l,u=>`& :is(${u.trim()})`)]),rules:[[`(lead|not-${r})`,({1:s},{h:o})=>[{c:o(s)}]],[`${r}-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)"}}],[r+"-",({$$:s},o)=>{let a=Pa(o.theme("fontSize",s));return a&&{"@layer components":a}}],[r+"-",({$$:s},o)=>i(s,o)],[r,(s,o)=>({...i(e,o),"@layer base":[Ra(r,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:T(20,16),marginBottom:T(20,16),paddingLeft:T(26,16)},li:{marginTop:T(8,16),marginBottom:T(8,16)},"ol>li,ul>li":{paddingLeft:T(6,16)},">ul>li p":{marginTop:T(12,16),marginBottom:T(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:T(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:T(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:T(12,16),marginBottom:T(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:T(48,16),marginBottom:T(48,16)},blockquote:{marginTop:T(32,20),marginBottom:T(32,20),paddingLeft:T(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:T(20,16),marginBottom:T(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:T(36,16),marginTop:"0",marginBottom:T(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:T(24,16),marginTop:T(48,24),marginBottom:T(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:T(20,16),marginTop:T(32,20),marginBottom:T(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:T(24,16),marginBottom:T(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:T(32,16),marginBottom:T(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:T(14,16),lineHeight:"1.4",marginTop:T(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:T(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:T(21,24)},"h3 code":{fontSize:T(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:T(14,16),lineHeight:"1.7",marginTop:T(24,14),marginBottom:T(24,14),borderRadius:"0.375rem",paddingTop:T(12,14),paddingRight:T(16,14),paddingBottom:T(12,14),paddingLeft:T(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:T(32,16),marginBottom:T(32,16),fontSize:T(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:T(8,14),paddingBottom:T(8,14),paddingLeft:T(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:T(8,14),paddingRight:T(8,14),paddingBottom:T(8,14),paddingLeft:T(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:T(20,16),lineHeight:"1.6",marginTop:T(24,20),marginBottom:T(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Ra(r,o,t)],"@layer components":{...Pa(o.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function i(s,o){let a={},l={},u=(c,d,p)=>{let f=o.theme(`colors.${s}.${d}`,d);p["--tw-prose-"+c]=ze(f);let g=p!=l&&o.d("colors",`${s}-${d}`,f);g&&(l["--tw-prose-"+c]=ze(g))};for(let c in n){let d=n[c];c!="dark"&&d&&u(c,d,a)}for(let c in n.dark||{}){let d=n.dark[c];d&&(n.dark?u("invert-"+c,d,a):u(c,d,l))}return Object.keys(a).length?{"@layer defaults":{"&":a,[o.v("dark")]:l}}:void 0}}function Ra(r,e,t){let n={};for(let i in t)n[Oa(r,i,e,s=>`.${e.e(e.h(r))}${s}`)]=t[i];return n}function Oa(r,e,{e:t,h:n},i){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,o=" ",a=s,l="")=>i(`${o}:where(${a}):not(:where(.${t(n("not-"+r))} *))${l}`))}function Pa(r){return r?typeof r=="string"?{fontSize:r}:{fontSize:r[0],...typeof r[1]=="string"?{lineHeight:r[1]}:r[1]}:void 0}function T(r,e){return`${(r/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var Ss=Mr({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:[zn(),Nn(),Un(),Hn()],hash:!1});function Wn(r,e=!0){let t=function(){if(hd)try{let l=Dn(new CSSStyleSheet);return l.connect=u=>{let c=Es(u);c.adoptedStyleSheets=[...c.adoptedStyleSheets,l.target]},l.disconnect=jn,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let o=[Dn(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 d=this.target.cssRules[u];o.forEach((p,f)=>f&&p.target.insertRule(d.cssText,u))},resume(l,u){return o[0].resume(l,u)},connect(l){let u=document.createElement("style");Es(l).appendChild(u);let c=Dn(u),{cssRules:d}=this.target;for(let p=0;p<d.length;p++)c.target.insertRule(d[p].cssText,p);o.push(c),a.set(l,c)},disconnect(l){let u=o.indexOf(a.get(l));u>=0&&o.splice(u,1)}}}(),n=ha({...r,hash:r.hash??e},t),i=ga(n);return function(o){return class extends o{connectedCallback(){super.connectedCallback?.(),t.connect(this),i.observe(Es(this))}disconnectedCallback(){t.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=n}}}}var hd=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Es(r){return r.shadowRoot||r.attachShadow({mode:"open"})}var $s=r=>Wn(Ss)(r);var Vn=globalThis,Gn=Vn.ShadowRoot&&(Vn.ShadyCSS===void 0||Vn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Cs=Symbol(),Fa=new WeakMap,jr=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==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(Gn&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=Fa.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Fa.set(t,e))}return e}toString(){return this.cssText}},Ma=r=>new jr(typeof r=="string"?r:r+"",void 0,Cs),As=(r,...e)=>{let t=r.length===1?r[0]:e.reduce((n,i,s)=>n+(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.")})(i)+r[s+1],r[0]);return new jr(t,r,Cs)},Is=(r,e)=>{if(Gn)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let n=document.createElement("style"),i=Vn.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)}},Jn=Gn?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let n of e.cssRules)t+=n.cssText;return Ma(t)})(r):r;var{is:gd,defineProperty:md,getOwnPropertyDescriptor:vd,getOwnPropertyNames:yd,getOwnPropertySymbols:_d,getPrototypeOf:bd}=Object,Xn=globalThis,La=Xn.trustedTypes,wd=La?La.emptyScript:"",xd=Xn.reactiveElementPolyfillSupport,Dr=(r,e)=>r,Ts={toAttribute(r,e){switch(e){case Boolean:r=r?wd:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},ja=(r,e)=>!gd(r,e),qa={attribute:!0,type:String,converter:Ts,reflect:!1,hasChanged:ja};Symbol.metadata??=Symbol("metadata"),Xn.litPropertyMetadata??=new WeakMap;var dt=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 n=Symbol(),i=this.getPropertyDescriptor(e,n,t);i!==void 0&&md(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){let{get:i,set:s}=vd(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get(){return i?.call(this)},set(o){let a=i?.call(this);s.call(this,o),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??qa}static _$Ei(){if(this.hasOwnProperty(Dr("elementProperties")))return;let e=bd(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Dr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Dr("properties"))){let t=this.properties,n=[...yd(t),..._d(t)];for(let i of n)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[n,i]of t)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[t,n]of this.elementProperties){let i=this._$Eu(t,n);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)t.unshift(Jn(i))}else e!==void 0&&t.push(Jn(e));return t}static _$Eu(e,t){let n=t.attribute;return n===!1?void 0:typeof n=="string"?n: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 n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);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,n){this._$AK(e,n)}_$EC(e,t){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:Ts).toAttribute(t,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,t){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Ts;this._$Em=i,this[i]=o.fromAttribute(t,s.type),this._$Em=null}}requestUpdate(e,t,n){if(e!==void 0){if(n??=this.constructor.getPropertyOptions(e),!(n.hasChanged??ja)(this[e],t))return;this.P(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,n){this._$AL.has(e)||this._$AL.set(e,t),n.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[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n)s.wrapped!==!0||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],s)}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(t)):this._$EU()}catch(n){throw e=!1,this._$EU(),n}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){}};dt.elementStyles=[],dt.shadowRootOptions={mode:"open"},dt[Dr("elementProperties")]=new Map,dt[Dr("finalized")]=new Map,xd?.({ReactiveElement:dt}),(Xn.reactiveElementVersions??=[]).push("2.0.4");var Ps=globalThis,Yn=Ps.trustedTypes,Da=Yn?Yn.createPolicy("lit-html",{createHTML:r=>r}):void 0,Os="$lit$",pt=`lit$${Math.random().toFixed(9).slice(2)}$`,Fs="?"+pt,kd=`<${Fs}>`,jt=document,Ur=()=>jt.createComment(""),Br=r=>r===null||typeof r!="object"&&typeof r!="function",Wa=Array.isArray,Va=r=>Wa(r)||typeof r?.[Symbol.iterator]=="function",Rs=`[
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
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`
|
|
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
|
|
8
|
-
<button type="button" @click="${
|
|
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">
|
|
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")}};
|
|
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`
|
|
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) -->
|
|
17
17
|
<div class="${this.state==="open"?"visible opacity-100":"invisible opacity-0"} absolute bottom-0 left-0 right-0 top-0 transition-[opacity,visibility]">
|
|
18
|
-
${this.src?
|
|
18
|
+
${this.src?O`
|
|
19
19
|
<!-- load given source -->
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
<!-- scale-[1.01] fixes aliasing (white outline) -->
|
|
21
|
+
<img class="block h-full w-full bg-white scale-[1.01]" src="${this.src}" />
|
|
22
|
+
`:O`
|
|
22
23
|
<!-- if no image URL is specified, we default to our animation -->
|
|
23
|
-
<!--
|
|
24
|
+
<!-- scale-[1.01] fixes aliasing (white outline) -->
|
|
24
25
|
<img src="https://widget.molin.ai/animations/bubble.webp" class="block h-full w-full scale-[1.01]" />
|
|
25
26
|
`}
|
|
26
27
|
</div>
|
|
@@ -33,26 +34,26 @@ var Ru=Object.defineProperty;var Qo=r=>{throw TypeError(r)};var Pu=(r,e,t)=>e in
|
|
|
33
34
|
</svg>
|
|
34
35
|
</div>
|
|
35
36
|
</button>
|
|
36
|
-
`);this.state="open",this.src=""}};S(
|
|
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
38
|
<div class="h-full w-full flex flex-col font-sans text-base bg-[#FDFDFD] items-stretch justify-center">
|
|
38
39
|
<!-- examples section -->
|
|
39
40
|
<div class="m-4">
|
|
40
|
-
${
|
|
41
|
-
${this.examples?.items?.length?
|
|
41
|
+
${ol(this.examples.title,()=>O`<p class="text-md text-center text-gray-500 font-semibold select-none">${this.examples.title}</p>`)}
|
|
42
|
+
${this.examples?.items?.length?O`
|
|
42
43
|
<ul class="prose mt-2 text-left text-gray-400 select-none">
|
|
43
|
-
${
|
|
44
|
-
<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="${()=>
|
|
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)}">
|
|
45
46
|
<span>“${t.trim()}” →</span>
|
|
46
47
|
</li>
|
|
47
48
|
`)}
|
|
48
49
|
</ul>
|
|
49
|
-
`:
|
|
50
|
+
`:D}
|
|
50
51
|
</div>
|
|
51
52
|
|
|
52
53
|
<!-- spacer for visual alignment -->
|
|
53
54
|
<div class="h-1/9"></div>
|
|
54
55
|
</div>
|
|
55
|
-
`);this.examples={title:"",items:[]}}};
|
|
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
57
|
<div class="flex items-center justify-between space-x-4 p-4 text-lg bg-white font-sans">
|
|
57
58
|
<mw-pulse-dot class="contents" position="bottom-right" color="green-500">
|
|
58
59
|
<div class="h-10 w-10 overflow-hidden rounded">
|
|
@@ -70,7 +71,7 @@ var Ru=Object.defineProperty;var Qo=r=>{throw TypeError(r)};var Pu=(r,e,t)=>e in
|
|
|
70
71
|
|
|
71
72
|
<div class="flex-grow"></div>
|
|
72
73
|
|
|
73
|
-
<button @click=${
|
|
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
75
|
<!-- -->
|
|
75
76
|
<p class="inline-flex h-6 w-6 items-center justify-center">
|
|
76
77
|
<span class="whitespace-pre text-[11px] font-medium leading-[15px]">${this.content.newChatTitle||`NEW
|
|
@@ -78,25 +79,25 @@ CHAT`}</span>
|
|
|
78
79
|
</p>
|
|
79
80
|
</button>
|
|
80
81
|
|
|
81
|
-
<button @click=${
|
|
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
83
|
<!-- x -->
|
|
83
84
|
<span class="inline-block h-6 w-6 leading-6">✕</span>
|
|
84
85
|
</button>
|
|
85
86
|
</div>
|
|
86
|
-
`);this.content={logoUrl:"",title:"",status:"",color:"",newChatTitle:""},this.showNewChat=!1,this.showClose=!1}};
|
|
87
|
-
<form class="flex items-center space-x-4 border-t font-sans text-base bg-white px-4" @submit="${
|
|
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)}">
|
|
88
89
|
<!-- text input -->
|
|
89
|
-
<textarea name="input" @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
91
|
|
|
91
92
|
<!-- send/cancel button -->
|
|
92
93
|
<div class="py-2">
|
|
93
94
|
<button type="submit" class="inline-flex justify-center items-center select-none hover:bg-[${this.color}]/80 bg-[${this.color}] h-8 w-8 text-white transition-colors rounded-full" ?disabled="${this.disabled}">
|
|
94
|
-
${this.streaming?
|
|
95
|
+
${this.streaming?O`
|
|
95
96
|
<!-- x -->
|
|
96
97
|
<svg class="h-4 w-4 fill-current" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
97
98
|
<path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" />
|
|
98
99
|
</svg>
|
|
99
|
-
`:
|
|
100
|
+
`:O`
|
|
100
101
|
<!-- airplane -->
|
|
101
102
|
<svg class="h-4 w-4 fill-current" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
102
103
|
<path d="m4.01 6.03 7.51 3.22-7.52-1 .01-2.22m7.5 8.72L4 17.97v-2.22l7.51-1M2.01 3 2 10l15 2-15 2 .01 7L23 12 2.01 3z" />
|
|
@@ -105,7 +106,7 @@ CHAT`}</span>
|
|
|
105
106
|
</button>
|
|
106
107
|
</div>
|
|
107
108
|
</form>
|
|
108
|
-
`);this.disabled=!1,this.streaming=!1,this.placeholder="Type a message...",this.color=""}};We=new WeakSet,
|
|
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
110
|
<div class="ml-20 flex justify-end font-sans text-base">
|
|
110
111
|
<div class="max-w-full">
|
|
111
112
|
<!-- include an invisible border (same color as background) so that this message is the same height as the bot message -->
|
|
@@ -114,15 +115,15 @@ CHAT`}</span>
|
|
|
114
115
|
</div>
|
|
115
116
|
|
|
116
117
|
<!-- render status (if any) -->
|
|
117
|
-
${this.status==="sent"?
|
|
118
|
+
${this.status==="sent"?O`
|
|
118
119
|
<!-- tick mark -->
|
|
119
120
|
<svg class="ml-auto h-4 w-4 text-[${this.color}]" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
|
120
121
|
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
|
|
121
122
|
</svg>
|
|
122
|
-
`:
|
|
123
|
+
`:D}
|
|
123
124
|
</div>
|
|
124
125
|
</div>
|
|
125
|
-
`;case"assistant":case"support":return
|
|
126
|
+
`;case"assistant":case"support":return O`
|
|
126
127
|
<div class="mr-8 flex justify-start font-sans text-base">
|
|
127
128
|
<div class="flex max-w-full space-x-2">
|
|
128
129
|
<!--
|
|
@@ -140,15 +141,15 @@ CHAT`}</span>
|
|
|
140
141
|
</div>
|
|
141
142
|
</div>
|
|
142
143
|
</div>
|
|
143
|
-
`;default:throw new Error(`Unknown side: ${this.side}`)}}};S(Jr,"properties",{side:{type:String},status:{type:String},color:{type:String},logoUrl:{type:String,attribute:"logo"}});var Xr=class extends sr{constructor(e){if(super(e),this.it=L,e.type!==ni.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===L||e==null)return this._t=void 0,this.it=e;if(e===Xe)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:[]}}};Xr.directiveName="unsafeHTML",Xr.resultType=1;var fl=ii(Xr);var Td=class extends Error{constructor(e){super(e[0].message);S(this,"issues");this.name="ValiError",this.issues=e}},Mg=Symbol("brand");function hl(r,e,t,n,i){return{issues:[{context:r,reference:e,input:t,label:n,received:i}]}}function gl(r){return{output:r}}function ur(r,e){return Array.isArray(r)?[void 0,r]:[r,e]}var li;function Rd(r){return{lang:r?.lang??li?.lang,message:r?.message,abortEarly:r?.abortEarly??li?.abortEarly,abortPipeEarly:r?.abortPipeEarly??li?.abortPipeEarly,skipPipe:r?.skipPipe??li?.skipPipe}}var Pd;function Od(r){return Pd?.get(r)}var Fd;function Md(r){return Fd?.get(r)}var Ld;function qd(r,e){return Ld?.get(r)?.get(e)}function ml(r,e,t,n,i){let s=e.message??qd(t,i.lang)??(r?Md(i.lang):null)??n?.message??Od(i.lang)??i.message;return typeof s=="function"?s(i):s}function Yr(r,e,t){return{typed:r,output:e,issues:t}}function Ut(r){let e=typeof r;return e==="object"&&(e=r?Object.getPrototypeOf(r).constructor.name:"null"),e==="string"?`"${r}"`:e==="number"||e==="bigint"||e==="boolean"?`${r}`:e}function jd(r,e,t){let n=t.received??Ut(t.input),i={reason:r.type,context:t.context.type,expected:t.context.expects,received:n,message:`Invalid ${t.label}: ${t.context.expects?`Expected ${t.context.expects} but r`:"R"}eceived ${n}`,input:t.input,requirement:t.context.requirement,path:t.path,lang:e?.lang,abortEarly:e?.abortEarly,abortPipeEarly:e?.abortPipeEarly,skipPipe:e?.skipPipe};return i.message=ml(!1,t.context,t.reference,e,i),i}function Qr(r,e,t,n){if(r.pipe&&!t?.skipPipe)for(let i of r.pipe){let s=i._parse(e);if(s.issues){for(let o of s.issues){let a=jd(r,t,o);n?n.push(a):n=[a]}if(t?.abortEarly||t?.abortPipeEarly)break}else e=s.output}return Yr(!0,e,n)}function Dd(r,e,t){if(!r||typeof r=="object"&&!Array.isArray(r)){let[s,o]=ur(e,t);return[r,s,o]}let[n,i]=ur(r,e);return[void 0,n,i]}function dr(r,e,t,n,i){let s=Ut(t),o=i?.expected??r.expects,a={reason:i?.reason??"type",context:r.type,expected:o,received:s,message:`Invalid type: Expected ${o} but received ${s}`,input:t,path:i?.path,issues:i?.issues,lang:n?.lang,abortEarly:n?.abortEarly,abortPipeEarly:n?.abortPipeEarly,skipPipe:n?.skipPipe};return a.message=ml(!0,r,e,n,a),{typed:!1,output:t,issues:[a]}}function Nd(r){return typeof r.default=="function"?r.default():r.default}function pr(r,e,t){let[n,i]=ur(e,t);return{type:"array",expects:"Array",async:!1,item:r,message:n,pipe:i,_parse(s,o){if(Array.isArray(s)){let a=!0,l,u=[];for(let c=0;c<s.length;c++){let d=s[c],p=this.item._parse(d,o);if(p.issues){let f={type:"array",origin:"value",input:s,key:c,value:d};for(let g of p.issues)g.path?g.path.unshift(f):g.path=[f],l?.push(g);if(l||(l=p.issues),o?.abortEarly){a=!1;break}}p.typed||(a=!1),u.push(p.output)}return a?Qr(this,u,o,l):Yr(!1,u,l)}return dr(this,pr,s,o)}}}function Ae(r,e){let[t,n]=ur(r,e);return{type:"boolean",expects:"boolean",async:!1,message:t,pipe:n,_parse(i,s){return typeof i=="boolean"?Qr(this,i,s):dr(this,Ae,i,s)}}}function Bt(r,e){let[t,n]=ur(r,e);return{type:"number",expects:"number",async:!1,message:t,pipe:n,_parse(i,s){return typeof i=="number"&&!isNaN(i)?Qr(this,i,s):dr(this,Bt,i,s)}}}function pe(r,e,t,n){let[i,s,o]=Dd(e,t,n),a;return{type:"object",expects:"Object",async:!1,entries:r,rest:i,message:s,pipe:o,_parse(l,u){if(l&&typeof l=="object"){a=a??Object.entries(this.entries);let c=!0,d,p={};for(let[f,g]of a){let v=l[f],b=g._parse(v,u);if(b.issues){let M={type:"object",origin:"value",input:l,key:f,value:v};for(let E of b.issues)E.path?E.path.unshift(M):E.path=[M],d?.push(E);if(d||(d=b.issues),u?.abortEarly){c=!1;break}}b.typed||(c=!1),(b.output!==void 0||f in l)&&(p[f]=b.output)}if(this.rest&&!(u?.abortEarly&&d)){for(let f in l)if(!(f in this.entries)){let g=l[f],v=this.rest._parse(g,u);if(v.issues){let b={type:"object",origin:"value",input:l,key:f,value:g};for(let M of v.issues)M.path?M.path.unshift(b):M.path=[b],d?.push(M);if(d||(d=v.issues),u?.abortEarly){c=!1;break}}v.typed||(c=!1),p[f]=v.output}}return c?Qr(this,p,u,d):Yr(!1,p,d)}return dr(this,pe,l,u)}}}function O(r,e){return{type:"optional",expects:`${r.expects} | undefined`,async:!1,wrapped:r,default:e,_parse(t,n){if(t===void 0){let i=Nd(this);if(i===void 0)return Yr(!0,t);t=i}return this.wrapped._parse(t,n)}}}function ci(r,e){return{type:"picklist",expects:r.map(Ut).join(" | "),async:!1,options:r,message:e,_parse(t,n){return this.options.includes(t)?Yr(!0,t):dr(this,ci,t,n)}}}function D(r,e){let[t,n]=ur(r,e);return{type:"string",expects:"string",async:!1,message:t,pipe:n,_parse(i,s){return typeof i=="string"?Qr(this,i,s):dr(this,D,i,s)}}}function vl(r,e,t){let n=r._parse(e,Rd(t));if(n.issues)throw new Td(n.issues);return n.output}function Bs(r,e){return{type:"max_value",expects:`<=${r instanceof Date?r.toJSON():Ut(r)}`,async:!1,message:e,requirement:r,_parse(t){return t<=this.requirement?gl(t):hl(this,Bs,t,"value",t instanceof Date?t.toJSON():Ut(t))}}}function zs(r,e){return{type:"min_value",expects:`>=${r instanceof Date?r.toJSON():Ut(r)}`,async:!1,message:e,requirement:r,_parse(t){return t>=this.requirement?gl(t):hl(this,zs,t,"value",t instanceof Date?t.toJSON():Ut(t))}}}var Zr,Me,Ye,Kr,Hs,ui=class{constructor(e,t){k(this,Kr);k(this,Zr);k(this,Me);k(this,Ye);if(!e)throw new Error("host is required");if(!t)throw new Error("config is required");P(this,Zr,e),h(this,Zr).addController(this),P(this,Me,t)}connect(e){P(this,Me,e),P(this,Ye,I(this,Kr,Hs).call(this))}hostConnected(){setTimeout(()=>{P(this,Ye,I(this,Kr,Hs).call(this))},0)}hostDisconnected(){h(this,Ye)?.close(1e3,"lit_host_disconnected"),P(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}};Zr=new WeakMap,Me=new WeakMap,Ye=new WeakMap,Kr=new WeakSet,Hs=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",ve,Ee,Qe,fr,hr,be,zt,bl,wl,xl,kl,di=class{constructor(e,t){k(this,be);k(this,ve);k(this,Ee);k(this,Qe);S(this,"isStreaming",!1);S(this,"typingIndicator");S(this,"ranOutOfCredits",!1);S(this,"messages",[]);S(this,"conversationId","");k(this,fr,0);k(this,hr);S(this,"isLiveMode",!1);P(this,ve,e),P(this,Ee,t),P(this,Qe,this.initWS()),e.addController(this)}sendUserInput(e,{role:t="user",expectStreaming:n=!1}={}){return I(this,be,zt).call(this,{type:"USER_INPUT",value:e,role:t},{expectStreaming:n})}sendUserCancel(){return I(this,be,zt).call(this,{type:"USER_CANCEL"})}sendUserTypingStart(){return I(this,be,zt).call(this,{type:"USER_TYPING_START"})}sendUserTypingStop(){return I(this,be,zt).call(this,{type:"USER_TYPING_STOP"})}reloadConfig(){I(this,be,zt).call(this,{type:"RELOAD_CONFIG"})}close(){h(this,Qe).close(1e3,"closed by user")}retry(){clearTimeout(h(this,hr)),P(this,hr,setTimeout(()=>{h(this,Ee).onReconnect?.(),P(this,Qe,this.initWS())},1e3*h(this,fr))),Zo(this,fr)._++}initWS(){return new ui(h(this,ve),{url:()=>h(this,Ee).url(this.conversationId,{}),onOpen:e=>I(this,be,bl).call(this,e),onMessage:e=>I(this,be,wl).call(this,JSON.parse(e.data)),onError:e=>I(this,be,xl).call(this,e),onClose:e=>I(this,be,kl).call(this,e)})}hostConnected(){this.conversationId=h(this,Ee).restoreConversationState?.()?.conversationId||""}reset(){I(this,be,zt).call(this,{type:"NEW_CHAT"}),h(this,Ee).onReset?.(),this.isStreaming=!1,this.typingIndicator=void 0,this.ranOutOfCredits=!1,this.messages=[],this.conversationId="",this.isLiveMode=!1,h(this,ve).requestUpdate()}hostDisconnected(){clearTimeout(h(this,hr))}reconnectSocket(){h(this,Qe).close(1e3,"destroy"),P(this,Qe,this.initWS())}get lastMsg(){if(this.messages.length>0)return this.messages[this.messages.length-1]}};ve=new WeakMap,Ee=new WeakMap,Qe=new WeakMap,fr=new WeakMap,hr=new WeakMap,be=new WeakSet,zt=function(e,{expectStreaming:t=!1}={}){return h(this,Qe).isConnected?(t&&!this.isLiveMode&&(this.isStreaming=!0,h(this,ve).requestUpdate()),h(this,Qe).send(JSON.stringify(e)),!0):(console.warn("WebSocket is not connected, message not sent - reconnecting now",e),this.retry(),!1)},bl=function(e){P(this,fr,0)},wl=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages=[...this.messages,e.message].filter((t,n,i)=>n===i.findIndex(s=>s.id===t.id)),this.typingIndicator=void 0,h(this,ve).requestUpdate(),h(this,Ee).onNewMessage?.(e.message);break}case"UPDATE_MESSAGE":{let t=this.messages.find(n=>n.id===e.message.id);if(t)Object.assign(t,e.message),h(this,ve).requestUpdate(),h(this,Ee).onUpdateMessage?.(e);else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let t=this.messages.find(n=>n.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,ve).requestUpdate(),h(this,Ee).onMessageDone?.(e,t);break}case"MESSAGE_CANCEL":{this.isStreaming=!1,this.typingIndicator=void 0,h(this,ve).requestUpdate();break}case"ERROR":{h(this,Ee).onMessageError?.(e);break}case"CONNECTED":{e.messages&&(this.messages=e.messages),this.conversationId=e.conversationId,h(this,Ee).onConnect?.(e.conversationId),h(this,Ee).persistConversationState?.(e.conversationId),this.isLiveMode=e.metadata?.isLiveMode,h(this,ve).requestUpdate();break}case"TYPING_START":{e.role==="assistant"&&(this.isStreaming=!0),this.typingIndicator={role:e.role,metadata:e.metadata},h(this,ve).requestUpdate();break}case"TYPING_STOP":{this.typingIndicator=void 0,h(this,ve).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,ve).requestUpdate();break}case"RECONNECT":{this.reconnectSocket(),h(this,ve).requestUpdate();break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},xl=function(e){console.error("onError",e),h(this,Ee).onError?.(e)},kl=function(e){h(this,ve).isConnected&&!h(this,Qe).isConnected&&e.reason==="reconnect"&&this.retry(),this.isStreaming=!1,this.typingIndicator=void 0,h(this,ve).requestUpdate(),h(this,Ee).onClose?.()};var en,gr,xt,Ht,fi,Sl,pi=class{constructor(e,t,{timeoutMs:n=2e3}={}){k(this,fi);k(this,en);k(this,gr);k(this,xt);k(this,Ht,!1);S(this,"timeoutMs");P(this,en,e),P(this,gr,t),this.timeoutMs=n,e.addController(this)}get isTyping(){return h(this,Ht)}hostDisconnected(){clearTimeout(h(this,xt)),P(this,xt,void 0)}onInput(e){if(h(this,en).isConnected){if(!e.trim()){this.typingStopped();return}clearTimeout(h(this,xt)),P(this,xt,setTimeout(()=>this.typingStopped(),this.timeoutMs)),h(this,Ht)||I(this,fi,Sl).call(this)}}typingStopped(){clearTimeout(h(this,xt)),P(this,Ht,!1),h(this,gr).typingStopped()}};en=new WeakMap,gr=new WeakMap,xt=new WeakMap,Ht=new WeakMap,fi=new WeakSet,Sl=function(){P(this,Ht,!0),h(this,gr).typingStarted()};function El(r,e){let t=new Map;for(let n of r){let i=e(n);t.has(i)||t.set(i,[]),(t.get(i)||[]).push(n)}return t}function $l(r,e="en-US"){let t=new Intl.DateTimeFormat(e,{hour:"numeric",minute:"numeric"}).format(r);return`${r.toLocaleDateString(e,{year:"numeric",month:"short",day:"numeric"})}, ${t}`}var Zg=pe({wsApiUrl:D(),url:D(),logoUrl:O(D()),title:D(),status:D(),color:D(),showStillLearningBanner:O(Ae()),liveChatEnabled:O(Ae()),allowedOrigins:O(pr(D())),input:pe({placeholder:D()}),bubble:pe({imageUrl:O(D()),position:pe({bottom:O(D()),right:O(D()),left:O(D())}),mobilePosition:O(pe({bottom:O(D()),right:O(D()),left:O(D())}))}),examples:pe({title:D(),items:pr(D())}),instructions:pe({items:pr(D())}),popup:O(pe({mobileEnabled:O(Ae()),desktopEnabled:O(Ae()),delayMs:O(Bt()),text:O(D()),mobileTitleText:O(D()),mobileButtonText:O(D())})),tryItOut:O(pe({mobileEnabled:O(Ae()),desktopEnabled:O(Ae()),text:O(D())})),contactDetails:O(pe({email:O(D()),phone:O(D()),socialMedia:O(pe({facebook:O(D()),instagram:O(D()),twitter:O(D())}))})),neverShowStillLearningBanner:O(Ae()),hidden:O(Ae()),newChatTitle:O(D()),webhookURL:O(D()),automatedResponse:O(pe({enabled:O(Ae()),text:O(D()),latencyThresholdMs:O(Bt())})),manual:O(Ae()),removePoweredBy:O(Ae()),claimable:O(Ae()),feed:O(D()),scraper:O(ci(["netkazan","jateknet","grandopet","insportline"])),platform:O(ci(["shopify","shoprenter","unas","scraper"])),workingHours:O(pe({dailyAvailability:pr(pe({dayOfWeek:Bt([zs(0),Bs(6)]),startTime:D(),endTime:D(),isActive:Ae()})),userTimeZone:O(D())})),planOverrides:O(pe({maxProducts:O(Bt()),conversations:O(Bt())}))});var Ud="\xB7 \xB7 \xB7",Bd=pe({conversationId:O(D())}),re,hi,tn,ie,Cl,Al,Il,Tl,Rl,Pl,Ol,Vs,gi=class gi extends B(j){constructor(){super();k(this,re);k(this,tn,new pi(this,{typingStarted:()=>h(this,ie).sendUserTypingStart(),typingStopped:()=>h(this,ie).sendUserTypingStop()}));k(this,ie,new di(this,{url:(t,{resume:n}={})=>{let i=new URL(this.config.wsApiUrl);return i.searchParams.set("widgetId",this.widgetId),i.searchParams.set("resume",n?"1":""),i.searchParams.set("conversationId",t),i.searchParams.set("pageUrl",window.location.href),i},onReconnect:()=>{},onError:t=>{console.error("ws error",t)},onClose:()=>{},onNewMessage:t=>{t.role==="user"&&h(this,re,Vs)?.scrollTo(0,h(this,re,Vs).scrollHeight),t.role==="assistant"&&this.callbacks.onNewMessageStartedStreaming?.({widgetId:this.widgetId,message:t,conversationId:this.conversationId})},onMessageDone:(t,n)=>{n.role==="assistant"&&this.callbacks.onMessageEndedStreaming?.({widgetId:this.widgetId,text:n.content??"",message:n,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,re,hi))},onConnect:t=>{},persistConversationState:t=>{localStorage.setItem(h(this,re,hi),JSON.stringify({conversationId:t}))},restoreConversationState:()=>{try{let t=JSON.parse(localStorage.getItem(h(this,re,hi))||"{}");return{conversationId:vl(Bd,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,ie).conversationId}get messages(){return h(this,ie).messages}render(){let t=El(this.messages,n=>new Date(n.timestamp).setSeconds(0,0).toString());return R`
|
|
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
145
|
<div class="mx-auto flex h-full w-full flex-col bg-white font-sans text-base">
|
|
145
146
|
<mw-header
|
|
146
147
|
class="z-10 border-b"
|
|
147
148
|
.content="${{logoUrl:this.config.logoUrl,title:this.config.title,status:this.config.status,color:this.config.color,newChatTitle:this.config.newChatTitle}}"
|
|
148
|
-
?show-new-chat="${!
|
|
149
|
+
?show-new-chat="${!h(this,re).isLiveMode&&this.messages.length>0}"
|
|
149
150
|
?show-close="${this.showClose}"
|
|
150
|
-
@mw:new-chat-click="${
|
|
151
|
-
@mw:close-click="${
|
|
151
|
+
@mw:new-chat-click="${R(this,ne,Pl)}"
|
|
152
|
+
@mw:close-click="${R(this,ne,Ol)}">
|
|
152
153
|
</mw-header>
|
|
153
154
|
|
|
154
155
|
<!-- used by the dashboard to inject content -->
|
|
@@ -156,7 +157,7 @@ CHAT`}</span>
|
|
|
156
157
|
|
|
157
158
|
<!-- this structure of 2 divs is required for the browser native stick/scroll to bottom -->
|
|
158
159
|
<div id="scrollable-content" class="flex h-full flex-shrink flex-grow flex-col-reverse overflow-auto bg-[#FDFDFD] pt-4">
|
|
159
|
-
${this.config?.showStillLearningBanner?
|
|
160
|
+
${this.config?.showStillLearningBanner?O`
|
|
160
161
|
<div class="flex justify-center">
|
|
161
162
|
<div class="mb-2 flex w-1/2 items-center justify-center rounded-full bg-black p-3">
|
|
162
163
|
<!-- (i) symbol -->
|
|
@@ -167,20 +168,20 @@ CHAT`}</span>
|
|
|
167
168
|
<span class="ml-2 text-sm text-white">I'm still learning!</span>
|
|
168
169
|
</div>
|
|
169
170
|
</div>
|
|
170
|
-
`:
|
|
171
|
+
`:O`
|
|
171
172
|
<!-- this makes the chat stick to bottom when the banner is hidden -->
|
|
172
173
|
<div class="flex p-1"></div>
|
|
173
174
|
`}
|
|
174
175
|
|
|
175
176
|
<!-- this is the 2nd (inner) div that will natively stick/scroll to bottom -->
|
|
176
177
|
<div>
|
|
177
|
-
${
|
|
178
|
-
<div class="my-2 text-center text-xs text-gray-500">${$l(new Date(Number(
|
|
179
|
-
${
|
|
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`
|
|
180
181
|
<div class="${l?"mb-[2px]":"mb-3"} mx-4 flex-row">
|
|
181
|
-
<mw-chat-message color="${this.config.color}" status="${u}" logo="${s.metadata?.avatar||this.config.logoUrl}" side="${s.role}" @click="${
|
|
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
183
|
<div class="prose break-words text-inherit">
|
|
183
|
-
${s.content===
|
|
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
185
|
</div>
|
|
185
186
|
</mw-chat-message>
|
|
186
187
|
</div>
|
|
@@ -188,27 +189,27 @@ CHAT`}</span>
|
|
|
188
189
|
`)}
|
|
189
190
|
|
|
190
191
|
<!-- show typing indicator if the non-user side is typing -->
|
|
191
|
-
${["assistant","support"].includes(h(this,
|
|
192
|
-
<mw-chat-message class="mx-4 mb-4 block" color="${this.config.color}" logo="${h(this,
|
|
192
|
+
${["assistant","support"].includes(h(this,re)?.typingIndicator?.role??"")&&h(this,re)?.typingIndicator?.role?O`
|
|
193
|
+
<mw-chat-message class="mx-4 mb-4 block" color="${this.config.color}" logo="${h(this,re)?.typingIndicator?.metadata?.avatar||this.config.logoUrl}" side="${h(this,re).typingIndicator.role}">
|
|
193
194
|
<div class="prose break-words text-inherit">
|
|
194
195
|
<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>
|
|
195
196
|
</div>
|
|
196
197
|
</mw-chat-message>
|
|
197
|
-
`:
|
|
198
|
+
`:D}
|
|
198
199
|
</div>
|
|
199
200
|
|
|
200
201
|
<mw-background
|
|
201
202
|
class="mx-auto max-w-sm flex-grow"
|
|
202
203
|
.examples="${this.messages.length>0?[]:this.config.examples}"
|
|
203
|
-
@mw:example-click="${
|
|
204
|
+
@mw:example-click="${R(this,ne,Al)}"></mw-background>
|
|
204
205
|
</div>
|
|
205
206
|
|
|
206
207
|
<div class="flex-shrink-0 flex-grow-0 space-y-2 pb-2">
|
|
207
|
-
<mw-chat-input @mw:change="${
|
|
208
|
-
${this.config.removePoweredBy?
|
|
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>
|
|
209
|
+
${this.config.removePoweredBy?D:O`<mw-powered-by></mw-powered-by>`}
|
|
209
210
|
</div>
|
|
210
211
|
</div>
|
|
211
|
-
`}reloadConfig(){h(this,
|
|
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
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">
|
|
213
214
|
<circle fill="currentFill" stroke="none" cx="27" cy="50" r="6">
|
|
214
215
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
|
|
@@ -220,56 +221,56 @@ CHAT`}</span>
|
|
|
220
221
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3" />
|
|
221
222
|
</circle>
|
|
222
223
|
</svg>
|
|
223
|
-
`)}};var
|
|
224
|
+
`)}};var wn,Fl,Ml,ri=class ri extends z(j){constructor(){super();b(this,wn);S(this,"render",()=>O`
|
|
224
225
|
<!-- wrapper -->
|
|
225
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">
|
|
226
227
|
<!-- close button -->
|
|
227
|
-
<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="${
|
|
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
229
|
|
|
229
230
|
<!-- content -->
|
|
230
|
-
<div class="p-4 text-left text-gray-800" @click="${
|
|
231
|
+
<div class="p-4 text-left text-gray-800" @click="${R(this,wn,Ml)}">
|
|
231
232
|
<p>${this.text}</p>
|
|
232
233
|
</div>
|
|
233
234
|
</div>
|
|
234
|
-
`);this.text="Hello there. How can we help?"}};
|
|
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
236
|
<!-- wrapper -->
|
|
236
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">
|
|
237
238
|
<!-- close button -->
|
|
238
|
-
<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="${
|
|
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
240
|
|
|
240
241
|
<!-- content -->
|
|
241
|
-
<div class="p-4 text-gray-800" @click="${
|
|
242
|
+
<div class="p-4 text-gray-800" @click="${R(this,xn,Ll)}">
|
|
242
243
|
<h1 class="mr-8 py-2.5 text-left font-display text-lg font-bold">${this.title}</h1>
|
|
243
244
|
<p class="py-2.5 text-left">${this.text}</p>
|
|
244
245
|
<div class="h-4"></div>
|
|
245
|
-
${this.button&&this.color?
|
|
246
|
+
${this.button&&this.color?O`
|
|
246
247
|
<!-- only visible if button text and color are given -->
|
|
247
248
|
<button class="w-full rounded-full bg-[${this.color}] px-5 py-2.5 text-center text-sm font-medium text-white" type="button">${this.button}</button>
|
|
248
|
-
`:
|
|
249
|
+
`:D}
|
|
249
250
|
</div>
|
|
250
251
|
|
|
251
252
|
<!-- can append any other content -->
|
|
252
253
|
<slot name="footer"></slot>
|
|
253
254
|
</div>
|
|
254
|
-
`);this.title="Chat with Molin AI",this.text="Hello there. How can we help?",this.button="Chat now",this.color="#601feb"}};
|
|
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
256
|
<!-- mobile shadow backdrop -->
|
|
256
257
|
<div class="sm:hidden ${t} fixed inset-0 z-[2147483647] bg-black/50 transition-[opacity,visibility]"></div>
|
|
257
258
|
|
|
258
259
|
<!-- mobile overlay -->
|
|
259
260
|
<div class="sm:hidden ${t} fixed bottom-0 z-[2147483647] left-0 right-0">
|
|
260
|
-
<mw-popup-mobile title="${
|
|
261
|
-
${
|
|
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)}">
|
|
262
|
+
${i.mobile.poweredBy?O`<mw-powered-by class="block p-4" slot="footer"></mw-powered-by>`:D}
|
|
262
263
|
</mw-popup-mobile>
|
|
263
264
|
</div>
|
|
264
265
|
|
|
265
266
|
<!-- desktop -->
|
|
266
267
|
<div class="max-sm:hidden ${t} ${this.positionClasses} z-[2147483647] fixed transition-[opacity,translate,visibility]">
|
|
267
|
-
<mw-popup-desktop text="${
|
|
268
|
+
<mw-popup-desktop text="${i.desktop.text}" @mw:click="${R(this,Rt,eo)}" @mw:close="${R(this,Rt,Zs)}"></mw-popup-desktop>
|
|
268
269
|
</div>
|
|
269
|
-
`}hide(){h(this,
|
|
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
271
|
<p class="flex items-center justify-center bg-white m-0 space-x-1 text-xs font-sans text-gray-400">
|
|
271
272
|
<span class="pointer-events-none select-none">Powered by</span>
|
|
272
|
-
<a class="inline-flex items-center space-x-1 text-gray-600 underline" href="${
|
|
273
|
+
<a class="inline-flex items-center space-x-1 text-gray-600 underline" href="${zp}" target="_blank">
|
|
273
274
|
<!-- molin logo icon -->
|
|
274
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">
|
|
275
276
|
<g clip-path="url(#clip0_1347_2815)">
|
|
@@ -285,19 +286,19 @@ CHAT`}</span>
|
|
|
285
286
|
<span>Molin AI</span>
|
|
286
287
|
</a>
|
|
287
288
|
</p>
|
|
288
|
-
`)}};S(
|
|
289
|
+
`)}};S(ui,"styles",As`
|
|
289
290
|
:host {
|
|
290
291
|
display: block;
|
|
291
292
|
}
|
|
292
|
-
`);var
|
|
293
|
+
`);var br,ql,ci=class extends z(j){constructor(){super();b(this,br);S(this,"render",()=>O`
|
|
293
294
|
<span class="relative inline-flex">
|
|
294
295
|
<slot></slot>
|
|
295
|
-
<span class="${h(this,
|
|
296
|
+
<span class="${h(this,br,ql)} pointer-events-none absolute flex h-3 w-3">
|
|
296
297
|
<span class="bg-${this.color} absolute inline-flex h-3 w-3 animate-ping rounded-full opacity-75"></span>
|
|
297
298
|
<span class="bg-${this.color} relative inline-flex h-3 w-3 rounded-full"></span>
|
|
298
299
|
</span>
|
|
299
300
|
</span>
|
|
300
|
-
`);this.color="sky-500",this.position="top-right"}};
|
|
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
302
|
<div class="fixed bottom-24 right-6 flex animate-bounce flex-col items-center justify-center font-sans text-base ${this.positionClasses}">
|
|
302
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>
|
|
303
304
|
|
|
@@ -306,43 +307,43 @@ CHAT`}</span>
|
|
|
306
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>
|
|
307
308
|
</svg>
|
|
308
309
|
</div>
|
|
309
|
-
`);this.positionClasses="",this.text="Try it out"}};S(
|
|
310
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function
|
|
311
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function
|
|
312
|
-
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(
|
|
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,`
|
|
313
314
|
`).replace(/\r/g,`
|
|
314
|
-
`)).length,i=0;i<n;i++){var o=r.charCodeAt(i),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),tt(a)||(t>e&&(s+=r.substring(e,t)),s+=a,e=t=i+1)}return t>e&&(s+=r.substring(e,r.length)),s},mt=function(){function r(e){return e&&(e.preventDefault=r.preventDefault,e.stopPropagation=r.stopPropagation),e}return r.preventDefault=function(){this.returnValue=!1},r.stopPropagation=function(){this.cancelBubble=!0},function(e,t,n,i,s){if(e)if(e.addEventListener&&!i)e.addEventListener(t,n,!!s);else{var o="on"+t,a=e[o];e[o]=function(l,u,c){return function(d){if(d=d||r(m?.event)){var p,f=!0;et(c)&&(p=c(d));var g=u.call(l,d);return p!==!1&&g!==!1||(f=!1),f}}}(e,n,a)}else x.error("No valid element provided to register_event")}}();function En(r,e){var t=function(){if(!C)return e("document not found");var n=C.createElement("script");n.type="text/javascript",n.src=r,n.onload=function(o){return e(void 0,o)},n.onerror=function(o){return e(o)};var i,s=C.querySelectorAll("body > script");s.length>0?(i=s[0].parentNode)===null||i===void 0||i.insertBefore(n,s[0]):C.body.appendChild(n)};C!=null&&C.body?t():C?.addEventListener("DOMContentLoaded",t)}(function(r){r.GZipJS="gzip-js",r.Base64="base64"})(Ke||(Ke={}));var Fc="$people_distinct_id",gn="__alias",mn="__timers",Xl="$autocapture_disabled_server_side",vo="$heatmaps_enabled_server_side",yo="$session_recording_enabled_server_side",Yl="$console_log_recording_enabled_server_side",Ql="$session_recording_network_payload_capture",Zl="$session_recording_canvas_recording",Kl="$replay_sample_rate",ec="$replay_minimum_duration",Fi="$sesid",bn="$session_is_sampled",kr="$enabled_feature_flags",_o="$early_access_features",Sr="$stored_person_properties",Tt="$stored_group_properties",bo="$surveys",Mi="$flag_call_reported",ht="$user_state",wo="$client_session_props",xo="$capture_rate_limit",ko="$initial_campaign_params",So="$initial_referrer_info",Li="$epp",Eo="__POSTHOG_TOOLBAR__",Zd=[Fc,gn,"__cmpns",mn,yo,vo,Fi,kr,ht,_o,Tt,Sr,bo,Mi,wo,xo,ko,So,Li],ro="$active_feature_flags",Si="$override_feature_flags",tc="$feature_flag_payloads",rc=function(r){var e,t={},n=rt(Ti(r||{}));try{for(n.s();!(e=n.n()).done;){var i=Te(e.value,2),s=i[0],o=i[1];o&&(t[s]=o)}}catch(a){n.e(a)}finally{n.f()}return t},Kd=function(){function r(e){Y(this,r),this.instance=e,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return Q(r,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(kr),t=this.instance.get_property(Si);if(!t)return e||{};for(var n=ye({},e),i=Object.keys(t),s=0;s<i.length;s++)n[i[s]]=t[i[s]];return this._override_warning||(x.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this._override_warning=!0),n}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(tc)||{}}},{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,n=this.instance.get_property(Sr),i=this.instance.get_property(Tt),s={token:t,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:n,group_properties:i,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:Ke.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 n,i=this.getFlagVariants()[e],s="".concat(i),o=this.instance.get_property(Mi)||{};return(t.send_event||!("send_event"in t))&&(!(e in o)||!o[e].includes(s))&&(fe(o[e])?o[e].push(s):o[e]=[s],(n=this.instance.persistence)===null||n===void 0||n.register(y({},Mi,o)),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:i})),i}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 n=this.getFlagVariants(),i=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,d=s.featureFlagPayloads;if(c)if(fe(c)){var p,f={};if(c)for(var g=0;g<c.length;g++)f[c[g]]=!0;o&&o.register((y(p={},ro,c),y(p,kr,f),p))}else{var v=c,b=d;s.errorsWhileComputingFlags&&(v=$($({},l),v),b=$($({},u),b)),o&&o.register((y(a={},ro,Object.keys(rc(v))),y(a,kr,v||{}),y(a,tc,b||{}),a))}})(e,this.instance.persistence,n,i),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(Si);else if(fe(e)){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;this.instance.persistence.register(y({},Si,t))}else this.instance.persistence.register(y({},Si,e))}},{key:"onFeatureFlags",value:function(e){var t=this;if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){var n=this._prepareFeatureFlagsForCallbacks(),i=n.flags,s=n.flagVariants;e(i,s)}return function(){return t.removeFeatureFlagsHandler(e)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,t){var n,i,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));(n=this.instance.persistence)===null||n===void 0||n.register((y(i={},ro,Object.keys(rc(o))),y(i,kr,o),i)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.instance.get_property(_o);if(i&&!n)return e(i);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({},_o,a)),e(a)}}})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(function(n){return t[n]}),flagVariants:Object.keys(t).filter(function(n){return t[n]}).reduce(function(n,i){return n[i]=t[i],n},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(e){var t=this._prepareFeatureFlagsForCallbacks(),n=t.flags,i=t.flagVariants;this.featureFlagEventHandlers.forEach(function(s){return s(n,i,{errorsLoading:e})})}},{key:"setPersonPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this.instance.get_property(Sr)||{};this.instance.register(y({},Sr,$($({},n),e))),t&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(Sr)}},{key:"setGroupPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this.instance.get_property(Tt)||{};Object.keys(n).length!==0&&Object.keys(n).forEach(function(i){n[i]=$($({},n[i]),e[i]),delete e[i]}),this.instance.register(y({},Tt,$($({},n),e))),t&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(e){if(e){var t=this.instance.get_property(Tt)||{};this.instance.register(y({},Tt,$($({},t),{},y({},e,{}))))}else this.instance.unregister(Tt)}}]),r}();Math.trunc||(Math.trunc=function(r){return r<0?Math.ceil(r):Math.floor(r)}),Number.isInteger||(Number.isInteger=function(r){return Ze(r)&&isFinite(r)&&Math.floor(r)===r});var nc="0123456789abcdef",ep=function(){function r(e){if(Y(this,r),this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}return Q(r,[{key:"toString",value:function(){for(var e="",t=0;t<this.bytes.length;t++)e=e+nc.charAt(this.bytes[t]>>>4)+nc.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 r(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 n=this.bytes[t]-e.bytes[t];if(n!==0)return Math.sign(n)}return 0}}],[{key:"fromFieldsV7",value:function(e,t,n,i){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(i)||e<0||t<0||n<0||i<0||e>0xffffffffffff||t>4095||n>1073741823||i>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|n>>>24,s[9]=n>>>16,s[10]=n>>>8,s[11]=n,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new r(s)}}]),r}(),tp=function(){function r(){Y(this,r),y(this,"timestamp",0),y(this,"counter",0),y(this,"random",new rp)}return Q(r,[{key:"generate",value:function(){var e=this.generateOrAbort();if(q(e)){this.timestamp=0;var t=this.generateOrAbort();if(q(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 ep.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())}}]),r}(),Mc=function(r){if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<r.length;e++)r[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return r};m&&!q(m.crypto)&&crypto.getRandomValues&&(Mc=function(r){return crypto.getRandomValues(r)});var ic,rp=function(){function r(){Y(this,r),y(this,"buffer",new Uint32Array(8)),y(this,"cursor",1/0)}return Q(r,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(Mc(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),r}(),Rt=function(){return np().toString()},np=function(){return(ic||(ic=new tp)).generate()},ip="Thu, 01 Jan 1970 00:00:00 GMT",pn="",sp=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function op(r,e){if(e){var t=function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C;if(pn)return pn;if(!s||["localhost","127.0.0.1"].includes(i))return"";for(var o=i.split("."),a=Math.min(o.length,8),l="dmn_chk_"+Rt(),u=new RegExp("(^|;)\\s*"+l+"=1");!pn&&a--;){var c=o.slice(a).join("."),d=l+"=1;domain=."+c;s.cookie=d,u.test(s.cookie)&&(s.cookie=d+";expires="+ip,pn=c)}return pn}(r);if(!t){var n=function(i){var s=i.match(sp);return s?s[0]:""}(r);n!==t&&x.info("Warning: cookie subdomain discovery mismatch",n,t),t=n}return t?"; domain=."+t:""}return""}var we,ct={is_supported:function(){return!!C},error:function(r){x.error("cookieStore error: "+r)},get:function(r){if(C){try{for(var e=r+"=",t=C.cookie.split(";").filter(function(s){return s.length}),n=0;n<t.length;n++){for(var i=t[n];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return decodeURIComponent(i.substring(e.length,i.length))}}catch{}return null}},parse:function(r){var e;try{e=JSON.parse(ct.get(r))||{}}catch{}return e},set:function(r,e,t,n,i){if(C)try{var s="",o="",a=op(C.location.hostname,n);if(t){var l=new Date;l.setTime(l.getTime()+24*t*60*60*1e3),s="; expires="+l.toUTCString()}i&&(o="; secure");var u=r+"="+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(r,e){try{ct.set(r,"",-1,e)}catch{return}}},no=null,le={is_supported:function(){if(!tt(no))return no;var r=!0;if(q(m))r=!1;else try{var e="__mplssupport__";le.set(e,"xyz"),le.get(e)!=='"xyz"'&&(r=!1),le.remove(e)}catch{r=!1}return r||x.error("localStorage unsupported; falling back to cookie store"),no=r,r},error:function(r){x.error("localStorage error: "+r)},get:function(r){try{return m?.localStorage.getItem(r)}catch(e){le.error(e)}return null},parse:function(r){try{return JSON.parse(le.get(r))||{}}catch{}return null},set:function(r,e){try{m?.localStorage.setItem(r,JSON.stringify(e))}catch(t){le.error(t)}},remove:function(r){try{m?.localStorage.removeItem(r)}catch(e){le.error(e)}}},ap=["distinct_id",Fi,bn,Li],vn=$($({},le),{},{parse:function(r){try{var e={};try{e=ct.parse(r)||{}}catch{}var t=ye(e,JSON.parse(le.get(r)||"{}"));return le.set(r,t),t}catch{}return null},set:function(r,e,t,n,i){try{le.set(r,e);var s={};ap.forEach(function(o){e[o]&&(s[o]=e[o])}),Object.keys(s).length&&ct.set(r,s,t,n,i)}catch(o){le.error(o)}},remove:function(r,e){try{m?.localStorage.removeItem(r),ct.remove(r,e)}catch(t){le.error(t)}}}),Ei={},lp={is_supported:function(){return!0},error:function(r){x.error("memoryStorage error: "+r)},get:function(r){return Ei[r]||null},parse:function(r){return Ei[r]||null},set:function(r,e){Ei[r]=e},remove:function(r){delete Ei[r]}},Xt=null,xe={is_supported:function(){if(!tt(Xt))return Xt;if(Xt=!0,q(m))Xt=!1;else try{var r="__support__";xe.set(r,"xyz"),xe.get(r)!=='"xyz"'&&(Xt=!1),xe.remove(r)}catch{Xt=!1}return Xt},error:function(r){x.error("sessionStorage error: ",r)},get:function(r){try{return m?.sessionStorage.getItem(r)}catch(e){xe.error(e)}return null},parse:function(r){try{return JSON.parse(xe.get(r))||null}catch{}return null},set:function(r,e){try{m?.sessionStorage.setItem(r,JSON.stringify(e))}catch(t){xe.error(t)}},remove:function(r){try{m?.sessionStorage.removeItem(r)}catch(e){xe.error(e)}}},cp=["localhost","127.0.0.1"],Lc=function(r){var e=C?.createElement("a");return q(e)?null:(e.href=r,e)},up=function(r,e){return!!function(t){try{new RegExp(t)}catch{return!1}return!0}(e)&&new RegExp(e).test(r)},dp=function(r){var e,t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",i=[];return G(r,function(s,o){q(s)||q(o)||o==="undefined"||(e=encodeURIComponent(function(a){return a instanceof File}(s)?s.name:s.toString()),t=encodeURIComponent(o),i[i.length]=t+"="+e)}),i.join(n)},sc=function(r,e){for(var t,n=((r.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<n.length;i++){var s=n[i].split("=");if(s[0]===e){t=s;break}}if(!fe(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," ")},qi=function(r,e){var t=r.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},Ge="Mobile",ji="iOS",lt="Android",$n="Tablet",qc=lt+" "+$n,jc="iPad",Dc="Apple",Nc=Dc+" Watch",Vi="Safari",Tr="BlackBerry",Uc="Samsung",Bc=Uc+"Browser",zc=Uc+" Internet",Zt="Chrome",pp=Zt+" OS",Hc=Zt+" "+ji,Mo="Internet Explorer",Wc=Mo+" "+Ge,Lo="Opera",fp=Lo+" Mini",qo="Edge",Vc="Microsoft "+qo,$r="Firefox",Gc=$r+" "+ji,Cn="Nintendo",An="PlayStation",Cr="Xbox",Jc=lt+" "+Ge,Xc=Ge+" "+Vi,yn="Windows",$o=yn+" Phone",oc="Nokia",Co="Ouya",Yc="Generic",hp=Yc+" "+Ge.toLowerCase(),Qc=Yc+" "+$n.toLowerCase(),Ao="Konqueror",Ie="(\\d+(\\.\\d+)?)",io=new RegExp("Version/"+Ie),gp=new RegExp(Cr,"i"),mp=new RegExp(An+" \\w+","i"),vp=new RegExp(Cn+" \\w+","i"),jo=new RegExp(Tr+"|PlayBook|BB10","i"),yp={"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"},_p=function(r,e){return e&&z(e,Dc)||function(t){return z(t,Vi)&&!z(t,Zt)&&!z(t,lt)}(r)},ac=function(r,e){return e=e||"",z(r," OPR/")&&z(r,"Mini")?fp:z(r," OPR/")?Lo:jo.test(r)?Tr:z(r,"IE"+Ge)||z(r,"WPDesktop")?Wc:z(r,Bc)?zc:z(r,qo)||z(r,"Edg/")?Vc:z(r,"FBIOS")?"Facebook "+Ge:z(r,Zt)?Zt:z(r,"CriOS")?Hc:z(r,"UCWEB")||z(r,"UCBrowser")?"UC Browser":z(r,"FxiOS")?Gc:z(r,lt)?Jc:z(r.toLowerCase(),Ao.toLowerCase())?Ao:_p(r,e)?z(r,Ge)?Xc:Vi:z(r,$r)?$r:z(r,"MSIE")||z(r,"Trident/")?Mo:z(r,"Gecko")?$r:""},bp=(y(we={},Wc,[new RegExp("rv:"+Ie)]),y(we,Vc,[new RegExp(qo+"?\\/"+Ie)]),y(we,Zt,[new RegExp(Zt+"/"+Ie)]),y(we,Hc,[new RegExp("CriOS\\/"+Ie)]),y(we,"UC Browser",[new RegExp("(UCBrowser|UCWEB)\\/"+Ie)]),y(we,Vi,[io]),y(we,Xc,[io]),y(we,Lo,[new RegExp("(Opera|OPR)\\/"+Ie)]),y(we,$r,[new RegExp($r+"\\/"+Ie)]),y(we,Gc,[new RegExp("FxiOS\\/"+Ie)]),y(we,Ao,[new RegExp("Konqueror[:/]?"+Ie,"i")]),y(we,Tr,[new RegExp(Tr+" "+Ie),io]),y(we,Jc,[new RegExp("android\\s"+Ie)]),y(we,zc,[new RegExp(Bc+"\\/"+Ie)]),y(we,Mo,[new RegExp("(rv:|MSIE )"+Ie)]),y(we,"Mozilla",[new RegExp("rv:"+Ie)]),we),lc=[[new RegExp(Cr+"; "+Cr+" (.*?)[);]","i"),function(r){return[Cr,r&&r[1]||""]}],[new RegExp(Cn,"i"),[Cn,""]],[new RegExp(An,"i"),[An,""]],[jo,[Tr,""]],[new RegExp(yn,"i"),function(r,e){if(/Phone/.test(e)||/WPDesktop/.test(e))return[$o,""];if(new RegExp(Ge).test(e)&&!/IEMobile\b/.test(e))return[yn+" "+Ge,""];var t=/Windows NT ([0-9.]+)/i.exec(e);if(t&&t[1]){var n=t[1],i=yp[n]||"";return/arm/i.test(e)&&(i="RT"),[yn,i]}return[yn,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,function(r){if(r&&r[3]){var e=[r[3],r[4],r[5]||"0"];return[ji,e.join(".")]}return[ji,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,function(r){var e="";return r&&r.length>=3&&(e=q(r[2])?r[3]:r[2]),["watchOS",e]}],[new RegExp("("+lt+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+lt+")","i"),function(r){if(r&&r[2]){var e=[r[2],r[3],r[4]||"0"];return[lt,e.join(".")]}return[lt,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,function(r){var e=["Mac OS X",""];if(r&&r[1]){var t=[r[1],r[2],r[3]||"0"];e[1]=t.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[pp,""]],[/Linux|debian/i,["Linux",""]]],cc=function(r){return vp.test(r)?Cn:mp.test(r)?An:gp.test(r)?Cr:new RegExp(Co,"i").test(r)?Co:new RegExp("("+$o+"|WPDesktop)","i").test(r)?$o:/iPad/.test(r)?jc:/iPod/.test(r)?"iPod Touch":/iPhone/.test(r)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(r)?Nc:jo.test(r)?Tr:/(kobo)\s(ereader|touch)/i.test(r)?"Kobo":new RegExp(oc,"i").test(r)?oc:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(r)||/(kf[a-z]+)( bui|\)).+silk\//i.test(r)?"Kindle Fire":/(Android|ZTE)/i.test(r)?!new RegExp(Ge).test(r)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(r)?/pixel[\daxl ]{1,6}/i.test(r)&&!/pixel c/i.test(r)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(r)||/lmy47v/i.test(r)&&!/QTAQZ3/i.test(r)?lt:qc:lt:new RegExp("(pda|"+Ge+")","i").test(r)?hp:new RegExp($n,"i").test(r)&&!new RegExp($n+" pc","i").test(r)?Qc:""},$i="https?://(.*)",wp=["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(r){var e=wp.concat(r||[]),t={};return G(e,function(n){var i=C?sc(C.URL,n):"";i.length&&(t[n]=i)}),t},searchEngine:function(){var r=C?.referrer;return r?r.search($i+"google.([^/?]*)")===0?"google":r.search($i+"bing.com")===0?"bing":r.search($i+"yahoo.com")===0?"yahoo":r.search($i+"duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var r=_e.searchEngine(),e=r!="yahoo"?"q":"p",t={};if(!tt(r)){t.$search_engine=r;var n=C?sc(C.referrer,e):"";n.length&&(t.ph_keyword=n)}return t},browser:ac,browserVersion:function(r,e){var t=ac(r,e),n=bp[t];if(q(n))return null;for(var i=0;i<n.length;i++){var s=n[i],o=r.match(s);if(o)return parseFloat(o[o.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(r){for(var e=0;e<lc.length;e++){var t=Te(lc[e],2),n=t[0],i=t[1],s=n.exec(r),o=s&&(et(i)?i(s,r):i);if(o)return o}return["",""]},device:cc,deviceType:function(r){var e=cc(r);return e===jc||e===qc||e==="Kobo"||e==="Kindle Fire"||e===Qc?$n:e===Cn||e===Cr||e===An||e===Co?"Console":e===Nc?"Wearable":e?Ge:"Desktop"},referrer:function(){return C?.referrer||"$direct"},referringDomain:function(){var r;return C!=null&&C.referrer&&((r=Lc(C.referrer))===null||r===void 0?void 0:r.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},properties:function(){if(!se)return{};var r=Te(_e.os(se),2),e=r[0],t=r[1];return ye(mo({$os:e,$os_version:t,$browser:_e.browser(se,navigator.vendor),$device:_e.device(se),$device_type:_e.deviceType(se)}),{$current_url:Ve?.href,$host:Ve?.host,$pathname:Ve?.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:Yt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Oc()/1e3})},people_properties:function(){if(!se)return{};var r=Te(_e.os(se),2),e=r[0],t=r[1];return ye(mo({$os:e,$os_version:t,$browser:_e.browser(se,navigator.vendor)}),{$browser_version:_e.browserVersion(se,navigator.vendor)})}},xp=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],so=function(){function r(e){Y(this,r),this.config=e,this.props={},this.campaign_params_saved=!1,this.name=function(t){var n="";return t.token&&(n=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),t.persistence_name?"ph_"+t.persistence_name:"ph_"+n+"_posthog"}(e),this.storage=this.buildStorage(e),this.load(),this.update_config(e,e),this.save()}return Q(r,[{key:"buildStorage",value:function(e){xp.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"&&le.is_supported()?le:t==="localstorage+cookie"&&vn.is_supported()?vn:t==="sessionstorage"&&xe.is_supported()?xe:t==="memory"?lp:t==="cookie"?ct:vn.is_supported()?vn:ct}},{key:"properties",value:function(){var e={};return G(this.props,function(t,n){if(n===kr&&at(t))for(var i=Object.keys(t),s=0;s<i.length;s++)e["$feature/".concat(i[s])]=t[i[s]];else a=n,l=!1,(tt(o=Zd)?l:Wl&&o.indexOf===Wl?o.indexOf(a)!=-1:(G(o,function(u){if(l||(l=u===a))return Oi}),l))||(e[n]=t);var o,a,l}),e}},{key:"load",value:function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=ye({},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,n){var i=this;if(at(e)){q(t)&&(t="None"),this.expire_days=q(n)?this.default_expiry:n;var s=!1;if(G(e,function(o,a){i.props.hasOwnProperty(a)&&i.props[a]!==t||(i.props[a]=o,s=!0)}),s)return this.save(),!0}return!1}},{key:"register",value:function(e,t){var n=this;if(at(e)){this.expire_days=q(t)?this.default_expiry:t;var i=!1;if(G(e,function(s,o){e.hasOwnProperty(o)&&n.props[o]!==s&&(n.props[o]=s,i=!0)}),i)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:"set_initial_campaign_params",value:function(){this.register_once(y({},ko,_e.campaignParams(this.config.custom_campaign_params)),void 0)}},{key:"update_search_keyword",value:function(){this.register(_e.searchInfo())}},{key:"update_referrer_info",value:function(){this.register(_e.referrerInfo())}},{key:"set_initial_referrer_info",value:function(){this.register_once(y({},So,_e.referrerInfo()),void 0)}},{key:"get_referrer_info",value:function(){return mo({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"get_initial_props",value:function(){var e=this,t={};return G([So,ko],function(n){var i=e.props[n];i&&G(i,function(s,o){var a;t["$initial_"+(a=o,a.replace(/^\$/,""))]=s})}),t}},{key:"safe_merge",value:function(e){return G(this.props,function(t,n){n in e||(e[n]=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 n=this.buildStorage(e),i=this.props;this.clear(),this.storage=n,this.props=i,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 n=this.props[mn]||{};n[e]=t,this.props[mn]=n,this.save()}},{key:"remove_event_timer",value:function(e){var t=(this.props[mn]||{})[e];return q(t)||(delete this.props[mn][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()}}]),r}(),kp=2,Sp=4,Ep=Q(function r(e){var t,n,i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Y(this,r),y(this,"bucketSize",100),y(this,"refillRate",10),y(this,"mutationBuckets",{}),y(this,"loggedTracker",{}),y(this,"refillBuckets",function(){Object.keys(i.mutationBuckets).forEach(function(o){i.mutationBuckets[o]=i.mutationBuckets[o]+i.refillRate,i.mutationBuckets[o]>=i.bucketSize&&delete i.mutationBuckets[o]})}),y(this,"getNodeOrRelevantParent",function(o){var a=i.rrweb.mirror.getNode(o);if(a?.nodeName!=="svg"&&a instanceof Element){var l=a.closest("svg");if(l)return[i.rrweb.mirror.getId(l),l]}return[o,a]}),y(this,"numberOfChanges",function(o){var a,l,u,c,d,p,f,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)+((d=(p=o.texts)===null||p===void 0?void 0:p.length)!==null&&d!==void 0?d:0)+((f=(g=o.adds)===null||g===void 0?void 0:g.length)!==null&&f!==void 0?f:0)}),y(this,"throttleMutations",function(o){if(o.type!==3||o.data.source!==0)return o;var a=o.data,l=i.numberOfChanges(a);a.attributes&&(a.attributes=a.attributes.filter(function(c){var d,p,f,g=Te(i.getNodeOrRelevantParent(c.id),2),v=g[0],b=g[1];return i.mutationBuckets[v]===0?!1:(i.mutationBuckets[v]=(d=i.mutationBuckets[v])!==null&&d!==void 0?d:i.bucketSize,i.mutationBuckets[v]=Math.max(i.mutationBuckets[v]-1,0),i.mutationBuckets[v]===0&&(i.loggedTracker[v]||(i.loggedTracker[v]=!0,(p=(f=i.options).onBlockedNode)===null||p===void 0||p.call(f,v,b))),c)}));var u=i.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=(n=this.options.bucketSize)!==null&&n!==void 0?n:this.bucketSize,setInterval(function(){i.refillBuckets()},1e3)}),Ri=function(r){return r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r}(Ri||{});function Do(r){return r?Wi(r).split(/\s+/):[]}function Di(r){var e="";switch(Sn(r.className)){case"string":e=r.className;break;case"object":e=("baseVal"in r.className?r.className.baseVal:null)||r.getAttribute("class")||"";break;default:e=""}return Do(e)}function Zc(r){return Pt(r)?null:Wi(r).split(/(\s+)/).filter(function(e){return Ar(e)}).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Ni(r){var e="";return To(r)&&!ru(r)&&r.childNodes&&r.childNodes.length&&G(r.childNodes,function(t){var n;Kc(t)&&t.textContent&&(e+=(n=Zc(t.textContent))!==null&&n!==void 0?n:"")}),Wi(e)}function No(r){return!!r&&r.nodeType===1}function Ot(r,e){return!!r&&!!r.tagName&&r.tagName.toLowerCase()===e.toLowerCase()}function Kc(r){return!!r&&r.nodeType===3}function eu(r){return!!r&&r.nodeType===11}var Io=["a","button","form","input","select","textarea","label"];function tu(r){var e=r.parentNode;return!(!e||!No(e))&&e}function $p(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;if(!m||!r||Ot(r,"html")||!No(r))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=[r],c=!0,d=r;d.parentNode&&!Ot(d,"body");)if(eu(d.parentNode))u.push(d.parentNode.host),d=d.parentNode.host;else{if(!(c=tu(d)))break;if(n||Io.indexOf(c.tagName.toLowerCase())>-1)l=!0;else{var p=m.getComputedStyle(c);p&&p.getPropertyValue("cursor")==="pointer"&&(l=!0)}u.push(c),d=c}if(!function(v,b){var M=b?.element_allowlist;if(q(M))return!0;var E,F=rt(v);try{var N=function(){var Z=E.value;if(M.some(function(X){return Z.tagName.toLowerCase()===X}))return{v:!0}};for(F.s();!(E=F.n()).done;){var H=N();if(Sn(H)==="object")return H.v}}catch(Z){F.e(Z)}finally{F.f()}return!1}(u,t)||!function(v,b){var M=b?.css_selector_allowlist;if(q(M))return!0;var E,F=rt(v);try{var N=function(){var Z=E.value;if(M.some(function(X){return Z.matches(X)}))return{v:!0}};for(F.s();!(E=F.n()).done;){var H=N();if(Sn(H)==="object")return H.v}}catch(Z){F.e(Z)}finally{F.f()}return!1}(u,t))return!1;var f=m.getComputedStyle(r);if(f&&f.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;var g=r.tagName.toLowerCase();switch(g){case"html":return!1;case"form":return(i||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(e.type)>=0;default:return l?(i||["click"]).indexOf(e.type)>=0:(i||["click"]).indexOf(e.type)>=0&&(Io.indexOf(g)>-1||r.getAttribute("contenteditable")==="true")}}function To(r){for(var e=r;e.parentNode&&!Ot(e,"body");e=e.parentNode){var t=Di(e);if(z(t,"ph-sensitive")||z(t,"ph-no-capture"))return!1}if(z(Di(r),"ph-include"))return!0;var n=r.type||"";if($e(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var i=r.name||r.id||"";return!($e(i)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))}function ru(r){return!!(Ot(r,"input")&&!["button","checkbox","submit","reset"].includes(r.type)||Ot(r,"select")||Ot(r,"textarea")||r.getAttribute("contenteditable")==="true")}var nu="(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})",Cp=new RegExp("^(?:".concat(nu,")$")),Ap=new RegExp(nu),iu="\\d{3}-?\\d{2}-?\\d{4}",Ip=new RegExp("^(".concat(iu,")$")),Tp=new RegExp("(".concat(iu,")"));function Ar(r){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return!(Pt(r)||$e(r)&&(r=Wi(r),(e?Cp:Ap).test((r||"").replace(/[- ]/g,""))||(e?Ip:Tp).test(r)))}function uc(r){var e=Ni(r);return Ar(e="".concat(e," ").concat(su(r)).trim())?e:""}function su(r){var e="";return r&&r.childNodes&&r.childNodes.length&&G(r.childNodes,function(t){var n;if(t&&((n=t.tagName)===null||n===void 0?void 0:n.toLowerCase())==="span")try{var i=Ni(t);e="".concat(e," ").concat(i).trim(),t.childNodes&&t.childNodes.length&&(e="".concat(e," ").concat(su(t)).trim())}catch(s){x.error(s)}}),e}function Rp(r){return function(e){var t=e.map(function(n){var i,s,o="";if(n.tag_name&&(o+=n.tag_name),n.attr_class){n.attr_class.sort();var a,l=rt(n.attr_class);try{for(l.s();!(a=l.n()).done;){var u=a.value;o+=".".concat(u.replace(/"/g,""))}}catch(p){l.e(p)}finally{l.f()}}var c=$($($($({},n.text?{text:n.text}:{}),{},{"nth-child":(i=n.nth_child)!==null&&i!==void 0?i:0,"nth-of-type":(s=n.nth_of_type)!==null&&s!==void 0?s:0},n.href?{href:n.href}:{}),n.attr_id?{attr_id:n.attr_id}:{}),n.attributes),d={};return Ti(c).sort(function(p,f){var g=Te(p,1)[0],v=Te(f,1)[0];return g.localeCompare(v)}).forEach(function(p){var f=Te(p,2),g=f[0],v=f[1];return d[dc(g.toString())]=dc(v.toString())}),o+=":",o+=Ti(c).map(function(p){var f=Te(p,2),g=f[0],v=f[1];return"".concat(g,'="').concat(v,'"')}).join("")});return t.join(";")}(function(e){return e.map(function(t){var n,i,s={text:(n=t.$el_text)===null||n===void 0?void 0:n.slice(0,400),tag_name:t.tag_name,href:(i=t.attr__href)===null||i===void 0?void 0:i.slice(0,2048),attr_class:Pp(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return Ti(t).filter(function(o){return Te(o,1)[0].indexOf("attr__")===0}).forEach(function(o){var a=Te(o,2),l=a[0],u=a[1];return s.attributes[l]=u}),s})}(r))}function dc(r){return r.replace(/"|\\"/g,'\\"')}function Pp(r){var e=r.attr__class;return e?fe(e)?e:Do(e):void 0}var Ro="[SessionRecording]",oo={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(r){return r},recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6},Op=["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"],Fp=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],Mp=["/s/","/e/","/i/"];function pc(r,e,t,n){if(Pt(r))return r;var i=e?.["content-length"]||function(s){return new Blob([s]).size}(r);return $e(i)&&(i=parseInt(i)),i>t?Ro+" ".concat(n," body too large to record (").concat(i," bytes)"):r}function fc(r,e){if(Pt(r))return r;var t=r;return Ar(t,!1)||(t=Ro+" "+e+" body redacted"),G(Fp,function(n){var i,s;(i=t)!==null&&i!==void 0&&i.length&&((s=t)===null||s===void 0?void 0:s.indexOf(n))!==-1&&(t=Ro+" "+e+" body redacted as might contain: "+n)}),t}var Lp=function(r,e){var t,n,i,s={payloadSizeLimitBytes:oo.payloadSizeLimitBytes,performanceEntryTypeToObserve:Ir(oo.performanceEntryTypeToObserve)},o=r.session_recording.recordHeaders!==!1&&e.recordHeaders,a=r.session_recording.recordBody!==!1&&e.recordBody,l=r.capture_performance!==!1&&e.recordPerformance,u=(t=s,i=Math.min(1e6,(n=t.payloadSizeLimitBytes)!==null&&n!==void 0?n:1e6),function(p){return p!=null&&p.requestBody&&(p.requestBody=pc(p.requestBody,p.requestHeaders,i,"Request")),p!=null&&p.responseBody&&(p.responseBody=pc(p.responseBody,p.responseHeaders,i,"Response")),p}),c=function(p){return u(function(v){var b=Lc(v.name);if(!(b&&b.pathname&&Mp.some(function(M){return b.pathname.indexOf(M)===0})))return v}((f=p,G(Object.keys((g=f.requestHeaders)!==null&&g!==void 0?g:{}),function(v){var b;Op.includes(v.toLowerCase())&&((b=f.requestHeaders)===null||b===void 0||delete b[v])}),f)));var f,g},d=et(r.session_recording.maskNetworkRequestFn);return d&&et(r.session_recording.maskCapturedNetworkRequestFn)&&x.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),d&&(r.session_recording.maskCapturedNetworkRequestFn=function(p){var f=r.session_recording.maskNetworkRequestFn({url:p.name});return $($({},p),{},{name:f?.url})}),s.maskRequestFn=et(r.session_recording.maskCapturedNetworkRequestFn)?function(p){var f,g,v,b=c(p);return b&&(f=(g=(v=r.session_recording).maskCapturedNetworkRequestFn)===null||g===void 0?void 0:g.call(v,b))!==null&&f!==void 0?f:void 0}:function(p){return function(f){if(!q(f))return f.requestBody=fc(f.requestBody,"Request"),f.responseBody=fc(f.responseBody,"Response"),f}(c(p))},$($($({},oo),s),{},{recordHeaders:o,recordBody:a,recordPerformance:l,recordInitialRequests:l})},qp="__ph_opt_in_out_";function jp(r,e){lu(!0,r,e)}function Dp(r,e){lu(!1,r,e)}function Np(r,e){return au(r,e)==="1"}function ou(r,e){return!!function(t){if(t&&t.respectDnt){var n=t&&t.window||m,i=n?.navigator,s=!1;return G([i?.doNotTrack,i.msDoNotTrack,n.doNotTrack],function(o){z([!0,1,"1","yes"],o)&&(s=!0)}),s}return!1}(e)||au(r,e)==="0"}function Up(r,e){Uo(e=e||{}).remove(Bo(r,e),!!e.crossSubdomainCookie)}function Uo(r){return(r=r||{}).persistenceType==="localStorage"?le:r.persistenceType==="localStorage+cookie"?vn:ct}function Bo(r,e){return((e=e||{}).persistencePrefix||qp)+r}function au(r,e){return Uo(e).get(Bo(r,e))}function lu(r,e,t){$e(e)&&e.length?(Uo(t=t||{}).set(Bo(e,t),r?1:0,Ze(t.cookieExpiration)?t.cookieExpiration:null,t.crossSubdomainCookie,t.secureCookie),t.capture&&r&&t.capture(t.captureEventName||"$opt_in",t.captureProperties||{},{send_instantly:!0})):x.error("gdpr."+(r?"optIn":"optOut")+" called with an invalid token")}function cu(r){var e=!1;try{var t=r.config.token,n=r.config.respect_dnt,i=r.config.opt_out_capturing_persistence_type,s=r.config.opt_out_capturing_cookie_prefix||void 0,o=r.config.window;t&&(e=ou(t,{respectDnt:n,persistenceType:i,persistencePrefix:s,window:o}))}catch(a){x.error("Unexpected error when checking capturing opt-out status: "+a)}return e}var ot,uu=3e5,hc=uu;(function(r){r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet"})(ot||(ot={}));var gt,Bp=[ot.MouseMove,ot.MouseInteraction,ot.Scroll,ot.ViewportResize,ot.Input,ot.TouchMove,ot.MediaInteraction,ot.Drag],gc=function(r){return{rrwebMethod:r,enqueuedAt:Date.now(),attempt:1}},Ne="[SessionRecording]",zp=function(){function r(e){var t=this;if(Y(this,r),y(this,"queuedRRWebEvents",[]),y(this,"isIdle",!1),y(this,"_linkedFlagSeen",!1),y(this,"_lastActivityTimestamp",Date.now()),y(this,"windowId",null),y(this,"sessionId",null),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 n="window "+C.visibilityState;t._tryAddCustomEvent(n,{})}}),!this.instance.sessionManager)throw x.error(Ne+" started without valid sessionManager"),new Error(Ne+" started without valid sessionManager. This is a bug.");this.buffer=this.clearBuffer(),this._setupSampling()}return Q(r,[{key:"rrwebRecord",get:function(){var e;return Re==null||(e=Re.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 x.error(Ne+" started without valid sessionManager"),new Error(Ne+" started without valid sessionManager. This is a bug.");return this.instance.sessionManager}},{key:"isSampled",get:function(){var e=this.instance.get_property(bn);return Ii(e)?e:null}},{key:"sessionDuration",get:function(){var e,t,n=(e=this.buffer)===null||e===void 0?void 0:e.data[((t=this.buffer)===null||t===void 0?void 0:t.data.length)-1],i=this.sessionManager.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp;return n?n.timestamp-i:null}},{key:"isRecordingEnabled",get:function(){var e=!!this.instance.get_property(yo),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(Zl);return e&&e.fps&&e.quality?{enabled:e.enabled,fps:e.fps,quality:e.quality}:void 0}},{key:"networkPayloadCapture",get:function(){var e,t,n=this.instance.get_property(Ql),i={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=i?.recordHeaders||n?.recordHeaders,o=i?.recordBody||n?.recordBody,a=this.instance.config.capture_performance||n?.capturePerformance;return s||o||a?{recordHeaders:s,recordBody:o,recordPerformance:a}:void 0}},{key:"sampleRate",get:function(){var e=this.instance.get_property(Kl);return Ze(e)?e:null}},{key:"minimumDuration",get:function(){var e=this.instance.get_property(ec);return Ze(e)?e:null}},{key:"status",get:function(){return this.receivedDecide?this.isRecordingEnabled?Pt(this._linkedFlag)||this._linkedFlagSeen?Ii(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"buffering":"disabled":"buffering"}},{key:"startIfEnabledOrStop",value:function(){this.isRecordingEnabled?(this._startCapture(),x.info(Ne+" started")):(this.stopRecording(),this.clearBuffer())}},{key:"stopRecording",value:function(){this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1,x.info(Ne+" stopped"))}},{key:"makeSamplingDecision",value:function(e){var t,n=this.sessionId!==e,i=this.sampleRate;if(Ze(i)){var s,o=this.isSampled,a=n||!Ii(o);a?s=Math.random()<i:s=o,!s&&a&&x.warn(Ne+" Sample rate (".concat(i,") has determined that this sessionId (").concat(e,") will not be sent to the server.")),this._tryAddCustomEvent("samplingDecisionMade",{sampleRate:i}),(t=this.instance.persistence)===null||t===void 0||t.register(y({},bn,s))}else{var l;(l=this.instance.persistence)===null||l===void 0||l.register(y({},bn,null))}}},{key:"afterDecideResponse",value:function(e){var t,n,i,s=this;if(this._persistDecideResponse(e),this._linkedFlag=((t=e.sessionRecording)===null||t===void 0?void 0:t.linkedFlag)||null,(n=e.sessionRecording)!==null&&n!==void 0&&n.endpoint&&(this._endpoint=(i=e.sessionRecording)===null||i===void 0?void 0:i.endpoint),this._setupSampling(),!Pt(this._linkedFlag)){var o=$e(this._linkedFlag)?this._linkedFlag:this._linkedFlag.flag,a=$e(this._linkedFlag)?null:this._linkedFlag.variant;this.instance.onFeatureFlags(function(l,u){var c=at(u)&&o in u,d=a?u[o]===a:c;if(d){var p={linkedFlag:o,linkedVariant:a},f="linked flag matched";x.info(Ne+" "+f,p),s._tryAddCustomEvent(f,p)}s._linkedFlagSeen=d})}this.receivedDecide=!0,this.startIfEnabledOrStop()}},{key:"_setupSampling",value:function(){var e=this;Ze(this.sampleRate)&&tt(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,n=function(){var i,s,o,a,l,u,c,d,p=(i=e.sessionRecording)===null||i===void 0?void 0:i.sampleRate,f=Pt(p)?null:parseFloat(p),g=(s=e.sessionRecording)===null||s===void 0?void 0:s.minimumDurationMilliseconds;t.register((y(d={},yo,!!e.sessionRecording),y(d,Yl,(o=e.sessionRecording)===null||o===void 0?void 0:o.consoleLogRecordingEnabled),y(d,Ql,$({capturePerformance:e.capturePerformance},(a=e.sessionRecording)===null||a===void 0?void 0:a.networkPayloadCapture)),y(d,Zl,{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(d,Kl,f),y(d,ec,q(g)?null:g),d))};n(),this.sessionManager.onSessionId(n)}}},{key:"log",value:function(e){var t,n=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:n,trace:[],payload:[JSON.stringify(e)]}},timestamp:Oc()})}},{key:"_startCapture",value:function(){var e=this;q(Object.assign)||this._captureStarted||this.instance.config.disable_session_recording||cu(this.instance)||(this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId(),this.rrwebRecord?this._onScriptLoaded():En(this.instance.requestRouter.endpointFor("assets","/static/recorder.js?v=".concat(Yt.LIB_VERSION)),function(t){if(t)return x.error(Ne+" could not load recorder.js",t);e._onScriptLoaded()}))}},{key:"isInteractiveEvent",value:function(e){var t;return e.type===3&&Bp.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>hc&&(this.isIdle=!0,this._tryAddCustomEvent("sessionIdle",{reason:"user inactivity",timeSinceLastActive:e.timestamp-this._lastActivityTimestamp,threshold:hc}));var n=!1;if(t&&(this._lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),n=!0)),!this.isIdle){var i=this.sessionManager.checkAndGetSessionAndWindowId(!t,e.timestamp),s=i.windowId,o=i.sessionId,a=this.sessionId!==o,l=this.windowId!==s;this.windowId=s,this.sessionId=o,(n||[kp,Sp].indexOf(e.type)===-1&&(l||a))&&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(Ne+" could not emit queued rrweb event.",t,e),!1}}},{key:"_tryAddCustomEvent",value:function(e,t){var n=this;return this._tryRRWebMethod(gc(function(){return n.rrwebRecord.addCustomEvent(e,t)}))}},{key:"_tryTakeFullSnapshot",value:function(){var e=this;return this._tryRRWebMethod(gc(function(){return e.rrwebRecord.takeFullSnapshot()}))}},{key:"_onScriptLoaded",value:function(){for(var e,t=this,n={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},i=this.instance.config.session_recording,s=0,o=Object.entries(i||{});s<o.length;s++){var a=Te(o[s],2),l=a[0],u=a[1];l in n&&(n[l]=u)}if(this.canvasRecording&&this.canvasRecording.enabled&&(n.recordCanvas=!0,n.sampling={canvas:this.canvasRecording.fps},n.dataURLOptions={type:"image/webp",quality:this.canvasRecording.quality}),this.rrwebRecord){this.mutationRateLimiter=(e=this.mutationRateLimiter)!==null&&e!==void 0?e:new Ep(this.rrwebRecord,{onBlockedNode:function(d,p){var f="Too many mutations on node '".concat(d,"'. Rate limiting. This could be due to SVG animations or something similar");x.info(f,{node:p}),t.log(Ne+" "+f,"warn")}}),this._scheduleFullSnapshot();var c=this._gatherRRWebPlugins();this.stopRrweb=this.rrwebRecord($({emit:function(d){t.onRRwebEmit(d)},plugins:c},n)),this.instance._addCaptureHook(function(d){try{if(d==="$pageview"){var p=m?t._maskUrl(m.location.href):"";if(!p)return;t._tryAddCustomEvent("$pageview",{href:p}),t._tryTakeFullSnapshot()}}catch(f){x.error("Could not add $pageview to rrweb session",f)}}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1,this._tryAddCustomEvent("$session_options",{sessionRecordingOptions:n,activePlugins:c.map(function(d){return d?.name})}),this._tryAddCustomEvent("$posthog_config",{config:this.instance.config})}else x.error(Ne+"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()},uu)}},{key:"_gatherRRWebPlugins",value:function(){var e=[];return Re.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled&&e.push(Re.rrwebConsoleRecord.getRecordConsolePlugin()),this.networkPayloadCapture&&et(Re.getRecordNetworkPlugin)&&(!cp.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?e.push(Re.getRecordNetworkPlugin(Lp(this.instance.config,this.networkPayloadCapture))):x.info(Ne+" NetworkCapture not started because we are on localhost.")),e}},{key:"onRRwebEmit",value:function(e){if(this._processQueuedEvents(),e&&at(e)){if(e.type===Ri.Meta){var t=this._maskUrl(e.data.href);if(this._lastHref=t,!t)return;e.data.href=t}else this._pageViewFallBack();e.type===Ri.FullSnapshot&&this._scheduleFullSnapshot();var n=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(n){var i=function(a){var l=a;if(l&&at(l)&&l.type===6&&at(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}(n),s=JSON.stringify(i).length;if(this._updateWindowAndSessionIds(i),!this.isIdle||i.type===Ri.Custom){var o={$snapshot_bytes:s,$snapshot_data:i,$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=Ir(this.queuedRRWebEvents);this.queuedRRWebEvents=[],t.forEach(function(n){Date.now()-n.enqueuedAt>2e3?e._tryAddCustomEvent("rrwebQueueTimeout",{enqueuedAt:n.enqueuedAt,attempt:n.attempt,queueLength:t.length}):e._tryRRWebMethod(n)&&e._tryAddCustomEvent("rrwebQueueSuccess",{enqueuedAt:n.enqueuedAt,attempt:n.attempt,queueLength:t.length})})}}},{key:"_maskUrl",value:function(e){var t=this.instance.config.session_recording;if(t.maskNetworkRequestFn){var n,i={url:e};return(n=i=t.maskNetworkRequestFn(i))===null||n===void 0?void 0:n.url}return e}},{key:"clearBuffer",value:function(){return this.buffer=void 0,{size:0,data:[],sessionId:this.sessionId,windowId:this.windowId}}},{key:"_flushBuffer",value:function(){var e=this;this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0);var t=this.minimumDuration,n=this.sessionDuration,i=Ze(n)&&n>=0,s=Ze(t)&&i&&n<t;return this.status==="buffering"||s?(this.flushBufferTimer=setTimeout(function(){e._flushBuffer()},2e3),this.buffer||this.clearBuffer()):this.buffer&&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()):this.buffer||this.clearBuffer()}},{key:"_captureSnapshotBuffered",value:function(e){var t,n=this,i=2+(((t=this.buffer)===null||t===void 0?void 0:t.data.length)||0);(!this.buffer||this.buffer.size+e.$snapshot_bytes+i>943718.4||this.buffer.sessionId&&this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),tt(this.buffer.sessionId)&&!tt(this.sessionId)&&(this.buffer.sessionId=this.sessionId,this.buffer.windowId=this.windowId),this.buffer.size+=e.$snapshot_bytes,this.buffer.data.push(e.$snapshot_data),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){n._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})}}]),r}(),Hp=function(){function r(e){Y(this,r),this.instance=e,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Q(r,[{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(Sr),group_properties:this.instance.get_property(Tt),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:Ke.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:function(n){return e.parseDecideResponse(n.json)}})}},{key:"parseDecideResponse",value:function(e){var t=this;this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer();var n=!e;if(this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.config.advanced_disable_feature_flags||this.instance.featureFlags.receivedFeatureFlags(e??{},n),n)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 i=m?.extendPostHogWithExceptionAutoCapture;if(e.autocaptureExceptions&&e.autocaptureExceptions&&q(i)&&En(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=rt(e.siteApps);try{var a=function(){var l=s.value,u=l.id,c=l.url,d=t.instance.requestRouter.endpointFor("api",c);Re["__$$ph_site_app_".concat(u)]=t.instance,En(d,function(p){p&&x.error("Error while initializing PostHog app with config id ".concat(u),p)})};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.')}}}]),r}(),Wp=m!=null&&m.location?qi(m.location.hash,"__posthog")||qi(location.hash,"state"):null,mc="_postHogToolbarParams";(function(r){r[r.UNINITIALIZED=0]="UNINITIALIZED",r[r.LOADING=1]="LOADING",r[r.LOADED=2]="LOADED"})(gt||(gt={}));var Vp=function(){function r(e){Y(this,r),this.instance=e}return Q(r,[{key:"setToolbarState",value:function(e){Re.ph_toolbar_state=e}},{key:"getToolbarState",value:function(){var e;return(e=Re.ph_toolbar_state)!==null&&e!==void 0?e:gt.UNINITIALIZED}},{key:"maybeLoadToolbar",value:function(){var e,t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,i=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;n=(e=n)!==null&&e!==void 0?e:m.location,s=(t=s)!==null&&t!==void 0?t:m.history;try{if(!i){try{m.localStorage.setItem("test","test"),m.localStorage.removeItem("test")}catch{return!1}i=m?.localStorage}var o,a=Wp||qi(n.hash,"__posthog")||qi(n.hash,"state"),l=a?Jl(function(){return JSON.parse(atob(decodeURIComponent(a)))})||Jl(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?n.hash=l.desiredHash:s?s.replaceState(s.state,"",n.pathname+n.search):n.hash="")):((o=JSON.parse(i.getItem(mc)||"{}")).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){(Re.ph_load_toolbar||Re.ph_load_editor)(e,this.instance)}},{key:"loadToolbar",value:function(e){var t=this,n=!(C==null||!C.getElementById(Eo));if(!m||n)return!1;var i=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")},i?{instrument:!1}:{});if(m.localStorage.setItem(mc,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;En(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)}),mt(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,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;return this.maybeLoadToolbar(e,t,n)}}]),r}(),Gp=function(){function r(e){Y(this,r),y(this,"isPaused",!0),y(this,"queue",[]),y(this,"flushTimeoutMs",3e3),this.sendRequest=e}return Q(r,[{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():{},n=Object.values(t);[].concat(Ir(n.filter(function(i){return i.url.indexOf("/e")===0})),Ir(n.filter(function(i){return i.url.indexOf("/e")!==0}))).map(function(i){e.sendRequest($($({},i),{},{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(),n=function(s){var o=t[s],a=new Date().getTime();o.data&&fe(o.data)&&G(o.data,function(l){l.offset=Math.abs(l.timestamp-a),delete l.timestamp}),e.sendRequest(o)};for(var i in t)n(i)}},this.flushTimeoutMs))}},{key:"clearFlushTimeout",value:function(){clearTimeout(this.flushTimeout),this.flushTimeout=void 0}},{key:"formatQueue",value:function(){var e={};return G(this.queue,function(t){var n,i=t,s=(i?i.batchKey:null)||i.url;q(e[s])&&(e[s]=$($({},i),{},{data:[]})),(n=e[s].data)===null||n===void 0||n.push(i.data)}),this.queue=[],e}}]),r}(),Ue=Uint8Array,Pe=Uint16Array,Rr=Uint32Array,zo=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]),Ho=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]),vc=new Ue([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),du=function(r,e){for(var t=new Pe(31),n=0;n<31;++n)t[n]=e+=1<<r[n-1];var i=new Rr(t[30]);for(n=1;n<30;++n)for(var s=t[n];s<t[n+1];++s)i[s]=s-t[n]<<5|n;return[t,i]},pu=du(zo,2),Jp=pu[0],Po=pu[1];Jp[28]=258,Po[258]=28;for(Oo=du(Ho,0)[1],Ui=new Pe(32768),J=0;J<32768;++J)It=(43690&J)>>>1|(21845&J)<<1,It=(61680&(It=(52428&It)>>>2|(13107&It)<<2))>>>4|(3855&It)<<4,Ui[J]=((65280&It)>>>8|(255&It)<<8)>>>1;var It,Oo,Ui,J,wn=function(r,e,t){for(var n=r.length,i=0,s=new Pe(e);i<n;++i)++s[r[i]-1];var o,a=new Pe(e);for(i=0;i<e;++i)a[i]=a[i-1]+s[i-1]<<1;if(t){o=new Pe(1<<e);var l=15-e;for(i=0;i<n;++i)if(r[i])for(var u=i<<4|r[i],c=e-r[i],d=a[r[i]-1]++<<c,p=d|(1<<c)-1;d<=p;++d)o[Ui[d]>>>l]=u}else for(o=new Pe(n),i=0;i<n;++i)o[i]=Ui[a[r[i]-1]++]>>>15-r[i];return o},Kt=new Ue(288);for(J=0;J<144;++J)Kt[J]=8;for(J=144;J<256;++J)Kt[J]=9;for(J=256;J<280;++J)Kt[J]=7;for(J=280;J<288;++J)Kt[J]=8;var Bi=new Ue(32);for(J=0;J<32;++J)Bi[J]=5;var Xp=wn(Kt,9,0),Yp=wn(Bi,5,0),fu=function(r){return(r/8>>0)+(7&r&&1)},hu=function(r,e,t){(e==null||e<0)&&(e=0),(t==null||t>r.length)&&(t=r.length);var n=new(r instanceof Pe?Pe:r instanceof Rr?Rr:Ue)(t-e);return n.set(r.subarray(e,t)),n},ft=function(r,e,t){t<<=7&e;var n=e/8>>0;r[n]|=t,r[n+1]|=t>>>8},fn=function(r,e,t){t<<=7&e;var n=e/8>>0;r[n]|=t,r[n+1]|=t>>>8,r[n+2]|=t>>>16},ao=function(r,e){for(var t=[],n=0;n<r.length;++n)r[n]&&t.push({s:n,f:r[n]});var i=t.length,s=t.slice();if(!i)return[new Ue(0),0];if(i==1){var o=new Ue(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(H,Z){return H.f-Z.f}),t.push({s:-1,f:25001});var a=t[0],l=t[1],u=0,c=1,d=2;for(t[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=t[t[u].f<t[d].f?u++:d++],l=t[u!=c&&t[u].f<t[d].f?u++:d++],t[c++]={s:-1,f:a.f+l.f,l:a,r:l};var p=s[0].s;for(n=1;n<i;++n)s[n].s>p&&(p=s[n].s);var f=new Pe(p+1),g=Qp(t[c-1],f,0);if(g>e){n=0;var v=0,b=g-e,M=1<<b;for(s.sort(function(H,Z){return f[Z.s]-f[H.s]||H.f-Z.f});n<i;++n){var E=s[n].s;if(!(f[E]>e))break;v+=M-(1<<g-f[E]),f[E]=e}for(v>>>=b;v>0;){var F=s[n].s;f[F]<e?v-=1<<e-f[F]++-1:++n}for(;n>=0&&v;--n){var N=s[n].s;f[N]==e&&(--f[N],++v)}g=e}return[new Ue(f),g]},Qp=function r(e,t,n){return e.s==-1?Math.max(r(e.l,t,n+1),r(e.r,t,n+1)):t[e.s]=n},yc=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new Pe(++e),n=0,i=r[0],s=1,o=function(l){t[n++]=l},a=1;a<=e;++a)if(r[a]==i&&a!=e)++s;else{if(!i&&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(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=r[a]}return[t.subarray(0,n),e]},hn=function(r,e){for(var t=0,n=0;n<e.length;++n)t+=r[n]*e[n];return t},Pi=function(r,e,t){var n=t.length,i=fu(e+2);r[i]=255&n,r[i+1]=n>>>8,r[i+2]=255^r[i],r[i+3]=255^r[i+1];for(var s=0;s<n;++s)r[i+s+4]=t[s];return 8*(i+4+n)},_c=function(r,e,t,n,i,s,o,a,l,u,c){ft(e,c++,t),++i[256];for(var d=ao(i,15),p=d[0],f=d[1],g=ao(s,15),v=g[0],b=g[1],M=yc(p),E=M[0],F=M[1],N=yc(v),H=N[0],Z=N[1],X=new Pe(19),A=0;A<E.length;++A)X[31&E[A]]++;for(A=0;A<H.length;++A)X[31&H[A]]++;for(var oe=ao(X,7),ee=oe[0],ut=oe[1],ge=19;ge>4&&!ee[vc[ge-1]];--ge);var Be,W,K,ae,Fe=u+5<<3,qe=hn(i,Kt)+hn(s,Bi)+o,ne=hn(i,p)+hn(s,v)+o+14+3*ge+hn(X,ee)+(2*X[16]+3*X[17]+7*X[18]);if(Fe<=qe&&Fe<=ne)return Pi(e,c,r.subarray(l,l+u));if(ft(e,c,1+(ne<qe)),c+=2,ne<qe){Be=wn(p,f,0),W=p,K=wn(v,b,0),ae=v;var ke=wn(ee,ut,0);for(ft(e,c,F-257),ft(e,c+5,Z-1),ft(e,c+10,ge-4),c+=14,A=0;A<ge;++A)ft(e,c+3*A,ee[vc[A]]);c+=3*ge;for(var Se=[E,H],te=0;te<2;++te){var me=Se[te];for(A=0;A<me.length;++A){var Ce=31&me[A];ft(e,c,ke[Ce]),c+=ee[Ce],Ce>15&&(ft(e,c,me[A]>>>5&127),c+=me[A]>>>12)}}}else Be=Xp,W=Kt,K=Yp,ae=Bi;for(A=0;A<a;++A)if(n[A]>255){Ce=n[A]>>>18&31,fn(e,c,Be[Ce+257]),c+=W[Ce+257],Ce>7&&(ft(e,c,n[A]>>>23&31),c+=zo[Ce]);var tr=31&n[A];fn(e,c,K[tr]),c+=ae[tr],tr>3&&(fn(e,c,n[A]>>>5&8191),c+=Ho[tr])}else fn(e,c,Be[n[A]]),c+=W[n[A]];return fn(e,c,Be[256]),c+W[256]},Zp=new Rr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Kp=new Ue(0),ef=function(){for(var r=new Rr(256),e=0;e<256;++e){for(var t=e,n=9;--n;)t=(1&t&&3988292384)^t>>>1;r[e]=t}return r}(),tf=function(r,e,t,n,i){return function(s,o,a,l,u,c){var d=s.length,p=new Ue(l+d+5*(1+Math.floor(d/7e3))+u),f=p.subarray(l,p.length-u),g=0;if(!o||d<8)for(var v=0;v<=d;v+=65535){var b=v+65535;b<d?g=Pi(f,g,s.subarray(v,b)):(f[v]=c,g=Pi(f,g,s.subarray(v,d)))}else{for(var M=Zp[o-1],E=M>>>13,F=8191&M,N=(1<<a)-1,H=new Pe(32768),Z=new Pe(N+1),X=Math.ceil(a/3),A=2*X,oe=function(os){return(s[os]^s[os+1]<<X^s[os+2]<<A)&N},ee=new Rr(25e3),ut=new Pe(288),ge=new Pe(32),Be=0,W=0,K=(v=0,0),ae=0,Fe=0;v<d;++v){var qe=oe(v),ne=32767&v,ke=Z[qe];if(H[ne]=ke,Z[qe]=ne,ae<=v){var Se=d-v;if((Be>7e3||K>24576)&&Se>423){g=_c(s,f,0,ee,ut,ge,W,K,Fe,v-Fe,g),K=Be=W=0,Fe=v;for(var te=0;te<286;++te)ut[te]=0;for(te=0;te<30;++te)ge[te]=0}var me=2,Ce=0,tr=F,vt=ne-ke&32767;if(Se>2&&qe==oe(v-vt))for(var Cu=Math.min(E,Se)-1,Au=Math.min(32767,v),Iu=Math.min(258,Se);vt<=Au&&--tr&&ne!=ke;){if(s[v+me]==s[v+me-vt]){for(var yt=0;yt<Iu&&s[v+yt]==s[v+yt-vt];++yt);if(yt>me){if(me=yt,Ce=vt,yt>Cu)break;var Tu=Math.min(vt,yt-2),Go=0;for(te=0;te<Tu;++te){var ss=v-vt+te+32768&32767,Jo=ss-H[ss]+32768&32767;Jo>Go&&(Go=Jo,ke=ss)}}}vt+=(ne=ke)-(ke=H[ne])+32768&32767}if(Ce){ee[K++]=268435456|Po[me]<<18|Oo[Ce];var Xo=31&Po[me],Yo=31&Oo[Ce];W+=zo[Xo]+Ho[Yo],++ut[257+Xo],++ge[Yo],ae=v+me,++Be}else ee[K++]=s[v],++ut[s[v]]}}g=_c(s,f,c,ee,ut,ge,W,K,Fe,v-Fe,g),c||(g=Pi(f,g,Kp))}return hu(p,0,l+fu(g)+u)}(r,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+e.mem,t,n,!i)},lo=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8};function rf(r,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=ef[255&u^l[c]]^u>>>8;a=u},d:function(){return 4294967295^a}}}(),n=r.length;t.p(r);var i,s=tf(r,e,10+((i=e).filename&&i.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&&lo(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),lo(s,o-8,t.d()),lo(s,o-4,n),s}var nf=!!go||!!ho,bc="text/plain",zi=function(r,e){var t=Te(r.split("?"),2),n=t[0],i=t[1],s=$({},e);i?.split("&").forEach(function(a){var l=Te(a.split("="),1)[0];delete s[l]});var o=dp(s);return o=o?(i?i+"&":"")+o:i,"".concat(n,"?").concat(o)},sf=function(r){return"data="+encodeURIComponent(typeof r=="string"?r:JSON.stringify(r))},co=function(r){var e=r.data,t=r.compression;if(e){if(t===Ke.GZipJS){var n=rf(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},d=0;d<a;++d){if(u+5>l.length){var p=new Ue(u+8+(a-d<<1));p.set(l),l=p}var f=s.charCodeAt(d);f<128||o?c(f):f<2048?(c(192|f>>>6),c(128|63&f)):f>55295&&f<57344?(c(240|(f=65536+(1047552&f)|1023&s.charCodeAt(++d))>>>18),c(128|f>>>12&63),c(128|f>>>6&63),c(128|63&f)):(c(224|f>>>12),c(128|f>>>6&63),c(128|63&f))}return hu(l,0,u)}(JSON.stringify(e)),{mtime:0});return{contentType:bc,body:new Blob([n],{type:bc})}}if(t===Ke.Base64){var i=function(s){var o,a,l,u,c,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",p=0,f=0,g="",v=[];if(!s)return s;s=Qd(s);do o=(c=s.charCodeAt(p++)<<16|s.charCodeAt(p++)<<8|s.charCodeAt(p++))>>18&63,a=c>>12&63,l=c>>6&63,u=63&c,v[f++]=d.charAt(o)+d.charAt(a)+d.charAt(l)+d.charAt(u);while(p<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:sf(i)}}return{contentType:"application/json",body:JSON.stringify(e)}}},xn=[];go&&xn.push({transport:"XHR",method:function(r){var e,t=new go;t.open(r.method||"GET",r.url,!0);var n=(e=co(r))!==null&&e!==void 0?e:{},i=n.contentType,s=n.body;G(r.headers,function(o,a){t.setRequestHeader(a,o)}),i&&t.setRequestHeader("Content-Type",i),r.timeout&&(t.timeout=r.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=r.callback)===null||o===void 0||o.call(r,a)}},t.send(s)}}),ho&&xn.push({transport:"fetch",method:function(r){var e,t,n=(e=co(r))!==null&&e!==void 0?e:{},i=n.contentType,s=n.body,o=new Headers;G(o,function(c,d){o.append(d,c)}),i&&o.append("Content-Type",i);var a=r.url,l=null;if(Vl){var u=new Vl;l={signal:u.signal,timeout:setTimeout(function(){return u.abort()},r.timeout)}}ho(a,{method:r?.method||"GET",headers:o,keepalive:r.method==="POST",body:s,signal:(t=l)===null||t===void 0?void 0:t.signal}).then(function(c){return c.text().then(function(d){var p,f={statusCode:c.status,text:d};if(c.status===200)try{f.json=JSON.parse(d)}catch(g){x.error(g)}(p=r.callback)===null||p===void 0||p.call(r,f)})}).catch(function(c){var d;x.error(c),(d=r.callback)===null||d===void 0||d.call(r,{statusCode:0,text:c})}).finally(function(){return l?clearTimeout(l.timeout):null})}}),_n!=null&&_n.sendBeacon&&xn.push({transport:"sendBeacon",method:function(r){var e=zi(r.url,{beacon:"1"});try{var t,n=(t=co(r))!==null&&t!==void 0?t:{},i=n.contentType,s=n.body,o=typeof s=="string"?new Blob([s],{type:i}):s;_n.sendBeacon(e,o)}catch{}}});var of=["retriesPerformedSoFar"],Qt,af=function(){function r(e){var t=this;Y(this,r),y(this,"isPolling",!1),y(this,"pollIntervalMs",3e3),y(this,"queue",[]),this.instance=e,this.queue=[],this.areWeOnline=!0,!q(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 Q(r,[{key:"retriableRequest",value:function(e){var t=this,n=e.retriesPerformedSoFar,i=Vd(e,of);Ze(n)&&n>0&&(i.url=zi(i.url,{retry_count:n})),this.instance._send_request($($({},i),{},{callback:function(s){var o;s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(n??0)<10?t.enqueue($({},i)):(o=i.callback)===null||o===void 0||o.call(i,s)}}))}},{key:"enqueue",value:function(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=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),i=Date.now()+n;this.queue.push({retryAt:i,requestOptions:e});var s="Enqueued failed request for retry in ".concat(n);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=[],n=this.queue.filter(function(a){return a.retryAt<e||(t.push(a),!1)});if(this.queue=t,n.length>0){var i,s=rt(n);try{for(s.s();!(i=s.n()).done;){var o=i.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=rt(this.queue);try{for(t.s();!(e=t.n()).done;){var n=e.value.requestOptions;try{this.instance._send_request($($({},n),{},{transport:"sendBeacon"}))}catch(i){x.error(i)}}}catch(i){t.e(i)}finally{t.f()}this.queue=[]}}]),r}(),Ci=1800,lf=function(){function r(e,t,n,i){Y(this,r),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=n||Rt,this._windowIdGenerator=i||Rt;var s=e.persistence_name||e.token,o=e.session_idle_timeout_seconds||Ci;if(Ze(o)?o>Ci?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=Ci),this._sessionTimeoutMs=1e3*Math.min(Math.max(o,60),Ci),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 Q(r,[{key:"onSessionId",value:function(e){var t=this;return q(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),function(){t._sessionIdChangedHandlers=t._sessionIdChangedHandlers.filter(function(n){return n!==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,n){e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register(y({},Fi,[t,e,n])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[Fi];return fe(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(),n=Te(this._getSessionId(),3),i=n[0],s=n[1],o=n[2],a=this._getWindowId(),l=o&&o>0&&Math.abs(t-o)>864e5,u=!1,c=!s,d=!e&&Math.abs(t-i)>this._sessionTimeoutMs;c||d||l?(s=this._sessionIdGenerator(),a=this._windowIdGenerator(),x.info("[SessionId] new session ID generated",{sessionId:s,windowId:a,changeReason:{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}}),o=t,u=!0):a||(a=this._windowIdGenerator(),u=!0);var p=i===0||!e||l?t:i,f=o===0?new Date().getTime():o;return this._setWindowId(a),this._setSessionId(s,p,f),u&&this._sessionIdChangedHandlers.forEach(function(g){return g(s,a)}),{sessionId:s,windowId:a,sessionStartTimestamp:f}}}]),r}();(function(r){r.US="us",r.EU="eu",r.CUSTOM="custom"})(Qt||(Qt={}));var wc="i.posthog.com",cf=function(){function r(e){Y(this,r),y(this,"_regionCache",{}),this.instance=e}return Q(r,[{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]=Qt.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=Qt.EU:this._regionCache[this.apiHost]=Qt.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(wc),".posthog.com"))+t;if(this.region===Qt.CUSTOM)return this.apiHost+t;var n=wc+t;switch(e){case"assets":return"https://".concat(this.region,"-assets.").concat(n);case"api":return"https://".concat(this.region,".").concat(n)}}}]),r}(),uf=Q(function r(e,t,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:["error"];Y(this,r),this.name="posthog-js",this.setupOnce=function(o){o(function(a){var l,u,c,d,p;if(!(s==="*"||s.includes(a.level))||!e.__loaded)return a;a.tags||(a.tags={});var f=e.requestRouter.endpointFor("ui","/project/".concat(e.config.token,"/person/").concat(e.get_distinct_id()));a.tags["PostHog Person URL"]=f,e.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=e.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:f,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((d=g[0])===null||d===void 0?void 0:d.value)||a.message,$sentry_exception_type:(p=g[0])===null||p===void 0?void 0:p.type,$sentry_tags:a.tags,$level:a.level};return t&&n&&(v.$sentry_url=(i||"https://sentry.io/organizations/")+t+"/issues/?project="+n+"&query="+a.event_id),e.capture("$exception",v),a})}});function df(r,e){var t=r.config.segment;if(!t)return e();(function(n,i){var s=n.config.segment;if(!s)return i();var o=function(l){var u=function(){return l.anonymousId()||Rt()};n.config.get_device_id=u,l.id()&&(n.register({distinct_id:l.id(),$device_id:u()}),n.persistence.set_property(ht,"identified")),i()},a=s.user();"then"in a&&et(a.then)?a.then(function(l){return o(l)}):o(a)})(r,function(){t.register(function(n){Promise&&Promise.resolve||x.warn("This browser does not have Promise support, and can not use the segment integration");var i=function(s,o){var a;if(!o)return s;s.event.userId||s.event.anonymousId===n.get_distinct_id()||n.reset(),s.event.userId&&s.event.userId!==n.get_distinct_id()&&(n.register({distinct_id:s.event.userId}),n.reloadFeatureFlags());var l=n._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 i(s,s.event.event)},page:function(s){return i(s,"$pageview")},identify:function(s){return i(s,"$identify")},screen:function(s){return i(s,"$screen")}}}(r)).then(function(){e()})})}var pf=function(){function r(e){Y(this,r),this._instance=e}return Q(r,[{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 n=t.maxScrollHeight,i=t.lastScrollY,s=t.maxScrollY,o=t.maxContentHeight,a=t.lastContentY,l=t.maxContentY;return q(n)||q(i)||q(s)||q(o)||q(a)||q(l)?{}:(n=Math.ceil(n),i=Math.ceil(i),s=Math.ceil(s),o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),{$prev_pageview_pathname:e,$prev_pageview_last_scroll:i,$prev_pageview_last_scroll_percentage:n<=1?1:Ai(i/n,0,1),$prev_pageview_max_scroll:s,$prev_pageview_max_scroll_percentage:n<=1?1:Ai(s/n,0,1),$prev_pageview_last_content:a,$prev_pageview_last_content_percentage:o<=1?1:Ai(a/o,0,1),$prev_pageview_max_content:l,$prev_pageview_max_content_percentage:o<=1?1:Ai(l/o,0,1)})}}]),r}();function Ai(r,e,t){return Math.max(e,Math.min(r,t))}var ff={icontains:function(r){return!!m&&m.location.href.toLowerCase().indexOf(r.toLowerCase())>-1},regex:function(r){return!!m&&up(m.location.href,r)},exact:function(r){return m?.location.href===r}},hf=function(){function r(e){Y(this,r),this.instance=e}return Q(r,[{key:"afterDecideResponse",value:function(e){this._decideServerResponse=!!e.surveys,this.loadIfEnabled()}},{key:"loadIfEnabled",value:function(){var e=this,t=Re?.extendPostHogWithSurveys;this.instance.config.disable_surveys||!this._decideServerResponse||t||En(this.instance.requestRouter.endpointFor("assets","/static/surveys.js"),function(n){if(n)return x.error("Could not load surveys script",n);Re.extendPostHogWithSurveys(e.instance)})}},{key:"getSurveys",value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(this.instance.config.disable_surveys)return e([]);var i=this.instance.get_property(bo);if(i&&!n)return e(i);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||[];return(o=t.instance.persistence)===null||o===void 0||o.register(y({},bo,a)),e(a)}})}},{key:"getActiveMatchingSurveys",value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(function(i){var s=i.filter(function(o){return!(!o.start_date||o.end_date)}).filter(function(o){var a,l,u,c;if(!o.conditions)return!0;var d=(a=o.conditions)===null||a===void 0||!a.url||ff[(l=(u=o.conditions)===null||u===void 0?void 0:u.urlMatchType)!==null&&l!==void 0?l:"icontains"](o.conditions.url),p=(c=o.conditions)===null||c===void 0||!c.selector||C?.querySelector(o.conditions.selector);return d&&p}).filter(function(o){if(!o.linked_flag_key&&!o.targeting_flag_key)return!0;var a=!o.linked_flag_key||t.instance.featureFlags.isFeatureEnabled(o.linked_flag_key),l=!o.targeting_flag_key||t.instance.featureFlags.isFeatureEnabled(o.targeting_flag_key);return a&&l});return e(s)},n)}}]),r}(),gf=function(){function r(e){var t,n,i=this;Y(this,r),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.")),i.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(((n=e.config.rate_limiting)===null||n===void 0?void 0:n.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}return Q(r,[{key:"clientRateLimitContext",value:function(){var e,t,n,i=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(xo))!==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||i||(o.tokens=Math.max(0,o.tokens-1)),!a||this.lastEventRateLimited||i||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,(n=this.instance.persistence)===null||n===void 0||n.set_property(xo,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}}]),r}(),mf=function(){return $({initialPathName:Ve?.pathname||"",referringDomain:_e.referringDomain()},_e.campaignParams())},vf=function(){function r(e,t,n){var i=this;Y(this,r),y(this,"_onSessionIdCallback",function(s){var o=i._getStoredProps();if(!o||o.sessionId!==s){var a={sessionId:s,props:i._sessionSourceParamGenerator()};i._persistence.register(y({},wo,a))}}),this._sessionIdManager=e,this._persistence=t,this._sessionSourceParamGenerator=n||mf,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}return Q(r,[{key:"_getStoredProps",value:function(){return this._persistence.props[wo]}},{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}:{}}}]),r}(),yf=["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;"],xc=function(r,e){if(!r)return!1;var t=r.toLowerCase();return yf.concat(e||[]).some(function(n){var i=n.toLowerCase();return t.indexOf(i)!==-1})},gu=function(){function r(){Y(this,r),this.clicks=[]}return Q(r,[{key:"isRageClick",value:function(e,t,n){var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(e-i.x)+Math.abs(t-i.y)<30&&n-i.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}}]),r}();function kc(r){var e;return r.id===Eo||!((e=r.closest)===null||e===void 0||!e.call(r,"#"+Eo))}var _f=function(){function r(e){var t;Y(this,r),y(this,"rageclicks",new gu),y(this,"_enabledServerSide",!1),y(this,"_initialized",!1),this.instance=e,this._enabledServerSide=!((t=this.instance.persistence)===null||t===void 0||!t.props[vo])}return Q(r,[{key:"startIfEnabled",value:function(){this.isEnabled&&!this._initialized&&(x.info("[heatmaps] Heatmaps enabled, starting..."),this._setupListeners())}},{key:"isEnabled",get:function(){return q(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({},vo,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&&(mt(C,"click",function(t){return e._onClick(t||m?.event)},!1,!0),mt(C,"mousemove",function(t){return e._onMouseMove(t||m?.event)},!1,!0),this._initialized=!0)}},{key:"_getProperties",value:function(e,t){var n=this.instance.scrollManager.scrollY(),i=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),o=function(a,l,u){for(var c=a;c&&!Ot(c,"body");){if(c===u)return!1;if(z(l,m?.getComputedStyle(c).position))return!0;c=tu(c)}return!1}(e.target,["fixed","sticky"],s);return{x:e.clientX+(o?0:i),y:e.clientY+(o?0:n),target_fixed:o,type:t}}},{key:"_onClick",value:function(e){var t;if(!kc(e.target)){var n=this._getProperties(e,"click");(t=this.rageclicks)!==null&&t!==void 0&&t.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._capture($($({},n),{},{type:"rageclick"})),this._capture(n)}}},{key:"_onMouseMove",value:function(e){var t=this;kc(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)}}}]),r}(),bf=function(){function r(e){var t=this;Y(this,r),y(this,"_updateScrollData",function(){var n,i,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),d=a?.scrollHeight||0;t.context.lastScrollY=Math.ceil(l),t.context.maxScrollY=Math.max(l,(n=t.context.maxScrollY)!==null&&n!==void 0?n:0),t.context.maxScrollHeight=Math.max(u,(i=t.context.maxScrollHeight)!==null&&i!==void 0?i: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(d,(o=t.context.maxContentHeight)!==null&&o!==void 0?o:0)}),this.instance=e}return Q(r,[{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=rt(fe(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 n=e.value,i=m?.document.querySelector(n);if(i)return i}}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}}]),r}(),wf=function(){function r(){Y(this,r),y(this,"events",{}),this.events={}}return Q(r,[{key:"on",value:function(e,t){var n=this;return this.events[e]||(this.events[e]=[]),this.events[e].push(t),function(){n.events[e]=n.events[e].filter(function(i){return i!==t})}}},{key:"emit",value:function(e,t){var n,i=rt(this.events[e]||[]);try{for(i.s();!(n=i.n()).done;)(0,n.value)(t)}catch(a){i.e(a)}finally{i.f()}var s,o=rt(this.events["*"]||[]);try{for(o.s();!(s=o.n()).done;)(0,s.value)(e,t)}catch(a){o.e(a)}finally{o.f()}}}]),r}(),uo="$copy_autocapture";function po(r,e){return e.length>r?e.slice(0,r)+"...":e}var xf=function(){function r(e){Y(this,r),y(this,"_initialized",!1),y(this,"_isDisabledServerSide",null),y(this,"rageclicks",new gu),y(this,"_elementsChainAsString",!1),this.instance=e}return Q(r,[{key:"config",get:function(){var e,t=at(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(n){return new RegExp(n)}),t}},{key:"_addDomEventHandlers",value:function(){var e=this;if(this.isBrowserSupported()){if(m&&C){var t=function(i){i=i||m?.event;try{e._captureEvent(i)}catch(s){x.error("Failed to capture event",s)}},n=function(i){i=i||m?.event,e._captureEvent(i,uo)};mt(C,"submit",t,!1,!0),mt(C,"change",t,!1,!0),mt(C,"click",t,!1,!0),this.config.capture_copied_text&&(mt(C,"copy",n,!1,!0),mt(C,"cut",n,!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({},Xl,!!e.autocapture_opt_out)),this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()}},{key:"isEnabled",get:function(){var e,t,n=(e=this.instance.persistence)===null||e===void 0?void 0:e.props[Xl],i=this._isDisabledServerSide;if(tt(i)&&!Ii(n)&&!this.instance.config.advanced_disable_decide)return!1;var s=(t=this._isDisabledServerSide)!==null&&t!==void 0?t:!!n;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&&!No(t));return t}},{key:"_getAugmentPropertiesFromElement",value:function(e){if(!To(e))return{};var t={};return G(e.attributes,function(n){if(n.name&&n.name.indexOf("data-ph-capture-attribute")===0){var i=n.name.replace("data-ph-capture-attribute-",""),s=n.value;i&&s&&Ar(s)&&(t[i]=s)}}),t}},{key:"_getPropertiesFromElement",value:function(e,t,n){var i,s=e.tagName.toLowerCase(),o={tag_name:s};Io.indexOf(s)>-1&&!n&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?o.$el_text=po(1024,uc(e)):o.$el_text=po(1024,Ni(e)));var a=Di(e);a.length>0&&(o.classes=a.filter(function(p){return p!==""}));var l=(i=this.config)===null||i===void 0?void 0:i.element_attribute_ignorelist;G(e.attributes,function(p){var f;if((!ru(e)||["name","id","class","aria-label"].indexOf(p.name)!==-1)&&(l==null||!l.includes(p.name))&&!t&&Ar(p.value)&&(f=p.name,!$e(f)||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")){var g=p.value;p.name==="class"&&(g=Do(g).join(" ")),o["attr__"+p.name]=po(1024,g)}});for(var u=1,c=1,d=e;d=this._previousElementSibling(d);)u++,d.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 q(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,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$autocapture";if(this.isEnabled){var i,s=this._getEventTarget(e);Kc(s)&&(s=s.parentNode||null),n==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(i=this.rageclicks)!==null&&i!==void 0&&i.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._captureEvent(e,"$rageclick");var o=n===uo;if(s&&$p(s,e,this.config,o,o?["copy","cut"]:void 0)){for(var a,l,u=[s],c=s;c.parentNode&&!Ot(c,"body");)eu(c.parentNode)?(u.push(c.parentNode.host),c=c.parentNode.host):(u.push(c.parentNode),c=c.parentNode);var d,p=[],f={},g=!1;if(G(u,function(F){var N=To(F);F.tagName.toLowerCase()==="a"&&(d=F.getAttribute("href"),d=N&&Ar(d)&&d),z(Di(F),"ph-no-capture")&&(g=!0),p.push(t._getPropertiesFromElement(F,t.instance.config.mask_all_element_attributes,t.instance.config.mask_all_text));var H=t._getAugmentPropertiesFromElement(F);ye(f,H)}),this.instance.config.mask_all_text||(s.tagName.toLowerCase()==="a"||s.tagName.toLowerCase()==="button"?p[0].$el_text=uc(s):p[0].$el_text=Ni(s)),d&&(p[0].attr__href=d),g)return!1;var v=ye(this._getDefaultProperties(e.type),this._elementsChainAsString?{$elements_chain:Rp(p)}:{$elements:p},(a=p[0])!==null&&a!==void 0&&a.$el_text?{$el_text:(l=p[0])===null||l===void 0?void 0:l.$el_text}:{},f);if(n===uo){var b,M=Zc(m==null||(b=m.getSelection())===null||b===void 0?void 0:b.toString()),E=e.type||"clipboard";if(!M)return!1;v.$selected_content=M,v.$copy_type=E}return this.instance.capture(n,v),!0}}}},{key:"isBrowserSupported",value:function(){return et(C?.querySelectorAll)}}]),r}(),kn={},Sc=function(){},xr="posthog",mu=!nf&&se?.indexOf("MSIE")===-1&&se?.indexOf("Mozilla")===-1,Ec=function(){var r,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,!!$e(t)&&t.split(".").slice(-2).join(".")!=="herokuapp.com"),persistence:"localStorage+cookie",persistence_name:"",loaded:Sc,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:"if_capture_pageview",debug:Ve&&$e(Ve?.search)&&Ve.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||(r=m.location)===null||r===void 0?void 0:r.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(n){var i="Bad HTTP status: "+n.statusCode+" "+n.text;x.error(i)},get_device_id:function(n){return n},_onCapture:Sc,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"always"}},$c=function(r){var e={};q(r.process_person)||(e.person_profiles=r.process_person),q(r.xhr_headers)||(e.request_headers=r.xhr_headers),q(r.cookie_name)||(e.persistence_name=r.cookie_name),q(r.disable_cookie)||(e.disable_persistence=r.disable_cookie);var t=ye({},e,r);return fe(r.property_blacklist)&&(q(r.property_denylist)?t.property_denylist=r.property_blacklist:fe(r.property_denylist)?t.property_denylist=[].concat(Ir(r.property_blacklist),Ir(r.property_denylist)):x.error("Invalid value for property_denylist config: "+r.property_denylist)),t},kf=function(){function r(){Y(this,r),y(this,"__forceAllowLocalhost",!1)}return Q(r,[{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}}]),r}(),vu=function(){function r(){var e=this;Y(this,r),y(this,"webPerformance",new kf),y(this,"_debugEventEmitter",new wf),this.config=Ec(),this.decideEndpointWasHit=!1,this.SentryIntegration=uf,this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.featureFlags=new Kd(this),this.toolbar=new Vp(this),this.scrollManager=new bf(this),this.pageViewManager=new pf(this),this.surveys=new hf(this),this.rateLimiter=new gf(this),this.requestRouter=new cf(this),this.people={set:function(t,n,i){var s=$e(t)?y({},t,n):t;e.setPersonProperties(s),i?.({})},set_once:function(t,n,i){var s=$e(t)?y({},t,n):t;e.setPersonProperties(void 0,s),i?.({})}},this.on("eventCaptured",function(t){return x.info("send",t)})}return Q(r,[{key:"init",value:function(e,t,n){if(n&&n!==xr){var i,s=(i=kn[n])!==null&&i!==void 0?i:new r;return s._init(e,t,n),kn[n]=s,kn[xr][n]=s,s}return this._init(e,t,n)}},{key:"_init",value:function(e){var t,n,i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(q(e)||function(b){return $e(b)&&b.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(ye({},Ec(),$c(s),{name:o,token:e})),this.compression=s.disable_compression?void 0:Ke.Base64,this.persistence=new so(this.config),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new so($($({},this.config),{},{persistence:"sessionStorage"})),this._requestQueue=new Gp(function(b){return i._send_retriable_request(b)}),this._retryQueue=new af(this),this.__request_queue=[],this.sessionManager=new lf(this.config,this.persistence),this.sessionPropsManager=new vf(this.sessionManager,this.persistence),this.sessionRecording=new zp(this),this.sessionRecording.startIfEnabledOrStop(),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new xf(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new _f(this),this.heatmaps.startIfEnabled(),Yt.DEBUG=Yt.DEBUG||this.config.debug,this._gdpr_init(),((t=s.bootstrap)===null||t===void 0?void 0:t.distinctID)!==void 0){var a,l,u=this.config.get_device_id(Rt()),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 d,p,f=Object.keys(((d=s.bootstrap)===null||d===void 0?void 0:d.featureFlags)||{}).filter(function(b){var M,E;return!((M=s.bootstrap)===null||M===void 0||(E=M.featureFlags)===null||E===void 0||!E[b])}).reduce(function(b,M){var E,F;return b[M]=((E=s.bootstrap)===null||E===void 0||(F=E.featureFlags)===null||F===void 0?void 0:F[M])||!1,b},{}),g=Object.keys(((p=s.bootstrap)===null||p===void 0?void 0:p.featureFlagPayloads)||{}).filter(function(b){return f[b]}).reduce(function(b,M){var E,F,N,H;return(E=s.bootstrap)!==null&&E!==void 0&&(F=E.featureFlagPayloads)!==null&&F!==void 0&&F[M]&&(b[M]=(N=s.bootstrap)===null||N===void 0||(H=N.featureFlagPayloads)===null||H===void 0?void 0:H[M]),b},{});this.featureFlags.receivedFeatureFlags({featureFlags:f,featureFlagPayloads:g})}if(!this.get_distinct_id()){var v=this.config.get_device_id(Rt());this.register_once({distinct_id:v,$device_id:v},""),this.persistence.set_property(ht,"anonymous")}return m==null||(n=m.addEventListener)===null||n===void 0||n.call(m,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),this.toolbar.maybeLoadToolbar(),s.segment?df(this,function(){return i._loaded()}):this._loaded(),et(this.config._onCapture)&&this.on("eventCaptured",function(b){return i.config._onCapture(b.event,b)}),this}},{key:"_afterDecideResponse",value:function(e){var t,n,i,s,o;this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=z(e.supportedCompression,Ke.GZipJS)?Ke.GZipJS:z(e.supportedCompression,Ke.Base64)?Ke.Base64:void 0),(t=e.analytics)!==null&&t!==void 0&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),(n=this.sessionRecording)===null||n===void 0||n.afterDecideResponse(e),(i=this.autocapture)===null||i===void 0||i.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(n){x.critical("`loaded` function failed",n)}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 Hp(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()||Er(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&&(mu?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=zi(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(n){var i,s,o,a=$({},n);a.timeout=a.timeout||6e4,a.url=zi(a.url,{_:new Date().getTime().toString(),ver:Yt.LIB_VERSION,compression:a.compression});var l=(i=a.transport)!==null&&i!==void 0?i:"XHR",u=(s=(o=function(c,d){for(var p=0;p<c.length;p++)if(d(c[p]))return c[p]}(xn,function(c){return c.transport===l}))===null||o===void 0?void 0:o.method)!==null&&s!==void 0?s:xn[0].method;if(!u)throw new Error("No available transport method");u(a)}($($({},e),{},{callback:function(n){var i,s,o;t.rateLimiter.checkForLimiting(n),n.statusCode>=400&&((s=(o=t.config).on_request_error)===null||s===void 0||s.call(o,n)),(i=e.callback)===null||i===void 0||i.call(e,n)}}))))}},{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,n=this,i=[],s=[],o=[];Er(e,function(l){l&&(t=l[0],fe(t)?o.push(l):et(l)?l.call(n):fe(l)&&t==="alias"?i.push(l):fe(l)&&t.indexOf("capture")!==-1&&et(n[t])?o.push(l):s.push(l))});var a=function(l,u){Er(l,function(c){if(fe(c[0])){var d=u;G(c,function(p){d=d[p[0]].apply(d,p.slice(1))})}else this[c[0]].apply(this,c.slice(1))},u)};a(i,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,n){var i;if(!(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue))return x.uninitializedWarning("posthog.capture");if(!cu(this))if(!q(e)&&$e(e)){if(!se||this.config.opt_out_useragent_filter||!xc(se,this.config.custom_blocked_useragents)){var s=n!=null&&n.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.persistence.set_initial_campaign_params()),this.config.save_referrer&&(this.sessionPersistence.update_referrer_info(),this.persistence.set_initial_referrer_info());var o={uuid:Rt(),event:e,properties:this._calculate_event_properties(e,t||{})};if(n==null||!n._noHeatmaps){var a,l=(a=this.heatmaps)===null||a===void 0?void 0:a.getAndClearBuffer();l&&(o.properties.$heatmap_data=l)}s&&(o.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),n?.$set&&(o.$set=n?.$set);var u=this._calculate_set_once_properties(n?.$set_once);u&&(o.$set_once=u),(o=Yd(o,n!=null&&n._noTruncate?null:this.config.properties_string_max_length)).timestamp=n?.timestamp||new Date,q(n?.timestamp)||(o.properties.$event_time_override_provided=!0,o.properties.$event_time_override_system_time=new Date);var c=$($({},o.properties.$set),o.$set);to(c)||this.setPersonPropertiesForFlags(c),this._debugEventEmitter.emit("eventCaptured",o);var d={method:"POST",url:(i=n?._url)!==null&&i!==void 0?i:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:o,compression:"best-available",batchKey:n?._batchKey};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this._send_retriable_request(d):this._requestQueue.enqueue(d),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){if(!this.persistence||!this.sessionPersistence)return t;var n=this.persistence.remove_event_timer(e),i=$({},t);if(i.token=this.config.token,e==="$snapshot"){var s=$($({},this.persistence.properties()),this.sessionPersistence.properties());return i.distinct_id=s.distinct_id,i}var o=_e.properties();if(this.sessionManager){var a=this.sessionManager.checkAndGetSessionAndWindowId(),l=a.sessionId,u=a.windowId;i.$session_id=l,i.$window_id=u}if(this.requestRouter.region===Qt.CUSTOM&&(i.$lib_custom_api_host=this.config.api_host),this.sessionPropsManager&&this.config.__preview_send_client_session_params&&(e==="$pageview"||e==="$pageleave"||e==="$autocapture")){var c=this.sessionPropsManager.getSessionProps();i=ye(i,c)}if(!this.config.disable_scroll_properties){var d={};e==="$pageview"?d=this.pageViewManager.doPageView():e==="$pageleave"&&(d=this.pageViewManager.doPageLeave()),i=ye(i,d)}if(e==="$pageview"&&C&&(i.title=C.title),!q(n)){var p=new Date().getTime()-n;i.$duration=parseFloat((p/1e3).toFixed(3))}se&&this.config.opt_out_useragent_filter&&(i.$browser_type=xc(se,this.config.custom_blocked_useragents)?"bot":"browser"),(i=ye({},o,this.persistence.properties(),this.sessionPersistence.properties(),i)).$is_identified=this._isIdentified(),fe(this.config.property_denylist)?G(this.config.property_denylist,function(g){delete i[g]}):x.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var f=this.config.sanitize_properties;return f&&(i=f(i,e)),i.$process_person_profile=this._hasPersonProcessing(),i}},{key:"_calculate_set_once_properties",value:function(e){if(!this.persistence||!this._hasPersonProcessing())return e;var t=ye({},this.persistence.get_initial_props(),e||{});return to(t)?void 0:t}},{key:"register",value:function(e,t){var n;(n=this.persistence)===null||n===void 0||n.register(e,t)}},{key:"register_once",value:function(e,t,n){var i;(i=this.persistence)===null||i===void 0||i.register_once(e,t,n)}},{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,n;return(t=(n=this.sessionManager)===null||n===void 0?void 0:n.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,n){if(!this.__loaded||!this.persistence)return x.uninitializedWarning("posthog.identify");if(Ze(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 i=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=i;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==i&&e!==this.get_property(gn)&&(this.unregister(gn),this.register({distinct_id:e}));var o=(this.persistence.get_property(ht)||"anonymous")==="anonymous";e!==i&&o?(this.persistence.set_property(ht,"identified"),this.setPersonPropertiesForFlags(t||{},!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:i},{$set:t||{},$set_once:n||{}}),this.featureFlags.setAnonymousDistinctId(i)):(t||n)&&this.setPersonProperties(t,n),e!==i&&(this.reloadFeatureFlags(),this.unregister(Mi))}}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,n){if(e&&t){if(this._requirePersonProcessing("posthog.group")){var i=this.getGroups();i[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:$($({},i),{},y({},e,t))}),n&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:n}),this.setGroupPropertiesForFlags(y({},e,n))),i[e]===t||n||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,n,i,s;if(!this.__loaded)return x.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");(t=this.persistence)===null||t===void 0||t.clear(),(n=this.sessionPersistence)===null||n===void 0||n.clear(),(i=this.persistence)===null||i===void 0||i.set_property(ht,"anonymous"),(s=this.sessionManager)===null||s===void 0||s.resetSessionId();var a=this.config.get_device_id(Rt());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),n=t.sessionId,i=t.sessionStartTimestamp,s=this.requestRouter.endpointFor("ui","/project/".concat(this.config.token,"/replay/").concat(n));if(e!=null&&e.withTimestamp&&i){var o,a=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!i)return s;var l=Math.max(Math.floor((new Date().getTime()-i)/1e3)-a,0);s+="?t=".concat(l)}return s}},{key:"alias",value:function(e,t){return e===this.get_property(Fc)?(x.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(q(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(gn,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,n,i,s,o=$({},this.config);at(e)&&(ye(this.config,$c(e)),(t=this.persistence)===null||t===void 0||t.update_config(this.config,o),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new so($($({},this.config),{},{persistence:"sessionStorage"})),le.is_supported()&&le.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(Yt.DEBUG=!0),(n=this.sessionRecording)===null||n===void 0||n.startIfEnabledOrStop(),(i=this.autocapture)===null||i===void 0||i.startIfEnabled(),(s=this.heatmaps)===null||s===void 0||s.startIfEnabled(),this.surveys.loadIfEnabled())}},{key:"startSessionRecording",value:function(e){if(e!=null&&e.sampling){var t,n,i=(t=this.sessionManager)===null||t===void 0?void 0:t.checkAndGetSessionAndWindowId();(n=this.persistence)===null||n===void 0||n.register(y({},bn,!0)),x.info("Session recording started with sampling override for session: ",i?.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:xr;return t!==xr&&(t=xr+"."+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,n,i;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&to(this.getGroups())&&((e=this.persistence)===null||e===void 0||(t=e.props)===null||t===void 0||!t[gn])&&((n=this.persistence)===null||n===void 0||(i=n.props)===null||i===void 0||!i[Li]))}},{key:"_shouldCapturePageleave",value:function(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&this.config.capture_pageview}},{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(Li,!0),!0)}},{key:"_gdpr_init",value:function(){this.config.opt_out_capturing_persistence_type==="localStorage"&&le.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.config.opt_out_capturing_by_default&&!ct.get("ph_optout")||(ct.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.config.opt_out_persistence_by_default}))}},{key:"_gdpr_update_persistence",value:function(e){var t,n,i,s,o;if(e&&e.clear_persistence)i=!0;else{if(!e||!e.enable_persistence)return;i=!1}this.config.disable_persistence||((t=this.persistence)===null||t===void 0?void 0:t.disabled)===i||(s=this.persistence)===null||s===void 0||s.set_disabled(i),this.config.disable_persistence||((n=this.sessionPersistence)===null||n===void 0?void 0:n.disabled)===i||(o=this.sessionPersistence)===null||o===void 0||o.set_disabled(i)}},{key:"_gdpr_call_func",value:function(e,t){return t=ye({capture:this.capture.bind(this),persistence_type:this.config.opt_out_capturing_persistence_type,cookie_prefix:this.config.opt_out_capturing_cookie_prefix,cookie_expiration:this.config.cookie_expiration,cross_subdomain_cookie:this.config.cross_subdomain_cookie,secure_cookie:this.config.secure_cookie},t||{}),le.is_supported()||t.persistence_type!=="localStorage"||(t.persistence_type="cookie"),e(this.config.token,{capture:t.capture,captureEventName:t.capture_event_name,captureProperties:t.capture_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieExpiration:t.cookie_expiration,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie})}},{key:"opt_in_capturing",value:function(e){e=ye({enable_persistence:!0},e||{}),this._gdpr_call_func(jp,e),this._gdpr_update_persistence(e)}},{key:"opt_out_capturing",value:function(e){var t=ye({clear_persistence:!0},e||{});this._gdpr_call_func(Dp,t),this._gdpr_update_persistence(t)}},{key:"has_opted_in_capturing",value:function(e){return this._gdpr_call_func(Np,e)}},{key:"has_opted_out_capturing",value:function(e){return this._gdpr_call_func(ou,e)}},{key:"clear_opt_in_out_capturing",value:function(e){var t=ye({enable_persistence:!0},e??{});this._gdpr_call_func(Up,t),this._gdpr_update_persistence(t)}},{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}))}}]),r}();(function(r,e){for(var t=0;t<e.length;t++)r.prototype[e[t]]=Xd(r.prototype[e[t]])})(vu,["identify"]);var Cc,Ac;(function(r){r.Popover="popover",r.API="api",r.Widget="widget"})(Cc||(Cc={})),function(r){r.Open="open",r.MultipleChoice="multiple_choice",r.SingleChoice="single_choice",r.Rating="rating",r.Link="link"}(Ac||(Ac={}));var Ic,yu=(Ic=kn[xr]=new vu,function(){function r(){r.done||(r.done=!0,mu=!1,G(kn,function(e){e._dom_loaded()}))}C!=null&&C.addEventListener&&(C.readyState==="complete"?r():C.addEventListener("DOMContentLoaded",r,!1)),m&&mt(m,"load",r,!0)}(),Ic);var _u=yu.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 ce(r,e){if(!_u)throw new Error("Failed to initialize PostHog");_u.capture(r,e)}var Ji,Tn,Xi,Ft,wu,Gi,Yi=class Yi extends B(j){constructor(){super();k(this,Ft);k(this,Ji,new At(this,{onError:console.error}));k(this,Tn);k(this,Xi,{onError:t=>{alert(t.error),console.error(t.widgetId,t.error),ce("ShopAssistant: error",t)},onNewMessageStartedStreaming:t=>ce("ShopAssistant: user received bot message (streaming started)",t),onMessageEndedStreaming:t=>ce("ShopAssistant: user received bot message (streaming ended)",t),onUserCanceledStreaming:t=>ce("ShopAssistant: user canceled streaming",t),onUserClickedLink:t=>ce("ShopAssistant: user clicked link",t),onUserSentInput:t=>ce("ShopAssistant: user sent input",t)});this.cdn="https://widget.molin.ai",this.widgetId="",this.showClose=!1}get config(){return h(this,Tn)||h(this,Ji).data}render(){return this.config?R`
|
|
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
316
|
<!-- embed our chat component forwarding props -->
|
|
316
|
-
<mw-chat .config="${{...this.config,widgetId:this.widgetId}}" .callbacks="${h(this,
|
|
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
318
|
<slot name="banner" slot="banner"></slot>
|
|
318
319
|
</mw-chat>
|
|
319
|
-
`:
|
|
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
321
|
<!-- embed our bubble component forwarding props -->
|
|
321
322
|
<!-- these props are never internally updated by mw-bubble so we pass them down only one way -->
|
|
322
|
-
<mw-bubble state="${this.state}" src="${
|
|
323
|
-
`:
|
|
324
|
-
<mw-bubble class="${t} fixed z-[2147483647]" @click=${
|
|
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>
|
|
325
326
|
|
|
326
327
|
<!-- only load the component if enabled on any platform -->
|
|
327
|
-
${this.config?.popup?.mobileEnabled||this.config?.popup?.desktopEnabled?
|
|
328
|
+
${this.config?.popup?.mobileEnabled||this.config?.popup?.desktopEnabled?O`<mw-popup
|
|
328
329
|
position="${o}"
|
|
329
330
|
delay="${this.config.popup?.delayMs||0}"
|
|
330
331
|
sound="https://molin.ai/sounds/widget/popup.aac"
|
|
331
|
-
.content="${{desktop:{text:this.config.popup?.text||""},mobile:{title:this.config.popup?.mobileTitleText??`Chat with ${this.config.title}`,text:this.config.popup?.text||"",button:this.config.popup?.mobileButtonText??`Chat with ${this.config.title}`,color:this.config.color,poweredBy:!this.config.removePoweredBy}}}"
|
|
332
|
-
@mw:click="${
|
|
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
334
|
|
|
334
335
|
<!-- show "Try it out" if enabled (even if the chat window is showing) -->
|
|
335
|
-
${this.config?.tryItOut?.mobileEnabled||this.config?.tryItOut?.desktopEnabled?
|
|
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}
|
|
336
337
|
|
|
337
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. -->
|
|
338
|
-
${this._dialogAlreadyShown?
|
|
339
|
-
<div class="${h(this,
|
|
340
|
-
<mw-chat .config="${{...this.config,widgetId:this.widgetId}}" .callbacks="${h(this,
|
|
339
|
+
${this._dialogAlreadyShown?O`
|
|
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
342
|
<slot name="banner" slot="banner"></slot>
|
|
342
343
|
</mw-chat>
|
|
343
344
|
</div>
|
|
344
|
-
`:
|
|
345
|
-
`}updated(){h(this,
|
|
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
347
|
/*! Bundled license information:
|
|
347
348
|
|
|
348
349
|
@lit/reactive-element/css-tag.js:
|