@molin.ai/shop-ai 0.4.17 → 0.4.18
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 +16 -16
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var Rd=Object.defineProperty;var Ld=(t,e,r)=>e in t?Rd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ye=(t,e,r)=>(Ld(t,typeof e!="symbol"?e+"":e,r),r),Xa=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var R=(t,e,r)=>(Xa(t,e,"read from private field"),r?r.call(t):e.get(t)),Z=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},fe=(t,e,r,i)=>(Xa(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r);var ch=(t,e,r,i)=>({set _(n){fe(t,e,n,r)},get _(){return R(t,e,i)}}),he=(t,e,r)=>(Xa(t,e,"access private method"),r);var be;(function(t){t.assertEqual=n=>n;function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{let s={};for(let a of n)s[a]=a;return s},t.getValidEnumValues=n=>{let s=t.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),a={};for(let o of s)a[o]=n[o];return t.objectValues(a)},t.objectValues=n=>t.objectKeys(n).map(function(s){return n[s]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let s=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.push(a);return s},t.find=(n,s)=>{for(let a of n)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,s=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=i,t.jsonStringifyReplacer=(n,s)=>typeof s=="bigint"?s.toString():s})(be||(be={}));var Qa;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Qa||(Qa={}));var j=be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cr=t=>{switch(typeof t){case"undefined":return j.undefined;case"string":return j.string;case"number":return isNaN(t)?j.nan:j.number;case"boolean":return j.boolean;case"function":return j.function;case"bigint":return j.bigint;case"symbol":return j.symbol;case"object":return Array.isArray(t)?j.array:t===null?j.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?j.promise:typeof Map<"u"&&t instanceof Map?j.map:typeof Set<"u"&&t instanceof Set?j.set:typeof Date<"u"&&t instanceof Date?j.date:j.object;default:return j.unknown}},B=be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Bd=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),gt=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},i={_errors:[]},n=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)i._errors.push(r(a));else{let o=i,l=0;for(;l<a.path.length;){let h=a.path[l];l===a.path.length-1?(o[h]=o[h]||{_errors:[]},o[h]._errors.push(r(a))):o[h]=o[h]||{_errors:[]},o=o[h],l++}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};gt.create=t=>new gt(t);var Ki=(t,e)=>{let r;switch(t.code){case B.invalid_type:t.received===j.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case B.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,be.jsonStringifyReplacer)}`;break;case B.unrecognized_keys:r=`Unrecognized key(s) in object: ${be.joinValues(t.keys,", ")}`;break;case B.invalid_union:r="Invalid input";break;case B.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${be.joinValues(t.options)}`;break;case B.invalid_enum_value:r=`Invalid enum value. Expected ${be.joinValues(t.options)}, received '${t.received}'`;break;case B.invalid_arguments:r="Invalid function arguments";break;case B.invalid_return_type:r="Invalid function return type";break;case B.invalid_date:r="Invalid date";break;case B.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:be.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case B.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case B.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case B.custom:r="Invalid input";break;case B.invalid_intersection_types:r="Intersection results could not be merged";break;case B.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case B.not_finite:r="Number must be finite";break;default:r=e.defaultError,be.assertNever(t)}return{message:r}},dh=Ki;function Vd(t){dh=t}function Xn(){return dh}var Kn=t=>{let{data:e,path:r,errorMaps:i,issueData:n}=t,s=[...r,...n.path||[]],a={...n,path:s},o="",l=i.filter(h=>!!h).slice().reverse();for(let h of l)o=h(a,{data:e,defaultError:o}).message;return{...n,path:s,message:n.message||o}},Nd=[];function H(t,e){let r=Kn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Xn(),Ki].filter(i=>!!i)});t.common.issues.push(r)}var Je=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let i=[];for(let n of r){if(n.status==="aborted")return ae;n.status==="dirty"&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,r){let i=[];for(let n of r)i.push({key:await n.key,value:await n.value});return t.mergeObjectSync(e,i)}static mergeObjectSync(e,r){let i={};for(let n of r){let{key:s,value:a}=n;if(s.status==="aborted"||a.status==="aborted")return ae;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(i[s.value]=a.value)}return{status:e.value,value:i}}},ae=Object.freeze({status:"aborted"}),fh=t=>({status:"dirty",value:t}),et=t=>({status:"valid",value:t}),eo=t=>t.status==="aborted",to=t=>t.status==="dirty",Qi=t=>t.status==="valid",Qn=t=>typeof Promise<"u"&&t instanceof Promise,te;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(te||(te={}));var Pt=class{constructor(e,r,i,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=i,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},uh=(t,e)=>{if(Qi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new gt(t.common.issues);return this._error=r,this._error}}};function oe(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:i,description:n}=t;if(e&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(a,o)=>a.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:i??o.defaultError}:{message:r??o.defaultError},description:n}}var le=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return cr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Je,ctx:{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Qn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){var i;let n={common:{issues:[],async:(i=r?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cr(e)},s=this._parseSync({data:e,path:n.path,parent:n});return uh(n,s)}async parseAsync(e,r){let i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cr(e)},n=this._parse({data:e,path:i.path,parent:i}),s=await(Qn(n)?n:Promise.resolve(n));return uh(i,s)}refine(e,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,s)=>{let a=e(n),o=()=>s.addIssue({code:B.custom,...i(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,r){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(e){return new yt({schema:this,typeName:ne.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return $t.create(this,this._def)}nullable(){return Jt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yt.create(this,this._def)}promise(){return dr.create(this,this._def)}or(e){return Dr.create([this,e],this._def)}and(e){return Fr.create(this,e,this._def)}transform(e){return new yt({...oe(this._def),schema:this,typeName:ne.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Br({...oe(this._def),innerType:this,defaultValue:r,typeName:ne.ZodDefault})}brand(){return new is({typeName:ne.ZodBranded,type:this,...oe(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new ui({...oe(this._def),innerType:this,catchValue:r,typeName:ne.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return en.create(this,e)}readonly(){return di.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},zd=/^c[^\s-]{8,}$/i,jd=/^[a-z][a-z0-9]*$/,Gd=/^[0-9A-HJKMNP-TV-Z]{26}$/,Hd=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,qd=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ud="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ka,Wd=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Zd=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Yd=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Jd(t,e){return!!((e==="v4"||!e)&&Wd.test(t)||(e==="v6"||!e)&&Zd.test(t))}var ur=class t extends le{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==j.string){let s=this._getOrReturnCtx(e);return H(s,{code:B.invalid_type,expected:j.string,received:s.parsedType}),ae}let i=new Je,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(n=this._getOrReturnCtx(e,n),a?H(n,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&H(n,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")qd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"email",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")Ka||(Ka=new RegExp(Ud,"u")),Ka.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"emoji",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")Hd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"uuid",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")zd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")jd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid2",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")Gd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ulid",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),H(n,{validation:"url",code:B.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"regex",code:B.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),H(n,{code:B.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),H(n,{code:B.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),H(n,{code:B.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?Yd(s).test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:B.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="ip"?Jd(e.data,s.version)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ip",code:B.invalid_string,message:s.message}),i.dirty()):be.assertNever(s);return{status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(n=>e.test(n),{validation:r,code:B.invalid_string,...te.errToObj(i)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...te.errToObj(e)})}url(e){return this._addCheck({kind:"url",...te.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...te.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...te.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...te.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...te.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...te.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...te.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,...te.errToObj(e?.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...te.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...te.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...te.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...te.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...te.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...te.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...te.errToObj(r)})}nonempty(e){return this.min(1,te.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ur.create=t=>{var e;return new ur({checks:[],typeName:ne.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};function Xd(t,e){let r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=r>i?r:i,s=parseInt(t.toFixed(n).replace(".","")),a=parseInt(e.toFixed(n).replace(".",""));return s%a/Math.pow(10,n)}var Pr=class t extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==j.number){let s=this._getOrReturnCtx(e);return H(s,{code:B.invalid_type,expected:j.number,received:s.parsedType}),ae}let i,n=new Je;for(let s of this._def.checks)s.kind==="int"?be.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),H(i,{code:B.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?Xd(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),H(i,{code:B.not_finite,message:s.message}),n.dirty()):be.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,te.toString(r))}gt(e,r){return this.setLimit("min",e,!1,te.toString(r))}lte(e,r){return this.setLimit("max",e,!0,te.toString(r))}lt(e,r){return this.setLimit("max",e,!1,te.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:te.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:te.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:te.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:te.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:te.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:te.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:te.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:te.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:te.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:te.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&be.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Pr.create=t=>new Pr({checks:[],typeName:ne.ZodNumber,coerce:t?.coerce||!1,...oe(t)});var Ar=class t extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==j.bigint){let s=this._getOrReturnCtx(e);return H(s,{code:B.invalid_type,expected:j.bigint,received:s.parsedType}),ae}let i,n=new Je;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):be.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,te.toString(r))}gt(e,r){return this.setLimit("min",e,!1,te.toString(r))}lte(e,r){return this.setLimit("max",e,!0,te.toString(r))}lt(e,r){return this.setLimit("max",e,!1,te.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:te.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:te.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:te.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:te.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:te.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:te.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Ar.create=t=>{var e;return new Ar({checks:[],typeName:ne.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};var Cr=class extends le{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==j.boolean){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.boolean,received:i.parsedType}),ae}return et(e.data)}};Cr.create=t=>new Cr({typeName:ne.ZodBoolean,coerce:t?.coerce||!1,...oe(t)});var Tr=class t extends le{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==j.date){let s=this._getOrReturnCtx(e);return H(s,{code:B.invalid_type,expected:j.date,received:s.parsedType}),ae}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return H(s,{code:B.invalid_date}),ae}let i=new Je,n;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:B.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:B.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):be.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:te.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:te.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Tr.create=t=>new Tr({checks:[],coerce:t?.coerce||!1,typeName:ne.ZodDate,...oe(t)});var oi=class extends le{_parse(e){if(this._getType(e)!==j.symbol){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.symbol,received:i.parsedType}),ae}return et(e.data)}};oi.create=t=>new oi({typeName:ne.ZodSymbol,...oe(t)});var Ir=class extends le{_parse(e){if(this._getType(e)!==j.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.undefined,received:i.parsedType}),ae}return et(e.data)}};Ir.create=t=>new Ir({typeName:ne.ZodUndefined,...oe(t)});var Mr=class extends le{_parse(e){if(this._getType(e)!==j.null){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.null,received:i.parsedType}),ae}return et(e.data)}};Mr.create=t=>new Mr({typeName:ne.ZodNull,...oe(t)});var pr=class extends le{constructor(){super(...arguments),this._any=!0}_parse(e){return et(e.data)}};pr.create=t=>new pr({typeName:ne.ZodAny,...oe(t)});var Zt=class extends le{constructor(){super(...arguments),this._unknown=!0}_parse(e){return et(e.data)}};Zt.create=t=>new Zt({typeName:ne.ZodUnknown,...oe(t)});var Rt=class extends le{_parse(e){let r=this._getOrReturnCtx(e);return H(r,{code:B.invalid_type,expected:j.never,received:r.parsedType}),ae}};Rt.create=t=>new Rt({typeName:ne.ZodNever,...oe(t)});var li=class extends le{_parse(e){if(this._getType(e)!==j.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.void,received:i.parsedType}),ae}return et(e.data)}};li.create=t=>new li({typeName:ne.ZodVoid,...oe(t)});var Yt=class t extends le{_parse(e){let{ctx:r,status:i}=this._processInputParams(e),n=this._def;if(r.parsedType!==j.array)return H(r,{code:B.invalid_type,expected:j.array,received:r.parsedType}),ae;if(n.exactLength!==null){let a=r.data.length>n.exactLength.value,o=r.data.length<n.exactLength.value;(a||o)&&(H(r,{code:a?B.too_big:B.too_small,minimum:o?n.exactLength.value:void 0,maximum:a?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(H(r,{code:B.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(H(r,{code:B.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>n.type._parseAsync(new Pt(r,a,r.path,o)))).then(a=>Je.mergeArray(i,a));let s=[...r.data].map((a,o)=>n.type._parseSync(new Pt(r,a,r.path,o)));return Je.mergeArray(i,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:te.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:te.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:te.toString(r)}})}nonempty(e){return this.min(1,e)}};Yt.create=(t,e)=>new Yt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ne.ZodArray,...oe(e)});function ai(t){if(t instanceof ot){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=$t.create(ai(i))}return new ot({...t._def,shape:()=>e})}else return t instanceof Yt?new Yt({...t._def,type:ai(t.element)}):t instanceof $t?$t.create(ai(t.unwrap())):t instanceof Jt?Jt.create(ai(t.unwrap())):t instanceof Vt?Vt.create(t.items.map(e=>ai(e))):t}var ot=class t extends le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=be.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==j.object){let h=this._getOrReturnCtx(e);return H(h,{code:B.invalid_type,expected:j.object,received:h.parsedType}),ae}let{status:i,ctx:n}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Rt&&this._def.unknownKeys==="strip"))for(let h in n.data)a.includes(h)||o.push(h);let l=[];for(let h of a){let c=s[h],u=n.data[h];l.push({key:{status:"valid",value:h},value:c._parse(new Pt(n,u,n.path,h)),alwaysSet:h in n.data})}if(this._def.catchall instanceof Rt){let h=this._def.unknownKeys;if(h==="passthrough")for(let c of o)l.push({key:{status:"valid",value:c},value:{status:"valid",value:n.data[c]}});else if(h==="strict")o.length>0&&(H(n,{code:B.unrecognized_keys,keys:o}),i.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let h=this._def.catchall;for(let c of o){let u=n.data[c];l.push({key:{status:"valid",value:c},value:h._parse(new Pt(n,u,n.path,c)),alwaysSet:c in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let h=[];for(let c of l){let u=await c.key;h.push({key:u,value:await c.value,alwaysSet:c.alwaysSet})}return h}).then(h=>Je.mergeObjectSync(i,h)):Je.mergeObjectSync(i,l)}get shape(){return this._def.shape()}strict(e){return te.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{var n,s,a,o;let l=(a=(s=(n=this._def).errorMap)===null||s===void 0?void 0:s.call(n,r,i).message)!==null&&a!==void 0?a:i.defaultError;return r.code==="unrecognized_keys"?{message:(o=te.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ne.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return be.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(r[i]=this.shape[i])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return be.objectKeys(this.shape).forEach(i=>{e[i]||(r[i]=this.shape[i])}),new t({...this._def,shape:()=>r})}deepPartial(){return ai(this)}partial(e){let r={};return be.objectKeys(this.shape).forEach(i=>{let n=this.shape[i];e&&!e[i]?r[i]=n:r[i]=n.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return be.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])r[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof $t;)s=s._def.innerType;r[i]=s}}),new t({...this._def,shape:()=>r})}keyof(){return mh(be.objectKeys(this.shape))}};ot.create=(t,e)=>new ot({shape:()=>t,unknownKeys:"strip",catchall:Rt.create(),typeName:ne.ZodObject,...oe(e)});ot.strictCreate=(t,e)=>new ot({shape:()=>t,unknownKeys:"strict",catchall:Rt.create(),typeName:ne.ZodObject,...oe(e)});ot.lazycreate=(t,e)=>new ot({shape:t,unknownKeys:"strip",catchall:Rt.create(),typeName:ne.ZodObject,...oe(e)});var Dr=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=this._def.options;function n(s){for(let o of s)if(o.result.status==="valid")return o.result;for(let o of s)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(o=>new gt(o.ctx.common.issues));return H(r,{code:B.invalid_union,unionErrors:a}),ae}if(r.common.async)return Promise.all(i.map(async s=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(n);{let s,a=[];for(let l of i){let h={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:h});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:h}),h.common.issues.length&&a.push(h.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(l=>new gt(l));return H(r,{code:B.invalid_union,unionErrors:o}),ae}}get options(){return this._def.options}};Dr.create=(t,e)=>new Dr({options:t,typeName:ne.ZodUnion,...oe(e)});var Jn=t=>t instanceof Or?Jn(t.schema):t instanceof yt?Jn(t.innerType()):t instanceof $r?[t.value]:t instanceof Rr?t.options:t instanceof Lr?Object.keys(t.enum):t instanceof Br?Jn(t._def.innerType):t instanceof Ir?[void 0]:t instanceof Mr?[null]:null,es=class t extends le{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==j.object)return H(r,{code:B.invalid_type,expected:j.object,received:r.parsedType}),ae;let i=this.discriminator,n=r.data[i],s=this.optionsMap.get(n);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(H(r,{code:B.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),ae)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,i){let n=new Map;for(let s of r){let a=Jn(s.shape[e]);if(!a)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,s)}}return new t({typeName:ne.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...oe(i)})}};function ro(t,e){let r=cr(t),i=cr(e);if(t===e)return{valid:!0,data:t};if(r===j.object&&i===j.object){let n=be.objectKeys(e),s=be.objectKeys(t).filter(o=>n.indexOf(o)!==-1),a={...t,...e};for(let o of s){let l=ro(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(r===j.array&&i===j.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let s=0;s<t.length;s++){let a=t[s],o=e[s],l=ro(a,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return r===j.date&&i===j.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Fr=class extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=(s,a)=>{if(eo(s)||eo(a))return ae;let o=ro(s.value,a.value);return o.valid?((to(s)||to(a))&&r.dirty(),{status:r.value,value:o.data}):(H(i,{code:B.invalid_intersection_types}),ae)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,a])=>n(s,a)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Fr.create=(t,e,r)=>new Fr({left:t,right:e,typeName:ne.ZodIntersection,...oe(r)});var Vt=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==j.array)return H(i,{code:B.invalid_type,expected:j.array,received:i.parsedType}),ae;if(i.data.length<this._def.items.length)return H(i,{code:B.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ae;!this._def.rest&&i.data.length>this._def.items.length&&(H(i,{code:B.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...i.data].map((a,o)=>{let l=this._def.items[o]||this._def.rest;return l?l._parse(new Pt(i,a,i.path,o)):null}).filter(a=>!!a);return i.common.async?Promise.all(s).then(a=>Je.mergeArray(r,a)):Je.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Vt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vt({items:t,typeName:ne.ZodTuple,rest:null,...oe(e)})};var ts=class t extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==j.object)return H(i,{code:B.invalid_type,expected:j.object,received:i.parsedType}),ae;let n=[],s=this._def.keyType,a=this._def.valueType;for(let o in i.data)n.push({key:s._parse(new Pt(i,o,i.path,o)),value:a._parse(new Pt(i,i.data[o],i.path,o))});return i.common.async?Je.mergeObjectAsync(r,n):Je.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,i){return r instanceof le?new t({keyType:e,valueType:r,typeName:ne.ZodRecord,...oe(i)}):new t({keyType:ur.create(),valueType:e,typeName:ne.ZodRecord,...oe(r)})}},hi=class extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==j.map)return H(i,{code:B.invalid_type,expected:j.map,received:i.parsedType}),ae;let n=this._def.keyType,s=this._def.valueType,a=[...i.data.entries()].map(([o,l],h)=>({key:n._parse(new Pt(i,o,i.path,[h,"key"])),value:s._parse(new Pt(i,l,i.path,[h,"value"]))}));if(i.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let l of a){let h=await l.key,c=await l.value;if(h.status==="aborted"||c.status==="aborted")return ae;(h.status==="dirty"||c.status==="dirty")&&r.dirty(),o.set(h.value,c.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let l of a){let h=l.key,c=l.value;if(h.status==="aborted"||c.status==="aborted")return ae;(h.status==="dirty"||c.status==="dirty")&&r.dirty(),o.set(h.value,c.value)}return{status:r.value,value:o}}}};hi.create=(t,e,r)=>new hi({valueType:e,keyType:t,typeName:ne.ZodMap,...oe(r)});var ci=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==j.set)return H(i,{code:B.invalid_type,expected:j.set,received:i.parsedType}),ae;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(H(i,{code:B.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(H(i,{code:B.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let s=this._def.valueType;function a(l){let h=new Set;for(let c of l){if(c.status==="aborted")return ae;c.status==="dirty"&&r.dirty(),h.add(c.value)}return{status:r.value,value:h}}let o=[...i.data.values()].map((l,h)=>s._parse(new Pt(i,l,i.path,h)));return i.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:te.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:te.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};ci.create=(t,e)=>new ci({valueType:t,minSize:null,maxSize:null,typeName:ne.ZodSet,...oe(e)});var rs=class t extends le{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==j.function)return H(r,{code:B.invalid_type,expected:j.function,received:r.parsedType}),ae;function i(o,l){return Kn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Xn(),Ki].filter(h=>!!h),issueData:{code:B.invalid_arguments,argumentsError:l}})}function n(o,l){return Kn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Xn(),Ki].filter(h=>!!h),issueData:{code:B.invalid_return_type,returnTypeError:l}})}let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof dr){let o=this;return et(async function(...l){let h=new gt([]),c=await o._def.args.parseAsync(l,s).catch(p=>{throw h.addIssue(i(l,p)),h}),u=await Reflect.apply(a,this,c);return await o._def.returns._def.type.parseAsync(u,s).catch(p=>{throw h.addIssue(n(u,p)),h})})}else{let o=this;return et(function(...l){let h=o._def.args.safeParse(l,s);if(!h.success)throw new gt([i(l,h.error)]);let c=Reflect.apply(a,this,h.data),u=o._def.returns.safeParse(c,s);if(!u.success)throw new gt([n(c,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Vt.create(e).rest(Zt.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,i){return new t({args:e||Vt.create([]).rest(Zt.create()),returns:r||Zt.create(),typeName:ne.ZodFunction,...oe(i)})}},Or=class extends le{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Or.create=(t,e)=>new Or({getter:t,typeName:ne.ZodLazy,...oe(e)});var $r=class extends le{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return H(r,{received:r.data,code:B.invalid_literal,expected:this._def.value}),ae}return{status:"valid",value:e.data}}get value(){return this._def.value}};$r.create=(t,e)=>new $r({value:t,typeName:ne.ZodLiteral,...oe(e)});function mh(t,e){return new Rr({values:t,typeName:ne.ZodEnum,...oe(e)})}var Rr=class t extends le{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return H(r,{expected:be.joinValues(i),received:r.parsedType,code:B.invalid_type}),ae}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),i=this._def.values;return H(r,{received:r.data,code:B.invalid_enum_value,options:i}),ae}return et(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e){return t.create(e)}exclude(e){return t.create(this.options.filter(r=>!e.includes(r)))}};Rr.create=mh;var Lr=class extends le{_parse(e){let r=be.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==j.string&&i.parsedType!==j.number){let n=be.objectValues(r);return H(i,{expected:be.joinValues(n),received:i.parsedType,code:B.invalid_type}),ae}if(r.indexOf(e.data)===-1){let n=be.objectValues(r);return H(i,{received:i.data,code:B.invalid_enum_value,options:n}),ae}return et(e.data)}get enum(){return this._def.values}};Lr.create=(t,e)=>new Lr({values:t,typeName:ne.ZodNativeEnum,...oe(e)});var dr=class extends le{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==j.promise&&r.common.async===!1)return H(r,{code:B.invalid_type,expected:j.promise,received:r.parsedType}),ae;let i=r.parsedType===j.promise?r.data:Promise.resolve(r.data);return et(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};dr.create=(t,e)=>new dr({type:t,typeName:ne.ZodPromise,...oe(e)});var yt=class extends le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:a=>{H(i,a),a.fatal?r.abort():r.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="preprocess"){let a=n.transform(i.data,s);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(a).then(o=>this._def.schema._parseAsync({data:o,path:i.path,parent:i})):this._def.schema._parseSync({data:a,path:i.path,parent:i})}if(n.type==="refinement"){let a=o=>{let l=n.refinement(o,s);if(i.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?ae:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>o.status==="aborted"?ae:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(n.type==="transform")if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Qi(a))return a;let o=n.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>Qi(a)?Promise.resolve(n.transform(a.value,s)).then(o=>({status:r.value,value:o})):a);be.assertNever(n)}};yt.create=(t,e,r)=>new yt({schema:t,typeName:ne.ZodEffects,effect:e,...oe(r)});yt.createWithPreprocess=(t,e,r)=>new yt({schema:e,effect:{type:"preprocess",transform:t},typeName:ne.ZodEffects,...oe(r)});var $t=class extends le{_parse(e){return this._getType(e)===j.undefined?et(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};$t.create=(t,e)=>new $t({innerType:t,typeName:ne.ZodOptional,...oe(e)});var Jt=class extends le{_parse(e){return this._getType(e)===j.null?et(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Jt.create=(t,e)=>new Jt({innerType:t,typeName:ne.ZodNullable,...oe(e)});var Br=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return r.parsedType===j.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Br.create=(t,e)=>new Br({innerType:t,typeName:ne.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...oe(e)});var ui=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Qn(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new gt(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new gt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};ui.create=(t,e)=>new ui({innerType:t,typeName:ne.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...oe(e)});var pi=class extends le{_parse(e){if(this._getType(e)!==j.nan){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.nan,received:i.parsedType}),ae}return{status:"valid",value:e.data}}};pi.create=t=>new pi({typeName:ne.ZodNaN,...oe(t)});var Kd=Symbol("zod_brand"),is=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},en=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?ae:s.status==="dirty"?(r.dirty(),fh(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?ae:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(e,r){return new t({in:e,out:r,typeName:ne.ZodPipeline})}},di=class extends le{_parse(e){let r=this._def.innerType._parse(e);return Qi(r)&&(r.value=Object.freeze(r.value)),r}};di.create=(t,e)=>new di({innerType:t,typeName:ne.ZodReadonly,...oe(e)});var gh=(t,e={},r)=>t?pr.create().superRefine((i,n)=>{var s,a;if(!t(i)){let o=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,l=(a=(s=o.fatal)!==null&&s!==void 0?s:r)!==null&&a!==void 0?a:!0,h=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...h,fatal:l})}}):pr.create(),Qd={object:ot.lazycreate},ne;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ne||(ne={}));var ef=(t,e={message:`Input not instance of ${t.name}`})=>gh(r=>r instanceof t,e),yh=ur.create,vh=Pr.create,tf=pi.create,rf=Ar.create,bh=Cr.create,nf=Tr.create,sf=oi.create,af=Ir.create,of=Mr.create,lf=pr.create,hf=Zt.create,cf=Rt.create,uf=li.create,pf=Yt.create,df=ot.create,ff=ot.strictCreate,mf=Dr.create,gf=es.create,yf=Fr.create,vf=Vt.create,bf=ts.create,_f=hi.create,wf=ci.create,xf=rs.create,Sf=Or.create,kf=$r.create,Ef=Rr.create,Pf=Lr.create,Af=dr.create,ph=yt.create,Cf=$t.create,Tf=Jt.create,If=yt.createWithPreprocess,Mf=en.create,Df=()=>yh().optional(),Ff=()=>vh().optional(),Of=()=>bh().optional(),$f={string:t=>ur.create({...t,coerce:!0}),number:t=>Pr.create({...t,coerce:!0}),boolean:t=>Cr.create({...t,coerce:!0}),bigint:t=>Ar.create({...t,coerce:!0}),date:t=>Tr.create({...t,coerce:!0})},Rf=ae,me=Object.freeze({__proto__:null,defaultErrorMap:Ki,setErrorMap:Vd,getErrorMap:Xn,makeIssue:Kn,EMPTY_PATH:Nd,addIssueToContext:H,ParseStatus:Je,INVALID:ae,DIRTY:fh,OK:et,isAborted:eo,isDirty:to,isValid:Qi,isAsync:Qn,get util(){return be},get objectUtil(){return Qa},ZodParsedType:j,getParsedType:cr,ZodType:le,ZodString:ur,ZodNumber:Pr,ZodBigInt:Ar,ZodBoolean:Cr,ZodDate:Tr,ZodSymbol:oi,ZodUndefined:Ir,ZodNull:Mr,ZodAny:pr,ZodUnknown:Zt,ZodNever:Rt,ZodVoid:li,ZodArray:Yt,ZodObject:ot,ZodUnion:Dr,ZodDiscriminatedUnion:es,ZodIntersection:Fr,ZodTuple:Vt,ZodRecord:ts,ZodMap:hi,ZodSet:ci,ZodFunction:rs,ZodLazy:Or,ZodLiteral:$r,ZodEnum:Rr,ZodNativeEnum:Lr,ZodPromise:dr,ZodEffects:yt,ZodTransformer:yt,ZodOptional:$t,ZodNullable:Jt,ZodDefault:Br,ZodCatch:ui,ZodNaN:pi,BRAND:Kd,ZodBranded:is,ZodPipeline:en,ZodReadonly:di,custom:gh,Schema:le,ZodSchema:le,late:Qd,get ZodFirstPartyTypeKind(){return ne},coerce:$f,any:lf,array:pf,bigint:rf,boolean:bh,date:nf,discriminatedUnion:gf,effect:ph,enum:Ef,function:xf,instanceof:ef,intersection:yf,lazy:Sf,literal:kf,map:_f,nan:tf,nativeEnum:Pf,never:cf,null:of,nullable:Tf,number:vh,object:df,oboolean:Of,onumber:Ff,optional:Cf,ostring:Df,pipeline:Mf,preprocess:If,promise:Af,record:bf,set:wf,strictObject:ff,string:yh,symbol:sf,transformer:ph,tuple:vf,undefined:af,union:mf,unknown:hf,void:uf,NEVER:Rf,ZodIssueCode:B,quotelessJson:Bd,ZodError:gt});var yy=me.object({wsApiUrl:me.string(),url:me.string(),logoSvg:me.string().optional(),logoUrl:me.string().optional(),title:me.string(),status:me.string(),color:me.string(),showStillLearningBanner:me.boolean().optional(),input:me.object({placeholder:me.string()}),bubble:me.object({imageUrl:me.string().optional(),position:me.object({bottom:me.string().optional(),right:me.string().optional(),left:me.string().optional()})}),header:me.object({background:me.string()}),limitations:me.object({title:me.string(),items:me.array(me.string())}),examples:me.object({title:me.string(),items:me.array(me.string())}),instructions:me.object({items:me.array(me.string())}),popup:me.object({enabled:me.boolean().optional(),delayMs:me.number().optional(),text:me.string().optional()}).optional()});function Lf(t){return t.replace(/[^A-Za-z0-9_-]/gi,"")}window.__INIT_MOLIN_SHOP_AI=function(e){if(!e)throw new Error("options is required");let{widgetId:r,config:i}=e;if(!r)throw new Error("widgetId is required");if(!i)throw new Error("config is required");r=Lf(r);let n=document.createElement("molin-shop-ai");n.setAttribute("widget",r),n.config=i,document.body.appendChild(n)};var ns=window,ss=ns.ShadowRoot&&(ns.ShadyCSS===void 0||ns.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,io=Symbol(),_h=new WeakMap,tn=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==io)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(ss&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=_h.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&_h.set(r,e))}return e}toString(){return this.cssText}},wh=t=>new tn(typeof t=="string"?t:t+"",void 0,io),no=(t,...e)=>{let r=t.length===1?t[0]:e.reduce((i,n,s)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[s+1],t[0]);return new tn(r,t,io)},so=(t,e)=>{ss?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let i=document.createElement("style"),n=ns.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)})},as=ss?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return wh(r)})(t):t;var ao,os=window,xh=os.trustedTypes,Bf=xh?xh.emptyScript:"",Sh=os.reactiveElementPolyfillSupport,lo={toAttribute(t,e){switch(e){case Boolean:t=t?Bf:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},kh=(t,e)=>e!==t&&(e==e||t==t),oo={attribute:!0,type:String,converter:lo,reflect:!1,hasChanged:kh},ho="finalized",Xt=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(e)}static get observedAttributes(){this.finalize();let e=[];return this.elementProperties.forEach((r,i)=>{let n=this._$Ep(i,r);n!==void 0&&(this._$Ev.set(n,i),e.push(n))}),e}static createProperty(e,r=oo){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(e,r),!r.noAccessor&&!this.prototype.hasOwnProperty(e)){let i=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,r);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,r,i){return{get(){return this[r]},set(n){let s=this[e];this[r]=n,this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||oo}static finalize(){if(this.hasOwnProperty(ho))return!1;this[ho]=!0;let e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let r=this.properties,i=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let n of i)this.createProperty(n,r[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let n of i)r.unshift(as(n))}else e!==void 0&&r.push(as(e));return r}static _$Ep(e,r){let i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(r=>r(this))}addController(e){var r,i;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var e;let r=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return so(r,this.constructor.elementStyles),r}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostConnected)===null||i===void 0?void 0:i.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostDisconnected)===null||i===void 0?void 0:i.call(r)})}attributeChangedCallback(e,r,i){this._$AK(e,i)}_$EO(e,r,i=oo){var n;let s=this.constructor._$Ep(e,i);if(s!==void 0&&i.reflect===!0){let a=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:lo).toAttribute(r,i.type);this._$El=e,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._$El=null}}_$AK(e,r){var i;let n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){let a=n.getPropertyOptions(s),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?a.converter:lo;this._$El=s,this[s]=o.fromAttribute(r,a.type),this._$El=null}}requestUpdate(e,r,i){let n=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||kh)(this[e],r)?(this._$AL.has(e)||this._$AL.set(e,r),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,s)=>this[s]=n),this._$Ei=void 0);let r=!1,i=this._$AL;try{r=this.shouldUpdate(i),r?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(i)):this._$Ek()}catch(n){throw r=!1,this._$Ek(),n}r&&this._$AE(i)}willUpdate(e){}_$AE(e){var r;(r=this._$ES)===null||r===void 0||r.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((r,i)=>this._$EO(i,this[i],r)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Xt[ho]=!0,Xt.elementProperties=new Map,Xt.elementStyles=[],Xt.shadowRootOptions={mode:"open"},Sh?.({ReactiveElement:Xt}),((ao=os.reactiveElementVersions)!==null&&ao!==void 0?ao:os.reactiveElementVersions=[]).push("1.6.3");var co,ls=window,fi=ls.trustedTypes,Eh=fi?fi.createPolicy("lit-html",{createHTML:t=>t}):void 0,hs="$lit$",Kt=`lit$${(Math.random()+"").slice(9)}$`,po="?"+Kt,Vf=`<${po}>`,zr=document,nn=()=>zr.createComment(""),sn=t=>t===null||typeof t!="object"&&typeof t!="function",Dh=Array.isArray,Fh=t=>Dh(t)||typeof t?.[Symbol.iterator]=="function",uo=`[
|
|
1
|
+
var Rd=Object.defineProperty;var Ld=(t,e,r)=>e in t?Rd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var me=(t,e,r)=>(Ld(t,typeof e!="symbol"?e+"":e,r),r),Xa=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var R=(t,e,r)=>(Xa(t,e,"read from private field"),r?r.call(t):e.get(t)),Z=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},de=(t,e,r,i)=>(Xa(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r);var ch=(t,e,r,i)=>({set _(n){de(t,e,n,r)},get _(){return R(t,e,i)}}),he=(t,e,r)=>(Xa(t,e,"access private method"),r);var be;(function(t){t.assertEqual=n=>n;function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{let s={};for(let a of n)s[a]=a;return s},t.getValidEnumValues=n=>{let s=t.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),a={};for(let o of s)a[o]=n[o];return t.objectValues(a)},t.objectValues=n=>t.objectKeys(n).map(function(s){return n[s]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let s=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&s.push(a);return s},t.find=(n,s)=>{for(let a of n)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,s=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=i,t.jsonStringifyReplacer=(n,s)=>typeof s=="bigint"?s.toString():s})(be||(be={}));var Qa;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Qa||(Qa={}));var j=be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cr=t=>{switch(typeof t){case"undefined":return j.undefined;case"string":return j.string;case"number":return isNaN(t)?j.nan:j.number;case"boolean":return j.boolean;case"function":return j.function;case"bigint":return j.bigint;case"symbol":return j.symbol;case"object":return Array.isArray(t)?j.array:t===null?j.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?j.promise:typeof Map<"u"&&t instanceof Map?j.map:typeof Set<"u"&&t instanceof Set?j.set:typeof Date<"u"&&t instanceof Date?j.date:j.object;default:return j.unknown}},B=be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Bd=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),gt=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},i={_errors:[]},n=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)i._errors.push(r(a));else{let o=i,l=0;for(;l<a.path.length;){let h=a.path[l];l===a.path.length-1?(o[h]=o[h]||{_errors:[]},o[h]._errors.push(r(a))):o[h]=o[h]||{_errors:[]},o=o[h],l++}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};gt.create=t=>new gt(t);var Ki=(t,e)=>{let r;switch(t.code){case B.invalid_type:t.received===j.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case B.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,be.jsonStringifyReplacer)}`;break;case B.unrecognized_keys:r=`Unrecognized key(s) in object: ${be.joinValues(t.keys,", ")}`;break;case B.invalid_union:r="Invalid input";break;case B.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${be.joinValues(t.options)}`;break;case B.invalid_enum_value:r=`Invalid enum value. Expected ${be.joinValues(t.options)}, received '${t.received}'`;break;case B.invalid_arguments:r="Invalid function arguments";break;case B.invalid_return_type:r="Invalid function return type";break;case B.invalid_date:r="Invalid date";break;case B.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:be.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case B.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case B.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case B.custom:r="Invalid input";break;case B.invalid_intersection_types:r="Intersection results could not be merged";break;case B.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case B.not_finite:r="Number must be finite";break;default:r=e.defaultError,be.assertNever(t)}return{message:r}},dh=Ki;function Vd(t){dh=t}function Xn(){return dh}var Kn=t=>{let{data:e,path:r,errorMaps:i,issueData:n}=t,s=[...r,...n.path||[]],a={...n,path:s},o="",l=i.filter(h=>!!h).slice().reverse();for(let h of l)o=h(a,{data:e,defaultError:o}).message;return{...n,path:s,message:n.message||o}},Nd=[];function H(t,e){let r=Kn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Xn(),Ki].filter(i=>!!i)});t.common.issues.push(r)}var Je=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let i=[];for(let n of r){if(n.status==="aborted")return ae;n.status==="dirty"&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,r){let i=[];for(let n of r)i.push({key:await n.key,value:await n.value});return t.mergeObjectSync(e,i)}static mergeObjectSync(e,r){let i={};for(let n of r){let{key:s,value:a}=n;if(s.status==="aborted"||a.status==="aborted")return ae;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(i[s.value]=a.value)}return{status:e.value,value:i}}},ae=Object.freeze({status:"aborted"}),fh=t=>({status:"dirty",value:t}),et=t=>({status:"valid",value:t}),eo=t=>t.status==="aborted",to=t=>t.status==="dirty",Qi=t=>t.status==="valid",Qn=t=>typeof Promise<"u"&&t instanceof Promise,te;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(te||(te={}));var Pt=class{constructor(e,r,i,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=i,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},uh=(t,e)=>{if(Qi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new gt(t.common.issues);return this._error=r,this._error}}};function oe(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:i,description:n}=t;if(e&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(a,o)=>a.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:i??o.defaultError}:{message:r??o.defaultError},description:n}}var le=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return cr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Je,ctx:{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Qn(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){var i;let n={common:{issues:[],async:(i=r?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cr(e)},s=this._parseSync({data:e,path:n.path,parent:n});return uh(n,s)}async parseAsync(e,r){let i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cr(e)},n=this._parse({data:e,path:i.path,parent:i}),s=await(Qn(n)?n:Promise.resolve(n));return uh(i,s)}refine(e,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,s)=>{let a=e(n),o=()=>s.addIssue({code:B.custom,...i(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,r){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(e){return new yt({schema:this,typeName:ne.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return $t.create(this,this._def)}nullable(){return Jt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yt.create(this,this._def)}promise(){return dr.create(this,this._def)}or(e){return Dr.create([this,e],this._def)}and(e){return Fr.create(this,e,this._def)}transform(e){return new yt({...oe(this._def),schema:this,typeName:ne.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Br({...oe(this._def),innerType:this,defaultValue:r,typeName:ne.ZodDefault})}brand(){return new is({typeName:ne.ZodBranded,type:this,...oe(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new ui({...oe(this._def),innerType:this,catchValue:r,typeName:ne.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return en.create(this,e)}readonly(){return di.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},zd=/^c[^\s-]{8,}$/i,jd=/^[a-z][a-z0-9]*$/,Gd=/^[0-9A-HJKMNP-TV-Z]{26}$/,Hd=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,qd=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ud="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ka,Wd=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Zd=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Yd=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Jd(t,e){return!!((e==="v4"||!e)&&Wd.test(t)||(e==="v6"||!e)&&Zd.test(t))}var ur=class t extends le{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==j.string){let s=this._getOrReturnCtx(e);return H(s,{code:B.invalid_type,expected:j.string,received:s.parsedType}),ae}let i=new Je,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),i.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(n=this._getOrReturnCtx(e,n),a?H(n,{code:B.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&H(n,{code:B.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")qd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"email",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")Ka||(Ka=new RegExp(Ud,"u")),Ka.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"emoji",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")Hd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"uuid",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")zd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")jd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid2",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")Gd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ulid",code:B.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),H(n,{validation:"url",code:B.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"regex",code:B.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(n=this._getOrReturnCtx(e,n),H(n,{code:B.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),i.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),H(n,{code:B.invalid_string,validation:{startsWith:s.value},message:s.message}),i.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),H(n,{code:B.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?Yd(s).test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:B.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="ip"?Jd(e.data,s.version)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ip",code:B.invalid_string,message:s.message}),i.dirty()):be.assertNever(s);return{status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(n=>e.test(n),{validation:r,code:B.invalid_string,...te.errToObj(i)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...te.errToObj(e)})}url(e){return this._addCheck({kind:"url",...te.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...te.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...te.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...te.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...te.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...te.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...te.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(r=e?.offset)!==null&&r!==void 0?r:!1,...te.errToObj(e?.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...te.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...te.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...te.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...te.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...te.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...te.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...te.errToObj(r)})}nonempty(e){return this.min(1,te.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ur.create=t=>{var e;return new ur({checks:[],typeName:ne.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};function Xd(t,e){let r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=r>i?r:i,s=parseInt(t.toFixed(n).replace(".","")),a=parseInt(e.toFixed(n).replace(".",""));return s%a/Math.pow(10,n)}var Pr=class t extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==j.number){let s=this._getOrReturnCtx(e);return H(s,{code:B.invalid_type,expected:j.number,received:s.parsedType}),ae}let i,n=new Je;for(let s of this._def.checks)s.kind==="int"?be.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),H(i,{code:B.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?Xd(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),H(i,{code:B.not_finite,message:s.message}),n.dirty()):be.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,te.toString(r))}gt(e,r){return this.setLimit("min",e,!1,te.toString(r))}lte(e,r){return this.setLimit("max",e,!0,te.toString(r))}lt(e,r){return this.setLimit("max",e,!1,te.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:te.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:te.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:te.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:te.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:te.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:te.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:te.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:te.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:te.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:te.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&be.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Pr.create=t=>new Pr({checks:[],typeName:ne.ZodNumber,coerce:t?.coerce||!1,...oe(t)});var Ar=class t extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==j.bigint){let s=this._getOrReturnCtx(e);return H(s,{code:B.invalid_type,expected:j.bigint,received:s.parsedType}),ae}let i,n=new Je;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),H(i,{code:B.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):be.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,te.toString(r))}gt(e,r){return this.setLimit("min",e,!1,te.toString(r))}lte(e,r){return this.setLimit("max",e,!0,te.toString(r))}lt(e,r){return this.setLimit("max",e,!1,te.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:te.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:te.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:te.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:te.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:te.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:te.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Ar.create=t=>{var e;return new Ar({checks:[],typeName:ne.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};var Cr=class extends le{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==j.boolean){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.boolean,received:i.parsedType}),ae}return et(e.data)}};Cr.create=t=>new Cr({typeName:ne.ZodBoolean,coerce:t?.coerce||!1,...oe(t)});var Tr=class t extends le{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==j.date){let s=this._getOrReturnCtx(e);return H(s,{code:B.invalid_type,expected:j.date,received:s.parsedType}),ae}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return H(s,{code:B.invalid_date}),ae}let i=new Je,n;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:B.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),i.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),H(n,{code:B.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):be.assertNever(s);return{status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:te.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:te.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Tr.create=t=>new Tr({checks:[],coerce:t?.coerce||!1,typeName:ne.ZodDate,...oe(t)});var oi=class extends le{_parse(e){if(this._getType(e)!==j.symbol){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.symbol,received:i.parsedType}),ae}return et(e.data)}};oi.create=t=>new oi({typeName:ne.ZodSymbol,...oe(t)});var Ir=class extends le{_parse(e){if(this._getType(e)!==j.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.undefined,received:i.parsedType}),ae}return et(e.data)}};Ir.create=t=>new Ir({typeName:ne.ZodUndefined,...oe(t)});var Mr=class extends le{_parse(e){if(this._getType(e)!==j.null){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.null,received:i.parsedType}),ae}return et(e.data)}};Mr.create=t=>new Mr({typeName:ne.ZodNull,...oe(t)});var pr=class extends le{constructor(){super(...arguments),this._any=!0}_parse(e){return et(e.data)}};pr.create=t=>new pr({typeName:ne.ZodAny,...oe(t)});var Zt=class extends le{constructor(){super(...arguments),this._unknown=!0}_parse(e){return et(e.data)}};Zt.create=t=>new Zt({typeName:ne.ZodUnknown,...oe(t)});var Rt=class extends le{_parse(e){let r=this._getOrReturnCtx(e);return H(r,{code:B.invalid_type,expected:j.never,received:r.parsedType}),ae}};Rt.create=t=>new Rt({typeName:ne.ZodNever,...oe(t)});var li=class extends le{_parse(e){if(this._getType(e)!==j.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.void,received:i.parsedType}),ae}return et(e.data)}};li.create=t=>new li({typeName:ne.ZodVoid,...oe(t)});var Yt=class t extends le{_parse(e){let{ctx:r,status:i}=this._processInputParams(e),n=this._def;if(r.parsedType!==j.array)return H(r,{code:B.invalid_type,expected:j.array,received:r.parsedType}),ae;if(n.exactLength!==null){let a=r.data.length>n.exactLength.value,o=r.data.length<n.exactLength.value;(a||o)&&(H(r,{code:a?B.too_big:B.too_small,minimum:o?n.exactLength.value:void 0,maximum:a?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(H(r,{code:B.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(H(r,{code:B.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>n.type._parseAsync(new Pt(r,a,r.path,o)))).then(a=>Je.mergeArray(i,a));let s=[...r.data].map((a,o)=>n.type._parseSync(new Pt(r,a,r.path,o)));return Je.mergeArray(i,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:te.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:te.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:te.toString(r)}})}nonempty(e){return this.min(1,e)}};Yt.create=(t,e)=>new Yt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ne.ZodArray,...oe(e)});function ai(t){if(t instanceof ot){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=$t.create(ai(i))}return new ot({...t._def,shape:()=>e})}else return t instanceof Yt?new Yt({...t._def,type:ai(t.element)}):t instanceof $t?$t.create(ai(t.unwrap())):t instanceof Jt?Jt.create(ai(t.unwrap())):t instanceof Vt?Vt.create(t.items.map(e=>ai(e))):t}var ot=class t extends le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=be.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==j.object){let h=this._getOrReturnCtx(e);return H(h,{code:B.invalid_type,expected:j.object,received:h.parsedType}),ae}let{status:i,ctx:n}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Rt&&this._def.unknownKeys==="strip"))for(let h in n.data)a.includes(h)||o.push(h);let l=[];for(let h of a){let c=s[h],u=n.data[h];l.push({key:{status:"valid",value:h},value:c._parse(new Pt(n,u,n.path,h)),alwaysSet:h in n.data})}if(this._def.catchall instanceof Rt){let h=this._def.unknownKeys;if(h==="passthrough")for(let c of o)l.push({key:{status:"valid",value:c},value:{status:"valid",value:n.data[c]}});else if(h==="strict")o.length>0&&(H(n,{code:B.unrecognized_keys,keys:o}),i.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let h=this._def.catchall;for(let c of o){let u=n.data[c];l.push({key:{status:"valid",value:c},value:h._parse(new Pt(n,u,n.path,c)),alwaysSet:c in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let h=[];for(let c of l){let u=await c.key;h.push({key:u,value:await c.value,alwaysSet:c.alwaysSet})}return h}).then(h=>Je.mergeObjectSync(i,h)):Je.mergeObjectSync(i,l)}get shape(){return this._def.shape()}strict(e){return te.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{var n,s,a,o;let l=(a=(s=(n=this._def).errorMap)===null||s===void 0?void 0:s.call(n,r,i).message)!==null&&a!==void 0?a:i.defaultError;return r.code==="unrecognized_keys"?{message:(o=te.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ne.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return be.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(r[i]=this.shape[i])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return be.objectKeys(this.shape).forEach(i=>{e[i]||(r[i]=this.shape[i])}),new t({...this._def,shape:()=>r})}deepPartial(){return ai(this)}partial(e){let r={};return be.objectKeys(this.shape).forEach(i=>{let n=this.shape[i];e&&!e[i]?r[i]=n:r[i]=n.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return be.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])r[i]=this.shape[i];else{let s=this.shape[i];for(;s instanceof $t;)s=s._def.innerType;r[i]=s}}),new t({...this._def,shape:()=>r})}keyof(){return mh(be.objectKeys(this.shape))}};ot.create=(t,e)=>new ot({shape:()=>t,unknownKeys:"strip",catchall:Rt.create(),typeName:ne.ZodObject,...oe(e)});ot.strictCreate=(t,e)=>new ot({shape:()=>t,unknownKeys:"strict",catchall:Rt.create(),typeName:ne.ZodObject,...oe(e)});ot.lazycreate=(t,e)=>new ot({shape:t,unknownKeys:"strip",catchall:Rt.create(),typeName:ne.ZodObject,...oe(e)});var Dr=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=this._def.options;function n(s){for(let o of s)if(o.result.status==="valid")return o.result;for(let o of s)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(o=>new gt(o.ctx.common.issues));return H(r,{code:B.invalid_union,unionErrors:a}),ae}if(r.common.async)return Promise.all(i.map(async s=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(n);{let s,a=[];for(let l of i){let h={...r,common:{...r.common,issues:[]},parent:null},c=l._parseSync({data:r.data,path:r.path,parent:h});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:h}),h.common.issues.length&&a.push(h.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(l=>new gt(l));return H(r,{code:B.invalid_union,unionErrors:o}),ae}}get options(){return this._def.options}};Dr.create=(t,e)=>new Dr({options:t,typeName:ne.ZodUnion,...oe(e)});var Jn=t=>t instanceof Or?Jn(t.schema):t instanceof yt?Jn(t.innerType()):t instanceof $r?[t.value]:t instanceof Rr?t.options:t instanceof Lr?Object.keys(t.enum):t instanceof Br?Jn(t._def.innerType):t instanceof Ir?[void 0]:t instanceof Mr?[null]:null,es=class t extends le{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==j.object)return H(r,{code:B.invalid_type,expected:j.object,received:r.parsedType}),ae;let i=this.discriminator,n=r.data[i],s=this.optionsMap.get(n);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(H(r,{code:B.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),ae)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,i){let n=new Map;for(let s of r){let a=Jn(s.shape[e]);if(!a)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,s)}}return new t({typeName:ne.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...oe(i)})}};function ro(t,e){let r=cr(t),i=cr(e);if(t===e)return{valid:!0,data:t};if(r===j.object&&i===j.object){let n=be.objectKeys(e),s=be.objectKeys(t).filter(o=>n.indexOf(o)!==-1),a={...t,...e};for(let o of s){let l=ro(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(r===j.array&&i===j.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let s=0;s<t.length;s++){let a=t[s],o=e[s],l=ro(a,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return r===j.date&&i===j.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Fr=class extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=(s,a)=>{if(eo(s)||eo(a))return ae;let o=ro(s.value,a.value);return o.valid?((to(s)||to(a))&&r.dirty(),{status:r.value,value:o.data}):(H(i,{code:B.invalid_intersection_types}),ae)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,a])=>n(s,a)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Fr.create=(t,e,r)=>new Fr({left:t,right:e,typeName:ne.ZodIntersection,...oe(r)});var Vt=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==j.array)return H(i,{code:B.invalid_type,expected:j.array,received:i.parsedType}),ae;if(i.data.length<this._def.items.length)return H(i,{code:B.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ae;!this._def.rest&&i.data.length>this._def.items.length&&(H(i,{code:B.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...i.data].map((a,o)=>{let l=this._def.items[o]||this._def.rest;return l?l._parse(new Pt(i,a,i.path,o)):null}).filter(a=>!!a);return i.common.async?Promise.all(s).then(a=>Je.mergeArray(r,a)):Je.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Vt.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vt({items:t,typeName:ne.ZodTuple,rest:null,...oe(e)})};var ts=class t extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==j.object)return H(i,{code:B.invalid_type,expected:j.object,received:i.parsedType}),ae;let n=[],s=this._def.keyType,a=this._def.valueType;for(let o in i.data)n.push({key:s._parse(new Pt(i,o,i.path,o)),value:a._parse(new Pt(i,i.data[o],i.path,o))});return i.common.async?Je.mergeObjectAsync(r,n):Je.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,i){return r instanceof le?new t({keyType:e,valueType:r,typeName:ne.ZodRecord,...oe(i)}):new t({keyType:ur.create(),valueType:e,typeName:ne.ZodRecord,...oe(r)})}},hi=class extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==j.map)return H(i,{code:B.invalid_type,expected:j.map,received:i.parsedType}),ae;let n=this._def.keyType,s=this._def.valueType,a=[...i.data.entries()].map(([o,l],h)=>({key:n._parse(new Pt(i,o,i.path,[h,"key"])),value:s._parse(new Pt(i,l,i.path,[h,"value"]))}));if(i.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let l of a){let h=await l.key,c=await l.value;if(h.status==="aborted"||c.status==="aborted")return ae;(h.status==="dirty"||c.status==="dirty")&&r.dirty(),o.set(h.value,c.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let l of a){let h=l.key,c=l.value;if(h.status==="aborted"||c.status==="aborted")return ae;(h.status==="dirty"||c.status==="dirty")&&r.dirty(),o.set(h.value,c.value)}return{status:r.value,value:o}}}};hi.create=(t,e,r)=>new hi({valueType:e,keyType:t,typeName:ne.ZodMap,...oe(r)});var ci=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==j.set)return H(i,{code:B.invalid_type,expected:j.set,received:i.parsedType}),ae;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(H(i,{code:B.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(H(i,{code:B.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let s=this._def.valueType;function a(l){let h=new Set;for(let c of l){if(c.status==="aborted")return ae;c.status==="dirty"&&r.dirty(),h.add(c.value)}return{status:r.value,value:h}}let o=[...i.data.values()].map((l,h)=>s._parse(new Pt(i,l,i.path,h)));return i.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:te.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:te.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};ci.create=(t,e)=>new ci({valueType:t,minSize:null,maxSize:null,typeName:ne.ZodSet,...oe(e)});var rs=class t extends le{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==j.function)return H(r,{code:B.invalid_type,expected:j.function,received:r.parsedType}),ae;function i(o,l){return Kn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Xn(),Ki].filter(h=>!!h),issueData:{code:B.invalid_arguments,argumentsError:l}})}function n(o,l){return Kn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Xn(),Ki].filter(h=>!!h),issueData:{code:B.invalid_return_type,returnTypeError:l}})}let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof dr){let o=this;return et(async function(...l){let h=new gt([]),c=await o._def.args.parseAsync(l,s).catch(p=>{throw h.addIssue(i(l,p)),h}),u=await Reflect.apply(a,this,c);return await o._def.returns._def.type.parseAsync(u,s).catch(p=>{throw h.addIssue(n(u,p)),h})})}else{let o=this;return et(function(...l){let h=o._def.args.safeParse(l,s);if(!h.success)throw new gt([i(l,h.error)]);let c=Reflect.apply(a,this,h.data),u=o._def.returns.safeParse(c,s);if(!u.success)throw new gt([n(c,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Vt.create(e).rest(Zt.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,i){return new t({args:e||Vt.create([]).rest(Zt.create()),returns:r||Zt.create(),typeName:ne.ZodFunction,...oe(i)})}},Or=class extends le{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Or.create=(t,e)=>new Or({getter:t,typeName:ne.ZodLazy,...oe(e)});var $r=class extends le{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return H(r,{received:r.data,code:B.invalid_literal,expected:this._def.value}),ae}return{status:"valid",value:e.data}}get value(){return this._def.value}};$r.create=(t,e)=>new $r({value:t,typeName:ne.ZodLiteral,...oe(e)});function mh(t,e){return new Rr({values:t,typeName:ne.ZodEnum,...oe(e)})}var Rr=class t extends le{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return H(r,{expected:be.joinValues(i),received:r.parsedType,code:B.invalid_type}),ae}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),i=this._def.values;return H(r,{received:r.data,code:B.invalid_enum_value,options:i}),ae}return et(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e){return t.create(e)}exclude(e){return t.create(this.options.filter(r=>!e.includes(r)))}};Rr.create=mh;var Lr=class extends le{_parse(e){let r=be.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==j.string&&i.parsedType!==j.number){let n=be.objectValues(r);return H(i,{expected:be.joinValues(n),received:i.parsedType,code:B.invalid_type}),ae}if(r.indexOf(e.data)===-1){let n=be.objectValues(r);return H(i,{received:i.data,code:B.invalid_enum_value,options:n}),ae}return et(e.data)}get enum(){return this._def.values}};Lr.create=(t,e)=>new Lr({values:t,typeName:ne.ZodNativeEnum,...oe(e)});var dr=class extends le{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==j.promise&&r.common.async===!1)return H(r,{code:B.invalid_type,expected:j.promise,received:r.parsedType}),ae;let i=r.parsedType===j.promise?r.data:Promise.resolve(r.data);return et(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};dr.create=(t,e)=>new dr({type:t,typeName:ne.ZodPromise,...oe(e)});var yt=class extends le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:a=>{H(i,a),a.fatal?r.abort():r.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="preprocess"){let a=n.transform(i.data,s);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(a).then(o=>this._def.schema._parseAsync({data:o,path:i.path,parent:i})):this._def.schema._parseSync({data:a,path:i.path,parent:i})}if(n.type==="refinement"){let a=o=>{let l=n.refinement(o,s);if(i.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?ae:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>o.status==="aborted"?ae:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(n.type==="transform")if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Qi(a))return a;let o=n.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>Qi(a)?Promise.resolve(n.transform(a.value,s)).then(o=>({status:r.value,value:o})):a);be.assertNever(n)}};yt.create=(t,e,r)=>new yt({schema:t,typeName:ne.ZodEffects,effect:e,...oe(r)});yt.createWithPreprocess=(t,e,r)=>new yt({schema:e,effect:{type:"preprocess",transform:t},typeName:ne.ZodEffects,...oe(r)});var $t=class extends le{_parse(e){return this._getType(e)===j.undefined?et(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};$t.create=(t,e)=>new $t({innerType:t,typeName:ne.ZodOptional,...oe(e)});var Jt=class extends le{_parse(e){return this._getType(e)===j.null?et(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Jt.create=(t,e)=>new Jt({innerType:t,typeName:ne.ZodNullable,...oe(e)});var Br=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return r.parsedType===j.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Br.create=(t,e)=>new Br({innerType:t,typeName:ne.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...oe(e)});var ui=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Qn(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new gt(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new gt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};ui.create=(t,e)=>new ui({innerType:t,typeName:ne.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...oe(e)});var pi=class extends le{_parse(e){if(this._getType(e)!==j.nan){let i=this._getOrReturnCtx(e);return H(i,{code:B.invalid_type,expected:j.nan,received:i.parsedType}),ae}return{status:"valid",value:e.data}}};pi.create=t=>new pi({typeName:ne.ZodNaN,...oe(t)});var Kd=Symbol("zod_brand"),is=class extends le{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},en=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?ae:s.status==="dirty"?(r.dirty(),fh(s.value)):this._def.out._parseAsync({data:s.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?ae:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(e,r){return new t({in:e,out:r,typeName:ne.ZodPipeline})}},di=class extends le{_parse(e){let r=this._def.innerType._parse(e);return Qi(r)&&(r.value=Object.freeze(r.value)),r}};di.create=(t,e)=>new di({innerType:t,typeName:ne.ZodReadonly,...oe(e)});var gh=(t,e={},r)=>t?pr.create().superRefine((i,n)=>{var s,a;if(!t(i)){let o=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,l=(a=(s=o.fatal)!==null&&s!==void 0?s:r)!==null&&a!==void 0?a:!0,h=typeof o=="string"?{message:o}:o;n.addIssue({code:"custom",...h,fatal:l})}}):pr.create(),Qd={object:ot.lazycreate},ne;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ne||(ne={}));var ef=(t,e={message:`Input not instance of ${t.name}`})=>gh(r=>r instanceof t,e),yh=ur.create,vh=Pr.create,tf=pi.create,rf=Ar.create,bh=Cr.create,nf=Tr.create,sf=oi.create,af=Ir.create,of=Mr.create,lf=pr.create,hf=Zt.create,cf=Rt.create,uf=li.create,pf=Yt.create,df=ot.create,ff=ot.strictCreate,mf=Dr.create,gf=es.create,yf=Fr.create,vf=Vt.create,bf=ts.create,_f=hi.create,wf=ci.create,xf=rs.create,Sf=Or.create,kf=$r.create,Ef=Rr.create,Pf=Lr.create,Af=dr.create,ph=yt.create,Cf=$t.create,Tf=Jt.create,If=yt.createWithPreprocess,Mf=en.create,Df=()=>yh().optional(),Ff=()=>vh().optional(),Of=()=>bh().optional(),$f={string:t=>ur.create({...t,coerce:!0}),number:t=>Pr.create({...t,coerce:!0}),boolean:t=>Cr.create({...t,coerce:!0}),bigint:t=>Ar.create({...t,coerce:!0}),date:t=>Tr.create({...t,coerce:!0})},Rf=ae,ge=Object.freeze({__proto__:null,defaultErrorMap:Ki,setErrorMap:Vd,getErrorMap:Xn,makeIssue:Kn,EMPTY_PATH:Nd,addIssueToContext:H,ParseStatus:Je,INVALID:ae,DIRTY:fh,OK:et,isAborted:eo,isDirty:to,isValid:Qi,isAsync:Qn,get util(){return be},get objectUtil(){return Qa},ZodParsedType:j,getParsedType:cr,ZodType:le,ZodString:ur,ZodNumber:Pr,ZodBigInt:Ar,ZodBoolean:Cr,ZodDate:Tr,ZodSymbol:oi,ZodUndefined:Ir,ZodNull:Mr,ZodAny:pr,ZodUnknown:Zt,ZodNever:Rt,ZodVoid:li,ZodArray:Yt,ZodObject:ot,ZodUnion:Dr,ZodDiscriminatedUnion:es,ZodIntersection:Fr,ZodTuple:Vt,ZodRecord:ts,ZodMap:hi,ZodSet:ci,ZodFunction:rs,ZodLazy:Or,ZodLiteral:$r,ZodEnum:Rr,ZodNativeEnum:Lr,ZodPromise:dr,ZodEffects:yt,ZodTransformer:yt,ZodOptional:$t,ZodNullable:Jt,ZodDefault:Br,ZodCatch:ui,ZodNaN:pi,BRAND:Kd,ZodBranded:is,ZodPipeline:en,ZodReadonly:di,custom:gh,Schema:le,ZodSchema:le,late:Qd,get ZodFirstPartyTypeKind(){return ne},coerce:$f,any:lf,array:pf,bigint:rf,boolean:bh,date:nf,discriminatedUnion:gf,effect:ph,enum:Ef,function:xf,instanceof:ef,intersection:yf,lazy:Sf,literal:kf,map:_f,nan:tf,nativeEnum:Pf,never:cf,null:of,nullable:Tf,number:vh,object:df,oboolean:Of,onumber:Ff,optional:Cf,ostring:Df,pipeline:Mf,preprocess:If,promise:Af,record:bf,set:wf,strictObject:ff,string:yh,symbol:sf,transformer:ph,tuple:vf,undefined:af,union:mf,unknown:hf,void:uf,NEVER:Rf,ZodIssueCode:B,quotelessJson:Bd,ZodError:gt});var yy=ge.object({wsApiUrl:ge.string(),url:ge.string(),logoSvg:ge.string().optional(),logoUrl:ge.string().optional(),title:ge.string(),status:ge.string(),color:ge.string(),showStillLearningBanner:ge.boolean().optional(),input:ge.object({placeholder:ge.string()}),bubble:ge.object({imageUrl:ge.string().optional(),position:ge.object({bottom:ge.string().optional(),right:ge.string().optional(),left:ge.string().optional()})}),header:ge.object({background:ge.string()}),limitations:ge.object({title:ge.string(),items:ge.array(ge.string())}),examples:ge.object({title:ge.string(),items:ge.array(ge.string())}),instructions:ge.object({items:ge.array(ge.string())}),popup:ge.object({enabled:ge.boolean().optional(),delayMs:ge.number().optional(),text:ge.string().optional()}).optional()});function Lf(t){return t.replace(/[^A-Za-z0-9_-]/gi,"")}window.__INIT_MOLIN_SHOP_AI=function(e){if(!e)throw new Error("options is required");let{widgetId:r,config:i}=e;if(!r)throw new Error("widgetId is required");if(!i)throw new Error("config is required");r=Lf(r);let n=document.createElement("molin-shop-ai");n.setAttribute("widget",r),n.config=i,document.body.appendChild(n)};var ns=window,ss=ns.ShadowRoot&&(ns.ShadyCSS===void 0||ns.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,io=Symbol(),_h=new WeakMap,tn=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==io)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(ss&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=_h.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&_h.set(r,e))}return e}toString(){return this.cssText}},wh=t=>new tn(typeof t=="string"?t:t+"",void 0,io),no=(t,...e)=>{let r=t.length===1?t[0]:e.reduce((i,n,s)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[s+1],t[0]);return new tn(r,t,io)},so=(t,e)=>{ss?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let i=document.createElement("style"),n=ns.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)})},as=ss?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return wh(r)})(t):t;var ao,os=window,xh=os.trustedTypes,Bf=xh?xh.emptyScript:"",Sh=os.reactiveElementPolyfillSupport,lo={toAttribute(t,e){switch(e){case Boolean:t=t?Bf:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},kh=(t,e)=>e!==t&&(e==e||t==t),oo={attribute:!0,type:String,converter:lo,reflect:!1,hasChanged:kh},ho="finalized",Xt=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(e)}static get observedAttributes(){this.finalize();let e=[];return this.elementProperties.forEach((r,i)=>{let n=this._$Ep(i,r);n!==void 0&&(this._$Ev.set(n,i),e.push(n))}),e}static createProperty(e,r=oo){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(e,r),!r.noAccessor&&!this.prototype.hasOwnProperty(e)){let i=typeof e=="symbol"?Symbol():"__"+e,n=this.getPropertyDescriptor(e,i,r);n!==void 0&&Object.defineProperty(this.prototype,e,n)}}static getPropertyDescriptor(e,r,i){return{get(){return this[r]},set(n){let s=this[e];this[r]=n,this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||oo}static finalize(){if(this.hasOwnProperty(ho))return!1;this[ho]=!0;let e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let r=this.properties,i=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let n of i)this.createProperty(n,r[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let n of i)r.unshift(as(n))}else e!==void 0&&r.push(as(e));return r}static _$Ep(e,r){let i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(r=>r(this))}addController(e){var r,i;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)===null||i===void 0||i.call(e))}removeController(e){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var e;let r=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return so(r,this.constructor.elementStyles),r}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostConnected)===null||i===void 0?void 0:i.call(r)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(r=>{var i;return(i=r.hostDisconnected)===null||i===void 0?void 0:i.call(r)})}attributeChangedCallback(e,r,i){this._$AK(e,i)}_$EO(e,r,i=oo){var n;let s=this.constructor._$Ep(e,i);if(s!==void 0&&i.reflect===!0){let a=(((n=i.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?i.converter:lo).toAttribute(r,i.type);this._$El=e,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._$El=null}}_$AK(e,r){var i;let n=this.constructor,s=n._$Ev.get(e);if(s!==void 0&&this._$El!==s){let a=n.getPropertyOptions(s),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?a.converter:lo;this._$El=s,this[s]=o.fromAttribute(r,a.type),this._$El=null}}requestUpdate(e,r,i){let n=!0;e!==void 0&&(((i=i||this.constructor.getPropertyOptions(e)).hasChanged||kh)(this[e],r)?(this._$AL.has(e)||this._$AL.set(e,r),i.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,s)=>this[s]=n),this._$Ei=void 0);let r=!1,i=this._$AL;try{r=this.shouldUpdate(i),r?(this.willUpdate(i),(e=this._$ES)===null||e===void 0||e.forEach(n=>{var s;return(s=n.hostUpdate)===null||s===void 0?void 0:s.call(n)}),this.update(i)):this._$Ek()}catch(n){throw r=!1,this._$Ek(),n}r&&this._$AE(i)}willUpdate(e){}_$AE(e){var r;(r=this._$ES)===null||r===void 0||r.forEach(i=>{var n;return(n=i.hostUpdated)===null||n===void 0?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((r,i)=>this._$EO(i,this[i],r)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};Xt[ho]=!0,Xt.elementProperties=new Map,Xt.elementStyles=[],Xt.shadowRootOptions={mode:"open"},Sh?.({ReactiveElement:Xt}),((ao=os.reactiveElementVersions)!==null&&ao!==void 0?ao:os.reactiveElementVersions=[]).push("1.6.3");var co,ls=window,fi=ls.trustedTypes,Eh=fi?fi.createPolicy("lit-html",{createHTML:t=>t}):void 0,hs="$lit$",Kt=`lit$${(Math.random()+"").slice(9)}$`,po="?"+Kt,Vf=`<${po}>`,zr=document,nn=()=>zr.createComment(""),sn=t=>t===null||typeof t!="object"&&typeof t!="function",Dh=Array.isArray,Fh=t=>Dh(t)||typeof t?.[Symbol.iterator]=="function",uo=`[
|
|
2
2
|
\f\r]`,rn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ph=/-->/g,Ah=/>/g,Vr=RegExp(`>|${uo}(?:([^\\s"'>=/]+)(${uo}*=${uo}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ch=/'/g,Th=/"/g,Oh=/^(?:script|style|textarea|title)$/i,$h=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),pe=$h(1),Ay=$h(2),vt=Symbol.for("lit-noChange"),Me=Symbol.for("lit-nothing"),Ih=new WeakMap,Nr=zr.createTreeWalker(zr,129,null,!1);function Rh(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Eh!==void 0?Eh.createHTML(e):e}var Lh=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":"",a=rn;for(let o=0;o<r;o++){let l=t[o],h,c,u=-1,f=0;for(;f<l.length&&(a.lastIndex=f,c=a.exec(l),c!==null);)f=a.lastIndex,a===rn?c[1]==="!--"?a=Ph:c[1]!==void 0?a=Ah:c[2]!==void 0?(Oh.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=Vr):c[3]!==void 0&&(a=Vr):a===Vr?c[0]===">"?(a=n??rn,u=-1):c[1]===void 0?u=-2:(u=a.lastIndex-c[2].length,h=c[1],a=c[3]===void 0?Vr:c[3]==='"'?Th:Ch):a===Th||a===Ch?a=Vr:a===Ph||a===Ah?a=rn:(a=Vr,n=void 0);let p=a===Vr&&t[o+1].startsWith("/>")?" ":"";s+=a===rn?l+Vf:u>=0?(i.push(h),l.slice(0,u)+hs+l.slice(u)+Kt+p):l+Kt+(u===-2?(i.push(void 0),o):p)}return[Rh(t,s+(t[r]||"<?>")+(e===2?"</svg>":"")),i]},an=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let s=0,a=0,o=e.length-1,l=this.parts,[h,c]=Lh(e,r);if(this.el=t.createElement(h,i),Nr.currentNode=this.el.content,r===2){let u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(n=Nr.nextNode())!==null&&l.length<o;){if(n.nodeType===1){if(n.hasAttributes()){let u=[];for(let f of n.getAttributeNames())if(f.endsWith(hs)||f.startsWith(Kt)){let p=c[a++];if(u.push(f),p!==void 0){let m=n.getAttribute(p.toLowerCase()+hs).split(Kt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:g[2],strings:m,ctor:g[1]==="."?us:g[1]==="?"?ps:g[1]==="@"?ds:Gr})}else l.push({type:6,index:s})}for(let f of u)n.removeAttribute(f)}if(Oh.test(n.tagName)){let u=n.textContent.split(Kt),f=u.length-1;if(f>0){n.textContent=fi?fi.emptyScript:"";for(let p=0;p<f;p++)n.append(u[p],nn()),Nr.nextNode(),l.push({type:2,index:++s});n.append(u[f],nn())}}}else if(n.nodeType===8)if(n.data===po)l.push({type:2,index:s});else{let u=-1;for(;(u=n.data.indexOf(Kt,u+1))!==-1;)l.push({type:7,index:s}),u+=Kt.length-1}s++}}static createElement(e,r){let i=zr.createElement("template");return i.innerHTML=e,i}};function jr(t,e,r=t,i){var n,s,a,o;if(e===vt)return e;let l=i!==void 0?(n=r._$Co)===null||n===void 0?void 0:n[i]:r._$Cl,h=sn(e)?void 0:e._$litDirective$;return l?.constructor!==h&&((s=l?._$AO)===null||s===void 0||s.call(l,!1),h===void 0?l=void 0:(l=new h(t),l._$AT(t,r,i)),i!==void 0?((a=(o=r)._$Co)!==null&&a!==void 0?a:o._$Co=[])[i]=l:r._$Cl=l),l!==void 0&&(e=jr(t,l._$AS(t,e.values),l,i)),e}var cs=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var r;let{el:{content:i},parts:n}=this._$AD,s=((r=e?.creationScope)!==null&&r!==void 0?r:zr).importNode(i,!0);Nr.currentNode=s;let a=Nr.nextNode(),o=0,l=0,h=n[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new mi(a,a.nextSibling,this,e):h.type===1?c=new h.ctor(a,h.name,h.strings,this,e):h.type===6&&(c=new fs(a,this,e)),this._$AV.push(c),h=n[++l]}o!==h?.index&&(a=Nr.nextNode(),o++)}return Nr.currentNode=zr,s}v(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},mi=class t{constructor(e,r,i,n){var s;this.type=2,this._$AH=Me,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cp=(s=n?.isConnected)===null||s===void 0||s}get _$AU(){var e,r;return(r=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&r!==void 0?r:this._$Cp}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=jr(this,e,r),sn(e)?e===Me||e==null||e===""?(this._$AH!==Me&&this._$AR(),this._$AH=Me):e!==this._$AH&&e!==vt&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Fh(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==Me&&sn(this._$AH)?this._$AA.nextSibling.data=e:this.$(zr.createTextNode(e)),this._$AH=e}g(e){var r;let{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=an.createElement(Rh(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)===null||r===void 0?void 0:r._$AD)===s)this._$AH.v(i);else{let a=new cs(s,this),o=a.u(this.options);a.v(i),this.$(o),this._$AH=a}}_$AC(e){let r=Ih.get(e.strings);return r===void 0&&Ih.set(e.strings,r=new an(e)),r}T(e){Dh(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let s of e)n===r.length?r.push(i=new t(this.k(nn()),this.k(nn()),this,this.options)):i=r[n],i._$AI(s),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,r);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){var r;this._$AM===void 0&&(this._$Cp=e,(r=this._$AP)===null||r===void 0||r.call(this,e))}},Gr=class{constructor(e,r,i,n,s){this.type=1,this._$AH=Me,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Me}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,i,n){let s=this.strings,a=!1;if(s===void 0)e=jr(this,e,r,0),a=!sn(e)||e!==this._$AH&&e!==vt,a&&(this._$AH=e);else{let o=e,l,h;for(e=s[0],l=0;l<s.length-1;l++)h=jr(this,o[i+l],r,l),h===vt&&(h=this._$AH[l]),a||(a=!sn(h)||h!==this._$AH[l]),h===Me?e=Me:e!==Me&&(e+=(h??"")+s[l+1]),this._$AH[l]=h}a&&!n&&this.j(e)}j(e){e===Me?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},us=class extends Gr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Me?void 0:e}},Nf=fi?fi.emptyScript:"",ps=class extends Gr{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Me?this.element.setAttribute(this.name,Nf):this.element.removeAttribute(this.name)}},ds=class extends Gr{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){var i;if((e=(i=jr(this,e,r,0))!==null&&i!==void 0?i:Me)===vt)return;let n=this._$AH,s=e===Me&&n!==Me||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==Me&&(n===Me||s);s&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r,i;typeof this._$AH=="function"?this._$AH.call((i=(r=this.options)===null||r===void 0?void 0:r.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}},fs=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){jr(this,e)}},Bh={O:hs,P:Kt,A:po,C:1,M:Lh,L:cs,R:Fh,D:jr,I:mi,V:Gr,H:ps,N:ds,U:us,F:fs},Mh=ls.litHtmlPolyfillSupport;Mh?.(an,mi),((co=ls.litHtmlVersions)!==null&&co!==void 0?co:ls.litHtmlVersions=[]).push("2.8.0");var Vh=(t,e,r)=>{var i,n;let s=(i=r?.renderBefore)!==null&&i!==void 0?i:e,a=s._$litPart$;if(a===void 0){let o=(n=r?.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=a=new mi(e.insertBefore(nn(),o),o,void 0,r??{})}return a._$AI(t),a};var fo,mo;var Ee=class extends Xt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,r;let i=super.createRenderRoot();return(e=(r=this.renderOptions).renderBefore)!==null&&e!==void 0||(r.renderBefore=i.firstChild),i}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Vh(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return vt}};Ee.finalized=!0,Ee._$litElement$=!0,(fo=globalThis.litElementHydrateSupport)===null||fo===void 0||fo.call(globalThis,{LitElement:Ee});var Nh=globalThis.litElementPolyfillSupport;Nh?.({LitElement:Ee});((mo=globalThis.litElementVersions)!==null&&mo!==void 0?mo:globalThis.litElementVersions=[]).push("3.3.3");var gi={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},yi=t=>(...e)=>({_$litDirective$:t,values:e}),fr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,i){this._$Ct=e,this._$AM=r,this._$Ci=i}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var{I:zf}=Bh;var zh=()=>document.createComment(""),vi=(t,e,r)=>{var i;let n=t._$AA.parentNode,s=e===void 0?t._$AB:e._$AA;if(r===void 0){let a=n.insertBefore(zh(),s),o=n.insertBefore(zh(),s);r=new zf(a,o,t,t.options)}else{let a=r._$AB.nextSibling,o=r._$AM,l=o!==t;if(l){let h;(i=r._$AQ)===null||i===void 0||i.call(r,t),r._$AM=t,r._$AP!==void 0&&(h=t._$AU)!==o._$AU&&r._$AP(h)}if(a!==s||l){let h=r._$AA;for(;h!==a;){let c=h.nextSibling;n.insertBefore(h,s),h=c}}}return r},mr=(t,e,r=t)=>(t._$AI(e,r),t),jf={},jh=(t,e=jf)=>t._$AH=e,Gh=t=>t._$AH,ms=t=>{var e;(e=t._$AP)===null||e===void 0||e.call(t,!1,!0);let r=t._$AA,i=t._$AB.nextSibling;for(;r!==i;){let n=r.nextSibling;r.remove(),r=n}};var Hh=(t,e,r)=>{let i=new Map;for(let n=e;n<=r;n++)i.set(t[n],n);return i},on=yi(class extends fr{constructor(t){if(super(t),t.type!==gi.CHILD)throw Error("repeat() can only be used in text expressions")}ct(t,e,r){let i;r===void 0?r=e:e!==void 0&&(i=e);let n=[],s=[],a=0;for(let o of t)n[a]=i?i(o,a):a,s[a]=r(o,a),a++;return{values:s,keys:n}}render(t,e,r){return this.ct(t,e,r).values}update(t,[e,r,i]){var n;let s=Gh(t),{values:a,keys:o}=this.ct(e,r,i);if(!Array.isArray(s))return this.ut=o,a;let l=(n=this.ut)!==null&&n!==void 0?n:this.ut=[],h=[],c,u,f=0,p=s.length-1,m=0,g=a.length-1;for(;f<=p&&m<=g;)if(s[f]===null)f++;else if(s[p]===null)p--;else if(l[f]===o[m])h[m]=mr(s[f],a[m]),f++,m++;else if(l[p]===o[g])h[g]=mr(s[p],a[g]),p--,g--;else if(l[f]===o[g])h[g]=mr(s[f],a[g]),vi(t,h[g+1],s[f]),f++,g--;else if(l[p]===o[m])h[m]=mr(s[p],a[m]),vi(t,s[f],s[p]),p--,m++;else if(c===void 0&&(c=Hh(o,m,g),u=Hh(l,f,p)),c.has(l[f]))if(c.has(l[p])){let d=u.get(o[m]),y=d!==void 0?s[d]:null;if(y===null){let v=vi(t,s[f]);mr(v,a[m]),h[m]=v}else h[m]=mr(y,a[m]),vi(t,s[f],y),s[d]=null;m++}else ms(s[p]),p--;else ms(s[f]),f++;for(;m<=g;){let d=vi(t,h[g+1]);mr(d,a[m]),h[m++]=d}for(;f<=p;){let d=s[f++];d!==null&&ms(d)}return this.ut=o,jh(t,h),vt}});function Eo(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function Gf(t,e=","){return t.map(Eo).join(e)}var Xh=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function gs(t){for(var e=9,r=t.length;r--;)e=Math.imul(e^t.charCodeAt(r),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function bs(t,e="@media "){return e+Ce(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(i=>`(${i}-width:${r[i]})`).join(" and "))).join(",")}function Ce(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function qh(t){return t}function _s(){}var Ne={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Kh(t){return t.match(/[-=:;]/g)?.length||0}function _o(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Kh(t),15)<<18}var Hf=["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 Po({n:t,i:e,v:r=[]},i,n,s){t&&(t=Eo({n:t,i:e,v:r})),s=[...Ce(s)];for(let o of r){let l=i.theme("screens",o);for(let h of Ce(l&&bs(l)||i.v(o))){var a;s.push(h),n|=l?67108864|_o(h):o=="dark"?1073741824:h[0]=="@"?_o(h):(a=h,1<<~(/:([a-z-]+)/.test(a)&&~Hf.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:n,r:s,i:e}}var Qh=new Map;function wo(t){if(t.d){let e=[],r=go(t.r.reduce((i,n)=>n[0]=="@"?(e.push(n),i):n?go(i,s=>go(n,a=>{let o=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(a);if(o){let l=s.indexOf(o[1]);return~l?s.slice(0,l)+o[0]+s.slice(l+o[1].length):yo(s,a)}return yo(a,s)})):i,"&"),i=>yo(i,t.n?"."+Xh(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((i,n)=>n+"{"+i+"}",t.d)}}function go(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,i,n)=>e(i)+n)}function yo(t,e){return t.replace(/&/g,e)}var Uh=new Intl.Collator("en",{numeric:!0});function ec(t,e){for(var r=0,i=t.length;r<i;){let n=i+r>>1;0>=tc(t[n],e)?r=n+1:i=n}return i}function tc(t,e){let r=t.p&Ne.o;return r==(e.p&Ne.o)&&(r==Ne.b||r==Ne.o)?0:t.p-e.p||t.o-e.o||Uh.compare(Wh(t.n),Wh(e.n))||Uh.compare(Zh(t.n),Zh(e.n))}function Wh(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function Zh(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function vo(t,e){return Math.round(parseInt(t,16)*e)}function At(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:r="1",opacityVariable:i}=e,n=i?`var(${i})`:r;if(t.includes("<alpha-value>"))return t.replace("<alpha-value>",n);if(t[0]=="#"&&(t.length==4||t.length==7)){let s=(t.length-1)/3,a=[17,1,.062272][s-1];return`rgba(${[vo(t.substr(1,s),a),vo(t.substr(1+s,s),a),vo(t.substr(1+2*s,s),a),n]})`}return n=="1"?t:n=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${n})`)}function rc(t,e,r,i,n=[]){return function s(a,{n:o,p:l,r:h=[],i:c},u){let f=[],p="",m=0,g=0;for(let v in a||{}){var d,y;let b=a[v];if(v[0]=="@"){if(!b)continue;if(v[1]=="a"){f.push(...Co(o,l,vs(""+b),u,l,h,c,!0));continue}if(v[1]=="l"){for(let _ of Ce(b))f.push(...s(_,{n:o,p:(d=Ne[v[7]],l&~Ne.o|d),r:v[7]=="d"?[]:h,i:c},u));continue}if(v[1]=="i"){f.push(...Ce(b).map(_=>({p:-1,o:0,r:[],d:v+" "+_})));continue}if(v[1]=="k"){f.push({p:Ne.d,o:0,r:[v],d:s(b,{p:Ne.d},u).map(wo).join("")});continue}if(v[1]=="f"){f.push(...Ce(b).map(_=>({p:Ne.d,o:0,r:[v],d:s(_,{p:Ne.d},u).map(wo).join("")})));continue}}if(typeof b!="object"||Array.isArray(b))v=="label"&&b?o=b+gs(JSON.stringify([l,c,a])):(b||b===0)&&(v=v.replace(/[A-Z]/g,_=>"-"+_.toLowerCase()),g+=1,m=Math.max(m,(y=v)[0]=="-"?0:Kh(y)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(y)?+!!RegExp.$1||-!!RegExp.$2:0)+1),p+=(p?";":"")+Ce(b).map(_=>u.s(v,Ao(""+_,u.theme)+(c?" !important":""))).join(";"));else if(v[0]=="@"||v.includes("&")){let _=l;v[0]=="@"&&(v=v.replace(/\bscreen\(([^)]+)\)/g,(x,T)=>{let S=u.theme("screens",T);return S?(_|=67108864,bs(S,"")):x}),_|=_o(v)),f.push(...s(b,{n:o,p:_,r:[...h,v],i:c},u))}else f.push(...s(b,{p:l,r:[...h,v]},u))}return f.unshift({n:o,p:l,o:Math.max(0,15-g)+1.5*Math.min(m||15,15),r:h,d:p}),f.sort(tc)}(t,Po(e,r,i,n),r)}function Ao(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,i,n,s,a="")=>{let o=e(n,a);return typeof o=="function"&&/color|fill|stroke/i.test(n)?At(o):""+Ce(o).filter(l=>Object(l)!==l)})}function ic(t,e){let r,i=[];for(let n of t)n.d&&n.n?r?.p==n.p&&""+r.r==""+n.r?(r.c=[r.c,n.c].filter(Boolean).join(" "),r.d=r.d+";"+n.d):i.push(r={...n,n:n.n&&e}):i.push({...n,n:n.n&&e});return i}function ys(t,e,r=Ne.u,i,n){let s=[];for(let a of t)for(let o of function(l,h,c,u,f){l={...l,i:l.i||f};let p=function(m,g){let d=Qh.get(m.n);return d?d(m,g):g.r(m.n,m.v[0]=="dark")}(l,h);return p?typeof p=="string"?({r:u,p:c}=Po(l,h,c,u),ic(ys(vs(p),h,c,u,l.i),l.n)):Array.isArray(p)?p.map(m=>{var g,d;return{o:0,...m,r:[...Ce(u),...Ce(m.r)],p:(g=c,d=m.p??c,g&~Ne.o|d)}}):rc(p,l,h,c,u):[{c:Eo(l),p:0,o:0,r:[]}]}(a,e,r,i,n))s.splice(ec(s,o),0,o);return s}function Co(t,e,r,i,n,s,a,o){return ic((o?r.flatMap(l=>ys([l],i,n,s,a)):ys(r,i,n,s,a)).map(l=>l.p&Ne.o&&(l.n||e==Ne.b)?{...l,p:l.p&~Ne.o|e,o:0}:l),t)}function qf(t,e,r,i){var n;return n=(s,a)=>{let{n:o,p:l,r:h,i:c}=Po(s,a,e);return r&&Co(o,e,r,a,l,h,c,i)},Qh.set(t,n),t}function bo(t,e,r){if(t[t.length-1]!="("){let i=[],n=!1,s=!1,a="";for(let o of t)if(!(o=="("||/[~@]$/.test(o))){if(o[0]=="!"&&(o=o.slice(1),n=!n),o.endsWith(":")){i[o=="dark:"?"unshift":"push"](o.slice(0,-1));continue}o[0]=="-"&&(o=o.slice(1),s=!s),o.endsWith("-")&&(o=o.slice(0,-1)),o&&o!="&"&&(a+=(a&&"-")+o)}a&&(s&&(a="-"+a),e[0].push({n:a,v:i.filter(Uf),i:n}))}}function Uf(t,e,r){return r.indexOf(t)==e}var Yh=new Map;function vs(t){let e=Yh.get(t);if(!e){let r=[],i=[[]],n=0,s=0,a=null,o=0,l=(h,c=0)=>{n!=o&&(r.push(t.slice(n,o+c)),h&&bo(r,i)),n=o+1};for(;o<t.length;o++){let h=t[o];if(s)t[o-1]!="\\"&&(s+=+(h=="[")||-(h=="]"));else if(h=="[")s+=1;else if(a)t[o-1]!="\\"&&a.test(t.slice(o))&&(a=null,n=o+RegExp.lastMatch.length);else if(h=="/"&&t[o-1]!="\\"&&(t[o+1]=="*"||t[o+1]=="/"))a=t[o+1]=="*"?/^\*\//:/^[\r\n]/;else if(h=="(")l(),r.push(h);else if(h==":")t[o+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(h)){l(!0);let c=r.lastIndexOf("(");if(h==")"){let u=r[c-1];if(/[~@]$/.test(u)){let f=i.shift();r.length=c,bo([...r,"#"],i);let{v:p}=i[0].pop();for(let m of f)m.v.splice(+(m.v[0]=="dark")-+(p[0]=="dark"),p.length);bo([...r,qf(u.length>1?u.slice(0,-1)+gs(JSON.stringify([u,f])):u+"("+Gf(f)+")",Ne.a,f,/@$/.test(u))],i)}c=r.lastIndexOf("(",c-1)}r.length=c+1}else/[~@]/.test(h)&&t[o+1]=="("&&i.unshift([])}l(!0),Yh.set(t,e=i[0])}return e}function V(t,e,r){return[t,xo(e,r)]}function xo(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,i)=>({[t]:e?e(r,i):So(r,1)}):r=>t||{[r[1]]:So(r,2)}}function So(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function N(t,e,r,i){return[t,To(e,r,i)]}function To(t,e,r){let i=typeof e=="string"?(n,s)=>({[e]:r?r(n,s):n._}):e||(({1:n,_:s},a,o)=>({[n||o]:s}));return(n,s)=>{let a=nc(t||n[1]),o=s.theme(a,n.$$)??Nt(n.$$,a,s);if(o!=null)return n._=So(n,0,o),i(n,s,a)}}function ze(t,e={},r){return[t,Wf(e,r)]}function Wf(t={},e){return(r,i)=>{let{section:n=nc(r[0]).replace("-","")+"Color"}=t,[s,a]=Zf(r.$$);if(!s)return;let o=i.theme(n,s)||Nt(s,n,i);if(!o||typeof o=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:h=n.replace("Color","Opacity"),property:c=n,selector:u}=t,f=i.theme(h,a||"DEFAULT")||a&&Nt(a,h,i),p=e||(({_:g})=>{let d=ln(c,g);return u?{[u]:d}:d});r._={value:At(o,{opacityVariable:l||void 0,opacityValue:f||void 0}),color:g=>At(o,g),opacityVariable:l||void 0,opacityValue:f||void 0};let m=p(r,i);if(!r.dark){let g=i.d(n,s,o);g&&g!==o&&(r._={value:At(g,{opacityVariable:l||void 0,opacityValue:f||"1"}),color:d=>At(g,d),opacityVariable:l||void 0,opacityValue:f||void 0},m={"&":m,[i.v("dark")]:p(r,i)})}return m}}function Zf(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function ln(t,e){let r={};return typeof e=="string"?r[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(r[e.opacityVariable]=e.opacityValue||"1"),r[t]=e.value),r}function Nt(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=bi(Ao(t.slice(1,-1),r.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function nc(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function bi(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",i,n="")=>bi(r)+i+bi(n)):t.replace(/(^|[^\\])_+/g,(e,r)=>r+" ".repeat(e.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Io({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:Ce(e.variants),rules:Ce(e.rules),ignorelist:Ce(e.ignorelist),hash:void 0,stringify:(i,n)=>i+":"+n,finalize:[]};for(let i of Ce([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&Ce(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:n,darkMode:s=r.darkMode,darkColor:a=r.darkColor,theme:o,variants:l,rules:h,ignorelist:c,hash:u=r.hash,stringify:f=r.stringify,finalize:p}=typeof i=="function"?i(r):i;r={preflight:r.preflight!==!1&&n!==!1&&[...r.preflight,...Ce(n)],darkMode:s,darkColor:a,theme:{...r.theme,...o,extend:{...r.theme.extend,...o?.extend}},variants:[...r.variants,...Ce(l)],rules:[...r.rules,...Ce(h)],ignorelist:[...r.ignorelist,...Ce(c)],hash:u,stringify:f,finalize:[...r.finalize,...Ce(p)]}}return r}function Jh(t,e,r,i,n,s){for(let a of e){let o=r.get(a);o||r.set(a,o=i(a));let l=o(t,n,s);if(l)return l}}function Yf(t){var e;return ko(t[0],typeof(e=t[1])=="function"?e:()=>e)}function Jf(t){var e,r;return Array.isArray(t)?ko(t[0],xo(t[1],t[2])):ko(t,xo(e,r))}function ko(t,e){return sc(t,(r,i,n,s)=>{let a=i.exec(r);if(a)return a.$$=r.slice(a[0].length),a.dark=s,e(a,n)})}function sc(t,e){let r=Ce(t).map(Xf);return(i,n,s)=>{for(let a of r){let o=e(i,a,n,s);if(o)return o}}}function Xf(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function ac(t,e){let r=Io(t),i=function({theme:l,darkMode:h,darkColor:c=_s,variants:u,rules:f,hash:p,stringify:m,ignorelist:g,finalize:d}){let y=new Map,v=new Map,b=new Map,_=new Map,x=sc(g,(w,M)=>M.test(w));u.push(["dark",Array.isArray(h)||h=="class"?`${Ce(h)[1]||".dark"} &`:typeof h=="string"&&h!="media"?h:"@media (prefers-color-scheme:dark)"]);let T=typeof p=="function"?w=>p(w,gs):p?gs:qh;T!==qh&&d.push(w=>({...w,n:w.n&&T(w.n),d:w.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(M,k)=>"--"+T(k).replace("#",""))}));let S={theme:function({extend:w={},...M}){let k={},I={get colors(){return P("colors")},theme:P,negative(){return{}},breakpoints(E){let F={};for(let O in E)typeof E[O]=="string"&&(F["screen-"+O]=E[O]);return F}};return P;function P(E,F,O,D){if(E){if({1:E,2:D}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(E)||[,E],/[.[]/.test(E)){let q=[];E.replace(/\[([^\]]+)\]|([^.[]+)/g,(U,J,G=J)=>q.push(G)),E=q.shift(),O=F,F=q.join("-")}let $=k[E]||Object.assign(Object.assign(k[E]={},A(M,E)),A(w,E));if(F==null)return $;F||(F="DEFAULT");let L=$[F]??F.split("-").reduce((q,U)=>q?.[U],$)??O;return D?At(L,{opacityValue:Ao(D,P)}):L}let C={};for(let $ of[...Object.keys(M),...Object.keys(w)])C[$]=P($);return C}function A(E,F){let O=E[F];return typeof O=="function"&&(O=O(I)),O&&/color|fill|stroke/i.test(F)?function D(C,$=[]){let L={};for(let q in C){let U=C[q],J=[...$,q];L[J.join("-")]=U,q=="DEFAULT"&&(J=$,L[$.join("-")]=U),typeof U=="object"&&Object.assign(L,D(U,J))}return L}(O):O}}(l),e:Xh,h:T,s(w,M){return m(w,M,S)},d(w,M,k){return c(w,M,S,k)},v(w){return y.has(w)||y.set(w,Jh(w,u,v,Yf,S)||"&:"+w),y.get(w)},r(w,M){let k=JSON.stringify([w,M]);return b.has(k)||b.set(k,!x(w,S)&&Jh(w,f,_,Jf,S,M)),b.get(k)},f(w){return d.reduce((M,k)=>k(M,S),w)}};return S}(r),n=new Map,s=[],a=new Set;e.resume(l=>n.set(l,l),(l,h)=>{e.insert(l,s.length,h),s.push(h),a.add(l)});function o(l){let h=i.f(l),c=wo(h);if(c&&!a.has(c)){a.add(c);let u=ec(s,l);e.insert(c,u,l),s.splice(u,0,l)}return h.n}return Object.defineProperties(function(h){if(!n.size)for(let u of Ce(r.preflight))typeof u=="function"&&(u=u(i)),u&&(typeof u=="string"?Co("",Ne.b,vs(u),i,Ne.b,[],!1,!0):rc(u,{},i,Ne.b)).forEach(o);h=""+h;let c=n.get(h);if(!c){let u=new Set;for(let f of ys(vs(h),i))u.add(f.c).add(o(f));c=[...u].filter(Boolean).join(" "),n.set(h,c).set(c,c)}return c},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:i.theme,config:r,snapshot(){let l=e.snapshot(),h=new Set(a),c=new Map(n),u=[...s];return()=>{l(),a=h,n=c,s=u}},clear(){e.clear(),a=new Set,n=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function Kf(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function oc(t){let e=new MutationObserver(r);return{observe(n){e.observe(n,{attributeFilter:["class"],subtree:!0,childList:!0}),i(n),r([{target:n,type:""}])},disconnect(){e.disconnect()}};function r(n){for(let{type:s,target:a}of n)if(s[0]=="a")i(a);else for(let o of a.querySelectorAll("[class]"))i(o);e.takeRecords()}function i(n){let s,a=n.getAttribute?.("class");a&&Kf(a,s=t(a))&&n.setAttribute("class",s)}}function Qf(t){let e=document.querySelector(t||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function ws(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:Qf(t)).sheet;return{target:e,snapshot(){let r=Array.from(e.cssRules,i=>i.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=e.cssRules.length;r--;)e.deleteRule(r)},destroy(){e.ownerNode?.remove()},insert(r,i){try{e.insertRule(r,i)}catch{e.insertRule(":root{}",i)}},resume:_s}}var em=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 lc(t){return em.get(t)}function hc(t){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(t);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function cc(t,e){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(t);return r?r[1]?/^sti/i.test(e)?1:0:r[2]?/^pat/i.test(e)?1:0:r[3]?/^image-/i.test(e)?1:0:r[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var tm=[["-webkit-",1],["-moz-",2],["-ms-",4]];function uc(){return({stringify:t})=>({stringify(e,r,i){let n="",s=lc(e);s&&(n+=t(s,r,i)+";");let a=hc(e),o=cc(e,r);for(let l of tm)a&l[1]&&(n+=t(l[0]+e,r,i)+";"),o&l[1]&&(n+=t(e,l[0]+r,i)+";");return n+t(e,r,i)}})}function dc(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",To("lineClamp",({_:t})=>pc(t))],["line-clamp-(\\d+)",({1:t})=>pc(t)]]}}function pc(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var cn={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",...bt(4,"rem",4,.5,.5),...bt(12,"rem",4,5),14:"3.5rem",...bt(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:ve("blur"),backdropBrightness:ve("brightness"),backdropContrast:ve("contrast"),backdropGrayscale:ve("grayscale"),backdropHueRotate:ve("hueRotate"),backdropInvert:ve("invert"),backdropOpacity:ve("opacity"),backdropSaturate:ve("saturate"),backdropSepia:ve("sepia"),backgroundColor:ve("colors"),backgroundImage:{none:"none"},backgroundOpacity:ve("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:{...bt(200,"",100,0,50),...bt(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:ve("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:ve("spacing"),borderWidth:{DEFAULT:"1px",...Ct(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:ve("colors"),caretColor:ve("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...bt(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:ve("borderColor"),divideOpacity:ve("borderOpacity"),divideWidth:ve("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:t})=>({...t("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:t})=>({...t("spacing"),...hn(2,6),...hn(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:ve("spacing"),gradientColorStops:ve("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:t})=>({...t("spacing"),...hn(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...hn(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:{...bt(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("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:{...bt(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:ve("spacing"),placeholderColor:ve("colors"),placeholderOpacity:ve("opacity"),outlineColor:ve("colors"),outlineOffset:Ct(8,"px"),outlineWidth:Ct(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:ve("colors"),ringOffsetWidth:Ct(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Ct(8,"px")},rotate:{...Ct(2,"deg"),...Ct(12,"deg",3),...Ct(180,"deg",45)},saturate:bt(200,"",100,0,50),scale:{...bt(150,"",100,0,50),...bt(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:ve("spacing"),scrollPadding:ve("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Ct(2,"deg"),...Ct(12,"deg",3)},space:ve("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:bt(2),textColor:ve("colors"),textDecorationColor:ve("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Ct(8,"px")},textUnderlineOffset:{auto:"auto",...Ct(8,"px")},textIndent:ve("spacing"),textOpacity:ve("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:ve("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:t})=>({...t("spacing"),...hn(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...bt(50,"",1,0,10),auto:"auto"}};function hn(t,e){let r={};do for(var i=1;i<t;i++)r[`${i}/${t}`]=Number((i/t*100).toFixed(6))+"%";while(++t<=e);return r}function Ct(t,e,r=0){let i={};for(;r<=t;r=2*r||1)i[r]=r+e;return i}function bt(t,e="",r=1,i=0,n=1,s={}){for(;i<=t;i+=n)s[i]=i/r+e;return s}function ve(t){return({theme:e})=>e(t)}var fc={"*,::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, ${cn.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, ${cn.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 _c=[V("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:Nt(`[${e}]`,"",r)}}})),V("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),N("aspect-","aspectRatio"),V("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:i,padding:n}=e("container"),s={width:"100%",marginRight:i&&"auto",marginLeft:i&&"auto",...a("xs")};for(let o in r){let l=r[o];typeof l=="string"&&(s[bs(l)]={"&":{maxWidth:l,...a(o)}})}return s;function a(o){let l=n&&(typeof n=="string"?n:n[o]||n.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),N("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),V("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),V("box-(border|content)","boxSizing",({1:t})=>t+"-box"),V("hidden",{display:"none"}),V("table-(auto|fixed)","tableLayout"),V(["(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)",V("isolate","isolation"),V("object-(contain|cover|fill|none|scale-down)","objectFit"),N("object-","objectPosition"),V("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",xs),V("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),V("(static|fixed|absolute|relative|sticky)","position"),N("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),N("-?(top|bottom|left|right)(?:$|-)","inset"),V("(visible|collapse)","visibility"),V("invisible",{visibility:"hidden"}),N("-?z-","zIndex"),V("flex-((row|col)(-reverse)?)","flexDirection",mc),V("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),N("(flex-(?:grow|shrink))(?:$|-)"),N("(flex)-"),N("grow(?:$|-)","flexGrow"),N("shrink(?:$|-)","flexShrink"),N("basis-","flexBasis"),N("-?(order)-"),"-?(order)-(\\d+)",N("grid-cols-","gridTemplateColumns"),V("grid-cols-(\\d+)","gridTemplateColumns",bc),N("col-","gridColumn"),V("col-(span)-(\\d+)","gridColumn",vc),N("col-start-","gridColumnStart"),V("col-start-(auto|\\d+)","gridColumnStart"),N("col-end-","gridColumnEnd"),V("col-end-(auto|\\d+)","gridColumnEnd"),N("grid-rows-","gridTemplateRows"),V("grid-rows-(\\d+)","gridTemplateRows",bc),N("row-","gridRow"),V("row-(span)-(\\d+)","gridRow",vc),N("row-start-","gridRowStart"),V("row-start-(auto|\\d+)","gridRowStart"),N("row-end-","gridRowEnd"),V("row-end-(auto|\\d+)","gridRowEnd"),V("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>xs(mc(t))),V("grid-flow-(dense)","gridAutoFlow"),N("auto-cols-","gridAutoColumns"),N("auto-rows-","gridAutoRows"),N("gap-x(?:$|-)","gap","columnGap"),N("gap-y(?:$|-)","gap","rowGap"),N("gap(?:$|-)","gap"),"(justify-(?:items|self))-",V("justify-","justifyContent",gc),V("(content|items|self)-",t=>({["align-"+t[1]]:gc(t)})),V("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),N("p([xytrbl])?(?:$|-)","padding",_i("padding")),N("-?m([xytrbl])?(?:$|-)","margin",_i("margin")),N("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),V("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),N("w-","width"),N("min-w-","minWidth"),N("max-w-","maxWidth"),N("h-","height"),N("min-h-","minHeight"),N("max-h-","maxHeight"),N("font-","fontWeight"),N("font-","fontFamily",({_:t})=>typeof(t=Ce(t))[1]=="string"?{fontFamily:Lt(t)}:{fontFamily:Lt(t[0]),...t[1]}),V("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),V("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),V("italic","fontStyle"),V("not-italic",{fontStyle:"normal"}),V("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:r})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...gr({"--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,/*!*/ /*!*/)"})}),N("tracking-","letterSpacing"),N("leading-","lineHeight"),V("list-(inside|outside)","listStylePosition"),N("list-","listStyleType"),V("list-","listStyleType"),N("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),ze("placeholder-",{property:"color",selector:"&::placeholder"}),V("text-(left|center|right|justify|start|end)","textAlign"),V("text-(ellipsis|clip)","textOverflow"),N("text-opacity-","textOpacity","--tw-text-opacity"),ze("text-",{property:"color"}),N("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),N("indent-","textIndent"),V("(overline|underline|line-through)","textDecorationLine"),V("no-underline",{textDecorationLine:"none"}),N("underline-offset-","textUnderlineOffset"),ze("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),N("decoration-","textDecorationThickness"),V("decoration-","textDecorationStyle"),V("(uppercase|lowercase|capitalize)","textTransform"),V("normal-case",{textTransform:"none"}),V("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),V("align-","verticalAlign"),V("whitespace-","whiteSpace"),V("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),V("break-words",{overflowWrap:"break-word"}),V("break-all",{wordBreak:"break-all"}),V("break-keep",{wordBreak:"keep-all"}),ze("caret-",{opacityVariable:!1,opacitySection:"opacity"}),ze("accent-",{opacityVariable:!1,opacitySection:"opacity"}),V("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${Hr(t," ")},var(--tw-gradient-stops))`),ze("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),ze("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),ze("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),V("bg-(fixed|local|scroll)","backgroundAttachment"),V("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),V(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),V("bg-blend-","backgroundBlendMode"),V("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),N("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),ze("bg-",{section:"backgroundColor"}),N("bg-","backgroundImage"),N("bg-","backgroundPosition"),V("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",xs),N("bg-","backgroundSize"),N("rounded(?:$|-)","borderRadius"),N("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${Hr(r[0])}-radius`]:e,[`border-${Hr(r[1])}-radius`]:e}}),V("border-(collapse|separate)","borderCollapse"),N("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),V("border-(solid|dashed|dotted|double|none)","borderStyle"),N("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...gr({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),ze("border-([xytrbl])-",{section:"borderColor"},_i("border","Color")),ze("border-"),N("border-([xytrbl])(?:$|-)","borderWidth",_i("border","Width")),N("border(?:$|-)","borderWidth"),N("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),V("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),V("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),N("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${Hr(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${Hr(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),ze("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),N("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),ze("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),N("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),V("ring-inset",{"--tw-ring-inset":"inset"}),ze("ring-",{property:"--tw-ring-color"}),N("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...gr({"--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":At(e("ringOffsetColor","","#fff")),"--tw-ring-color":At(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(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),ze("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),N("shadow(?:$|-)","boxShadow",({_:t})=>({...gr({"--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":Lt(t),"--tw-shadow-colored":Lt(t).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)"})),N("(opacity)-"),V("mix-blend-","mixBlendMode"),...yc(),...yc("backdrop-"),N("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:Lt(t),transitionTimingFunction:t._=="none"?void 0:Lt(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:Lt(e("transitionDuration",""))})),N("duration(?:$|-)","transitionDuration","transitionDuration",Lt),N("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Lt),N("delay(?:$|-)","transitionDelay","transitionDelay",Lt),N("animate(?:$|-)","animation",(t,{theme:e,h:r,e:i})=>{let n=Lt(t),s=n.split(" "),a=e("keyframes",s[0]);return a?{["@keyframes "+(s[0]=i(r(s[0])))]:a,animation:s.join(" ")}:{animation:n}}),"(transform)-(none)",V("transform",Do),V("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":wc(t=="gpu")})),N("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...Do()})),N("-?(rotate)-","rotate",Mo),N("-?(translate-[xy])-","translate",Mo),N("-?(skew-[xy])-","skew",Mo),V("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",xs),"(appearance)-",N("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",N("(cursor)-"),"(cursor)-",V("snap-(none)","scroll-snap-type"),V("snap-(x|y|both)",({1:t})=>({...gr({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),V("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),V("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),V("snap-(normal|always)","scroll-snap-stop"),V("scroll-(auto|smooth)","scroll-behavior"),N("scroll-p([xytrbl])?(?:$|-)","padding",_i("scroll-padding")),N("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",_i("scroll-margin")),V("touch-(auto|none|manipulation)","touch-action"),V("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...gr({"--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":r?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),V("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),V("outline",{outlineStyle:"solid"}),V("outline-(dashed|dotted|double)","outlineStyle"),N("-?(outline-offset)-"),ze("outline-",{opacityVariable:!1,opacitySection:"opacity"}),N("outline-","outlineWidth"),"(pointer-events)-",N("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],V("select-(none|text|all|auto)","userSelect"),ze("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),ze("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),N("stroke-","strokeWidth"),V("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),V("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function xs(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function mc(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function Hr(t,e="-"){let r=[];for(let i of t)r.push({t:"top",r:"right",b:"bottom",l:"left"}[i]);return r.join(e)}function Lt(t){return t&&""+(t._||t)}function gc({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function _i(t,e=""){return({1:r,_:i})=>{let n={x:"lr",y:"tb"}[r]||r+r;return n?{...ln(t+"-"+Hr(n[0])+e,i),...ln(t+"-"+Hr(n[1])+e,i)}:ln(t+e,i)}}function yc(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),r={};for(let i of e)r[`--tw-${t}${i}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...gr(r),[`${t}filter`]:e.map(i=>`var(--tw-${t}${i})`).join(" ")},[`(${t}filter)-(none)`,V(`${t}filter`,r),...e.map(i=>N(`${i[0]=="h"?"-?":""}(${t}${i})(?:$|-)`,i,({1:n,_:s})=>({[`--tw-${n}`]:Ce(s).map(a=>`${i}(${a})`).join(" "),...r})))]}function Mo({1:t,_:e}){return{["--tw-"+t]:e,...Do()}}function Do(){return{...gr({"--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":wc()}),transform:"var(--tw-transform)"}}function wc(t){return[t?"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 vc({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function bc({1:t}){return`repeat(${t},minmax(0,1fr))`}function gr(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var xc=[["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:t})=>`@media (orientation:${t})`],["contrast-(more|less)",({1:t})=>`@media (prefers-contrast:${t})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:t})=>`&::${t}`],["(marker|selection)",({1:t})=>`& *::${t},&::${t}`],["file","&::file-selector-button"],["(first|last|only)",({1:t})=>`&:${t}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:t,$$:e},r)=>e&&`&[${t}-${r.theme(t,e)||Nt(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:i="",6:n=e},{e:s,h:a,v:o})=>{let l=bi(i)||(r[0]=="["?r:o(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(a(t+n))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||Nt(t,"",e)),t)return t.includes(":")||(t+=":var(--tw)"),/^\w*\s*\(/.test(t)||(t=`(${t})`),`@supports ${t.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:t},e)=>{if(t&&(t=e.theme("screens",t)||Nt(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=Nt(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&bi(t).replace(/[}]+$/,"").split("{")]];function Sc({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:fc,theme:{...cn,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:xc,rules:_c,finalize(r){return r.n&&r.d&&r.r.some(i=>/^&::(before|after)$/.test(i))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var rm={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},im={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},nm={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},sm={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},am={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},om={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},lm={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},hm={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},cm={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},um={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},pm={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},dm={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},fm={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},mm={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},gm={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},ym={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},vm={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},bm={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},_m={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},wm={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},xm={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},Sm={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},kc={__proto__:null,slate:rm,gray:im,zinc:nm,neutral:sm,stone:am,red:om,orange:lm,amber:hm,yellow:cm,lime:um,green:pm,emerald:dm,teal:fm,cyan:mm,sky:gm,blue:ym,indigo:vm,violet:bm,purple:_m,fuchsia:wm,pink:xm,rose:Sm};function Ec({disablePreflight:t}={}){return Sc({colors:kc,disablePreflight:t})}function Cc({className:t="prose",defaultColor:e="gray",extend:r={},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,a=s])=>[`${t}-${s}`,(o,l)=>Tc(t,a[0]=="."?"."+l.e(l.h(a.slice(1))):a,l,h=>`& :is(${h.trim()})`)]),rules:[[`(lead|not-${t})`,({1:s},{h:a})=>[{c:a(s)}]],[`${t}-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)"}}],[t+"-",({$$:s},a)=>{let o=Ac(a.theme("fontSize",s));return o&&{"@layer components":o}}],[t+"-",({$$:s},a)=>n(s,a)],[t,(s,a)=>({...n(e,a),"@layer base":[Pc(t,a,{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:K(20,16),marginBottom:K(20,16),paddingLeft:K(26,16)},li:{marginTop:K(8,16),marginBottom:K(8,16)},"ol>li,ul>li":{paddingLeft:K(6,16)},">ul>li p":{marginTop:K(12,16),marginBottom:K(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:K(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:K(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:K(12,16),marginBottom:K(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:K(48,16),marginBottom:K(48,16)},blockquote:{marginTop:K(32,20),marginBottom:K(32,20),paddingLeft:K(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:K(20,16),marginBottom:K(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:K(36,16),marginTop:"0",marginBottom:K(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:K(24,16),marginTop:K(48,24),marginBottom:K(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:K(20,16),marginTop:K(32,20),marginBottom:K(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:K(24,16),marginBottom:K(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:K(32,16),marginBottom:K(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:K(14,16),lineHeight:"1.4",marginTop:K(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:K(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:K(21,24)},"h3 code":{fontSize:K(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:K(14,16),lineHeight:"1.7",marginTop:K(24,14),marginBottom:K(24,14),borderRadius:"0.375rem",paddingTop:K(12,14),paddingRight:K(16,14),paddingBottom:K(12,14),paddingLeft:K(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:K(32,16),marginBottom:K(32,16),fontSize:K(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:K(8,14),paddingBottom:K(8,14),paddingLeft:K(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:K(8,14),paddingRight:K(8,14),paddingBottom:K(8,14),paddingLeft:K(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${a.e(a.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:K(20,16),lineHeight:"1.6",marginTop:K(24,20),marginBottom:K(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Pc(t,a,r)],"@layer components":{...Ac(a.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function n(s,a){let o={},l={},h=(c,u,f)=>{let p=a.theme(`colors.${s}.${u}`,u);f["--tw-prose-"+c]=At(p);let m=f!=l&&a.d("colors",`${s}-${u}`,p);m&&(l["--tw-prose-"+c]=At(m))};for(let c in i){let u=i[c];c!="dark"&&u&&h(c,u,o)}for(let c in i.dark||{}){let u=i.dark[c];u&&(i.dark?h("invert-"+c,u,o):h(c,u,l))}return Object.keys(o).length?{"@layer defaults":{"&":o,[a.v("dark")]:l}}:void 0}}function Pc(t,e,r){let i={};for(let n in r)i[Tc(t,n,e,s=>`.${e.e(e.h(t))}${s}`)]=r[n];return i}function Tc(t,e,{e:r,h:i},n){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,a=" ",o=s,l="")=>n(`${a}:where(${o}):not(:where(.${r(i("not-"+t))} *))${l}`))}function Ac(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function K(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var Fo=Io({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:[Ec(),uc(),dc(),Cc()],hash:!1});function Ic(t,e=!0){let r=function(){if(km)try{let l=ws(new CSSStyleSheet);return l.connect=h=>{let c=Oo(h);c.adoptedStyleSheets=[...c.adoptedStyleSheets,l.target]},l.disconnect=_s,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let a=[ws(s)],o=new WeakMap;return{get target(){return a[0].target},snapshot(){let l=a.map(h=>h.snapshot());return()=>l.forEach(h=>h())},clear(){a.forEach(l=>l.clear())},destroy(){a.forEach(l=>l.destroy())},insert(l,h,c){a[0].insert(l,h,c);let u=this.target.cssRules[h];a.forEach((f,p)=>p&&f.target.insertRule(u.cssText,h))},resume(l,h){return a[0].resume(l,h)},connect(l){let h=document.createElement("style");Oo(l).appendChild(h);let c=ws(h),{cssRules:u}=this.target;for(let f=0;f<u.length;f++)c.target.insertRule(u[f].cssText,f);a.push(c),o.set(l,c)},disconnect(l){let h=a.indexOf(o.get(l));h>=0&&a.splice(h,1)}}}(),i=ac({...t,hash:t.hash??e},r),n=oc(i);return function(a){return class extends a{connectedCallback(){super.connectedCallback?.(),r.connect(this),n.observe(Oo(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=i}}}}var km=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Oo(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var De=t=>Ic(Fo)(t);var ks,Mc,Es,Dc,Ss=class extends De(Ee){constructor(){super();Z(this,ks);Z(this,Es);ye(this,"render",()=>pe`
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ch=/'/g,Th=/"/g,Oh=/^(?:script|style|textarea|title)$/i,$h=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),pe=$h(1),Ay=$h(2),vt=Symbol.for("lit-noChange"),Me=Symbol.for("lit-nothing"),Ih=new WeakMap,Nr=zr.createTreeWalker(zr,129,null,!1);function Rh(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Eh!==void 0?Eh.createHTML(e):e}var Lh=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":"",a=rn;for(let o=0;o<r;o++){let l=t[o],h,c,u=-1,f=0;for(;f<l.length&&(a.lastIndex=f,c=a.exec(l),c!==null);)f=a.lastIndex,a===rn?c[1]==="!--"?a=Ph:c[1]!==void 0?a=Ah:c[2]!==void 0?(Oh.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=Vr):c[3]!==void 0&&(a=Vr):a===Vr?c[0]===">"?(a=n??rn,u=-1):c[1]===void 0?u=-2:(u=a.lastIndex-c[2].length,h=c[1],a=c[3]===void 0?Vr:c[3]==='"'?Th:Ch):a===Th||a===Ch?a=Vr:a===Ph||a===Ah?a=rn:(a=Vr,n=void 0);let p=a===Vr&&t[o+1].startsWith("/>")?" ":"";s+=a===rn?l+Vf:u>=0?(i.push(h),l.slice(0,u)+hs+l.slice(u)+Kt+p):l+Kt+(u===-2?(i.push(void 0),o):p)}return[Rh(t,s+(t[r]||"<?>")+(e===2?"</svg>":"")),i]},an=class t{constructor({strings:e,_$litType$:r},i){let n;this.parts=[];let s=0,a=0,o=e.length-1,l=this.parts,[h,c]=Lh(e,r);if(this.el=t.createElement(h,i),Nr.currentNode=this.el.content,r===2){let u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(n=Nr.nextNode())!==null&&l.length<o;){if(n.nodeType===1){if(n.hasAttributes()){let u=[];for(let f of n.getAttributeNames())if(f.endsWith(hs)||f.startsWith(Kt)){let p=c[a++];if(u.push(f),p!==void 0){let m=n.getAttribute(p.toLowerCase()+hs).split(Kt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:g[2],strings:m,ctor:g[1]==="."?us:g[1]==="?"?ps:g[1]==="@"?ds:Gr})}else l.push({type:6,index:s})}for(let f of u)n.removeAttribute(f)}if(Oh.test(n.tagName)){let u=n.textContent.split(Kt),f=u.length-1;if(f>0){n.textContent=fi?fi.emptyScript:"";for(let p=0;p<f;p++)n.append(u[p],nn()),Nr.nextNode(),l.push({type:2,index:++s});n.append(u[f],nn())}}}else if(n.nodeType===8)if(n.data===po)l.push({type:2,index:s});else{let u=-1;for(;(u=n.data.indexOf(Kt,u+1))!==-1;)l.push({type:7,index:s}),u+=Kt.length-1}s++}}static createElement(e,r){let i=zr.createElement("template");return i.innerHTML=e,i}};function jr(t,e,r=t,i){var n,s,a,o;if(e===vt)return e;let l=i!==void 0?(n=r._$Co)===null||n===void 0?void 0:n[i]:r._$Cl,h=sn(e)?void 0:e._$litDirective$;return l?.constructor!==h&&((s=l?._$AO)===null||s===void 0||s.call(l,!1),h===void 0?l=void 0:(l=new h(t),l._$AT(t,r,i)),i!==void 0?((a=(o=r)._$Co)!==null&&a!==void 0?a:o._$Co=[])[i]=l:r._$Cl=l),l!==void 0&&(e=jr(t,l._$AS(t,e.values),l,i)),e}var cs=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var r;let{el:{content:i},parts:n}=this._$AD,s=((r=e?.creationScope)!==null&&r!==void 0?r:zr).importNode(i,!0);Nr.currentNode=s;let a=Nr.nextNode(),o=0,l=0,h=n[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new mi(a,a.nextSibling,this,e):h.type===1?c=new h.ctor(a,h.name,h.strings,this,e):h.type===6&&(c=new fs(a,this,e)),this._$AV.push(c),h=n[++l]}o!==h?.index&&(a=Nr.nextNode(),o++)}return Nr.currentNode=zr,s}v(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},mi=class t{constructor(e,r,i,n){var s;this.type=2,this._$AH=Me,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cp=(s=n?.isConnected)===null||s===void 0||s}get _$AU(){var e,r;return(r=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&r!==void 0?r:this._$Cp}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=jr(this,e,r),sn(e)?e===Me||e==null||e===""?(this._$AH!==Me&&this._$AR(),this._$AH=Me):e!==this._$AH&&e!==vt&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Fh(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==Me&&sn(this._$AH)?this._$AA.nextSibling.data=e:this.$(zr.createTextNode(e)),this._$AH=e}g(e){var r;let{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=an.createElement(Rh(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)===null||r===void 0?void 0:r._$AD)===s)this._$AH.v(i);else{let a=new cs(s,this),o=a.u(this.options);a.v(i),this.$(o),this._$AH=a}}_$AC(e){let r=Ih.get(e.strings);return r===void 0&&Ih.set(e.strings,r=new an(e)),r}T(e){Dh(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,n=0;for(let s of e)n===r.length?r.push(i=new t(this.k(nn()),this.k(nn()),this,this.options)):i=r[n],i._$AI(s),n++;n<r.length&&(this._$AR(i&&i._$AB.nextSibling,n),r.length=n)}_$AR(e=this._$AA.nextSibling,r){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,r);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){var r;this._$AM===void 0&&(this._$Cp=e,(r=this._$AP)===null||r===void 0||r.call(this,e))}},Gr=class{constructor(e,r,i,n,s){this.type=1,this._$AH=Me,this._$AN=void 0,this.element=e,this.name=r,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Me}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,r=this,i,n){let s=this.strings,a=!1;if(s===void 0)e=jr(this,e,r,0),a=!sn(e)||e!==this._$AH&&e!==vt,a&&(this._$AH=e);else{let o=e,l,h;for(e=s[0],l=0;l<s.length-1;l++)h=jr(this,o[i+l],r,l),h===vt&&(h=this._$AH[l]),a||(a=!sn(h)||h!==this._$AH[l]),h===Me?e=Me:e!==Me&&(e+=(h??"")+s[l+1]),this._$AH[l]=h}a&&!n&&this.j(e)}j(e){e===Me?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},us=class extends Gr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Me?void 0:e}},Nf=fi?fi.emptyScript:"",ps=class extends Gr{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Me?this.element.setAttribute(this.name,Nf):this.element.removeAttribute(this.name)}},ds=class extends Gr{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){var i;if((e=(i=jr(this,e,r,0))!==null&&i!==void 0?i:Me)===vt)return;let n=this._$AH,s=e===Me&&n!==Me||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==Me&&(n===Me||s);s&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var r,i;typeof this._$AH=="function"?this._$AH.call((i=(r=this.options)===null||r===void 0?void 0:r.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}},fs=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){jr(this,e)}},Bh={O:hs,P:Kt,A:po,C:1,M:Lh,L:cs,R:Fh,D:jr,I:mi,V:Gr,H:ps,N:ds,U:us,F:fs},Mh=ls.litHtmlPolyfillSupport;Mh?.(an,mi),((co=ls.litHtmlVersions)!==null&&co!==void 0?co:ls.litHtmlVersions=[]).push("2.8.0");var Vh=(t,e,r)=>{var i,n;let s=(i=r?.renderBefore)!==null&&i!==void 0?i:e,a=s._$litPart$;if(a===void 0){let o=(n=r?.renderBefore)!==null&&n!==void 0?n:null;s._$litPart$=a=new mi(e.insertBefore(nn(),o),o,void 0,r??{})}return a._$AI(t),a};var fo,mo;var Ee=class extends Xt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,r;let i=super.createRenderRoot();return(e=(r=this.renderOptions).renderBefore)!==null&&e!==void 0||(r.renderBefore=i.firstChild),i}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Vh(r,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return vt}};Ee.finalized=!0,Ee._$litElement$=!0,(fo=globalThis.litElementHydrateSupport)===null||fo===void 0||fo.call(globalThis,{LitElement:Ee});var Nh=globalThis.litElementPolyfillSupport;Nh?.({LitElement:Ee});((mo=globalThis.litElementVersions)!==null&&mo!==void 0?mo:globalThis.litElementVersions=[]).push("3.3.3");var gi={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},yi=t=>(...e)=>({_$litDirective$:t,values:e}),fr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,i){this._$Ct=e,this._$AM=r,this._$Ci=i}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var{I:zf}=Bh;var zh=()=>document.createComment(""),vi=(t,e,r)=>{var i;let n=t._$AA.parentNode,s=e===void 0?t._$AB:e._$AA;if(r===void 0){let a=n.insertBefore(zh(),s),o=n.insertBefore(zh(),s);r=new zf(a,o,t,t.options)}else{let a=r._$AB.nextSibling,o=r._$AM,l=o!==t;if(l){let h;(i=r._$AQ)===null||i===void 0||i.call(r,t),r._$AM=t,r._$AP!==void 0&&(h=t._$AU)!==o._$AU&&r._$AP(h)}if(a!==s||l){let h=r._$AA;for(;h!==a;){let c=h.nextSibling;n.insertBefore(h,s),h=c}}}return r},mr=(t,e,r=t)=>(t._$AI(e,r),t),jf={},jh=(t,e=jf)=>t._$AH=e,Gh=t=>t._$AH,ms=t=>{var e;(e=t._$AP)===null||e===void 0||e.call(t,!1,!0);let r=t._$AA,i=t._$AB.nextSibling;for(;r!==i;){let n=r.nextSibling;r.remove(),r=n}};var Hh=(t,e,r)=>{let i=new Map;for(let n=e;n<=r;n++)i.set(t[n],n);return i},on=yi(class extends fr{constructor(t){if(super(t),t.type!==gi.CHILD)throw Error("repeat() can only be used in text expressions")}ct(t,e,r){let i;r===void 0?r=e:e!==void 0&&(i=e);let n=[],s=[],a=0;for(let o of t)n[a]=i?i(o,a):a,s[a]=r(o,a),a++;return{values:s,keys:n}}render(t,e,r){return this.ct(t,e,r).values}update(t,[e,r,i]){var n;let s=Gh(t),{values:a,keys:o}=this.ct(e,r,i);if(!Array.isArray(s))return this.ut=o,a;let l=(n=this.ut)!==null&&n!==void 0?n:this.ut=[],h=[],c,u,f=0,p=s.length-1,m=0,g=a.length-1;for(;f<=p&&m<=g;)if(s[f]===null)f++;else if(s[p]===null)p--;else if(l[f]===o[m])h[m]=mr(s[f],a[m]),f++,m++;else if(l[p]===o[g])h[g]=mr(s[p],a[g]),p--,g--;else if(l[f]===o[g])h[g]=mr(s[f],a[g]),vi(t,h[g+1],s[f]),f++,g--;else if(l[p]===o[m])h[m]=mr(s[p],a[m]),vi(t,s[f],s[p]),p--,m++;else if(c===void 0&&(c=Hh(o,m,g),u=Hh(l,f,p)),c.has(l[f]))if(c.has(l[p])){let d=u.get(o[m]),y=d!==void 0?s[d]:null;if(y===null){let v=vi(t,s[f]);mr(v,a[m]),h[m]=v}else h[m]=mr(y,a[m]),vi(t,s[f],y),s[d]=null;m++}else ms(s[p]),p--;else ms(s[f]),f++;for(;m<=g;){let d=vi(t,h[g+1]);mr(d,a[m]),h[m++]=d}for(;f<=p;){let d=s[f++];d!==null&&ms(d)}return this.ut=o,jh(t,h),vt}});function Eo(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function Gf(t,e=","){return t.map(Eo).join(e)}var Xh=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function gs(t){for(var e=9,r=t.length;r--;)e=Math.imul(e^t.charCodeAt(r),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function bs(t,e="@media "){return e+Ce(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(i=>`(${i}-width:${r[i]})`).join(" and "))).join(",")}function Ce(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function qh(t){return t}function _s(){}var Ne={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Kh(t){return t.match(/[-=:;]/g)?.length||0}function _o(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Kh(t),15)<<18}var Hf=["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 Po({n:t,i:e,v:r=[]},i,n,s){t&&(t=Eo({n:t,i:e,v:r})),s=[...Ce(s)];for(let o of r){let l=i.theme("screens",o);for(let h of Ce(l&&bs(l)||i.v(o))){var a;s.push(h),n|=l?67108864|_o(h):o=="dark"?1073741824:h[0]=="@"?_o(h):(a=h,1<<~(/:([a-z-]+)/.test(a)&&~Hf.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:n,r:s,i:e}}var Qh=new Map;function wo(t){if(t.d){let e=[],r=go(t.r.reduce((i,n)=>n[0]=="@"?(e.push(n),i):n?go(i,s=>go(n,a=>{let o=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(a);if(o){let l=s.indexOf(o[1]);return~l?s.slice(0,l)+o[0]+s.slice(l+o[1].length):yo(s,a)}return yo(a,s)})):i,"&"),i=>yo(i,t.n?"."+Xh(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((i,n)=>n+"{"+i+"}",t.d)}}function go(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,i,n)=>e(i)+n)}function yo(t,e){return t.replace(/&/g,e)}var Uh=new Intl.Collator("en",{numeric:!0});function ec(t,e){for(var r=0,i=t.length;r<i;){let n=i+r>>1;0>=tc(t[n],e)?r=n+1:i=n}return i}function tc(t,e){let r=t.p&Ne.o;return r==(e.p&Ne.o)&&(r==Ne.b||r==Ne.o)?0:t.p-e.p||t.o-e.o||Uh.compare(Wh(t.n),Wh(e.n))||Uh.compare(Zh(t.n),Zh(e.n))}function Wh(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function Zh(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function vo(t,e){return Math.round(parseInt(t,16)*e)}function At(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:r="1",opacityVariable:i}=e,n=i?`var(${i})`:r;if(t.includes("<alpha-value>"))return t.replace("<alpha-value>",n);if(t[0]=="#"&&(t.length==4||t.length==7)){let s=(t.length-1)/3,a=[17,1,.062272][s-1];return`rgba(${[vo(t.substr(1,s),a),vo(t.substr(1+s,s),a),vo(t.substr(1+2*s,s),a),n]})`}return n=="1"?t:n=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${n})`)}function rc(t,e,r,i,n=[]){return function s(a,{n:o,p:l,r:h=[],i:c},u){let f=[],p="",m=0,g=0;for(let v in a||{}){var d,y;let b=a[v];if(v[0]=="@"){if(!b)continue;if(v[1]=="a"){f.push(...Co(o,l,vs(""+b),u,l,h,c,!0));continue}if(v[1]=="l"){for(let _ of Ce(b))f.push(...s(_,{n:o,p:(d=Ne[v[7]],l&~Ne.o|d),r:v[7]=="d"?[]:h,i:c},u));continue}if(v[1]=="i"){f.push(...Ce(b).map(_=>({p:-1,o:0,r:[],d:v+" "+_})));continue}if(v[1]=="k"){f.push({p:Ne.d,o:0,r:[v],d:s(b,{p:Ne.d},u).map(wo).join("")});continue}if(v[1]=="f"){f.push(...Ce(b).map(_=>({p:Ne.d,o:0,r:[v],d:s(_,{p:Ne.d},u).map(wo).join("")})));continue}}if(typeof b!="object"||Array.isArray(b))v=="label"&&b?o=b+gs(JSON.stringify([l,c,a])):(b||b===0)&&(v=v.replace(/[A-Z]/g,_=>"-"+_.toLowerCase()),g+=1,m=Math.max(m,(y=v)[0]=="-"?0:Kh(y)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(y)?+!!RegExp.$1||-!!RegExp.$2:0)+1),p+=(p?";":"")+Ce(b).map(_=>u.s(v,Ao(""+_,u.theme)+(c?" !important":""))).join(";"));else if(v[0]=="@"||v.includes("&")){let _=l;v[0]=="@"&&(v=v.replace(/\bscreen\(([^)]+)\)/g,(x,T)=>{let S=u.theme("screens",T);return S?(_|=67108864,bs(S,"")):x}),_|=_o(v)),f.push(...s(b,{n:o,p:_,r:[...h,v],i:c},u))}else f.push(...s(b,{p:l,r:[...h,v]},u))}return f.unshift({n:o,p:l,o:Math.max(0,15-g)+1.5*Math.min(m||15,15),r:h,d:p}),f.sort(tc)}(t,Po(e,r,i,n),r)}function Ao(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(r,i,n,s,a="")=>{let o=e(n,a);return typeof o=="function"&&/color|fill|stroke/i.test(n)?At(o):""+Ce(o).filter(l=>Object(l)!==l)})}function ic(t,e){let r,i=[];for(let n of t)n.d&&n.n?r?.p==n.p&&""+r.r==""+n.r?(r.c=[r.c,n.c].filter(Boolean).join(" "),r.d=r.d+";"+n.d):i.push(r={...n,n:n.n&&e}):i.push({...n,n:n.n&&e});return i}function ys(t,e,r=Ne.u,i,n){let s=[];for(let a of t)for(let o of function(l,h,c,u,f){l={...l,i:l.i||f};let p=function(m,g){let d=Qh.get(m.n);return d?d(m,g):g.r(m.n,m.v[0]=="dark")}(l,h);return p?typeof p=="string"?({r:u,p:c}=Po(l,h,c,u),ic(ys(vs(p),h,c,u,l.i),l.n)):Array.isArray(p)?p.map(m=>{var g,d;return{o:0,...m,r:[...Ce(u),...Ce(m.r)],p:(g=c,d=m.p??c,g&~Ne.o|d)}}):rc(p,l,h,c,u):[{c:Eo(l),p:0,o:0,r:[]}]}(a,e,r,i,n))s.splice(ec(s,o),0,o);return s}function Co(t,e,r,i,n,s,a,o){return ic((o?r.flatMap(l=>ys([l],i,n,s,a)):ys(r,i,n,s,a)).map(l=>l.p&Ne.o&&(l.n||e==Ne.b)?{...l,p:l.p&~Ne.o|e,o:0}:l),t)}function qf(t,e,r,i){var n;return n=(s,a)=>{let{n:o,p:l,r:h,i:c}=Po(s,a,e);return r&&Co(o,e,r,a,l,h,c,i)},Qh.set(t,n),t}function bo(t,e,r){if(t[t.length-1]!="("){let i=[],n=!1,s=!1,a="";for(let o of t)if(!(o=="("||/[~@]$/.test(o))){if(o[0]=="!"&&(o=o.slice(1),n=!n),o.endsWith(":")){i[o=="dark:"?"unshift":"push"](o.slice(0,-1));continue}o[0]=="-"&&(o=o.slice(1),s=!s),o.endsWith("-")&&(o=o.slice(0,-1)),o&&o!="&"&&(a+=(a&&"-")+o)}a&&(s&&(a="-"+a),e[0].push({n:a,v:i.filter(Uf),i:n}))}}function Uf(t,e,r){return r.indexOf(t)==e}var Yh=new Map;function vs(t){let e=Yh.get(t);if(!e){let r=[],i=[[]],n=0,s=0,a=null,o=0,l=(h,c=0)=>{n!=o&&(r.push(t.slice(n,o+c)),h&&bo(r,i)),n=o+1};for(;o<t.length;o++){let h=t[o];if(s)t[o-1]!="\\"&&(s+=+(h=="[")||-(h=="]"));else if(h=="[")s+=1;else if(a)t[o-1]!="\\"&&a.test(t.slice(o))&&(a=null,n=o+RegExp.lastMatch.length);else if(h=="/"&&t[o-1]!="\\"&&(t[o+1]=="*"||t[o+1]=="/"))a=t[o+1]=="*"?/^\*\//:/^[\r\n]/;else if(h=="(")l(),r.push(h);else if(h==":")t[o+1]!=":"&&l(!1,1);else if(/[\s,)]/.test(h)){l(!0);let c=r.lastIndexOf("(");if(h==")"){let u=r[c-1];if(/[~@]$/.test(u)){let f=i.shift();r.length=c,bo([...r,"#"],i);let{v:p}=i[0].pop();for(let m of f)m.v.splice(+(m.v[0]=="dark")-+(p[0]=="dark"),p.length);bo([...r,qf(u.length>1?u.slice(0,-1)+gs(JSON.stringify([u,f])):u+"("+Gf(f)+")",Ne.a,f,/@$/.test(u))],i)}c=r.lastIndexOf("(",c-1)}r.length=c+1}else/[~@]/.test(h)&&t[o+1]=="("&&i.unshift([])}l(!0),Yh.set(t,e=i[0])}return e}function V(t,e,r){return[t,xo(e,r)]}function xo(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,i)=>({[t]:e?e(r,i):So(r,1)}):r=>t||{[r[1]]:So(r,2)}}function So(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function N(t,e,r,i){return[t,To(e,r,i)]}function To(t,e,r){let i=typeof e=="string"?(n,s)=>({[e]:r?r(n,s):n._}):e||(({1:n,_:s},a,o)=>({[n||o]:s}));return(n,s)=>{let a=nc(t||n[1]),o=s.theme(a,n.$$)??Nt(n.$$,a,s);if(o!=null)return n._=So(n,0,o),i(n,s,a)}}function ze(t,e={},r){return[t,Wf(e,r)]}function Wf(t={},e){return(r,i)=>{let{section:n=nc(r[0]).replace("-","")+"Color"}=t,[s,a]=Zf(r.$$);if(!s)return;let o=i.theme(n,s)||Nt(s,n,i);if(!o||typeof o=="object")return;let{opacityVariable:l=`--tw-${r[0].replace(/-$/,"")}-opacity`,opacitySection:h=n.replace("Color","Opacity"),property:c=n,selector:u}=t,f=i.theme(h,a||"DEFAULT")||a&&Nt(a,h,i),p=e||(({_:g})=>{let d=ln(c,g);return u?{[u]:d}:d});r._={value:At(o,{opacityVariable:l||void 0,opacityValue:f||void 0}),color:g=>At(o,g),opacityVariable:l||void 0,opacityValue:f||void 0};let m=p(r,i);if(!r.dark){let g=i.d(n,s,o);g&&g!==o&&(r._={value:At(g,{opacityVariable:l||void 0,opacityValue:f||"1"}),color:d=>At(g,d),opacityVariable:l||void 0,opacityValue:f||void 0},m={"&":m,[i.v("dark")]:p(r,i)})}return m}}function Zf(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function ln(t,e){let r={};return typeof e=="string"?r[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(r[e.opacityVariable]=e.opacityValue||"1"),r[t]=e.value),r}function Nt(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=bi(Ao(t.slice(1,-1),r.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function nc(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function bi(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",i,n="")=>bi(r)+i+bi(n)):t.replace(/(^|[^\\])_+/g,(e,r)=>r+" ".repeat(e.length-r.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}function Io({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:Ce(e.variants),rules:Ce(e.rules),ignorelist:Ce(e.ignorelist),hash:void 0,stringify:(i,n)=>i+":"+n,finalize:[]};for(let i of Ce([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&Ce(e.preflight),theme:e.theme,hash:e.hash,stringify:e.stringify,finalize:e.finalize}])){let{preflight:n,darkMode:s=r.darkMode,darkColor:a=r.darkColor,theme:o,variants:l,rules:h,ignorelist:c,hash:u=r.hash,stringify:f=r.stringify,finalize:p}=typeof i=="function"?i(r):i;r={preflight:r.preflight!==!1&&n!==!1&&[...r.preflight,...Ce(n)],darkMode:s,darkColor:a,theme:{...r.theme,...o,extend:{...r.theme.extend,...o?.extend}},variants:[...r.variants,...Ce(l)],rules:[...r.rules,...Ce(h)],ignorelist:[...r.ignorelist,...Ce(c)],hash:u,stringify:f,finalize:[...r.finalize,...Ce(p)]}}return r}function Jh(t,e,r,i,n,s){for(let a of e){let o=r.get(a);o||r.set(a,o=i(a));let l=o(t,n,s);if(l)return l}}function Yf(t){var e;return ko(t[0],typeof(e=t[1])=="function"?e:()=>e)}function Jf(t){var e,r;return Array.isArray(t)?ko(t[0],xo(t[1],t[2])):ko(t,xo(e,r))}function ko(t,e){return sc(t,(r,i,n,s)=>{let a=i.exec(r);if(a)return a.$$=r.slice(a[0].length),a.dark=s,e(a,n)})}function sc(t,e){let r=Ce(t).map(Xf);return(i,n,s)=>{for(let a of r){let o=e(i,a,n,s);if(o)return o}}}function Xf(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function ac(t,e){let r=Io(t),i=function({theme:l,darkMode:h,darkColor:c=_s,variants:u,rules:f,hash:p,stringify:m,ignorelist:g,finalize:d}){let y=new Map,v=new Map,b=new Map,_=new Map,x=sc(g,(w,M)=>M.test(w));u.push(["dark",Array.isArray(h)||h=="class"?`${Ce(h)[1]||".dark"} &`:typeof h=="string"&&h!="media"?h:"@media (prefers-color-scheme:dark)"]);let T=typeof p=="function"?w=>p(w,gs):p?gs:qh;T!==qh&&d.push(w=>({...w,n:w.n&&T(w.n),d:w.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(M,k)=>"--"+T(k).replace("#",""))}));let S={theme:function({extend:w={},...M}){let k={},I={get colors(){return P("colors")},theme:P,negative(){return{}},breakpoints(E){let F={};for(let O in E)typeof E[O]=="string"&&(F["screen-"+O]=E[O]);return F}};return P;function P(E,F,O,D){if(E){if({1:E,2:D}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(E)||[,E],/[.[]/.test(E)){let q=[];E.replace(/\[([^\]]+)\]|([^.[]+)/g,(U,J,G=J)=>q.push(G)),E=q.shift(),O=F,F=q.join("-")}let $=k[E]||Object.assign(Object.assign(k[E]={},A(M,E)),A(w,E));if(F==null)return $;F||(F="DEFAULT");let L=$[F]??F.split("-").reduce((q,U)=>q?.[U],$)??O;return D?At(L,{opacityValue:Ao(D,P)}):L}let C={};for(let $ of[...Object.keys(M),...Object.keys(w)])C[$]=P($);return C}function A(E,F){let O=E[F];return typeof O=="function"&&(O=O(I)),O&&/color|fill|stroke/i.test(F)?function D(C,$=[]){let L={};for(let q in C){let U=C[q],J=[...$,q];L[J.join("-")]=U,q=="DEFAULT"&&(J=$,L[$.join("-")]=U),typeof U=="object"&&Object.assign(L,D(U,J))}return L}(O):O}}(l),e:Xh,h:T,s(w,M){return m(w,M,S)},d(w,M,k){return c(w,M,S,k)},v(w){return y.has(w)||y.set(w,Jh(w,u,v,Yf,S)||"&:"+w),y.get(w)},r(w,M){let k=JSON.stringify([w,M]);return b.has(k)||b.set(k,!x(w,S)&&Jh(w,f,_,Jf,S,M)),b.get(k)},f(w){return d.reduce((M,k)=>k(M,S),w)}};return S}(r),n=new Map,s=[],a=new Set;e.resume(l=>n.set(l,l),(l,h)=>{e.insert(l,s.length,h),s.push(h),a.add(l)});function o(l){let h=i.f(l),c=wo(h);if(c&&!a.has(c)){a.add(c);let u=ec(s,l);e.insert(c,u,l),s.splice(u,0,l)}return h.n}return Object.defineProperties(function(h){if(!n.size)for(let u of Ce(r.preflight))typeof u=="function"&&(u=u(i)),u&&(typeof u=="string"?Co("",Ne.b,vs(u),i,Ne.b,[],!1,!0):rc(u,{},i,Ne.b)).forEach(o);h=""+h;let c=n.get(h);if(!c){let u=new Set;for(let f of ys(vs(h),i))u.add(f.c).add(o(f));c=[...u].filter(Boolean).join(" "),n.set(h,c).set(c,c)}return c},Object.getOwnPropertyDescriptors({get target(){return e.target},theme:i.theme,config:r,snapshot(){let l=e.snapshot(),h=new Set(a),c=new Map(n),u=[...s];return()=>{l(),a=h,n=c,s=u}},clear(){e.clear(),a=new Set,n=new Map,s=[]},destroy(){this.clear(),e.destroy()}}))}function Kf(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function oc(t){let e=new MutationObserver(r);return{observe(n){e.observe(n,{attributeFilter:["class"],subtree:!0,childList:!0}),i(n),r([{target:n,type:""}])},disconnect(){e.disconnect()}};function r(n){for(let{type:s,target:a}of n)if(s[0]=="a")i(a);else for(let o of a.querySelectorAll("[class]"))i(o);e.takeRecords()}function i(n){let s,a=n.getAttribute?.("class");a&&Kf(a,s=t(a))&&n.setAttribute("class",s)}}function Qf(t){let e=document.querySelector(t||'style[data-twind=""]');return(!e||e.tagName!="STYLE")&&(e=document.createElement("style"),document.head.prepend(e)),e.dataset.twind="claimed",e}function ws(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:Qf(t)).sheet;return{target:e,snapshot(){let r=Array.from(e.cssRules,i=>i.cssText);return()=>{this.clear(),r.forEach(this.insert)}},clear(){for(let r=e.cssRules.length;r--;)e.deleteRule(r)},destroy(){e.ownerNode?.remove()},insert(r,i){try{e.insertRule(r,i)}catch{e.insertRule(":root{}",i)}},resume:_s}}var em=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 lc(t){return em.get(t)}function hc(t){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(t);return e?e[1]?1:e[2]?2:e[3]?3:5:0}function cc(t,e){var r=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(t);return r?r[1]?/^sti/i.test(e)?1:0:r[2]?/^pat/i.test(e)?1:0:r[3]?/^image-/i.test(e)?1:0:r[4]?e[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(e)?4:0:0}var tm=[["-webkit-",1],["-moz-",2],["-ms-",4]];function uc(){return({stringify:t})=>({stringify(e,r,i){let n="",s=lc(e);s&&(n+=t(s,r,i)+";");let a=hc(e),o=cc(e,r);for(let l of tm)a&l[1]&&(n+=t(l[0]+e,r,i)+";"),o&l[1]&&(n+=t(e,l[0]+r,i)+";");return n+t(e,r,i)}})}function dc(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",To("lineClamp",({_:t})=>pc(t))],["line-clamp-(\\d+)",({1:t})=>pc(t)]]}}function pc(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var cn={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",...bt(4,"rem",4,.5,.5),...bt(12,"rem",4,5),14:"3.5rem",...bt(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:ve("blur"),backdropBrightness:ve("brightness"),backdropContrast:ve("contrast"),backdropGrayscale:ve("grayscale"),backdropHueRotate:ve("hueRotate"),backdropInvert:ve("invert"),backdropOpacity:ve("opacity"),backdropSaturate:ve("saturate"),backdropSepia:ve("sepia"),backgroundColor:ve("colors"),backgroundImage:{none:"none"},backgroundOpacity:ve("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:{...bt(200,"",100,0,50),...bt(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:ve("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:ve("spacing"),borderWidth:{DEFAULT:"1px",...Ct(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:ve("colors"),caretColor:ve("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...bt(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:ve("borderColor"),divideOpacity:ve("borderOpacity"),divideWidth:ve("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:t})=>({...t("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:t})=>({...t("spacing"),...hn(2,6),...hn(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:ve("spacing"),gradientColorStops:ve("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:t})=>({...t("spacing"),...hn(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...hn(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:{...bt(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("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:{...bt(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:ve("spacing"),placeholderColor:ve("colors"),placeholderOpacity:ve("opacity"),outlineColor:ve("colors"),outlineOffset:Ct(8,"px"),outlineWidth:Ct(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:ve("colors"),ringOffsetWidth:Ct(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Ct(8,"px")},rotate:{...Ct(2,"deg"),...Ct(12,"deg",3),...Ct(180,"deg",45)},saturate:bt(200,"",100,0,50),scale:{...bt(150,"",100,0,50),...bt(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:ve("spacing"),scrollPadding:ve("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Ct(2,"deg"),...Ct(12,"deg",3)},space:ve("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:bt(2),textColor:ve("colors"),textDecorationColor:ve("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Ct(8,"px")},textUnderlineOffset:{auto:"auto",...Ct(8,"px")},textIndent:ve("spacing"),textOpacity:ve("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:ve("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:t})=>({...t("spacing"),...hn(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...bt(50,"",1,0,10),auto:"auto"}};function hn(t,e){let r={};do for(var i=1;i<t;i++)r[`${i}/${t}`]=Number((i/t*100).toFixed(6))+"%";while(++t<=e);return r}function Ct(t,e,r=0){let i={};for(;r<=t;r=2*r||1)i[r]=r+e;return i}function bt(t,e="",r=1,i=0,n=1,s={}){for(;i<=t;i+=n)s[i]=i/r+e;return s}function ve(t){return({theme:e})=>e(t)}var fc={"*,::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, ${cn.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, ${cn.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 _c=[V("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:Nt(`[${e}]`,"",r)}}})),V("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),N("aspect-","aspectRatio"),V("container",(t,{theme:e})=>{let{screens:r=e("screens"),center:i,padding:n}=e("container"),s={width:"100%",marginRight:i&&"auto",marginLeft:i&&"auto",...a("xs")};for(let o in r){let l=r[o];typeof l=="string"&&(s[bs(l)]={"&":{maxWidth:l,...a(o)}})}return s;function a(o){let l=n&&(typeof n=="string"?n:n[o]||n.DEFAULT);if(l)return{paddingRight:l,paddingLeft:l}}}),N("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),V("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),V("box-(border|content)","boxSizing",({1:t})=>t+"-box"),V("hidden",{display:"none"}),V("table-(auto|fixed)","tableLayout"),V(["(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)",V("isolate","isolation"),V("object-(contain|cover|fill|none|scale-down)","objectFit"),N("object-","objectPosition"),V("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",xs),V("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),V("(static|fixed|absolute|relative|sticky)","position"),N("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),N("-?(top|bottom|left|right)(?:$|-)","inset"),V("(visible|collapse)","visibility"),V("invisible",{visibility:"hidden"}),N("-?z-","zIndex"),V("flex-((row|col)(-reverse)?)","flexDirection",mc),V("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),N("(flex-(?:grow|shrink))(?:$|-)"),N("(flex)-"),N("grow(?:$|-)","flexGrow"),N("shrink(?:$|-)","flexShrink"),N("basis-","flexBasis"),N("-?(order)-"),"-?(order)-(\\d+)",N("grid-cols-","gridTemplateColumns"),V("grid-cols-(\\d+)","gridTemplateColumns",bc),N("col-","gridColumn"),V("col-(span)-(\\d+)","gridColumn",vc),N("col-start-","gridColumnStart"),V("col-start-(auto|\\d+)","gridColumnStart"),N("col-end-","gridColumnEnd"),V("col-end-(auto|\\d+)","gridColumnEnd"),N("grid-rows-","gridTemplateRows"),V("grid-rows-(\\d+)","gridTemplateRows",bc),N("row-","gridRow"),V("row-(span)-(\\d+)","gridRow",vc),N("row-start-","gridRowStart"),V("row-start-(auto|\\d+)","gridRowStart"),N("row-end-","gridRowEnd"),V("row-end-(auto|\\d+)","gridRowEnd"),V("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>xs(mc(t))),V("grid-flow-(dense)","gridAutoFlow"),N("auto-cols-","gridAutoColumns"),N("auto-rows-","gridAutoRows"),N("gap-x(?:$|-)","gap","columnGap"),N("gap-y(?:$|-)","gap","rowGap"),N("gap(?:$|-)","gap"),"(justify-(?:items|self))-",V("justify-","justifyContent",gc),V("(content|items|self)-",t=>({["align-"+t[1]]:gc(t)})),V("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),N("p([xytrbl])?(?:$|-)","padding",_i("padding")),N("-?m([xytrbl])?(?:$|-)","margin",_i("margin")),N("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),V("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),N("w-","width"),N("min-w-","minWidth"),N("max-w-","maxWidth"),N("h-","height"),N("min-h-","minHeight"),N("max-h-","maxHeight"),N("font-","fontWeight"),N("font-","fontFamily",({_:t})=>typeof(t=Ce(t))[1]=="string"?{fontFamily:Lt(t)}:{fontFamily:Lt(t[0]),...t[1]}),V("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),V("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),V("italic","fontStyle"),V("not-italic",{fontStyle:"normal"}),V("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:r})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(r?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...gr({"--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,/*!*/ /*!*/)"})}),N("tracking-","letterSpacing"),N("leading-","lineHeight"),V("list-(inside|outside)","listStylePosition"),N("list-","listStyleType"),V("list-","listStyleType"),N("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),ze("placeholder-",{property:"color",selector:"&::placeholder"}),V("text-(left|center|right|justify|start|end)","textAlign"),V("text-(ellipsis|clip)","textOverflow"),N("text-opacity-","textOpacity","--tw-text-opacity"),ze("text-",{property:"color"}),N("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),N("indent-","textIndent"),V("(overline|underline|line-through)","textDecorationLine"),V("no-underline",{textDecorationLine:"none"}),N("underline-offset-","textUnderlineOffset"),ze("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),N("decoration-","textDecorationThickness"),V("decoration-","textDecorationStyle"),V("(uppercase|lowercase|capitalize)","textTransform"),V("normal-case",{textTransform:"none"}),V("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),V("align-","verticalAlign"),V("whitespace-","whiteSpace"),V("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),V("break-words",{overflowWrap:"break-word"}),V("break-all",{wordBreak:"break-all"}),V("break-keep",{wordBreak:"keep-all"}),ze("caret-",{opacityVariable:!1,opacitySection:"opacity"}),ze("accent-",{opacityVariable:!1,opacitySection:"opacity"}),V("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${Hr(t," ")},var(--tw-gradient-stops))`),ze("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),ze("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),ze("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),V("bg-(fixed|local|scroll)","backgroundAttachment"),V("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),V(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),V("bg-blend-","backgroundBlendMode"),V("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),N("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),ze("bg-",{section:"backgroundColor"}),N("bg-","backgroundImage"),N("bg-","backgroundPosition"),V("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",xs),N("bg-","backgroundSize"),N("rounded(?:$|-)","borderRadius"),N("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let r={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${Hr(r[0])}-radius`]:e,[`border-${Hr(r[1])}-radius`]:e}}),V("border-(collapse|separate)","borderCollapse"),N("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),V("border-(solid|dashed|dotted|double|none)","borderStyle"),N("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...gr({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),ze("border-([xytrbl])-",{section:"borderColor"},_i("border","Color")),ze("border-"),N("border-([xytrbl])(?:$|-)","borderWidth",_i("border","Width")),N("border(?:$|-)","borderWidth"),N("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),V("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),V("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),N("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${Hr(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${Hr(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),ze("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),N("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),ze("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),N("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),V("ring-inset",{"--tw-ring-inset":"inset"}),ze("ring-",{property:"--tw-ring-color"}),N("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...gr({"--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":At(e("ringOffsetColor","","#fff")),"--tw-ring-color":At(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(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),ze("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),N("shadow(?:$|-)","boxShadow",({_:t})=>({...gr({"--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":Lt(t),"--tw-shadow-colored":Lt(t).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)"})),N("(opacity)-"),V("mix-blend-","mixBlendMode"),...yc(),...yc("backdrop-"),N("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:Lt(t),transitionTimingFunction:t._=="none"?void 0:Lt(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:Lt(e("transitionDuration",""))})),N("duration(?:$|-)","transitionDuration","transitionDuration",Lt),N("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Lt),N("delay(?:$|-)","transitionDelay","transitionDelay",Lt),N("animate(?:$|-)","animation",(t,{theme:e,h:r,e:i})=>{let n=Lt(t),s=n.split(" "),a=e("keyframes",s[0]);return a?{["@keyframes "+(s[0]=i(r(s[0])))]:a,animation:s.join(" ")}:{animation:n}}),"(transform)-(none)",V("transform",Do),V("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":wc(t=="gpu")})),N("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...Do()})),N("-?(rotate)-","rotate",Mo),N("-?(translate-[xy])-","translate",Mo),N("-?(skew-[xy])-","skew",Mo),V("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",xs),"(appearance)-",N("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",N("(cursor)-"),"(cursor)-",V("snap-(none)","scroll-snap-type"),V("snap-(x|y|both)",({1:t})=>({...gr({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),V("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),V("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),V("snap-(normal|always)","scroll-snap-stop"),V("scroll-(auto|smooth)","scroll-behavior"),N("scroll-p([xytrbl])?(?:$|-)","padding",_i("scroll-padding")),N("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",_i("scroll-margin")),V("touch-(auto|none|manipulation)","touch-action"),V("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...gr({"--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":r?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),V("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),V("outline",{outlineStyle:"solid"}),V("outline-(dashed|dotted|double)","outlineStyle"),N("-?(outline-offset)-"),ze("outline-",{opacityVariable:!1,opacitySection:"opacity"}),N("outline-","outlineWidth"),"(pointer-events)-",N("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],V("select-(none|text|all|auto)","userSelect"),ze("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),ze("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),N("stroke-","strokeWidth"),V("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),V("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function xs(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function mc(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function Hr(t,e="-"){let r=[];for(let i of t)r.push({t:"top",r:"right",b:"bottom",l:"left"}[i]);return r.join(e)}function Lt(t){return t&&""+(t._||t)}function gc({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function _i(t,e=""){return({1:r,_:i})=>{let n={x:"lr",y:"tb"}[r]||r+r;return n?{...ln(t+"-"+Hr(n[0])+e,i),...ln(t+"-"+Hr(n[1])+e,i)}:ln(t+e,i)}}function yc(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),r={};for(let i of e)r[`--tw-${t}${i}`]="var(--tw-empty,/*!*/ /*!*/)";return r={...gr(r),[`${t}filter`]:e.map(i=>`var(--tw-${t}${i})`).join(" ")},[`(${t}filter)-(none)`,V(`${t}filter`,r),...e.map(i=>N(`${i[0]=="h"?"-?":""}(${t}${i})(?:$|-)`,i,({1:n,_:s})=>({[`--tw-${n}`]:Ce(s).map(a=>`${i}(${a})`).join(" "),...r})))]}function Mo({1:t,_:e}){return{["--tw-"+t]:e,...Do()}}function Do(){return{...gr({"--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":wc()}),transform:"var(--tw-transform)"}}function wc(t){return[t?"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 vc({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function bc({1:t}){return`repeat(${t},minmax(0,1fr))`}function gr(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var xc=[["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:t})=>`@media (orientation:${t})`],["contrast-(more|less)",({1:t})=>`@media (prefers-contrast:${t})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:t})=>`&::${t}`],["(marker|selection)",({1:t})=>`& *::${t},&::${t}`],["file","&::file-selector-button"],["(first|last|only)",({1:t})=>`&:${t}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:t,$$:e},r)=>e&&`&[${t}-${r.theme(t,e)||Nt(e,"",r)||`${e}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:t,3:e="",4:r,5:i="",6:n=e},{e:s,h:a,v:o})=>{let l=bi(i)||(r[0]=="["?r:o(r.slice(1)));return`${(l.includes("&")?l:"&"+l).replace(/&/g,`:merge(.${s(a(t+n))})`)}${t[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:t})=>`[dir="${t}"] &`],["supports-",({$$:t},e)=>{if(t&&(t=e.theme("supports",t)||Nt(t,"",e)),t)return t.includes(":")||(t+=":var(--tw)"),/^\w*\s*\(/.test(t)||(t=`(${t})`),`@supports ${t.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:t},e)=>{if(t&&(t=e.theme("screens",t)||Nt(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=Nt(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&bi(t).replace(/[}]+$/,"").split("{")]];function Sc({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:fc,theme:{...cn,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:xc,rules:_c,finalize(r){return r.n&&r.d&&r.r.some(i=>/^&::(before|after)$/.test(i))&&!/(^|;)content:/.test(r.d)?{...r,d:"content:var(--tw-content);"+r.d}:r}}}var rm={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},im={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},nm={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},sm={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},am={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},om={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},lm={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},hm={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},cm={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},um={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},pm={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},dm={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},fm={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},mm={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},gm={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},ym={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},vm={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},bm={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},_m={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},wm={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},xm={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},Sm={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},kc={__proto__:null,slate:rm,gray:im,zinc:nm,neutral:sm,stone:am,red:om,orange:lm,amber:hm,yellow:cm,lime:um,green:pm,emerald:dm,teal:fm,cyan:mm,sky:gm,blue:ym,indigo:vm,violet:bm,purple:_m,fuchsia:wm,pink:xm,rose:Sm};function Ec({disablePreflight:t}={}){return Sc({colors:kc,disablePreflight:t})}function Cc({className:t="prose",defaultColor:e="gray",extend:r={},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,a=s])=>[`${t}-${s}`,(o,l)=>Tc(t,a[0]=="."?"."+l.e(l.h(a.slice(1))):a,l,h=>`& :is(${h.trim()})`)]),rules:[[`(lead|not-${t})`,({1:s},{h:a})=>[{c:a(s)}]],[`${t}-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)"}}],[t+"-",({$$:s},a)=>{let o=Ac(a.theme("fontSize",s));return o&&{"@layer components":o}}],[t+"-",({$$:s},a)=>n(s,a)],[t,(s,a)=>({...n(e,a),"@layer base":[Pc(t,a,{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:K(20,16),marginBottom:K(20,16),paddingLeft:K(26,16)},li:{marginTop:K(8,16),marginBottom:K(8,16)},"ol>li,ul>li":{paddingLeft:K(6,16)},">ul>li p":{marginTop:K(12,16),marginBottom:K(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:K(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:K(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:K(12,16),marginBottom:K(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:K(48,16),marginBottom:K(48,16)},blockquote:{marginTop:K(32,20),marginBottom:K(32,20),paddingLeft:K(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:K(20,16),marginBottom:K(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:K(36,16),marginTop:"0",marginBottom:K(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:K(24,16),marginTop:K(48,24),marginBottom:K(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:K(20,16),marginTop:K(32,20),marginBottom:K(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:K(24,16),marginBottom:K(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:K(32,16),marginBottom:K(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:K(14,16),lineHeight:"1.4",marginTop:K(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:K(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:K(21,24)},"h3 code":{fontSize:K(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:K(14,16),lineHeight:"1.7",marginTop:K(24,14),marginBottom:K(24,14),borderRadius:"0.375rem",paddingTop:K(12,14),paddingRight:K(16,14),paddingBottom:K(12,14),paddingLeft:K(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:K(32,16),marginBottom:K(32,16),fontSize:K(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:K(8,14),paddingBottom:K(8,14),paddingLeft:K(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:K(8,14),paddingRight:K(8,14),paddingBottom:K(8,14),paddingLeft:K(8,14)},"tbody td:first-child,tfoot td:first-child":{paddingLeft:"0"},"tbody td:last-child,tfoot td:last-child":{paddingRight:"0"},[`.${a.e(a.h("lead"))}`]:{color:"var(--tw-prose-lead)",fontSize:K(20,16),lineHeight:"1.6",marginTop:K(24,20),marginBottom:K(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),Pc(t,a,r)],"@layer components":{...Ac(a.theme("fontSize","base")),color:"var(--tw-prose-body)",maxWidth:"theme(max-w.prose, 65ch)"}})]]};function n(s,a){let o={},l={},h=(c,u,f)=>{let p=a.theme(`colors.${s}.${u}`,u);f["--tw-prose-"+c]=At(p);let m=f!=l&&a.d("colors",`${s}-${u}`,p);m&&(l["--tw-prose-"+c]=At(m))};for(let c in i){let u=i[c];c!="dark"&&u&&h(c,u,o)}for(let c in i.dark||{}){let u=i.dark[c];u&&(i.dark?h("invert-"+c,u,o):h(c,u,l))}return Object.keys(o).length?{"@layer defaults":{"&":o,[a.v("dark")]:l}}:void 0}}function Pc(t,e,r){let i={};for(let n in r)i[Tc(t,n,e,s=>`.${e.e(e.h(t))}${s}`)]=r[n];return i}function Tc(t,e,{e:r,h:i},n){return e.replace(/^[^>:]+$|(>)?((?:[^:,]+(?::[\w-]+)?)|:[\w-]+)(::[\w-]+)?/g,(s,a=" ",o=s,l="")=>n(`${a}:where(${o}):not(:where(.${r(i("not-"+t))} *))${l}`))}function Ac(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function K(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var Fo=Io({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:[Ec(),uc(),dc(),Cc()],hash:!1});function Ic(t,e=!0){let r=function(){if(km)try{let l=ws(new CSSStyleSheet);return l.connect=h=>{let c=Oo(h);c.adoptedStyleSheets=[...c.adoptedStyleSheets,l.target]},l.disconnect=_s,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let a=[ws(s)],o=new WeakMap;return{get target(){return a[0].target},snapshot(){let l=a.map(h=>h.snapshot());return()=>l.forEach(h=>h())},clear(){a.forEach(l=>l.clear())},destroy(){a.forEach(l=>l.destroy())},insert(l,h,c){a[0].insert(l,h,c);let u=this.target.cssRules[h];a.forEach((f,p)=>p&&f.target.insertRule(u.cssText,h))},resume(l,h){return a[0].resume(l,h)},connect(l){let h=document.createElement("style");Oo(l).appendChild(h);let c=ws(h),{cssRules:u}=this.target;for(let f=0;f<u.length;f++)c.target.insertRule(u[f].cssText,f);a.push(c),o.set(l,c)},disconnect(l){let h=a.indexOf(o.get(l));h>=0&&a.splice(h,1)}}}(),i=ac({...t,hash:t.hash??e},r),n=oc(i);return function(a){return class extends a{connectedCallback(){super.connectedCallback?.(),r.connect(this),n.observe(Oo(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=i}}}}var km=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Oo(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var De=t=>Ic(Fo)(t);var ks,Mc,Es,Dc,Ss=class extends De(Ee){constructor(){super();Z(this,ks);Z(this,Es);me(this,"render",()=>pe`
|
|
4
4
|
<div class="${R(this,ks,Mc)?"block":"hidden"} flex h-full w-full flex-col items-stretch justify-center space-y-8 px-4">
|
|
5
5
|
<!-- limitations section -->
|
|
6
6
|
${this.config.limitations&&this.config.limitations.items.length>0?pe`
|
|
@@ -25,7 +25,7 @@ var Rd=Object.defineProperty;var Ld=(t,e,r)=>e in t?Rd(t,e,{enumerable:!0,config
|
|
|
25
25
|
<!-- spacer for visual alignment -->
|
|
26
26
|
<div class="h-1/9"></div>
|
|
27
27
|
</div>
|
|
28
|
-
`);this.config,this.messages=0}};ks=new WeakSet,Mc=function(){return this.messages===0},Es=new WeakSet,Dc=function(r){let i={example:r};this.dispatchEvent(new CustomEvent("mw-example-click",{detail:i}))},ye(Ss,"properties",{config:{type:Object},messages:{type:Number}});customElements.define("mw-background",Ss);function pn(t){var e,r;function i(s,a){try{var o=t[s](a),l=o.value,h=l instanceof il;Promise.resolve(h?l.v:l).then(function(c){if(h){var u=s==="return"?"return":"next";if(!l.k||c.done)return i(u,c);c=t[u](c).value}n(o.done?"return":"normal",c)},function(c){i("throw",c)})}catch(c){n("throw",c)}}function n(s,a){switch(s){case"return":e.resolve({value:a,done:!0});break;case"throw":e.reject(a);break;default:e.resolve({value:a,done:!1})}(e=e.next)?i(e.key,e.arg):r=null}this._invoke=function(s,a){return new Promise(function(o,l){var h={key:s,arg:a,resolve:o,reject:l,next:null};r?r=r.next=h:(e=r=h,i(s,a))})},typeof t.return!="function"&&(this.return=void 0)}function il(t,e){this.v=t,this.k=e}function wu(t,e,r,i){return{getMetadata:function(n){qo(i,"getMetadata"),$c(n);var s=t[n];if(s!==void 0){if(e===1){var a=s.public;if(a!==void 0)return a[r]}else if(e===2){var o=s.private;if(o!==void 0)return o.get(r)}else if(Object.hasOwnProperty.call(s,"constructor"))return s.constructor}},setMetadata:function(n,s){qo(i,"setMetadata"),$c(n);var a=t[n];if(a===void 0&&(a=t[n]={}),e===1){var o=a.public;o===void 0&&(o=a.public={}),o[r]=s}else if(e===2){var l=a.priv;l===void 0&&(l=a.private=new Map),l.set(r,s)}else a.constructor=s}}}function Fc(t,e){var r=t[Symbol.metadata||Symbol.for("Symbol.metadata")],i=Object.getOwnPropertySymbols(e);if(i.length!==0){for(var n=0;n<i.length;n++){var s=i[n],a=e[s],o=r?r[s]:null,l=a.public,h=o?o.public:null;l&&h&&Object.setPrototypeOf(l,h);var c=a.private;if(c){var u=Array.from(c.values()),f=o?o.private:null;f&&(u=u.concat(f)),a.private=u}o&&Object.setPrototypeOf(a,o)}r&&Object.setPrototypeOf(e,r),t[Symbol.metadata||Symbol.for("Symbol.metadata")]=e}}function xu(t,e){return function(r){qo(e,"addInitializer"),dn(r,"An initializer"),t.push(r)}}function Oc(t,e,r,i,n,s,a,o,l){var h;switch(s){case 1:h="accessor";break;case 2:h="method";break;case 3:h="getter";break;case 4:h="setter";break;default:h="field"}var c,u,f={kind:h,name:o?"#"+e:e,isStatic:a,isPrivate:o},p={v:!1};if(s!==0&&(f.addInitializer=xu(n,p)),o){c=2,u=Symbol(e);var m={};s===0?(m.get=r.get,m.set=r.set):s===2?m.get=function(){return r.value}:(s!==1&&s!==3||(m.get=function(){return r.get.call(this)}),s!==1&&s!==4||(m.set=function(g){r.set.call(this,g)})),f.access=m}else c=1,u=e;try{return t(l,Object.assign(f,wu(i,c,u,p)))}finally{p.v=!0}}function qo(t,e){if(t.v)throw new Error("attempted to call "+e+" after decoration was finished")}function $c(t){if(typeof t!="symbol")throw new TypeError("Metadata keys must be symbols, received: "+t)}function dn(t,e){if(typeof t!="function")throw new TypeError(e+" must be a function")}function Uo(t,e){var r=typeof e;if(t===1){if(r!=="object"||e===null)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");e.get!==void 0&&dn(e.get,"accessor.get"),e.set!==void 0&&dn(e.set,"accessor.set"),e.init!==void 0&&dn(e.init,"accessor.init"),e.initializer!==void 0&&dn(e.initializer,"accessor.initializer")}else if(r!=="function")throw new TypeError((t===0?"field":t===10?"class":"method")+" decorators must return a function or void 0")}function Rc(t){var e;return(e=t.init)==null&&(e=t.initializer)&&typeof console<"u"&&console.warn(".initializer has been renamed to .init as of March 2022"),e}function Em(t,e,r,i,n,s,a,o,l){var h,c,u,f,p,m,g=r[0];if(a?h=n===0||n===1?{get:r[3],set:r[4]}:n===3?{get:r[3]}:n===4?{set:r[3]}:{value:r[3]}:n!==0&&(h=Object.getOwnPropertyDescriptor(e,i)),n===1?u={get:h.get,set:h.set}:n===2?u=h.value:n===3?u=h.get:n===4&&(u=h.set),typeof g=="function")(f=Oc(g,i,h,o,l,n,s,a,u))!==void 0&&(Uo(n,f),n===0?c=f:n===1?(c=Rc(f),p=f.get||u.get,m=f.set||u.set,u={get:p,set:m}):u=f);else for(var d=g.length-1;d>=0;d--){var y;(f=Oc(g[d],i,h,o,l,n,s,a,u))!==void 0&&(Uo(n,f),n===0?y=f:n===1?(y=Rc(f),p=f.get||u.get,m=f.set||u.set,u={get:p,set:m}):u=f,y!==void 0&&(c===void 0?c=y:typeof c=="function"?c=[c,y]:c.push(y)))}if(n===0||n===1){if(c===void 0)c=function(_,x){return x};else if(typeof c!="function"){var v=c;c=function(_,x){for(var T=x,S=0;S<v.length;S++)T=v[S].call(_,T);return T}}else{var b=c;c=function(_,x){return b.call(_,x)}}t.push(c)}n!==0&&(n===1?(h.get=u.get,h.set=u.set):n===2?h.value=u:n===3?h.get=u:n===4&&(h.set=u),a?n===1?(t.push(function(_,x){return u.get.call(_,x)}),t.push(function(_,x){return u.set.call(_,x)})):n===2?t.push(u):t.push(function(_,x){return u.call(_,x)}):Object.defineProperty(e,i,h))}function Pm(t,e,r,i,n){for(var s,a,o=new Map,l=new Map,h=0;h<n.length;h++){var c=n[h];if(Array.isArray(c)){var u,f,p,m=c[1],g=c[2],d=c.length>3,y=m>=5;if(y?(u=e,f=i,(m-=5)!=0&&(p=a=a||[])):(u=e.prototype,f=r,m!==0&&(p=s=s||[])),m!==0&&!d){var v=y?l:o,b=v.get(g)||0;if(b===!0||b===3&&m!==4||b===4&&m!==3)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+g);!b&&m>2?v.set(g,m):v.set(g,!0)}Em(t,u,c,g,m,y,d,f,p)}}Lc(t,s),Lc(t,a)}function Lc(t,e){e&&t.push(function(r){for(var i=0;i<e.length;i++)e[i].call(r);return r})}function Am(t,e,r,i){if(i.length>0){for(var n=[],s=e,a=e.name,o=i.length-1;o>=0;o--){var l={v:!1};try{var h=Object.assign({kind:"class",name:a,addInitializer:xu(n,l)},wu(r,0,a,l)),c=i[o](s,h)}finally{l.v=!0}c!==void 0&&(Uo(10,c),s=c)}t.push(s,function(){for(var u=0;u<n.length;u++)n[u].call(s)})}}function Vv(t,e,r){var i=[],n={},s={};return Pm(i,t,s,n,e),Fc(t.prototype,s),Am(i,t,n,r),Fc(t,n),i}function Su(t,e){return function(r){Cm(e,"addInitializer"),Cs(r,"An initializer"),t.push(r)}}function Bc(t,e,r,i,n,s,a,o){var l;switch(n){case 1:l="accessor";break;case 2:l="method";break;case 3:l="getter";break;case 4:l="setter";break;default:l="field"}var h,c,u={kind:l,name:a?"#"+e:e,static:s,private:a},f={v:!1};n!==0&&(u.addInitializer=Su(i,f)),n===0?a?(h=r.get,c=r.set):(h=function(){return this[e]},c=function(p){this[e]=p}):n===2?h=function(){return r.value}:(n!==1&&n!==3||(h=function(){return r.get.call(this)}),n!==1&&n!==4||(c=function(p){r.set.call(this,p)})),u.access=h&&c?{get:h,set:c}:h?{get:h}:{set:c};try{return t(o,u)}finally{f.v=!0}}function Cm(t,e){if(t.v)throw new Error("attempted to call "+e+" after decoration was finished")}function Cs(t,e){if(typeof t!="function")throw new TypeError(e+" must be a function")}function Wo(t,e){var r=typeof e;if(t===1){if(r!=="object"||e===null)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");e.get!==void 0&&Cs(e.get,"accessor.get"),e.set!==void 0&&Cs(e.set,"accessor.set"),e.init!==void 0&&Cs(e.init,"accessor.init")}else if(r!=="function")throw new TypeError((t===0?"field":t===10?"class":"method")+" decorators must return a function or void 0")}function Tm(t,e,r,i,n,s,a,o){var l,h,c,u,f,p,m=r[0];if(a?l=n===0||n===1?{get:r[3],set:r[4]}:n===3?{get:r[3]}:n===4?{set:r[3]}:{value:r[3]}:n!==0&&(l=Object.getOwnPropertyDescriptor(e,i)),n===1?c={get:l.get,set:l.set}:n===2?c=l.value:n===3?c=l.get:n===4&&(c=l.set),typeof m=="function")(u=Bc(m,i,l,o,n,s,a,c))!==void 0&&(Wo(n,u),n===0?h=u:n===1?(h=u.init,f=u.get||c.get,p=u.set||c.set,c={get:f,set:p}):c=u);else for(var g=m.length-1;g>=0;g--){var d;(u=Bc(m[g],i,l,o,n,s,a,c))!==void 0&&(Wo(n,u),n===0?d=u:n===1?(d=u.init,f=u.get||c.get,p=u.set||c.set,c={get:f,set:p}):c=u,d!==void 0&&(h===void 0?h=d:typeof h=="function"?h=[h,d]:h.push(d)))}if(n===0||n===1){if(h===void 0)h=function(b,_){return _};else if(typeof h!="function"){var y=h;h=function(b,_){for(var x=_,T=0;T<y.length;T++)x=y[T].call(b,x);return x}}else{var v=h;h=function(b,_){return v.call(b,_)}}t.push(h)}n!==0&&(n===1?(l.get=c.get,l.set=c.set):n===2?l.value=c:n===3?l.get=c:n===4&&(l.set=c),a?n===1?(t.push(function(b,_){return c.get.call(b,_)}),t.push(function(b,_){return c.set.call(b,_)})):n===2?t.push(c):t.push(function(b,_){return c.call(b,_)}):Object.defineProperty(e,i,l))}function Im(t,e,r){for(var i,n,s=new Map,a=new Map,o=0;o<r.length;o++){var l=r[o];if(Array.isArray(l)){var h,c,u=l[1],f=l[2],p=l.length>3,m=u>=5;if(m?(h=e,(u-=5)!=0&&(c=n=n||[])):(h=e.prototype,u!==0&&(c=i=i||[])),u!==0&&!p){var g=m?a:s,d=g.get(f)||0;if(d===!0||d===3&&u!==4||d===4&&u!==3)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+f);!d&&u>2?g.set(f,u):g.set(f,!0)}Tm(t,h,l,f,u,m,p,c)}}Vc(t,i),Vc(t,n)}function Vc(t,e){e&&t.push(function(r){for(var i=0;i<e.length;i++)e[i].call(r);return r})}function Mm(t,e,r){if(r.length>0){for(var i=[],n=e,s=e.name,a=r.length-1;a>=0;a--){var o={v:!1};try{var l=r[a](n,{kind:"class",name:s,addInitializer:Su(i,o)})}finally{o.v=!0}l!==void 0&&(Wo(10,l),n=l)}t.push(n,function(){for(var h=0;h<i.length;h++)i[h].call(n)})}}function Nv(t,e,r){var i=[];return Im(i,t,e),Mm(i,t,r),i}function zv(t){var e={},r=!1;function i(n,s){return r=!0,{done:!1,value:new il(s=new Promise(function(a){a(t[n](s))}),1)}}return e[typeof Symbol<"u"&&Symbol.iterator||"@@iterator"]=function(){return this},e.next=function(n){return r?(r=!1,n):i("next",n)},typeof t.throw=="function"&&(e.throw=function(n){if(r)throw r=!1,n;return i("throw",n)}),typeof t.return=="function"&&(e.return=function(n){return r?(r=!1,n):i("return",n)}),e}function jv(t){var e,r,i,n=2;for(typeof Symbol<"u"&&(r=Symbol.asyncIterator,i=Symbol.iterator);n--;){if(r&&(e=t[r])!=null)return e.call(t);if(i&&(e=t[i])!=null)return new Zo(e.call(t));r="@@asyncIterator",i="@@iterator"}throw new TypeError("Object is not async iterable")}function Zo(t){function e(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var i=r.done;return Promise.resolve(r.value).then(function(n){return{value:n,done:i}})}return(Zo=function(r){this.s=r,this.n=r.next}).prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(r){var i=this.s.return;return i===void 0?Promise.resolve({value:r,done:!0}):e(i.apply(this.s,arguments))},throw:function(r){var i=this.s.return;return i===void 0?Promise.reject(r):e(i.apply(this.s,arguments))}},new Zo(t)}function Gv(t){return new il(t,0)}function Hv(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}function Dm(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,n,s,a,o=[],l=!0,h=!1;try{if(s=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=s.call(r)).done)&&(o.push(i.value),o.length!==e);l=!0);}catch(c){h=!0,n=c}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(h)throw n}}return o}}function Fm(t,e){var r=t&&(typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"]);if(r!=null){var i,n=[];for(r=r.call(t);t.length<e&&!(i=r.next()).done;)n.push(i.value);return n}}var $o;function qv(t,e,r,i){$o||($o=typeof Symbol=="function"&&Symbol.for&&Symbol.for("react.element")||60103);var n=t&&t.defaultProps,s=arguments.length-3;if(e||s===0||(e={children:void 0}),s===1)e.children=i;else if(s>1){for(var a=new Array(s),o=0;o<s;o++)a[o]=arguments[o+3];e.children=a}if(e&&n)for(var l in n)e[l]===void 0&&(e[l]=n[l]);else e||(e=n||{});return{$$typeof:$o,type:t,key:r===void 0?null:""+r,ref:null,props:e,_owner:null}}function Nc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Uv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nc(Object(r),!0).forEach(function(i){nl(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Om(){Om=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i=Object.defineProperty||function(P,A,E){P[A]=E.value},n=typeof Symbol=="function"?Symbol:{},s=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function l(P,A,E){return Object.defineProperty(P,A,{value:E,enumerable:!0,configurable:!0,writable:!0}),P[A]}try{l({},"")}catch{l=function(A,E,F){return A[E]=F}}function h(P,A,E,F){var O=A&&A.prototype instanceof f?A:f,D=Object.create(O.prototype),C=new M(F||[]);return i(D,"_invoke",{value:x(P,E,C)}),D}function c(P,A,E){try{return{type:"normal",arg:P.call(A,E)}}catch(F){return{type:"throw",arg:F}}}t.wrap=h;var u={};function f(){}function p(){}function m(){}var g={};l(g,s,function(){return this});var d=Object.getPrototypeOf,y=d&&d(d(k([])));y&&y!==e&&r.call(y,s)&&(g=y);var v=m.prototype=f.prototype=Object.create(g);function b(P){["next","throw","return"].forEach(function(A){l(P,A,function(E){return this._invoke(A,E)})})}function _(P,A){var E;i(this,"_invoke",{value:function(F,O){function D(){return new A(function(C,$){(function L(q,U,J,G){var re=c(P[q],P,U);if(re.type!=="throw"){var se=re.arg,ie=se.value;return ie&&typeof ie=="object"&&r.call(ie,"__await")?A.resolve(ie.__await).then(function(ee){L("next",ee,J,G)},function(ee){L("throw",ee,J,G)}):A.resolve(ie).then(function(ee){se.value=ee,J(se)},function(ee){return L("throw",ee,J,G)})}G(re.arg)})(F,O,C,$)})}return E=E?E.then(D,D):D()}})}function x(P,A,E){var F="suspendedStart";return function(O,D){if(F==="executing")throw new Error("Generator is already running");if(F==="completed"){if(O==="throw")throw D;return I()}for(E.method=O,E.arg=D;;){var C=E.delegate;if(C){var $=T(C,E);if($){if($===u)continue;return $}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(F==="suspendedStart")throw F="completed",E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);F="executing";var L=c(P,A,E);if(L.type==="normal"){if(F=E.done?"completed":"suspendedYield",L.arg===u)continue;return{value:L.arg,done:E.done}}L.type==="throw"&&(F="completed",E.method="throw",E.arg=L.arg)}}}function T(P,A){var E=A.method,F=P.iterator[E];if(F===void 0)return A.delegate=null,E==="throw"&&P.iterator.return&&(A.method="return",A.arg=void 0,T(P,A),A.method==="throw")||E!=="return"&&(A.method="throw",A.arg=new TypeError("The iterator does not provide a '"+E+"' method")),u;var O=c(F,P.iterator,A.arg);if(O.type==="throw")return A.method="throw",A.arg=O.arg,A.delegate=null,u;var D=O.arg;return D?D.done?(A[P.resultName]=D.value,A.next=P.nextLoc,A.method!=="return"&&(A.method="next",A.arg=void 0),A.delegate=null,u):D:(A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,u)}function S(P){var A={tryLoc:P[0]};1 in P&&(A.catchLoc=P[1]),2 in P&&(A.finallyLoc=P[2],A.afterLoc=P[3]),this.tryEntries.push(A)}function w(P){var A=P.completion||{};A.type="normal",delete A.arg,P.completion=A}function M(P){this.tryEntries=[{tryLoc:"root"}],P.forEach(S,this),this.reset(!0)}function k(P){if(P){var A=P[s];if(A)return A.call(P);if(typeof P.next=="function")return P;if(!isNaN(P.length)){var E=-1,F=function O(){for(;++E<P.length;)if(r.call(P,E))return O.value=P[E],O.done=!1,O;return O.value=void 0,O.done=!0,O};return F.next=F}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=m,i(v,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:p,configurable:!0}),p.displayName=l(m,o,"GeneratorFunction"),t.isGeneratorFunction=function(P){var A=typeof P=="function"&&P.constructor;return!!A&&(A===p||(A.displayName||A.name)==="GeneratorFunction")},t.mark=function(P){return Object.setPrototypeOf?Object.setPrototypeOf(P,m):(P.__proto__=m,l(P,o,"GeneratorFunction")),P.prototype=Object.create(v),P},t.awrap=function(P){return{__await:P}},b(_.prototype),l(_.prototype,a,function(){return this}),t.AsyncIterator=_,t.async=function(P,A,E,F,O){O===void 0&&(O=Promise);var D=new _(h(P,A,E,F),O);return t.isGeneratorFunction(A)?D:D.next().then(function(C){return C.done?C.value:D.next()})},b(v),l(v,o,"Generator"),l(v,s,function(){return this}),l(v,"toString",function(){return"[object Generator]"}),t.keys=function(P){var A=Object(P),E=[];for(var F in A)E.push(F);return E.reverse(),function O(){for(;E.length;){var D=E.pop();if(D in A)return O.value=D,O.done=!1,O}return O.done=!0,O}},t.values=k,M.prototype={constructor:M,reset:function(P){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!P)for(var A in this)A.charAt(0)==="t"&&r.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=void 0)},stop:function(){this.done=!0;var P=this.tryEntries[0].completion;if(P.type==="throw")throw P.arg;return this.rval},dispatchException:function(P){if(this.done)throw P;var A=this;function E(L,q){return D.type="throw",D.arg=P,A.next=L,q&&(A.method="next",A.arg=void 0),!!q}for(var F=this.tryEntries.length-1;F>=0;--F){var O=this.tryEntries[F],D=O.completion;if(O.tryLoc==="root")return E("end");if(O.tryLoc<=this.prev){var C=r.call(O,"catchLoc"),$=r.call(O,"finallyLoc");if(C&&$){if(this.prev<O.catchLoc)return E(O.catchLoc,!0);if(this.prev<O.finallyLoc)return E(O.finallyLoc)}else if(C){if(this.prev<O.catchLoc)return E(O.catchLoc,!0)}else{if(!$)throw new Error("try statement without catch or finally");if(this.prev<O.finallyLoc)return E(O.finallyLoc)}}}},abrupt:function(P,A){for(var E=this.tryEntries.length-1;E>=0;--E){var F=this.tryEntries[E];if(F.tryLoc<=this.prev&&r.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var O=F;break}}O&&(P==="break"||P==="continue")&&O.tryLoc<=A&&A<=O.finallyLoc&&(O=null);var D=O?O.completion:{};return D.type=P,D.arg=A,O?(this.method="next",this.next=O.finallyLoc,u):this.complete(D)},complete:function(P,A){if(P.type==="throw")throw P.arg;return P.type==="break"||P.type==="continue"?this.next=P.arg:P.type==="return"?(this.rval=this.arg=P.arg,this.method="return",this.next="end"):P.type==="normal"&&A&&(this.next=A),u},finish:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var E=this.tryEntries[A];if(E.finallyLoc===P)return this.complete(E.completion,E.afterLoc),w(E),u}},catch:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var E=this.tryEntries[A];if(E.tryLoc===P){var F=E.completion;if(F.type==="throw"){var O=F.arg;w(E)}return O}}throw new Error("illegal catch attempt")},delegateYield:function(P,A,E){return this.delegate={iterator:k(P),resultName:A,nextLoc:E},this.method==="next"&&(this.arg=void 0),u}},t}function $m(t){return($m=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})(t)}function zc(){zc=function(n,s){return new r(n,void 0,s)};var t=RegExp.prototype,e=new WeakMap;function r(n,s,a){var o=new RegExp(n,s);return e.set(o,a||e.get(n)),Mi(o,r.prototype)}function i(n,s){var a=e.get(s);return Object.keys(a).reduce(function(o,l){var h=a[l];if(typeof h=="number")o[l]=n[h];else{for(var c=0;n[h[c]]===void 0&&c+1<h.length;)c++;o[l]=n[h[c]]}return o},Object.create(null))}return Lm(r,RegExp),r.prototype.exec=function(n){var s=t.exec.call(this,n);if(s){s.groups=i(s,this);var a=s.indices;a&&(a.groups=i(a,this))}return s},r.prototype[Symbol.replace]=function(n,s){if(typeof s=="string"){var a=e.get(this);return t[Symbol.replace].call(this,n,s.replace(/\$<([^>]+)>/g,function(l,h){var c=a[h];return"$"+(Array.isArray(c)?c.join("$"):c)}))}if(typeof s=="function"){var o=this;return t[Symbol.replace].call(this,n,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l)).push(i(l,o)),s.apply(this,l)})}return t[Symbol.replace].call(this,n,s)},zc.apply(this,arguments)}function Wv(t){this.wrapped=t}function Zv(t){return function(){return new pn(t.apply(this,arguments))}}function jc(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(h){return void r(h)}o.done?e(l):Promise.resolve(l).then(i,n)}function Yv(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){jc(s,i,n,a,o,"next",l)}function o(l){jc(s,i,n,a,o,"throw",l)}a(void 0)})}}function Jv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ys(i.key),i)}}function Xv(t,e,r){return e&&Gc(t.prototype,e),r&&Gc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kv(t,e){for(var r in e)(s=e[r]).configurable=s.enumerable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,r,s);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),n=0;n<i.length;n++){var s,a=i[n];(s=e[a]).configurable=s.enumerable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,a,s)}return t}function Qv(t,e){for(var r=Object.getOwnPropertyNames(e),i=0;i<r.length;i++){var n=r[i],s=Object.getOwnPropertyDescriptor(e,n);s&&s.configurable&&t[n]===void 0&&Object.defineProperty(t,n,s)}return t}function nl(t,e,r){return(e=Ys(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rm(){return(Rm=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}function e1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&i.push.apply(i,Object.getOwnPropertySymbols(r).filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),i.forEach(function(n){nl(t,n,r[n])})}return t}function Lm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mi(t,e)}function t1(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Mi(t,e)}function gn(t){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function Mi(t,e){return(Mi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r})(t,e)}function ku(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Eu(t,e,r){return(Eu=ku()?Reflect.construct.bind():function(i,n,s){var a=[null];a.push.apply(a,n);var o=new(Function.bind.apply(i,a));return s&&Mi(o,s.prototype),o}).apply(null,arguments)}function Bm(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Vm(t){var e=typeof Map=="function"?new Map:void 0;return(Vm=function(r){if(r===null||!Bm(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return Eu(r,arguments,gn(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Mi(i,r)})(t)}function r1(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function i1(t){return t&&t.__esModule?t:{default:t}}function Pu(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(Pu=function(i){return i?r:e})(t)}function n1(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=Pu(e);if(r&&r.has(t))return r.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=n?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function s1(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function a1(t){if(t==null)throw new TypeError("Cannot destructure "+t)}function Nm(t,e){if(t==null)return{};var r,i,n={},s=Object.keys(t);for(i=0;i<s.length;i++)r=s[i],e.indexOf(r)>=0||(n[r]=t[r]);return n}function o1(t,e){if(t==null)return{};var r,i,n=Nm(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zm(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jm(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zm(t)}function l1(t){var e=ku();return function(){var r,i=gn(t);if(e){var n=gn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return jm(this,r)}}function Au(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=gn(t))!==null;);return t}function Gm(){return(Gm=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=Au(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:r):n.value}}).apply(this,arguments)}function Cu(t,e,r,i){return(Cu=typeof Reflect<"u"&&Reflect.set?Reflect.set:function(n,s,a,o){var l,h=Au(n,s);if(h){if((l=Object.getOwnPropertyDescriptor(h,s)).set)return l.set.call(o,a),!0;if(!l.writable)return!1}if(l=Object.getOwnPropertyDescriptor(o,s)){if(!l.writable)return!1;l.value=a,Object.defineProperty(o,s,l)}else nl(o,s,a);return!0})(t,e,r,i)}function h1(t,e,r,i,n){if(!Cu(t,e,r,i||t)&&n)throw new Error("failed to set property");return r}function wi(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function c1(t,e){return e||(e=t.slice(0)),t.raw=e,t}function u1(t){throw new TypeError('"'+t+'" is read-only')}function p1(t){throw new TypeError('"'+t+'" is write-only')}function d1(t){throw new Error('Class "'+t+'" cannot be referenced in computed property keys.')}function Hm(){}function qm(t){throw new ReferenceError(t+" is not defined - temporal dead zone")}function f1(t,e){return t===Hm?qm(e):t}function m1(t,e){return sl(t)||Dm(t,e)||Di(t,e)||al()}function g1(t,e){return sl(t)||Fm(t,e)||Di(t,e)||al()}function Um(t){return sl(t)||Tu(t)||Di(t)||al()}function y1(t){return Wm(t)||Tu(t)||Di(t)||Zm()}function Wm(t){if(Array.isArray(t))return Fs(t)}function sl(t){if(Array.isArray(t))return t}function v1(t,e,r){if(e&&!Array.isArray(e)&&typeof e.length=="number"){var i=e.length;return Fs(e,r!==void 0&&r<i?r:i)}return t(e,r)}function Tu(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Di(t,e){if(t){if(typeof t=="string")return Fs(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fs(t,e):void 0}}function Fs(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function Zm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
28
|
+
`);this.config,this.messages=0}};ks=new WeakSet,Mc=function(){return this.messages===0},Es=new WeakSet,Dc=function(r){let i={example:r};this.dispatchEvent(new CustomEvent("mw-example-click",{detail:i}))},me(Ss,"properties",{config:{type:Object},messages:{type:Number}});customElements.define("mw-background",Ss);function pn(t){var e,r;function i(s,a){try{var o=t[s](a),l=o.value,h=l instanceof il;Promise.resolve(h?l.v:l).then(function(c){if(h){var u=s==="return"?"return":"next";if(!l.k||c.done)return i(u,c);c=t[u](c).value}n(o.done?"return":"normal",c)},function(c){i("throw",c)})}catch(c){n("throw",c)}}function n(s,a){switch(s){case"return":e.resolve({value:a,done:!0});break;case"throw":e.reject(a);break;default:e.resolve({value:a,done:!1})}(e=e.next)?i(e.key,e.arg):r=null}this._invoke=function(s,a){return new Promise(function(o,l){var h={key:s,arg:a,resolve:o,reject:l,next:null};r?r=r.next=h:(e=r=h,i(s,a))})},typeof t.return!="function"&&(this.return=void 0)}function il(t,e){this.v=t,this.k=e}function wu(t,e,r,i){return{getMetadata:function(n){qo(i,"getMetadata"),$c(n);var s=t[n];if(s!==void 0){if(e===1){var a=s.public;if(a!==void 0)return a[r]}else if(e===2){var o=s.private;if(o!==void 0)return o.get(r)}else if(Object.hasOwnProperty.call(s,"constructor"))return s.constructor}},setMetadata:function(n,s){qo(i,"setMetadata"),$c(n);var a=t[n];if(a===void 0&&(a=t[n]={}),e===1){var o=a.public;o===void 0&&(o=a.public={}),o[r]=s}else if(e===2){var l=a.priv;l===void 0&&(l=a.private=new Map),l.set(r,s)}else a.constructor=s}}}function Fc(t,e){var r=t[Symbol.metadata||Symbol.for("Symbol.metadata")],i=Object.getOwnPropertySymbols(e);if(i.length!==0){for(var n=0;n<i.length;n++){var s=i[n],a=e[s],o=r?r[s]:null,l=a.public,h=o?o.public:null;l&&h&&Object.setPrototypeOf(l,h);var c=a.private;if(c){var u=Array.from(c.values()),f=o?o.private:null;f&&(u=u.concat(f)),a.private=u}o&&Object.setPrototypeOf(a,o)}r&&Object.setPrototypeOf(e,r),t[Symbol.metadata||Symbol.for("Symbol.metadata")]=e}}function xu(t,e){return function(r){qo(e,"addInitializer"),dn(r,"An initializer"),t.push(r)}}function Oc(t,e,r,i,n,s,a,o,l){var h;switch(s){case 1:h="accessor";break;case 2:h="method";break;case 3:h="getter";break;case 4:h="setter";break;default:h="field"}var c,u,f={kind:h,name:o?"#"+e:e,isStatic:a,isPrivate:o},p={v:!1};if(s!==0&&(f.addInitializer=xu(n,p)),o){c=2,u=Symbol(e);var m={};s===0?(m.get=r.get,m.set=r.set):s===2?m.get=function(){return r.value}:(s!==1&&s!==3||(m.get=function(){return r.get.call(this)}),s!==1&&s!==4||(m.set=function(g){r.set.call(this,g)})),f.access=m}else c=1,u=e;try{return t(l,Object.assign(f,wu(i,c,u,p)))}finally{p.v=!0}}function qo(t,e){if(t.v)throw new Error("attempted to call "+e+" after decoration was finished")}function $c(t){if(typeof t!="symbol")throw new TypeError("Metadata keys must be symbols, received: "+t)}function dn(t,e){if(typeof t!="function")throw new TypeError(e+" must be a function")}function Uo(t,e){var r=typeof e;if(t===1){if(r!=="object"||e===null)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");e.get!==void 0&&dn(e.get,"accessor.get"),e.set!==void 0&&dn(e.set,"accessor.set"),e.init!==void 0&&dn(e.init,"accessor.init"),e.initializer!==void 0&&dn(e.initializer,"accessor.initializer")}else if(r!=="function")throw new TypeError((t===0?"field":t===10?"class":"method")+" decorators must return a function or void 0")}function Rc(t){var e;return(e=t.init)==null&&(e=t.initializer)&&typeof console<"u"&&console.warn(".initializer has been renamed to .init as of March 2022"),e}function Em(t,e,r,i,n,s,a,o,l){var h,c,u,f,p,m,g=r[0];if(a?h=n===0||n===1?{get:r[3],set:r[4]}:n===3?{get:r[3]}:n===4?{set:r[3]}:{value:r[3]}:n!==0&&(h=Object.getOwnPropertyDescriptor(e,i)),n===1?u={get:h.get,set:h.set}:n===2?u=h.value:n===3?u=h.get:n===4&&(u=h.set),typeof g=="function")(f=Oc(g,i,h,o,l,n,s,a,u))!==void 0&&(Uo(n,f),n===0?c=f:n===1?(c=Rc(f),p=f.get||u.get,m=f.set||u.set,u={get:p,set:m}):u=f);else for(var d=g.length-1;d>=0;d--){var y;(f=Oc(g[d],i,h,o,l,n,s,a,u))!==void 0&&(Uo(n,f),n===0?y=f:n===1?(y=Rc(f),p=f.get||u.get,m=f.set||u.set,u={get:p,set:m}):u=f,y!==void 0&&(c===void 0?c=y:typeof c=="function"?c=[c,y]:c.push(y)))}if(n===0||n===1){if(c===void 0)c=function(_,x){return x};else if(typeof c!="function"){var v=c;c=function(_,x){for(var T=x,S=0;S<v.length;S++)T=v[S].call(_,T);return T}}else{var b=c;c=function(_,x){return b.call(_,x)}}t.push(c)}n!==0&&(n===1?(h.get=u.get,h.set=u.set):n===2?h.value=u:n===3?h.get=u:n===4&&(h.set=u),a?n===1?(t.push(function(_,x){return u.get.call(_,x)}),t.push(function(_,x){return u.set.call(_,x)})):n===2?t.push(u):t.push(function(_,x){return u.call(_,x)}):Object.defineProperty(e,i,h))}function Pm(t,e,r,i,n){for(var s,a,o=new Map,l=new Map,h=0;h<n.length;h++){var c=n[h];if(Array.isArray(c)){var u,f,p,m=c[1],g=c[2],d=c.length>3,y=m>=5;if(y?(u=e,f=i,(m-=5)!=0&&(p=a=a||[])):(u=e.prototype,f=r,m!==0&&(p=s=s||[])),m!==0&&!d){var v=y?l:o,b=v.get(g)||0;if(b===!0||b===3&&m!==4||b===4&&m!==3)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+g);!b&&m>2?v.set(g,m):v.set(g,!0)}Em(t,u,c,g,m,y,d,f,p)}}Lc(t,s),Lc(t,a)}function Lc(t,e){e&&t.push(function(r){for(var i=0;i<e.length;i++)e[i].call(r);return r})}function Am(t,e,r,i){if(i.length>0){for(var n=[],s=e,a=e.name,o=i.length-1;o>=0;o--){var l={v:!1};try{var h=Object.assign({kind:"class",name:a,addInitializer:xu(n,l)},wu(r,0,a,l)),c=i[o](s,h)}finally{l.v=!0}c!==void 0&&(Uo(10,c),s=c)}t.push(s,function(){for(var u=0;u<n.length;u++)n[u].call(s)})}}function Vv(t,e,r){var i=[],n={},s={};return Pm(i,t,s,n,e),Fc(t.prototype,s),Am(i,t,n,r),Fc(t,n),i}function Su(t,e){return function(r){Cm(e,"addInitializer"),Cs(r,"An initializer"),t.push(r)}}function Bc(t,e,r,i,n,s,a,o){var l;switch(n){case 1:l="accessor";break;case 2:l="method";break;case 3:l="getter";break;case 4:l="setter";break;default:l="field"}var h,c,u={kind:l,name:a?"#"+e:e,static:s,private:a},f={v:!1};n!==0&&(u.addInitializer=Su(i,f)),n===0?a?(h=r.get,c=r.set):(h=function(){return this[e]},c=function(p){this[e]=p}):n===2?h=function(){return r.value}:(n!==1&&n!==3||(h=function(){return r.get.call(this)}),n!==1&&n!==4||(c=function(p){r.set.call(this,p)})),u.access=h&&c?{get:h,set:c}:h?{get:h}:{set:c};try{return t(o,u)}finally{f.v=!0}}function Cm(t,e){if(t.v)throw new Error("attempted to call "+e+" after decoration was finished")}function Cs(t,e){if(typeof t!="function")throw new TypeError(e+" must be a function")}function Wo(t,e){var r=typeof e;if(t===1){if(r!=="object"||e===null)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");e.get!==void 0&&Cs(e.get,"accessor.get"),e.set!==void 0&&Cs(e.set,"accessor.set"),e.init!==void 0&&Cs(e.init,"accessor.init")}else if(r!=="function")throw new TypeError((t===0?"field":t===10?"class":"method")+" decorators must return a function or void 0")}function Tm(t,e,r,i,n,s,a,o){var l,h,c,u,f,p,m=r[0];if(a?l=n===0||n===1?{get:r[3],set:r[4]}:n===3?{get:r[3]}:n===4?{set:r[3]}:{value:r[3]}:n!==0&&(l=Object.getOwnPropertyDescriptor(e,i)),n===1?c={get:l.get,set:l.set}:n===2?c=l.value:n===3?c=l.get:n===4&&(c=l.set),typeof m=="function")(u=Bc(m,i,l,o,n,s,a,c))!==void 0&&(Wo(n,u),n===0?h=u:n===1?(h=u.init,f=u.get||c.get,p=u.set||c.set,c={get:f,set:p}):c=u);else for(var g=m.length-1;g>=0;g--){var d;(u=Bc(m[g],i,l,o,n,s,a,c))!==void 0&&(Wo(n,u),n===0?d=u:n===1?(d=u.init,f=u.get||c.get,p=u.set||c.set,c={get:f,set:p}):c=u,d!==void 0&&(h===void 0?h=d:typeof h=="function"?h=[h,d]:h.push(d)))}if(n===0||n===1){if(h===void 0)h=function(b,_){return _};else if(typeof h!="function"){var y=h;h=function(b,_){for(var x=_,T=0;T<y.length;T++)x=y[T].call(b,x);return x}}else{var v=h;h=function(b,_){return v.call(b,_)}}t.push(h)}n!==0&&(n===1?(l.get=c.get,l.set=c.set):n===2?l.value=c:n===3?l.get=c:n===4&&(l.set=c),a?n===1?(t.push(function(b,_){return c.get.call(b,_)}),t.push(function(b,_){return c.set.call(b,_)})):n===2?t.push(c):t.push(function(b,_){return c.call(b,_)}):Object.defineProperty(e,i,l))}function Im(t,e,r){for(var i,n,s=new Map,a=new Map,o=0;o<r.length;o++){var l=r[o];if(Array.isArray(l)){var h,c,u=l[1],f=l[2],p=l.length>3,m=u>=5;if(m?(h=e,(u-=5)!=0&&(c=n=n||[])):(h=e.prototype,u!==0&&(c=i=i||[])),u!==0&&!p){var g=m?a:s,d=g.get(f)||0;if(d===!0||d===3&&u!==4||d===4&&u!==3)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+f);!d&&u>2?g.set(f,u):g.set(f,!0)}Tm(t,h,l,f,u,m,p,c)}}Vc(t,i),Vc(t,n)}function Vc(t,e){e&&t.push(function(r){for(var i=0;i<e.length;i++)e[i].call(r);return r})}function Mm(t,e,r){if(r.length>0){for(var i=[],n=e,s=e.name,a=r.length-1;a>=0;a--){var o={v:!1};try{var l=r[a](n,{kind:"class",name:s,addInitializer:Su(i,o)})}finally{o.v=!0}l!==void 0&&(Wo(10,l),n=l)}t.push(n,function(){for(var h=0;h<i.length;h++)i[h].call(n)})}}function Nv(t,e,r){var i=[];return Im(i,t,e),Mm(i,t,r),i}function zv(t){var e={},r=!1;function i(n,s){return r=!0,{done:!1,value:new il(s=new Promise(function(a){a(t[n](s))}),1)}}return e[typeof Symbol<"u"&&Symbol.iterator||"@@iterator"]=function(){return this},e.next=function(n){return r?(r=!1,n):i("next",n)},typeof t.throw=="function"&&(e.throw=function(n){if(r)throw r=!1,n;return i("throw",n)}),typeof t.return=="function"&&(e.return=function(n){return r?(r=!1,n):i("return",n)}),e}function jv(t){var e,r,i,n=2;for(typeof Symbol<"u"&&(r=Symbol.asyncIterator,i=Symbol.iterator);n--;){if(r&&(e=t[r])!=null)return e.call(t);if(i&&(e=t[i])!=null)return new Zo(e.call(t));r="@@asyncIterator",i="@@iterator"}throw new TypeError("Object is not async iterable")}function Zo(t){function e(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var i=r.done;return Promise.resolve(r.value).then(function(n){return{value:n,done:i}})}return(Zo=function(r){this.s=r,this.n=r.next}).prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(r){var i=this.s.return;return i===void 0?Promise.resolve({value:r,done:!0}):e(i.apply(this.s,arguments))},throw:function(r){var i=this.s.return;return i===void 0?Promise.reject(r):e(i.apply(this.s,arguments))}},new Zo(t)}function Gv(t){return new il(t,0)}function Hv(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(t!==null?typeof t:"null"));return t}function Dm(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,n,s,a,o=[],l=!0,h=!1;try{if(s=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=s.call(r)).done)&&(o.push(i.value),o.length!==e);l=!0);}catch(c){h=!0,n=c}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(h)throw n}}return o}}function Fm(t,e){var r=t&&(typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"]);if(r!=null){var i,n=[];for(r=r.call(t);t.length<e&&!(i=r.next()).done;)n.push(i.value);return n}}var $o;function qv(t,e,r,i){$o||($o=typeof Symbol=="function"&&Symbol.for&&Symbol.for("react.element")||60103);var n=t&&t.defaultProps,s=arguments.length-3;if(e||s===0||(e={children:void 0}),s===1)e.children=i;else if(s>1){for(var a=new Array(s),o=0;o<s;o++)a[o]=arguments[o+3];e.children=a}if(e&&n)for(var l in n)e[l]===void 0&&(e[l]=n[l]);else e||(e=n||{});return{$$typeof:$o,type:t,key:r===void 0?null:""+r,ref:null,props:e,_owner:null}}function Nc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Uv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nc(Object(r),!0).forEach(function(i){nl(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Om(){Om=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i=Object.defineProperty||function(P,A,E){P[A]=E.value},n=typeof Symbol=="function"?Symbol:{},s=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function l(P,A,E){return Object.defineProperty(P,A,{value:E,enumerable:!0,configurable:!0,writable:!0}),P[A]}try{l({},"")}catch{l=function(A,E,F){return A[E]=F}}function h(P,A,E,F){var O=A&&A.prototype instanceof f?A:f,D=Object.create(O.prototype),C=new M(F||[]);return i(D,"_invoke",{value:x(P,E,C)}),D}function c(P,A,E){try{return{type:"normal",arg:P.call(A,E)}}catch(F){return{type:"throw",arg:F}}}t.wrap=h;var u={};function f(){}function p(){}function m(){}var g={};l(g,s,function(){return this});var d=Object.getPrototypeOf,y=d&&d(d(k([])));y&&y!==e&&r.call(y,s)&&(g=y);var v=m.prototype=f.prototype=Object.create(g);function b(P){["next","throw","return"].forEach(function(A){l(P,A,function(E){return this._invoke(A,E)})})}function _(P,A){var E;i(this,"_invoke",{value:function(F,O){function D(){return new A(function(C,$){(function L(q,U,J,G){var re=c(P[q],P,U);if(re.type!=="throw"){var se=re.arg,ie=se.value;return ie&&typeof ie=="object"&&r.call(ie,"__await")?A.resolve(ie.__await).then(function(ee){L("next",ee,J,G)},function(ee){L("throw",ee,J,G)}):A.resolve(ie).then(function(ee){se.value=ee,J(se)},function(ee){return L("throw",ee,J,G)})}G(re.arg)})(F,O,C,$)})}return E=E?E.then(D,D):D()}})}function x(P,A,E){var F="suspendedStart";return function(O,D){if(F==="executing")throw new Error("Generator is already running");if(F==="completed"){if(O==="throw")throw D;return I()}for(E.method=O,E.arg=D;;){var C=E.delegate;if(C){var $=T(C,E);if($){if($===u)continue;return $}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(F==="suspendedStart")throw F="completed",E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);F="executing";var L=c(P,A,E);if(L.type==="normal"){if(F=E.done?"completed":"suspendedYield",L.arg===u)continue;return{value:L.arg,done:E.done}}L.type==="throw"&&(F="completed",E.method="throw",E.arg=L.arg)}}}function T(P,A){var E=A.method,F=P.iterator[E];if(F===void 0)return A.delegate=null,E==="throw"&&P.iterator.return&&(A.method="return",A.arg=void 0,T(P,A),A.method==="throw")||E!=="return"&&(A.method="throw",A.arg=new TypeError("The iterator does not provide a '"+E+"' method")),u;var O=c(F,P.iterator,A.arg);if(O.type==="throw")return A.method="throw",A.arg=O.arg,A.delegate=null,u;var D=O.arg;return D?D.done?(A[P.resultName]=D.value,A.next=P.nextLoc,A.method!=="return"&&(A.method="next",A.arg=void 0),A.delegate=null,u):D:(A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,u)}function S(P){var A={tryLoc:P[0]};1 in P&&(A.catchLoc=P[1]),2 in P&&(A.finallyLoc=P[2],A.afterLoc=P[3]),this.tryEntries.push(A)}function w(P){var A=P.completion||{};A.type="normal",delete A.arg,P.completion=A}function M(P){this.tryEntries=[{tryLoc:"root"}],P.forEach(S,this),this.reset(!0)}function k(P){if(P){var A=P[s];if(A)return A.call(P);if(typeof P.next=="function")return P;if(!isNaN(P.length)){var E=-1,F=function O(){for(;++E<P.length;)if(r.call(P,E))return O.value=P[E],O.done=!1,O;return O.value=void 0,O.done=!0,O};return F.next=F}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=m,i(v,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:p,configurable:!0}),p.displayName=l(m,o,"GeneratorFunction"),t.isGeneratorFunction=function(P){var A=typeof P=="function"&&P.constructor;return!!A&&(A===p||(A.displayName||A.name)==="GeneratorFunction")},t.mark=function(P){return Object.setPrototypeOf?Object.setPrototypeOf(P,m):(P.__proto__=m,l(P,o,"GeneratorFunction")),P.prototype=Object.create(v),P},t.awrap=function(P){return{__await:P}},b(_.prototype),l(_.prototype,a,function(){return this}),t.AsyncIterator=_,t.async=function(P,A,E,F,O){O===void 0&&(O=Promise);var D=new _(h(P,A,E,F),O);return t.isGeneratorFunction(A)?D:D.next().then(function(C){return C.done?C.value:D.next()})},b(v),l(v,o,"Generator"),l(v,s,function(){return this}),l(v,"toString",function(){return"[object Generator]"}),t.keys=function(P){var A=Object(P),E=[];for(var F in A)E.push(F);return E.reverse(),function O(){for(;E.length;){var D=E.pop();if(D in A)return O.value=D,O.done=!1,O}return O.done=!0,O}},t.values=k,M.prototype={constructor:M,reset:function(P){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!P)for(var A in this)A.charAt(0)==="t"&&r.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=void 0)},stop:function(){this.done=!0;var P=this.tryEntries[0].completion;if(P.type==="throw")throw P.arg;return this.rval},dispatchException:function(P){if(this.done)throw P;var A=this;function E(L,q){return D.type="throw",D.arg=P,A.next=L,q&&(A.method="next",A.arg=void 0),!!q}for(var F=this.tryEntries.length-1;F>=0;--F){var O=this.tryEntries[F],D=O.completion;if(O.tryLoc==="root")return E("end");if(O.tryLoc<=this.prev){var C=r.call(O,"catchLoc"),$=r.call(O,"finallyLoc");if(C&&$){if(this.prev<O.catchLoc)return E(O.catchLoc,!0);if(this.prev<O.finallyLoc)return E(O.finallyLoc)}else if(C){if(this.prev<O.catchLoc)return E(O.catchLoc,!0)}else{if(!$)throw new Error("try statement without catch or finally");if(this.prev<O.finallyLoc)return E(O.finallyLoc)}}}},abrupt:function(P,A){for(var E=this.tryEntries.length-1;E>=0;--E){var F=this.tryEntries[E];if(F.tryLoc<=this.prev&&r.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var O=F;break}}O&&(P==="break"||P==="continue")&&O.tryLoc<=A&&A<=O.finallyLoc&&(O=null);var D=O?O.completion:{};return D.type=P,D.arg=A,O?(this.method="next",this.next=O.finallyLoc,u):this.complete(D)},complete:function(P,A){if(P.type==="throw")throw P.arg;return P.type==="break"||P.type==="continue"?this.next=P.arg:P.type==="return"?(this.rval=this.arg=P.arg,this.method="return",this.next="end"):P.type==="normal"&&A&&(this.next=A),u},finish:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var E=this.tryEntries[A];if(E.finallyLoc===P)return this.complete(E.completion,E.afterLoc),w(E),u}},catch:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var E=this.tryEntries[A];if(E.tryLoc===P){var F=E.completion;if(F.type==="throw"){var O=F.arg;w(E)}return O}}throw new Error("illegal catch attempt")},delegateYield:function(P,A,E){return this.delegate={iterator:k(P),resultName:A,nextLoc:E},this.method==="next"&&(this.arg=void 0),u}},t}function $m(t){return($m=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})(t)}function zc(){zc=function(n,s){return new r(n,void 0,s)};var t=RegExp.prototype,e=new WeakMap;function r(n,s,a){var o=new RegExp(n,s);return e.set(o,a||e.get(n)),Mi(o,r.prototype)}function i(n,s){var a=e.get(s);return Object.keys(a).reduce(function(o,l){var h=a[l];if(typeof h=="number")o[l]=n[h];else{for(var c=0;n[h[c]]===void 0&&c+1<h.length;)c++;o[l]=n[h[c]]}return o},Object.create(null))}return Lm(r,RegExp),r.prototype.exec=function(n){var s=t.exec.call(this,n);if(s){s.groups=i(s,this);var a=s.indices;a&&(a.groups=i(a,this))}return s},r.prototype[Symbol.replace]=function(n,s){if(typeof s=="string"){var a=e.get(this);return t[Symbol.replace].call(this,n,s.replace(/\$<([^>]+)>/g,function(l,h){var c=a[h];return"$"+(Array.isArray(c)?c.join("$"):c)}))}if(typeof s=="function"){var o=this;return t[Symbol.replace].call(this,n,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l)).push(i(l,o)),s.apply(this,l)})}return t[Symbol.replace].call(this,n,s)},zc.apply(this,arguments)}function Wv(t){this.wrapped=t}function Zv(t){return function(){return new pn(t.apply(this,arguments))}}function jc(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(h){return void r(h)}o.done?e(l):Promise.resolve(l).then(i,n)}function Yv(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){jc(s,i,n,a,o,"next",l)}function o(l){jc(s,i,n,a,o,"throw",l)}a(void 0)})}}function Jv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ys(i.key),i)}}function Xv(t,e,r){return e&&Gc(t.prototype,e),r&&Gc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kv(t,e){for(var r in e)(s=e[r]).configurable=s.enumerable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,r,s);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),n=0;n<i.length;n++){var s,a=i[n];(s=e[a]).configurable=s.enumerable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,a,s)}return t}function Qv(t,e){for(var r=Object.getOwnPropertyNames(e),i=0;i<r.length;i++){var n=r[i],s=Object.getOwnPropertyDescriptor(e,n);s&&s.configurable&&t[n]===void 0&&Object.defineProperty(t,n,s)}return t}function nl(t,e,r){return(e=Ys(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rm(){return(Rm=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}).apply(this,arguments)}function e1(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&i.push.apply(i,Object.getOwnPropertySymbols(r).filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),i.forEach(function(n){nl(t,n,r[n])})}return t}function Lm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mi(t,e)}function t1(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Mi(t,e)}function gn(t){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function Mi(t,e){return(Mi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r})(t,e)}function ku(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Eu(t,e,r){return(Eu=ku()?Reflect.construct.bind():function(i,n,s){var a=[null];a.push.apply(a,n);var o=new(Function.bind.apply(i,a));return s&&Mi(o,s.prototype),o}).apply(null,arguments)}function Bm(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Vm(t){var e=typeof Map=="function"?new Map:void 0;return(Vm=function(r){if(r===null||!Bm(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return Eu(r,arguments,gn(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Mi(i,r)})(t)}function r1(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function i1(t){return t&&t.__esModule?t:{default:t}}function Pu(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(Pu=function(i){return i?r:e})(t)}function n1(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=Pu(e);if(r&&r.has(t))return r.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=n?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function s1(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function a1(t){if(t==null)throw new TypeError("Cannot destructure "+t)}function Nm(t,e){if(t==null)return{};var r,i,n={},s=Object.keys(t);for(i=0;i<s.length;i++)r=s[i],e.indexOf(r)>=0||(n[r]=t[r]);return n}function o1(t,e){if(t==null)return{};var r,i,n=Nm(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zm(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jm(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zm(t)}function l1(t){var e=ku();return function(){var r,i=gn(t);if(e){var n=gn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return jm(this,r)}}function Au(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=gn(t))!==null;);return t}function Gm(){return(Gm=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=Au(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:r):n.value}}).apply(this,arguments)}function Cu(t,e,r,i){return(Cu=typeof Reflect<"u"&&Reflect.set?Reflect.set:function(n,s,a,o){var l,h=Au(n,s);if(h){if((l=Object.getOwnPropertyDescriptor(h,s)).set)return l.set.call(o,a),!0;if(!l.writable)return!1}if(l=Object.getOwnPropertyDescriptor(o,s)){if(!l.writable)return!1;l.value=a,Object.defineProperty(o,s,l)}else nl(o,s,a);return!0})(t,e,r,i)}function h1(t,e,r,i,n){if(!Cu(t,e,r,i||t)&&n)throw new Error("failed to set property");return r}function wi(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function c1(t,e){return e||(e=t.slice(0)),t.raw=e,t}function u1(t){throw new TypeError('"'+t+'" is read-only')}function p1(t){throw new TypeError('"'+t+'" is write-only')}function d1(t){throw new Error('Class "'+t+'" cannot be referenced in computed property keys.')}function Hm(){}function qm(t){throw new ReferenceError(t+" is not defined - temporal dead zone")}function f1(t,e){return t===Hm?qm(e):t}function m1(t,e){return sl(t)||Dm(t,e)||Di(t,e)||al()}function g1(t,e){return sl(t)||Fm(t,e)||Di(t,e)||al()}function Um(t){return sl(t)||Tu(t)||Di(t)||al()}function y1(t){return Wm(t)||Tu(t)||Di(t)||Zm()}function Wm(t){if(Array.isArray(t))return Fs(t)}function sl(t){if(Array.isArray(t))return t}function v1(t,e,r){if(e&&!Array.isArray(e)&&typeof e.length=="number"){var i=e.length;return Fs(e,r!==void 0&&r<i?r:i)}return t(e,r)}function Tu(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Di(t,e){if(t){if(typeof t=="string")return Fs(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fs(t,e):void 0}}function Fs(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function Zm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
29
29
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function al(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
30
30
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b1(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Di(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
31
31
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{a||r.return==null||r.return()}finally{if(o)throw s}}}}function _1(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=Di(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
@@ -192,7 +192,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
192
192
|
height: 100%;
|
|
193
193
|
align-items: center;
|
|
194
194
|
}
|
|
195
|
-
`]))),au={},vg=function(t,e,r,i,n){var s=new Worker(au[e]||(au[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return s.onmessage=function(a){var o=a.data,l=o.$e$;if(l){var h=new Error(l[0]);h.code=l[1],h.stack=l[2],n(h,null)}else n(null,o)},s.postMessage(r,i),s},de=Uint8Array,Xe=Uint16Array,Oi=Uint32Array,$i=new de([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]),Ri=new de([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]),_n=new de([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ju=function(t,e){for(var r=new Xe(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Oi(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return[r,n]},Gu=ju($i,2),pl=Gu[0],Gs=Gu[1];pl[28]=258,Gs[258]=28;for(jo=ju(Ri,0),dl=jo[0],Hs=jo[1],Ti=new Xe(32768),_e=0;_e<32768;++_e)Qt=(43690&_e)>>>1|(21845&_e)<<1,Qt=(52428&Qt)>>>2|(13107&Qt)<<2,Qt=(61680&Qt)>>>4|(3855&Qt)<<4,Ti[_e]=((65280&Qt)>>>8|(255&Qt)<<8)>>>1;var Qt,jo,dl,Hs,Ti,_e;for(_t=function(e,r,i){for(var n=e.length,s=0,a=new Xe(r);s<n;++s)e[s]&&++a[e[s]-1];var o,l=new Xe(r);for(s=0;s<r;++s)l[s]=l[s-1]+a[s-1]<<1;if(i){o=new Xe(1<<r);var h=15-r;for(s=0;s<n;++s)if(e[s])for(var c=s<<4|e[s],u=r-e[s],f=l[e[s]-1]++<<u,p=f|(1<<u)-1;f<=p;++f)o[Ti[f]>>>h]=c}else for(o=new Xe(n),s=0;s<n;++s)e[s]&&(o[s]=Ti[l[e[s]-1]++]>>>15-e[s]);return o},jt=new de(288),_e=0;_e<144;++_e)jt[_e]=8;var _t,jt,_e;for(_e=144;_e<256;++_e)jt[_e]=9;var _e;for(_e=256;_e<280;++_e)jt[_e]=7;var _e;for(_e=280;_e<288;++_e)jt[_e]=8;var _e;for(Yr=new de(32),_e=0;_e<32;++_e)Yr[_e]=5;var Yr,_e,Hu=_t(jt,9,0),qu=_t(jt,9,1),Uu=_t(Yr,5,0),Wu=_t(Yr,5,1),Is=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},Tt=function(t,e,r){var i=e/8|0;return(t[i]|t[i+1]<<8)>>(7&e)&r},Ms=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&e)},wn=function(t){return(t+7)/8|0},It=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new(t.BYTES_PER_ELEMENT==2?Xe:t.BYTES_PER_ELEMENT==4?Oi:de)(r-e);return i.set(t.subarray(e,r)),i},_b={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Zu=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Q=function(t,e,r){var i=new Error(e||Zu[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,Q),!r)throw i;return i},xn=function(t,e,r){var i=t.length;if(!i||r&&r.f&&!r.l)return e||new de(0);var n=!e||r,s=!r||r.i;r||(r={}),e||(e=new de(3*i));var a=function(se){var ie=e.length;if(se>ie){var ee=new de(Math.max(2*ie,se));ee.set(e),e=ee}},o=r.f||0,l=r.p||0,h=r.b||0,c=r.l,u=r.d,f=r.m,p=r.n,m=8*i;do{if(!c){o=Tt(t,l,1);var g=Tt(t,l+1,3);if(l+=3,!g){var d=t[(I=wn(l)+4)-4]|t[I-3]<<8,y=I+d;if(y>i){s&&Q(0);break}n&&a(h+d),e.set(t.subarray(I,y),h),r.b=h+=d,r.p=l=8*y,r.f=o;continue}if(g==1)c=qu,u=Wu,f=9,p=5;else if(g==2){var v=Tt(t,l,31)+257,b=Tt(t,l+10,15)+4,_=v+Tt(t,l+5,31)+1;l+=14;for(var x=new de(_),T=new de(19),S=0;S<b;++S)T[_n[S]]=Tt(t,l+3*S,7);l+=3*b;var w=Is(T),M=(1<<w)-1,k=_t(T,w,1);for(S=0;S<_;){var I,P=k[Tt(t,l,M)];if(l+=15&P,(I=P>>>4)<16)x[S++]=I;else{var A=0,E=0;for(I==16?(E=3+Tt(t,l,3),l+=2,A=x[S-1]):I==17?(E=3+Tt(t,l,7),l+=3):I==18&&(E=11+Tt(t,l,127),l+=7);E--;)x[S++]=A}}var F=x.subarray(0,v),O=x.subarray(v);f=Is(F),p=Is(O),c=_t(F,f,1),u=_t(O,p,1)}else Q(1);if(l>m){s&&Q(0);break}}n&&a(h+131072);for(var D=(1<<f)-1,C=(1<<p)-1,$=l;;$=l){var L=(A=c[Ms(t,l)&D])>>>4;if((l+=15&A)>m){s&&Q(0);break}if(A||Q(2),L<256)e[h++]=L;else{if(L==256){$=l,c=null;break}var q=L-254;if(L>264){var U=$i[S=L-257];q=Tt(t,l,(1<<U)-1)+pl[S],l+=U}var J=u[Ms(t,l)&C],G=J>>>4;if(J||Q(3),l+=15&J,O=dl[G],G>3&&(U=Ri[G],O+=Ms(t,l)&(1<<U)-1,l+=U),l>m){s&&Q(0);break}n&&a(h+131072);for(var re=h+q;h<re;h+=4)e[h]=e[h-O],e[h+1]=e[h+1-O],e[h+2]=e[h+2-O],e[h+3]=e[h+3-O];h=re}}r.l=c,r.p=$,r.b=h,r.f=o,c&&(o=1,r.m=f,r.d=u,r.n=p)}while(!o);return h==e.length?e:It(e,0,h)},zt=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>>8},xi=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},Ds=function(t,e){for(var r=[],i=0;i<t.length;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[ir,0];if(n==1){var a=new de(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort(function(x,T){return x.f-T.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],h=0,c=1,u=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=n-1;)o=r[r[h].f<r[u].f?h++:u++],l=r[h!=c&&r[h].f<r[u].f?h++:u++],r[c++]={s:-1,f:o.f+l.f,l:o,r:l};var f=s[0].s;for(i=1;i<n;++i)s[i].s>f&&(f=s[i].s);var p=new Xe(f+1),m=qs(r[c-1],p,0);if(m>e){i=0;var g=0,d=m-e,y=1<<d;for(s.sort(function(x,T){return p[T.s]-p[x.s]||x.f-T.f});i<n;++i){var v=s[i].s;if(!(p[v]>e))break;g+=y-(1<<m-p[v]),p[v]=e}for(g>>>=d;g>0;){var b=s[i].s;p[b]<e?g-=1<<e-p[b]++-1:++i}for(;i>=0&&g;--i){var _=s[i].s;p[_]==e&&(--p[_],++g)}m=e}return[new de(p),m]},qs=function(t,e,r){return t.s==-1?Math.max(qs(t.l,e,r+1),qs(t.r,e,r+1)):e[t.s]=r},Jo=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Xe(++e),i=0,n=t[0],s=1,a=function(l){r[i++]=l},o=1;o<=e;++o)if(t[o]==n&&o!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(n),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(n);s=1,n=t[o]}return[r.subarray(0,i),e]},Si=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},Us=function(t,e,r){var i=r.length,n=wn(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<i;++s)t[n+s+4]=r[s];return 8*(n+4+i)},Xo=function(t,e,r,i,n,s,a,o,l,h,c){zt(e,c++,r),++n[256];for(var u=Ds(n,15),f=u[0],p=u[1],m=Ds(s,15),g=m[0],d=m[1],y=Jo(f),v=y[0],b=y[1],_=Jo(g),x=_[0],T=_[1],S=new Xe(19),w=0;w<v.length;++w)S[31&v[w]]++;for(w=0;w<x.length;++w)S[31&x[w]]++;for(var M=Ds(S,7),k=M[0],I=M[1],P=19;P>4&&!k[_n[P-1]];--P);var A,E,F,O,D=h+5<<3,C=Si(n,jt)+Si(s,Yr)+a,$=Si(n,f)+Si(s,g)+a+14+3*P+Si(S,k)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return Us(e,c,t.subarray(l,l+h));if(zt(e,c,1+($<C)),c+=2,$<C){A=_t(f,p,0),E=f,F=_t(g,d,0),O=g;var L=_t(k,I,0);for(zt(e,c,b-257),zt(e,c+5,T-1),zt(e,c+10,P-4),c+=14,w=0;w<P;++w)zt(e,c+3*w,k[_n[w]]);c+=3*P;for(var q=[v,x],U=0;U<2;++U){var J=q[U];for(w=0;w<J.length;++w){var G=31&J[w];zt(e,c,L[G]),c+=k[G],G>15&&(zt(e,c,J[w]>>>5&127),c+=J[w]>>>12)}}}else A=Hu,E=jt,F=Uu,O=Yr;for(w=0;w<o;++w)if(i[w]>255){G=i[w]>>>18&31,xi(e,c,A[G+257]),c+=E[G+257],G>7&&(zt(e,c,i[w]>>>23&31),c+=$i[G]);var re=31&i[w];xi(e,c,F[re]),c+=O[re],re>3&&(xi(e,c,i[w]>>>5&8191),c+=Ri[re])}else xi(e,c,A[i[w]]),c+=E[i[w]];return xi(e,c,A[256]),c+E[256]},Yu=new Oi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ir=new de(0),Ju=function(t,e,r,i,n,s){var a=t.length,o=new de(i+a+5*(1+Math.ceil(a/7e3))+n),l=o.subarray(i,o.length-n),h=0;if(!e||a<8)for(var c=0;c<=a;c+=65535){var u=c+65535;u>=a&&(l[h>>3]=s),h=Us(l,h+1,t.subarray(c,u))}else{for(var f=Yu[e-1],p=f>>>13,m=8191&f,g=(1<<r)-1,d=new Xe(32768),y=new Xe(g+1),v=Math.ceil(r/3),b=2*v,_=function(ke){return(t[ke]^t[ke+1]<<v^t[ke+2]<<b)&g},x=new Oi(25e3),T=new Xe(288),S=new Xe(32),w=0,M=0,k=(c=0,0),I=0,P=0;c<a;++c){var A=_(c),E=32767&c,F=y[A];if(d[E]=F,y[A]=E,I<=c){var O=a-c;if((w>7e3||k>24576)&&O>423){h=Xo(t,l,0,x,T,S,M,k,P,c-P,h),k=w=M=0,P=c;for(var D=0;D<286;++D)T[D]=0;for(D=0;D<30;++D)S[D]=0}var C=2,$=0,L=m,q=E-F&32767;if(O>2&&A==_(c-q))for(var U=Math.min(p,O)-1,J=Math.min(32767,c),G=Math.min(258,O);q<=J&&--L&&E!=F;){if(t[c+C]==t[c+C-q]){for(var re=0;re<G&&t[c+re]==t[c+re-q];++re);if(re>C){if(C=re,$=q,re>U)break;var se=Math.min(q,re-2),ie=0;for(D=0;D<se;++D){var ee=c-q+D+32768&32767,Se=ee-d[ee]+32768&32767;Se>ie&&(ie=Se,F=ee)}}}q+=(E=F)-(F=d[E])+32768&32767}if($){x[k++]=268435456|Gs[C]<<18|Hs[$];var ue=31&Gs[C],Ie=31&Hs[$];M+=$i[ue]+Ri[Ie],++T[257+ue],++S[Ie],I=c+C,++w}else x[k++]=t[c],++T[t[c]]}}h=Xo(t,l,s,x,T,S,M,k,P,c-P,h),!s&&7&h&&(h=Us(l,h+1,ir))}return It(o,0,i+wn(h)+n)},Xu=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&-306674912)^r>>>1;t[e]=r}return t}(),Li=function(){var t=-1;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=Xu[255&r^e[i]]^r>>>8;t=r},d:function(){return~t}}},fl=function(){var t=1,e=0;return{p:function(r){for(var i=t,n=e,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)n+=i+=r[a];i=(65535&i)+15*(i>>16),n=(65535&n)+15*(n>>16)}t=i,e=n},d:function(){return(255&(t%=65521))<<24|t>>>8<<16|(255&(e%=65521))<<8|e>>>8}}},Xr=function(t,e,r,i,n){return Ju(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!n)},Sn=function(t,e){var r={};for(var i in t)r[i]=t[i];for(var i in e)r[i]=e[i];return r},ou=function(t,e,r){for(var i=t(),n=t.toString(),s=n.slice(n.indexOf("[")+1,n.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<i.length;++a){var o=i[a],l=s[a];if(typeof o=="function"){e+=";"+l+"=";var h=o.toString();if(o.prototype)if(h.indexOf("[native code]")!=-1){var c=h.indexOf(" ",8)+1;e+=h.slice(c,h.indexOf("(",c))}else for(var u in e+=h,o.prototype)e+=";"+l+".prototype."+u+"="+o.prototype[u].toString();else e+=h}else r[l]=o}return[e,r]},As=[],bg=function(t){var e=[];for(var r in t)t[r].buffer&&e.push((t[r]=new t[r].constructor(t[r])).buffer);return e},Ku=function(t,e,r,i){var n;if(!As[r]){for(var s="",a={},o=t.length-1,l=0;l<o;++l)s=(n=ou(t[l],s,a))[0],a=n[1];As[r]=ou(t[o],s,a)}var h=Sn({},As[r][1]);return vg(As[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",r,h,bg(h),i)},Bi=function(){return[de,Xe,Oi,$i,Ri,_n,pl,dl,qu,Wu,Ti,Zu,_t,Is,Tt,Ms,wn,It,Q,xn,kn,vr,ml]},Vi=function(){return[de,Xe,Oi,$i,Ri,_n,Gs,Hs,Hu,jt,Uu,Yr,Ti,Yu,ir,_t,zt,xi,Ds,qs,Jo,Si,Us,Xo,wn,It,Ju,Xr,Xs,vr]},Qu=function(){return[gl,vl,xe,Li,Xu]},ep=function(){return[yl,ip]},tp=function(){return[bl,xe,fl]},rp=function(){return[np]},vr=function(t){return postMessage(t,[t.buffer])},ml=function(t){return t&&t.size&&new de(t.size)},Ni=function(t,e,r,i,n,s){var a=Ku(r,i,n,function(o,l){a.terminate(),s(o,l)});return a.postMessage([t,e],e.consume?[t.buffer]:[]),function(){a.terminate()}},Mt=function(t){return t.ondata=function(e,r){return postMessage([e,r],[e.buffer])},function(e){return t.push(e.data[0],e.data[1])}},zi=function(t,e,r,i,n){var s,a=Ku(t,i,n,function(o,l){o?(a.terminate(),e.ondata.call(e,o)):(l[1]&&a.terminate(),e.ondata.call(e,o,l[0],l[1]))});a.postMessage(r),e.push=function(o,l){e.ondata||Q(5),s&&e.ondata(Q(4,0,1),null,!!l),a.postMessage([o,s=l],[o.buffer])},e.terminate=function(){a.terminate()}},it=function(t,e){return t[e]|t[e+1]<<8},Fe=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},Go=function(t,e){return Fe(t,e)+4294967296*Fe(t,e+4)},xe=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},gl=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&xe(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},yl=function(t){t[0]==31&&t[1]==139&&t[2]==8||Q(6,"invalid gzip data");var e=t[3],r=10;4&e&&(r+=t[10]|2+(t[11]<<8));for(var i=(e>>3&1)+(e>>4&1);i>0;i-=!t[r++]);return r+(2&e)},ip=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},vl=function(t){return 10+(t.filename&&t.filename.length+1||0)},bl=function(t,e){var r=e.level,i=r==0?0:r<6?1:r==9?3:2;t[0]=120,t[1]=i<<6|(i?32-2*i:1)},np=function(t){((15&t[0])!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&Q(6,"invalid zlib data"),32&t[1]&&Q(6,"invalid zlib data: preset dictionaries not supported")};function _l(t,e){return e||typeof t!="function"||(e=t,t={}),this.ondata=e,t}var nr=function(){function t(e,r){r||typeof e!="function"||(r=e,e={}),this.ondata=r,this.o=e||{}}return t.prototype.p=function(e,r){this.ondata(Xr(e,this.o,0,0,!r),r)},t.prototype.push=function(e,r){this.ondata||Q(5),this.d&&Q(4),this.d=r,this.p(e,r||!1)},t}(),_g=function(){return function(t,e){zi([Vi,function(){return[Mt,nr]}],this,_l.call(this,t,e),function(r){var i=new nr(r.data);onmessage=Mt(i)},6)}}();function wg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Vi],function(i){return vr(Xs(i.data[0],i.data[1]))},0,r)}function Xs(t,e){return Xr(t,e||{},0,0)}var wt=function(){function t(e){this.s={},this.p=new de(0),this.ondata=e}return t.prototype.e=function(e){this.ondata||Q(5),this.d&&Q(4);var r=this.p.length,i=new de(r+e.length);i.set(this.p),i.set(e,r),this.p=i},t.prototype.c=function(e){this.d=this.s.i=e||!1;var r=this.s.b,i=xn(this.p,this.o,this.s);this.ondata(It(i,r,this.s.b),this.d),this.o=It(i,this.s.b-32768),this.s.b=this.o.length,this.p=It(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(e,r){this.e(e),this.c(r)},t}(),sp=function(){return function(t){this.ondata=t,zi([Bi,function(){return[Mt,wt]}],this,0,function(){var e=new wt;onmessage=Mt(e)},7)}}();function ap(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Bi],function(i){return vr(kn(i.data[0],ml(i.data[1])))},1,r)}function kn(t,e){return xn(t,e)}var lu=function(){function t(e,r){this.c=Li(),this.l=0,this.v=1,nr.call(this,e,r)}return t.prototype.push=function(e,r){nr.prototype.push.call(this,e,r)},t.prototype.p=function(e,r){this.c.p(e),this.l+=e.length;var i=Xr(e,this.o,this.v&&vl(this.o),r&&8,!r);this.v&&(gl(i,this.o),this.v=0),r&&(xe(i,i.length-8,this.c.d()),xe(i,i.length-4,this.l)),this.ondata(i,r)},t}(),wb=function(){return function(t,e){zi([Vi,Qu,function(){return[Mt,nr,lu]}],this,_l.call(this,t,e),function(r){var i=new lu(r.data);onmessage=Mt(i)},8)}}();function xb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Vi,Qu,function(){return[hu]}],function(i){return vr(hu(i.data[0],i.data[1]))},2,r)}function hu(t,e){e||(e={});var r=Li(),i=t.length;r.p(t);var n=Xr(t,e,vl(e),8),s=n.length;return gl(n,e),xe(n,s-8,r.d()),xe(n,s-4,i),n}var Ko=function(){function t(e){this.v=1,wt.call(this,e)}return t.prototype.push=function(e,r){if(wt.prototype.e.call(this,e),this.v){var i=this.p.length>3?yl(this.p):4;if(i>=this.p.length&&!r)return;this.p=this.p.subarray(i),this.v=0}r&&(this.p.length<8&&Q(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),wt.prototype.c.call(this,r)},t}(),xg=function(){return function(t){this.ondata=t,zi([Bi,ep,function(){return[Mt,wt,Ko]}],this,0,function(){var e=new Ko;onmessage=Mt(e)},9)}}();function Sg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Bi,ep,function(){return[Qo]}],function(i){return vr(Qo(i.data[0]))},3,r)}function Qo(t,e){return xn(t.subarray(yl(t),-8),e||new de(ip(t)))}var cu=function(){function t(e,r){this.c=fl(),this.v=1,nr.call(this,e,r)}return t.prototype.push=function(e,r){nr.prototype.push.call(this,e,r)},t.prototype.p=function(e,r){this.c.p(e);var i=Xr(e,this.o,this.v&&2,r&&4,!r);this.v&&(bl(i,this.o),this.v=0),r&&xe(i,i.length-4,this.c.d()),this.ondata(i,r)},t}(),Sb=function(){return function(t,e){zi([Vi,tp,function(){return[Mt,nr,cu]}],this,_l.call(this,t,e),function(r){var i=new cu(r.data);onmessage=Mt(i)},10)}}();function kb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Vi,tp,function(){return[uu]}],function(i){return vr(uu(i.data[0],i.data[1]))},4,r)}function uu(t,e){e||(e={});var r=fl();r.p(t);var i=Xr(t,e,2,4);return bl(i,e),xe(i,i.length-4,r.d()),i}var el=function(){function t(e){this.v=1,wt.call(this,e)}return t.prototype.push=function(e,r){if(wt.prototype.e.call(this,e),this.v){if(this.p.length<2&&!r)return;this.p=this.p.subarray(2),this.v=0}r&&(this.p.length<4&&Q(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),wt.prototype.c.call(this,r)},t}(),kg=function(){return function(t){this.ondata=t,zi([Bi,rp,function(){return[Mt,wt,el]}],this,0,function(){var e=new el;onmessage=Mt(e)},11)}}();function Eg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Bi,rp,function(){return[tl]}],function(i){return vr(tl(i.data[0],ml(i.data[1])))},5,r)}function tl(t,e){return xn((np(t),t.subarray(2,-4)),e)}var Pg=function(){function t(e){this.G=Ko,this.I=wt,this.Z=el,this.ondata=e}return t.prototype.push=function(e,r){if(this.ondata||Q(5),this.s)this.s.push(e,r);else{if(this.p&&this.p.length){var i=new de(this.p.length+e.length);i.set(this.p),i.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var n=this,s=function(){n.ondata.apply(n,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(s):(15&this.p[0])!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(s):new this.Z(s),this.s.push(this.p,r),this.p=null}}},t}(),Eb=function(){function t(e){this.G=xg,this.I=sp,this.Z=kg,this.ondata=e}return t.prototype.push=function(e,r){Pg.prototype.push.call(this,e,r)},t}();function Pb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),t[0]==31&&t[1]==139&&t[2]==8?Sg(t,e,r):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?ap(t,e,r):Eg(t,e,r)}function Ab(t,e){return t[0]==31&&t[1]==139&&t[2]==8?Qo(t,e):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?kn(t,e):tl(t,e)}var wl=function(t,e,r,i){for(var n in t){var s=t[n],a=e+n,o=i;Array.isArray(s)&&(o=Sn(i,s[1]),s=s[0]),s instanceof de?r[a]=[s,o]:(r[a+="/"]=[new de(0),o],wl(s,a,r,i))}},pu=typeof TextEncoder<"u"&&new TextEncoder,rl=typeof TextDecoder<"u"&&new TextDecoder,op=0;try{rl.decode(ir,{stream:!0}),op=1}catch(t){}var lp=function(t){for(var e="",r=0;;){var i=t[r++],n=(i>127)+(i>223)+(i>239);if(r+n>t.length)return[e,It(t,r-1)];n?n==3?(i=((15&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,e+=String.fromCharCode(55296|i>>10,56320|1023&i)):e+=1&n?String.fromCharCode((31&i)<<6|63&t[r++]):String.fromCharCode((15&i)<<12|(63&t[r++])<<6|63&t[r++]):e+=String.fromCharCode(i)}},Cb=function(){function t(e){this.ondata=e,op?this.t=new TextDecoder:this.p=ir}return t.prototype.push=function(e,r){if(this.ondata||Q(5),r=!!r,this.t)return this.ondata(this.t.decode(e,{stream:!0}),r),void(r&&(this.t.decode().length&&Q(8),this.t=null));this.p||Q(4);var i=new de(this.p.length+e.length);i.set(this.p),i.set(e,this.p.length);var n=lp(i),s=n[0],a=n[1];r?(a.length&&Q(8),this.p=null):this.p=a,this.ondata(s,r)},t}(),Tb=function(){function t(e){this.ondata=e}return t.prototype.push=function(e,r){this.ondata||Q(5),this.d&&Q(4),this.ondata(Jr(e),this.d=r||!1)},t}();function Jr(t,e){if(e){for(var r=new de(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}if(pu)return pu.encode(t);var n=t.length,s=new de(t.length+(t.length>>1)),a=0,o=function(c){s[a++]=c};for(i=0;i<n;++i){if(a+5>s.length){var l=new de(a+8+(n-i<<1));l.set(s),s=l}var h=t.charCodeAt(i);h<128||e?o(h):h<2048?(o(192|h>>6),o(128|63&h)):h>55295&&h<57344?(o(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++i))>>18),o(128|h>>12&63),o(128|h>>6&63),o(128|63&h)):(o(224|h>>12),o(128|h>>6&63),o(128|63&h))}return It(s,0,a)}function mn(t,e){if(e){for(var r="",i=0;i<t.length;i+=16384)r+=String.fromCharCode.apply(null,t.subarray(i,i+16384));return r}if(rl)return rl.decode(t);var n=lp(t),s=n[0];return n[1].length&&Q(8),s}var hp=function(t){return t==1?3:t<6?2:t==9?1:0},cp=function(t,e){return e+30+it(t,e+26)+it(t,e+28)},up=function(t,e,r){var i=it(t,e+28),n=mn(t.subarray(e+46,e+46+i),!(2048&it(t,e+8))),s=e+46+i,a=Fe(t,e+20),o=r&&a==4294967295?pp(t,s):[a,Fe(t,e+24),Fe(t,e+42)],l=o[0],h=o[1],c=o[2];return[it(t,e+10),l,h,n,s+it(t,e+30)+it(t,e+32),c]},pp=function(t,e){for(;it(t,e)!=1;e+=4+it(t,e+2));return[Go(t,e+12),Go(t,e+4),Go(t,e+20)]},yr=function(t){var e=0;if(t)for(var r in t){var i=t[r].length;i>65535&&Q(9),e+=i+4}return e},Ii=function(t,e,r,i,n,s,a,o){var l=i.length,h=r.extra,c=o&&o.length,u=yr(h);xe(t,e,a!=null?33639248:67324752),e+=4,a!=null&&(t[e++]=20,t[e++]=r.os),t[e]=20,e+=2,t[e++]=r.flag<<1|(s<0&&8),t[e++]=n&&8,t[e++]=255&r.compression,t[e++]=r.compression>>8;var f=new Date(r.mtime==null?Date.now():r.mtime),p=f.getFullYear()-1980;if((p<0||p>119)&&Q(10),xe(t,e,p<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>>1),e+=4,s!=-1&&(xe(t,e,r.crc),xe(t,e+4,s<0?-s-2:s),xe(t,e+8,r.size)),xe(t,e+12,l),xe(t,e+14,u),e+=16,a!=null&&(xe(t,e,c),xe(t,e+6,r.attrs),xe(t,e+10,a),e+=14),t.set(i,e),e+=l,u)for(var m in h){var g=h[m],d=g.length;xe(t,e,+m),xe(t,e+2,d),t.set(g,e+4),e+=4+d}return c&&(t.set(o,e),e+=c),e},xl=function(t,e,r,i,n){xe(t,e,101010256),xe(t,e+8,r),xe(t,e+10,r),xe(t,e+12,i),xe(t,e+16,n)},Ws=function(){function t(e){this.filename=e,this.c=Li(),this.size=0,this.compression=0}return t.prototype.process=function(e,r){this.ondata(null,e,r)},t.prototype.push=function(e,r){this.ondata||Q(5),this.c.p(e),this.size+=e.length,r&&(this.crc=this.c.d()),this.process(e,r||!1)},t}(),Ib=function(){function t(e,r){var i=this;r||(r={}),Ws.call(this,e),this.d=new nr(r,function(n,s){i.ondata(null,n,s)}),this.compression=8,this.flag=hp(r.level)}return t.prototype.process=function(e,r){try{this.d.push(e,r)}catch(i){this.ondata(i,null,r)}},t.prototype.push=function(e,r){Ws.prototype.push.call(this,e,r)},t}(),Mb=function(){function t(e,r){var i=this;r||(r={}),Ws.call(this,e),this.d=new _g(r,function(n,s,a){i.ondata(n,s,a)}),this.compression=8,this.flag=hp(r.level),this.terminate=this.d.terminate}return t.prototype.process=function(e,r){this.d.push(e,r)},t.prototype.push=function(e,r){Ws.prototype.push.call(this,e,r)},t}(),Db=function(){function t(e){this.ondata=e,this.u=[],this.d=1}return t.prototype.add=function(e){var r=this;if(this.ondata||Q(5),2&this.d)this.ondata(Q(4+8*(1&this.d),0,1),null,!1);else{var i=Jr(e.filename),n=i.length,s=e.comment,a=s&&Jr(s),o=n!=e.filename.length||a&&s.length!=a.length,l=n+yr(e.extra)+30;n>65535&&this.ondata(Q(11,0,1),null,!1);var h=new de(l);Ii(h,0,e,i,o,-1);var c=[h],u=function(){for(var d=0,y=c;d<y.length;d++){var v=y[d];r.ondata(null,v,!1)}c=[]},f=this.d;this.d=0;var p=this.u.length,m=Sn(e,{f:i,u:o,o:a,t:function(){e.terminate&&e.terminate()},r:function(){if(u(),f){var d=r.u[p+1];d?d.r():r.d=1}f=1}}),g=0;e.ondata=function(d,y,v){if(d)r.ondata(d,y,v),r.terminate();else if(g+=y.length,c.push(y),v){var b=new de(16);xe(b,0,134695760),xe(b,4,e.crc),xe(b,8,g),xe(b,12,e.size),c.push(b),m.c=g,m.b=l+g+16,m.crc=e.crc,m.size=e.size,f&&m.r(),f=1}else f&&u()},this.u.push(m)}},t.prototype.end=function(){var e=this;2&this.d?this.ondata(Q(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},t.prototype.e=function(){for(var e=0,r=0,i=0,n=0,s=this.u;n<s.length;n++)i+=46+(h=s[n]).f.length+yr(h.extra)+(h.o?h.o.length:0);for(var a=new de(i+22),o=0,l=this.u;o<l.length;o++){var h=l[o];Ii(a,e,h,h.f,h.u,-h.c-2,r,h.o),e+=46+h.f.length+yr(h.extra)+(h.o?h.o.length:0),r+=h.b}xl(a,e,this.u.length,i,r),this.ondata(null,a,!0),this.d=2},t.prototype.terminate=function(){for(var e=0,r=this.u;e<r.length;e++)r[e].t();this.d=2},t}();function Fb(t,e,r){r||(r=e,e={}),typeof r!="function"&&Q(7);var i={};wl(t,"",i,e);var n=Object.keys(i),s=n.length,a=0,o=0,l=s,h=new Array(s),c=[],u=function(){for(var d=0;d<c.length;++d)c[d]()},f=function(d,y){Zs(function(){r(d,y)})};Zs(function(){f=r});var p=function(){var d=new de(o+22),y=a,v=o-a;o=0;for(var b=0;b<l;++b){var _=h[b];try{var x=_.c.length;Ii(d,o,_,_.f,_.u,x);var T=30+_.f.length+yr(_.extra),S=o+T;d.set(_.c,S),Ii(d,a,_,_.f,_.u,x,o,_.m),a+=16+T+(_.m?_.m.length:0),o=S+x}catch(w){return f(w,null)}}xl(d,a,h.length,v,y),f(null,d)};s||p();for(var m=function(d){var y=n[d],v=i[y],b=v[0],_=v[1],x=Li(),T=b.length;x.p(b);var S=Jr(y),w=S.length,M=_.comment,k=M&&Jr(M),I=k&&k.length,P=yr(_.extra),A=_.level==0?0:8,E=function(F,O){if(F)u(),f(F,null);else{var D=O.length;h[d]=Sn(_,{size:T,crc:x.d(),c:O,f:S,m:k,u:w!=y.length||k&&M.length!=I,compression:A}),a+=30+w+P+D,o+=76+2*(w+P)+(I||0)+D,--s||p()}};if(w>65535&&E(Q(11,0,1),null),A)if(T<16e4)try{E(null,Xs(b,_))}catch(F){E(F,null)}else c.push(wg(b,_,E));else E(null,b)},g=0;g<l;++g)m(g);return u}function Ob(t,e){e||(e={});var r={},i=[];wl(t,"",r,e);var n=0,s=0;for(var a in r){var o=r[a],l=o[0],h=o[1],c=h.level==0?0:8,u=(S=Jr(a)).length,f=h.comment,p=f&&Jr(f),m=p&&p.length,g=yr(h.extra);u>65535&&Q(11);var d=c?Xs(l,h):l,y=d.length,v=Li();v.p(l),i.push(Sn(h,{size:l.length,crc:v.d(),c:d,f:S,m:p,u:u!=a.length||p&&f.length!=m,o:n,compression:c})),n+=30+u+g+y,s+=76+2*(u+g)+(m||0)+y}for(var b=new de(s+22),_=n,x=s-n,T=0;T<i.length;++T){var S=i[T];Ii(b,S.o,S,S.f,S.u,S.c.length);var w=30+S.f.length+yr(S.extra);b.set(S.c,S.o+w),Ii(b,n,S,S.f,S.u,S.c.length,S.o,S.m),n+=16+w+(S.m?S.m.length:0)}return xl(b,n,i.length,x,_),b}var Ag=function(){function t(){}return t.prototype.push=function(e,r){this.ondata(null,e,r)},t.compression=0,t}(),$b=function(){function t(){var e=this;this.i=new wt(function(r,i){e.ondata(null,r,i)})}return t.prototype.push=function(e,r){try{this.i.push(e,r)}catch(i){this.ondata(i,null,r)}},t.compression=8,t}(),Rb=function(){function t(e,r){var i=this;r<32e4?this.i=new wt(function(n,s){i.ondata(null,n,s)}):(this.i=new sp(function(n,s,a){i.ondata(n,s,a)}),this.terminate=this.i.terminate)}return t.prototype.push=function(e,r){this.i.terminate&&(e=It(e,0)),this.i.push(e,r)},t.compression=8,t}(),Lb=function(){function t(e){this.onfile=e,this.k=[],this.o={0:Ag},this.p=ir}return t.prototype.push=function(e,r){var i=this;if(this.onfile||Q(5),this.p||Q(4),this.c>0){var n=Math.min(this.c,e.length),s=e.subarray(0,n);if(this.c-=n,this.d?this.d.push(s,!this.c):this.k[0].push(s),(e=e.subarray(n)).length)return this.push(e,r)}else{var a=0,o=0,l=void 0,h=void 0;this.p.length?e.length?((h=new de(this.p.length+e.length)).set(this.p),h.set(e,this.p.length)):h=this.p:h=e;for(var c=h.length,u=this.c,f=u&&this.d,p=function(){var d,y=Fe(h,o);if(y==67324752){a=1,l=o,m.d=null,m.c=0;var v=it(h,o+6),b=it(h,o+8),_=2048&v,x=8&v,T=it(h,o+26),S=it(h,o+28);if(c>o+30+T+S){var w=[];m.k.unshift(w),a=2;var M,k=Fe(h,o+18),I=Fe(h,o+22),P=mn(h.subarray(o+30,o+=30+T),!_);k==4294967295?(d=x?[-2]:pp(h,o),k=d[0],I=d[1]):x&&(k=-1),o+=S,m.c=k;var A={name:P,compression:b,start:function(){if(A.ondata||Q(5),k){var E=i.o[b];E||A.ondata(Q(14,"unknown compression type "+b,1),null,!1),(M=k<0?new E(P):new E(P,k,I)).ondata=function(C,$,L){A.ondata(C,$,L)};for(var F=0,O=w;F<O.length;F++){var D=O[F];M.push(D,!1)}i.k[0]==w&&i.c?i.d=M:M.push(ir,!0)}else A.ondata(null,ir,!0)},terminate:function(){M&&M.terminate&&M.terminate()}};k>=0&&(A.size=k,A.originalSize=I),m.onfile(A)}return"break"}if(u){if(y==134695760)return l=o+=12+(u==-2&&8),a=3,m.c=0,"break";if(y==33639248)return l=o-=4,a=3,m.c=0,"break"}},m=this;o<c-4&&p()!=="break";++o);if(this.p=ir,u<0){var g=a?h.subarray(0,l-12-(u==-2&&8)-(Fe(h,l-16)==134695760&&4)):h.subarray(0,o);f?f.push(g,!!a):this.k[+(a==2)].push(g)}if(2&a)return this.push(h.subarray(o),r);this.p=h.subarray(o)}r&&(this.c&&Q(13),this.p=null)},t.prototype.register=function(e){this.o[e.compression]=e},t}(),Zs=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(t){t()};function Cg(t,e,r){r||(r=e,e={}),typeof r!="function"&&Q(7);var i=[],n=function(){for(var d=0;d<i.length;++d)i[d]()},s={},a=function(d,y){Zs(function(){r(d,y)})};Zs(function(){a=r});for(var o=t.length-22;Fe(t,o)!=101010256;--o)if(!o||t.length-o>65558)return a(Q(13,0,1),null),n;var l=it(t,o+8);if(l){var h=l,c=Fe(t,o+16),u=c==4294967295||h==65535;if(u){var f=Fe(t,o-12);(u=Fe(t,f)==101075792)&&(h=l=Fe(t,f+32),c=Fe(t,f+48))}for(var p=e&&e.filter,m=function(d){var y=up(t,c,u),v=y[0],b=y[1],_=y[2],x=y[3],T=y[4],S=y[5],w=cp(t,S);c=T;var M=function(I,P){I?(n(),a(I,null)):(P&&(s[x]=P),--l||a(null,s))};if(!p||p({name:x,size:b,originalSize:_,compression:v}))if(v)if(v==8){var k=t.subarray(w,w+b);if(b<32e4)try{M(null,kn(k,new de(_)))}catch(I){M(I,null)}else i.push(ap(k,{size:_},M))}else M(Q(14,"unknown compression type "+v,1),null);else M(null,It(t,w,w+b));else M(null,null)},g=0;g<h;++g)m()}else a(null,{});return n}function Bb(t,e){for(var r={},i=t.length-22;Fe(t,i)!=101010256;--i)(!i||t.length-i>65558)&&Q(13);var n=it(t,i+8);if(!n)return{};var s=Fe(t,i+16),a=s==4294967295||n==65535;if(a){var o=Fe(t,i-12);(a=Fe(t,o)==101075792)&&(n=Fe(t,o+32),s=Fe(t,o+48))}for(var l=e&&e.filter,h=0;h<n;++h){var c=up(t,s,a),u=c[0],f=c[1],p=c[2],m=c[3],g=c[4],d=c[5],y=cp(t,d);s=g,l&&!l({name:m,size:f,originalSize:p,compression:u})||(u?u==8?r[m]=kn(t.subarray(y,y+f),new de(p)):Q(14,"unknown compression type "+u):r[m]=It(t,y,y+f))}return r}var Tg="@dotlottie/player-component",Ig="1.4.2",Mg="dotlottie animation player web component.",Dg="dist/dotlottie-player.js",Fg="dist/dotlottie-player.esm.js",Og="dist/dotlottie-player.esm.d.ts",$g="https://dotlottie.com/players",Rg="https://github.com/dotlottie/player-component.git",Lg="https://github.com/dotlottie/player-component/issues",Bg="Jawish Hameed <jawish@lottiefiles.com>",Vg="MIT",Ng={build:"yarn build-dotlottie",buildtsup:"tsup","build-with-coverage":"CODE_COVERAGE=true yarn build-dotlottie","build-dotlottie":"yarn cleanup && rollup -c","build:types":"tsc --declaration",dev:"yarn cleanup && rollup -c --watch",lint:"eslint","lint:fix":"eslint --fix",cleanup:"shx rm -rf dist && shx mkdir dist",serve:"node ./cypress/pages/server.js -p 8000 &","start-cypress":"npx cypress run && npx nyc report --reporter=text-summary","run-tests":"yarn build-with-coverage && yarn serve && yarn start-cypress","postrun-tests":"kill $(lsof -t -i:8000)"},zg={"@rollup/plugin-json":"^6.0.0",fflate:"^0.7.3",lit:"^2.4.1","lottie-web":"^5.10.0",tsup:"^6.1.3"},jg={"@babel/core":"^7.11.0","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-decorators":"^7.10.5","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@changesets/cli":"^2.24.4","@cypress/code-coverage":"^3.9.12","@istanbuljs/nyc-config-typescript":"^1.0.2","@rollup/plugin-babel":"^5.1.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-node-resolve":"^8.4.0","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","babel-plugin-istanbul":"^6.1.1",changesets:"^1.0.2",cypress:"^9.4.1",eslint:"^6.6.0","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.1",fastify:"^3.27.1","fastify-static":"^4.5.0",lerna:"^4.0.0","parcel-bundler":"^1.12.4",prettier:"1.18.2",rollup:"^2.23.0","rollup-plugin-alias":"^2.2.0","rollup-plugin-copy":"^3.3.0","rollup-plugin-filesize":"^9.0.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-serve":"^1.0.3","rollup-plugin-terser":"^6.1.0","rollup-plugin-typescript2":"^0.27.1","rollup-plugin-visualizer":"^4.0.4",shx:"^0.3.3","source-map-support":"^0.5.21","ts-node":"^10.5.0",typescript:"^3.7.5"},Gg=["dist"],Hg=["dotlottie","animation","web component","component","lit-element","player"],qg=["> 3%"],Ug={access:"public"},Wg={extends:"@istanbuljs/nyc-config-typescript",all:!0},du={name:Tg,version:Ig,description:Mg,main:Dg,module:Fg,types:Og,homepage:$g,repository:Rg,bugs:Lg,author:Bg,license:Vg,scripts:Ng,dependencies:zg,devDependencies:jg,files:Gg,keywords:Hg,browserslist:qg,publishConfig:Ug,nyc:Wg},lt=t=>new Error("[dotLottie-player-component] ".concat(t)),fu=t=>{let e="[dotLottie-player-component] ".concat(t);console.error(e)},Ho=t=>{let e="[dotLottie-player-component] ".concat(t);console.warn(e)},mu,gu,yu,vu,bu,Pe,er,je;(function(t){t.Loading="loading",t.Playing="playing",t.Paused="paused",t.Stopped="stopped",t.Frozen="frozen",t.Error="error"})(Pe||(Pe={})),function(t){t.Normal="normal",t.Bounce="bounce"}(er||(er={})),function(t){t.Load="load",t.Error="error",t.Ready="ready",t.Play="play",t.Pause="pause",t.Stop="stop",t.Freeze="freeze",t.Loop="loop",t.Complete="complete",t.Rendered="rendered",t.Frame="frame"}(je||(je={}));var _u="dotlottie-player",Ge=class t extends Ur{constructor(){super(),this.mode=er.Normal,this.autoplay=!1,this.background="transparent",this.controls=!1,this.direction=1,this.hover=!1,this.renderer="svg",this.speed=1,this.currentState=Pe.Loading,this.intermission=1,this.activeAnimationId=null,this._counter=1,this._activeAnimationIndex=0,this._manifest={animations:[]}}static get properties(){return{mode:{type:String},autoplay:{type:Boolean},background:{type:String},controls:{type:Boolean},direction:{type:Number},hover:{type:Boolean},loop:{type:String},renderer:{type:String},speed:{type:Number},src:{type:String},currentState:{type:String},seeker:{type:Object},intermission:{type:Number},activeAnimationId:{type:String}}}_parseLoop(e){let r=parseInt(e,10);return Number.isInteger(r)&&r>0?(this._count=r,this._loop=!0,!0):typeof e=="string"&&["true","false"].includes(e)?(this._loop=e==="true",this._loop):(Ho("loop must be a positive integer or a boolean"),!1)}_onVisibilityChange(){document.hidden&&this.currentState===Pe.Playing?this.freeze():this.currentState===Pe.Frozen&&this.play()}_handleSeekChange(e){if(!this._lottie||isNaN(e.target.value))return;let r=e.target.value/100*this._lottie.totalFrames;this.seek(r)}isLottie(e){let r=!1;return e.animations&&e.animations.length?(e.animations.forEach(i=>{this.isLottie(i)||(r=!0)}),r):["v","ip","op","layers","fr","w","h"].every(i=>Object.prototype.hasOwnProperty.call(e,i))}parseSrc(e){if(typeof e=="object")return e;try{return JSON.parse(e)}catch{return new URL(e,window.location.href).toString()}}async _fetchDotLottie(e){return await fetch(e,{method:"GET",mode:"cors",headers:{"Response-Type":"arraybuffer"}}).then(r=>r.arrayBuffer()).then(async r=>{let i=[],n={animations:[],manifest:void 0},s=await new Promise((o,l)=>{Cg(new Uint8Array(r),(h,c)=>{h&&l(h),o(c)})}),a;if(s["manifest.json"]){let o=mn(s["manifest.json"]),l=JSON.parse(o);if(!("animations"in l))throw lt("Manifest not found");if(l.animations.length===0)throw lt("No animations listed in the manifest");n.manifest=l;for(let h of l.animations)a=JSON.parse(mn(s["animations/".concat(h.id,".json")])),"assets"in a&&a.assets.map(c=>{if(!c.p||!s["images/".concat(c.p)])return;let u=btoa(mn(s["images/".concat(c.p)],!0));c.p="data:;base64,"+u,c.e=1}),i.push(a);return n.manifest=l,n.animations=i,n}throw lt("No manifest found in file.")}).catch(r=>{throw lt(r)})}async _fetchJsonFile(e){return await fetch(e,{method:"GET",mode:"cors",headers:{"Response-Type":"json"}}).then(r=>r.json()).then(r=>{let i=[],n={animations:[{id:e.substring(e.lastIndexOf("/")+1,e.lastIndexOf(".")),speed:1,loop:"true",direction:1}],description:"",author:"",generator:"dotLottie-player-component",revision:1,version:"1.0.0"},s={animations:[],manifest:void 0};return i.push(r),s.animations=i,s.manifest=n,s}).catch(r=>{throw lt(r)})}async _fetchFileAndLoad(e){var r;let i={animations:[],manifest:void 0};if(i=((r=e.split(/[#?]/)[0].split(".").pop())===null||r===void 0?void 0:r.toLowerCase())==="json"?await this._fetchJsonFile(e):await this._fetchDotLottie(e),!i.animations||!i.manifest||i.animations.length===0)throw this.currentState=Pe.Error,this.dispatchEvent(new CustomEvent(je.Error)),lt(i.animations&&i.animations.length?"Manifest not found":"Animations are empty");if(this._animations=i.animations,this._manifest=i.manifest,this.activeAnimationId){let s=this._manifest.animations.findIndex(a=>a.id===this.activeAnimationId);s!==-1?this._activeAnimationIndex=s:Ho("Active animation not found in manifest")}else if(this._manifest&&this._manifest.activeAnimationId){let s=this._manifest.animations.findIndex(a=>a.id===this._manifest.activeAnimationId);s!==-1?this._activeAnimationIndex=s:Ho("Active animation not found in manifest")}let n=this._animations[this._activeAnimationIndex];if(n===void 0)throw lt("No animation to load!");return n}_loadManifestOptions(e){if(this._requireAnimationsInTheManifest(),this._manifest.animations[e]===void 0)throw lt("Animation not found in manifest");let{autoplay:r,direction:i,loop:n,playMode:s,speed:a,hover:o,intermission:l}=this._manifest.animations[e];r!==void 0&&(this.autoplay=r),i!==void 0&&(this.direction=i),n!==void 0&&(this.loop=n),s!==void 0&&(this.mode=s),a!==void 0&&(this.speed=a),o!==void 0&&(this.hover=o),l!==void 0&&(this.intermission=l)}_initListeners(){this.dispatchEvent(new CustomEvent(je.Load)),this._lottie.addEventListener("enterFrame",()=>{this.seeker=this._lottie.currentFrame/this._lottie.totalFrames*100,this.dispatchEvent(new CustomEvent(je.Frame,{detail:{frame:this._lottie.currentFrame,seeker:this.seeker}}))}),this._lottie.addEventListener("complete",()=>{if(this.currentState===Pe.Playing){if((!this._loop||this._count&&this._counter>=this._count)&&(this.dispatchEvent(new CustomEvent(je.Complete)),this.mode!==er.Bounce||this._lottie.currentFrame===0))return;this.mode===er.Bounce?(this._count&&(this._counter+=.5),setTimeout(()=>{this.dispatchEvent(new CustomEvent(je.Loop)),this.currentState===Pe.Playing&&(this._lottie.setDirection(-1*this._lottie.playDirection),this._lottie.play())},this.intermission)):(this._count&&(this._counter+=1),window.setTimeout(()=>{this.dispatchEvent(new CustomEvent(je.Loop)),this.currentState===Pe.Playing&&(this.direction===-1?(this.seek("99%"),this.play()):(this._lottie.stop(),this.play()))},this.intermission))}else this.dispatchEvent(new CustomEvent(je.Complete))}),this._lottie.addEventListener("DOMLoaded",()=>{this.dispatchEvent(new CustomEvent(je.Ready))}),this._lottie.addEventListener("data_ready",()=>{this.dispatchEvent(new CustomEvent(je.Load))}),this._lottie.addEventListener("data_failed",()=>{this.currentState=Pe.Error,this.dispatchEvent(new CustomEvent(je.Error))}),this.container.addEventListener("mouseenter",()=>{this.hover&&this.currentState!==Pe.Playing&&this.play()}),this.container.addEventListener("mouseleave",()=>{this.hover&&this.currentState===Pe.Playing&&this.stop()})}async load(e,r,i){if(!this.shadowRoot)return;let n={container:this.container,loop:!1,autoplay:!1,renderer:this.renderer,rendererSettings:r||{scaleMode:"noScale",clearCanvas:!1,progressiveLoad:!0,hideOnTransparent:!0}};try{let s=this.parseSrc(e),a=null;if(typeof s=="string")a=await this._fetchFileAndLoad(s);else if(typeof s=="object"&&!this.isLottie(s))throw lt("Load method failing. Object is not a valid Lottie.");if(this._lottie&&this._lottie.destroy(),i!==void 0)for(let[o,l]of Object.entries(i))o==="playMode"?this.mode=l==="normal"?er.Normal:er.Bounce:l!==void 0&&(this[o]=l);else if(this._activeAnimationIndex===0||this._manifest.animations[this._activeAnimationIndex].id===this.activeAnimationId||this._manifest.animations[this._activeAnimationIndex].id===this._manifest.activeAnimationId){let o=this._manifest.animations[this._activeAnimationIndex],l=Object.keys(t.properties),h=Array.from(this.getAttributeNames());for(let u of h){let f=this.getAttribute(u);f&&(this[u]=f)}let c=l.filter(u=>!h.includes(u.toLowerCase())&&this._manifest.animations[this._activeAnimationIndex].hasOwnProperty(u));for(let u of c){let f=o[u];f!==void 0&&(u==="playMode"?this.mode=f==="normal"?er.Normal:er.Bounce:this[u]=f)}}else this._loadManifestOptions(this._activeAnimationIndex);this._lottie=gg.loadAnimation(Object.assign(Object.assign({},n),{animationData:a!==null?a:s}))}catch(s){return this.currentState=Pe.Error,this.dispatchEvent(new CustomEvent(je.Error)),void console.error(s)}if(!this._lottie)throw this.currentState=Pe.Error,this.dispatchEvent(new CustomEvent(je.Error)),lt("Player failed to initialize.");this._initListeners(),this.setSpeed(this.speed),this.setDirection(this.direction),this.autoplay&&(this.direction===-1&&this.seek("99%"),this.play())}getActiveId(){return this._manifest.animations?this._manifest.animations[this._activeAnimationIndex].id:null}getActiveAnimationIndex(){return this._activeAnimationIndex}animationCount(){return this._animations?this._animations.length:0}getManifest(){return this._manifest}getLottie(){return this._lottie}getVersions(){return{lottieWebVersion:"".concat(du.dependencies["lottie-web"]),dotLottiePlayerVersion:"".concat(du.version)}}_requireAnimationsInTheManifest(){if(!this._manifest.animations.length)throw lt("No animations found in manifest.")}_requireAnimationsToBeLoaded(){var e;if(!(!((e=this._animations)===null||e===void 0)&&e.length))throw lt("No animations have been loaded.")}previous(e){this._activeAnimationIndex=(this._activeAnimationIndex-1+this._manifest.animations.length)%this._manifest.animations.length,this.play(this._activeAnimationIndex,e)}next(e){this._activeAnimationIndex=(this._activeAnimationIndex+1)%this._manifest.animations.length,this.play(this._activeAnimationIndex,e)}reset(){this._manifest&&this._manifest.activeAnimationId?this.play(this._manifest.activeAnimationId):this.activeAnimationId?this.play(this.activeAnimationId):this.play(0)}_validateAnimationIndex(e){if(isNaN(e)||e<0||e>=this._manifest.animations.length)throw lt("Animation index ".concat(e," is out of bounds."))}play(e,r){if(this._lottie){if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),e===void 0)return this._lottie.play(),this.currentState=Pe.Playing,void this.dispatchEvent(new CustomEvent(je.Play));if(this._requireAnimationsToBeLoaded(),this._requireAnimationsInTheManifest(),e!==void 0){if(!this._animations)throw lt("No animations have been loaded.");if(this._requireAnimationsInTheManifest(),typeof e=="string"){let i=this._manifest.animations.findIndex(n=>n.id===e);i!==-1?(this._activeAnimationIndex=i,this.load(this._animations[this._activeAnimationIndex],{playbackOptions:r})):fu("No animation with the id '".concat(e,"' was found."))}else typeof e=="number"&&(this._validateAnimationIndex(e),this._manifest.animations&&this._manifest.animations[e]?(this._activeAnimationIndex=e,this.load(this._animations[this._activeAnimationIndex],{playbackOptions:r})):fu("Animation not found at index: ".concat(e)))}}}pause(){this._lottie&&(this._lottie.pause(),this.currentState=Pe.Paused,this.dispatchEvent(new CustomEvent(je.Pause)))}stop(){this._lottie&&(this._counter=0,this._lottie.stop(),this.direction===-1&&this._lottie.goToAndStop(this._lottie.totalFrames,!0),this.currentState=Pe.Stopped,this.dispatchEvent(new CustomEvent(je.Stop)))}seek(e){if(!this._lottie)return;typeof e=="number"&&(e=Math.round(e));let r=/^(\d+)(%?)$/.exec(e.toString());if(!r)return;let i=r[2]==="%"?this._lottie.totalFrames*Number(r[1])/100:Number(r[1]);this.seeker=i,this.currentState===Pe.Playing?this._lottie.goToAndPlay(i,!0):(this._lottie.goToAndStop(i,!0),this._lottie.pause())}snapshot(){let e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];if(!this.shadowRoot)return;let r=this.shadowRoot.querySelector(".animation svg"),i=new XMLSerializer().serializeToString(r);if(e){let n=document.createElement("a");n.href="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i),n.download="download_"+this.seeker+".svg",document.body.appendChild(n),n.click(),document.body.removeChild(n)}return i}freeze(){this._lottie&&(this._lottie.pause(),this.currentState=Pe.Frozen,this.dispatchEvent(new CustomEvent(je.Freeze)))}setSpeed(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this._lottie&&this._lottie.setSpeed(e)}setDirection(e){this._lottie&&this._lottie.setDirection(e)}setLooping(e){this._lottie&&(this._lottie.loop=this._parseLoop(e))}isLooping(){return!!this._loop&&this._loop}togglePlay(){return this.currentState===Pe.Playing?this.pause():this.play()}toggleLooping(){let e=!this._loop;this.setLooping(e.toString())}static get styles(){return yg}async firstUpdated(){"IntersectionObserver"in window&&(this._io=new IntersectionObserver(e=>{e[0].isIntersecting?this.currentState===Pe.Frozen&&this.play():this.currentState===Pe.Playing&&this.freeze()}),this._io.observe(this.container)),document.hidden!==void 0&&document.addEventListener("visibilitychange",()=>this._onVisibilityChange()),this.loop?this._parseLoop(this.loop):this.hasAttribute("loop")&&this._parseLoop("true"),this.src&&await this.load(this.src),this.dispatchEvent(new CustomEvent(je.Rendered))}disconnectedCallback(){this._io&&(this._io.disconnect(),this._io=void 0),this._lottie&&this._lottie.destroy(),document.removeEventListener("visibilitychange",()=>this._onVisibilityChange())}renderControls(){let e=this.currentState===Pe.Playing,r=this.currentState===Pe.Paused,i=this.currentState===Pe.Stopped;return Ps(mu||(mu=wi([`
|
|
195
|
+
`]))),au={},vg=function(t,e,r,i,n){var s=new Worker(au[e]||(au[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return s.onmessage=function(a){var o=a.data,l=o.$e$;if(l){var h=new Error(l[0]);h.code=l[1],h.stack=l[2],n(h,null)}else n(null,o)},s.postMessage(r,i),s},fe=Uint8Array,Xe=Uint16Array,Oi=Uint32Array,$i=new fe([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]),Ri=new fe([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]),_n=new fe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ju=function(t,e){for(var r=new Xe(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Oi(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return[r,n]},Gu=ju($i,2),pl=Gu[0],Gs=Gu[1];pl[28]=258,Gs[258]=28;for(jo=ju(Ri,0),dl=jo[0],Hs=jo[1],Ti=new Xe(32768),_e=0;_e<32768;++_e)Qt=(43690&_e)>>>1|(21845&_e)<<1,Qt=(52428&Qt)>>>2|(13107&Qt)<<2,Qt=(61680&Qt)>>>4|(3855&Qt)<<4,Ti[_e]=((65280&Qt)>>>8|(255&Qt)<<8)>>>1;var Qt,jo,dl,Hs,Ti,_e;for(_t=function(e,r,i){for(var n=e.length,s=0,a=new Xe(r);s<n;++s)e[s]&&++a[e[s]-1];var o,l=new Xe(r);for(s=0;s<r;++s)l[s]=l[s-1]+a[s-1]<<1;if(i){o=new Xe(1<<r);var h=15-r;for(s=0;s<n;++s)if(e[s])for(var c=s<<4|e[s],u=r-e[s],f=l[e[s]-1]++<<u,p=f|(1<<u)-1;f<=p;++f)o[Ti[f]>>>h]=c}else for(o=new Xe(n),s=0;s<n;++s)e[s]&&(o[s]=Ti[l[e[s]-1]++]>>>15-e[s]);return o},jt=new fe(288),_e=0;_e<144;++_e)jt[_e]=8;var _t,jt,_e;for(_e=144;_e<256;++_e)jt[_e]=9;var _e;for(_e=256;_e<280;++_e)jt[_e]=7;var _e;for(_e=280;_e<288;++_e)jt[_e]=8;var _e;for(Yr=new fe(32),_e=0;_e<32;++_e)Yr[_e]=5;var Yr,_e,Hu=_t(jt,9,0),qu=_t(jt,9,1),Uu=_t(Yr,5,0),Wu=_t(Yr,5,1),Is=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},Tt=function(t,e,r){var i=e/8|0;return(t[i]|t[i+1]<<8)>>(7&e)&r},Ms=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&e)},wn=function(t){return(t+7)/8|0},It=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new(t.BYTES_PER_ELEMENT==2?Xe:t.BYTES_PER_ELEMENT==4?Oi:fe)(r-e);return i.set(t.subarray(e,r)),i},_b={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Zu=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Q=function(t,e,r){var i=new Error(e||Zu[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,Q),!r)throw i;return i},xn=function(t,e,r){var i=t.length;if(!i||r&&r.f&&!r.l)return e||new fe(0);var n=!e||r,s=!r||r.i;r||(r={}),e||(e=new fe(3*i));var a=function(se){var ie=e.length;if(se>ie){var ee=new fe(Math.max(2*ie,se));ee.set(e),e=ee}},o=r.f||0,l=r.p||0,h=r.b||0,c=r.l,u=r.d,f=r.m,p=r.n,m=8*i;do{if(!c){o=Tt(t,l,1);var g=Tt(t,l+1,3);if(l+=3,!g){var d=t[(I=wn(l)+4)-4]|t[I-3]<<8,y=I+d;if(y>i){s&&Q(0);break}n&&a(h+d),e.set(t.subarray(I,y),h),r.b=h+=d,r.p=l=8*y,r.f=o;continue}if(g==1)c=qu,u=Wu,f=9,p=5;else if(g==2){var v=Tt(t,l,31)+257,b=Tt(t,l+10,15)+4,_=v+Tt(t,l+5,31)+1;l+=14;for(var x=new fe(_),T=new fe(19),S=0;S<b;++S)T[_n[S]]=Tt(t,l+3*S,7);l+=3*b;var w=Is(T),M=(1<<w)-1,k=_t(T,w,1);for(S=0;S<_;){var I,P=k[Tt(t,l,M)];if(l+=15&P,(I=P>>>4)<16)x[S++]=I;else{var A=0,E=0;for(I==16?(E=3+Tt(t,l,3),l+=2,A=x[S-1]):I==17?(E=3+Tt(t,l,7),l+=3):I==18&&(E=11+Tt(t,l,127),l+=7);E--;)x[S++]=A}}var F=x.subarray(0,v),O=x.subarray(v);f=Is(F),p=Is(O),c=_t(F,f,1),u=_t(O,p,1)}else Q(1);if(l>m){s&&Q(0);break}}n&&a(h+131072);for(var D=(1<<f)-1,C=(1<<p)-1,$=l;;$=l){var L=(A=c[Ms(t,l)&D])>>>4;if((l+=15&A)>m){s&&Q(0);break}if(A||Q(2),L<256)e[h++]=L;else{if(L==256){$=l,c=null;break}var q=L-254;if(L>264){var U=$i[S=L-257];q=Tt(t,l,(1<<U)-1)+pl[S],l+=U}var J=u[Ms(t,l)&C],G=J>>>4;if(J||Q(3),l+=15&J,O=dl[G],G>3&&(U=Ri[G],O+=Ms(t,l)&(1<<U)-1,l+=U),l>m){s&&Q(0);break}n&&a(h+131072);for(var re=h+q;h<re;h+=4)e[h]=e[h-O],e[h+1]=e[h+1-O],e[h+2]=e[h+2-O],e[h+3]=e[h+3-O];h=re}}r.l=c,r.p=$,r.b=h,r.f=o,c&&(o=1,r.m=f,r.d=u,r.n=p)}while(!o);return h==e.length?e:It(e,0,h)},zt=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>>8},xi=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},Ds=function(t,e){for(var r=[],i=0;i<t.length;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[ir,0];if(n==1){var a=new fe(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort(function(x,T){return x.f-T.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],h=0,c=1,u=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=n-1;)o=r[r[h].f<r[u].f?h++:u++],l=r[h!=c&&r[h].f<r[u].f?h++:u++],r[c++]={s:-1,f:o.f+l.f,l:o,r:l};var f=s[0].s;for(i=1;i<n;++i)s[i].s>f&&(f=s[i].s);var p=new Xe(f+1),m=qs(r[c-1],p,0);if(m>e){i=0;var g=0,d=m-e,y=1<<d;for(s.sort(function(x,T){return p[T.s]-p[x.s]||x.f-T.f});i<n;++i){var v=s[i].s;if(!(p[v]>e))break;g+=y-(1<<m-p[v]),p[v]=e}for(g>>>=d;g>0;){var b=s[i].s;p[b]<e?g-=1<<e-p[b]++-1:++i}for(;i>=0&&g;--i){var _=s[i].s;p[_]==e&&(--p[_],++g)}m=e}return[new fe(p),m]},qs=function(t,e,r){return t.s==-1?Math.max(qs(t.l,e,r+1),qs(t.r,e,r+1)):e[t.s]=r},Jo=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Xe(++e),i=0,n=t[0],s=1,a=function(l){r[i++]=l},o=1;o<=e;++o)if(t[o]==n&&o!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(n),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(n);s=1,n=t[o]}return[r.subarray(0,i),e]},Si=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},Us=function(t,e,r){var i=r.length,n=wn(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<i;++s)t[n+s+4]=r[s];return 8*(n+4+i)},Xo=function(t,e,r,i,n,s,a,o,l,h,c){zt(e,c++,r),++n[256];for(var u=Ds(n,15),f=u[0],p=u[1],m=Ds(s,15),g=m[0],d=m[1],y=Jo(f),v=y[0],b=y[1],_=Jo(g),x=_[0],T=_[1],S=new Xe(19),w=0;w<v.length;++w)S[31&v[w]]++;for(w=0;w<x.length;++w)S[31&x[w]]++;for(var M=Ds(S,7),k=M[0],I=M[1],P=19;P>4&&!k[_n[P-1]];--P);var A,E,F,O,D=h+5<<3,C=Si(n,jt)+Si(s,Yr)+a,$=Si(n,f)+Si(s,g)+a+14+3*P+Si(S,k)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return Us(e,c,t.subarray(l,l+h));if(zt(e,c,1+($<C)),c+=2,$<C){A=_t(f,p,0),E=f,F=_t(g,d,0),O=g;var L=_t(k,I,0);for(zt(e,c,b-257),zt(e,c+5,T-1),zt(e,c+10,P-4),c+=14,w=0;w<P;++w)zt(e,c+3*w,k[_n[w]]);c+=3*P;for(var q=[v,x],U=0;U<2;++U){var J=q[U];for(w=0;w<J.length;++w){var G=31&J[w];zt(e,c,L[G]),c+=k[G],G>15&&(zt(e,c,J[w]>>>5&127),c+=J[w]>>>12)}}}else A=Hu,E=jt,F=Uu,O=Yr;for(w=0;w<o;++w)if(i[w]>255){G=i[w]>>>18&31,xi(e,c,A[G+257]),c+=E[G+257],G>7&&(zt(e,c,i[w]>>>23&31),c+=$i[G]);var re=31&i[w];xi(e,c,F[re]),c+=O[re],re>3&&(xi(e,c,i[w]>>>5&8191),c+=Ri[re])}else xi(e,c,A[i[w]]),c+=E[i[w]];return xi(e,c,A[256]),c+E[256]},Yu=new Oi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ir=new fe(0),Ju=function(t,e,r,i,n,s){var a=t.length,o=new fe(i+a+5*(1+Math.ceil(a/7e3))+n),l=o.subarray(i,o.length-n),h=0;if(!e||a<8)for(var c=0;c<=a;c+=65535){var u=c+65535;u>=a&&(l[h>>3]=s),h=Us(l,h+1,t.subarray(c,u))}else{for(var f=Yu[e-1],p=f>>>13,m=8191&f,g=(1<<r)-1,d=new Xe(32768),y=new Xe(g+1),v=Math.ceil(r/3),b=2*v,_=function(ke){return(t[ke]^t[ke+1]<<v^t[ke+2]<<b)&g},x=new Oi(25e3),T=new Xe(288),S=new Xe(32),w=0,M=0,k=(c=0,0),I=0,P=0;c<a;++c){var A=_(c),E=32767&c,F=y[A];if(d[E]=F,y[A]=E,I<=c){var O=a-c;if((w>7e3||k>24576)&&O>423){h=Xo(t,l,0,x,T,S,M,k,P,c-P,h),k=w=M=0,P=c;for(var D=0;D<286;++D)T[D]=0;for(D=0;D<30;++D)S[D]=0}var C=2,$=0,L=m,q=E-F&32767;if(O>2&&A==_(c-q))for(var U=Math.min(p,O)-1,J=Math.min(32767,c),G=Math.min(258,O);q<=J&&--L&&E!=F;){if(t[c+C]==t[c+C-q]){for(var re=0;re<G&&t[c+re]==t[c+re-q];++re);if(re>C){if(C=re,$=q,re>U)break;var se=Math.min(q,re-2),ie=0;for(D=0;D<se;++D){var ee=c-q+D+32768&32767,Se=ee-d[ee]+32768&32767;Se>ie&&(ie=Se,F=ee)}}}q+=(E=F)-(F=d[E])+32768&32767}if($){x[k++]=268435456|Gs[C]<<18|Hs[$];var ue=31&Gs[C],Ie=31&Hs[$];M+=$i[ue]+Ri[Ie],++T[257+ue],++S[Ie],I=c+C,++w}else x[k++]=t[c],++T[t[c]]}}h=Xo(t,l,s,x,T,S,M,k,P,c-P,h),!s&&7&h&&(h=Us(l,h+1,ir))}return It(o,0,i+wn(h)+n)},Xu=function(){for(var t=new Int32Array(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&-306674912)^r>>>1;t[e]=r}return t}(),Li=function(){var t=-1;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=Xu[255&r^e[i]]^r>>>8;t=r},d:function(){return~t}}},fl=function(){var t=1,e=0;return{p:function(r){for(var i=t,n=e,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)n+=i+=r[a];i=(65535&i)+15*(i>>16),n=(65535&n)+15*(n>>16)}t=i,e=n},d:function(){return(255&(t%=65521))<<24|t>>>8<<16|(255&(e%=65521))<<8|e>>>8}}},Xr=function(t,e,r,i,n){return Ju(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!n)},Sn=function(t,e){var r={};for(var i in t)r[i]=t[i];for(var i in e)r[i]=e[i];return r},ou=function(t,e,r){for(var i=t(),n=t.toString(),s=n.slice(n.indexOf("[")+1,n.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<i.length;++a){var o=i[a],l=s[a];if(typeof o=="function"){e+=";"+l+"=";var h=o.toString();if(o.prototype)if(h.indexOf("[native code]")!=-1){var c=h.indexOf(" ",8)+1;e+=h.slice(c,h.indexOf("(",c))}else for(var u in e+=h,o.prototype)e+=";"+l+".prototype."+u+"="+o.prototype[u].toString();else e+=h}else r[l]=o}return[e,r]},As=[],bg=function(t){var e=[];for(var r in t)t[r].buffer&&e.push((t[r]=new t[r].constructor(t[r])).buffer);return e},Ku=function(t,e,r,i){var n;if(!As[r]){for(var s="",a={},o=t.length-1,l=0;l<o;++l)s=(n=ou(t[l],s,a))[0],a=n[1];As[r]=ou(t[o],s,a)}var h=Sn({},As[r][1]);return vg(As[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",r,h,bg(h),i)},Bi=function(){return[fe,Xe,Oi,$i,Ri,_n,pl,dl,qu,Wu,Ti,Zu,_t,Is,Tt,Ms,wn,It,Q,xn,kn,vr,ml]},Vi=function(){return[fe,Xe,Oi,$i,Ri,_n,Gs,Hs,Hu,jt,Uu,Yr,Ti,Yu,ir,_t,zt,xi,Ds,qs,Jo,Si,Us,Xo,wn,It,Ju,Xr,Xs,vr]},Qu=function(){return[gl,vl,xe,Li,Xu]},ep=function(){return[yl,ip]},tp=function(){return[bl,xe,fl]},rp=function(){return[np]},vr=function(t){return postMessage(t,[t.buffer])},ml=function(t){return t&&t.size&&new fe(t.size)},Ni=function(t,e,r,i,n,s){var a=Ku(r,i,n,function(o,l){a.terminate(),s(o,l)});return a.postMessage([t,e],e.consume?[t.buffer]:[]),function(){a.terminate()}},Mt=function(t){return t.ondata=function(e,r){return postMessage([e,r],[e.buffer])},function(e){return t.push(e.data[0],e.data[1])}},zi=function(t,e,r,i,n){var s,a=Ku(t,i,n,function(o,l){o?(a.terminate(),e.ondata.call(e,o)):(l[1]&&a.terminate(),e.ondata.call(e,o,l[0],l[1]))});a.postMessage(r),e.push=function(o,l){e.ondata||Q(5),s&&e.ondata(Q(4,0,1),null,!!l),a.postMessage([o,s=l],[o.buffer])},e.terminate=function(){a.terminate()}},it=function(t,e){return t[e]|t[e+1]<<8},Fe=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},Go=function(t,e){return Fe(t,e)+4294967296*Fe(t,e+4)},xe=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},gl=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&xe(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},yl=function(t){t[0]==31&&t[1]==139&&t[2]==8||Q(6,"invalid gzip data");var e=t[3],r=10;4&e&&(r+=t[10]|2+(t[11]<<8));for(var i=(e>>3&1)+(e>>4&1);i>0;i-=!t[r++]);return r+(2&e)},ip=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},vl=function(t){return 10+(t.filename&&t.filename.length+1||0)},bl=function(t,e){var r=e.level,i=r==0?0:r<6?1:r==9?3:2;t[0]=120,t[1]=i<<6|(i?32-2*i:1)},np=function(t){((15&t[0])!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&Q(6,"invalid zlib data"),32&t[1]&&Q(6,"invalid zlib data: preset dictionaries not supported")};function _l(t,e){return e||typeof t!="function"||(e=t,t={}),this.ondata=e,t}var nr=function(){function t(e,r){r||typeof e!="function"||(r=e,e={}),this.ondata=r,this.o=e||{}}return t.prototype.p=function(e,r){this.ondata(Xr(e,this.o,0,0,!r),r)},t.prototype.push=function(e,r){this.ondata||Q(5),this.d&&Q(4),this.d=r,this.p(e,r||!1)},t}(),_g=function(){return function(t,e){zi([Vi,function(){return[Mt,nr]}],this,_l.call(this,t,e),function(r){var i=new nr(r.data);onmessage=Mt(i)},6)}}();function wg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Vi],function(i){return vr(Xs(i.data[0],i.data[1]))},0,r)}function Xs(t,e){return Xr(t,e||{},0,0)}var wt=function(){function t(e){this.s={},this.p=new fe(0),this.ondata=e}return t.prototype.e=function(e){this.ondata||Q(5),this.d&&Q(4);var r=this.p.length,i=new fe(r+e.length);i.set(this.p),i.set(e,r),this.p=i},t.prototype.c=function(e){this.d=this.s.i=e||!1;var r=this.s.b,i=xn(this.p,this.o,this.s);this.ondata(It(i,r,this.s.b),this.d),this.o=It(i,this.s.b-32768),this.s.b=this.o.length,this.p=It(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(e,r){this.e(e),this.c(r)},t}(),sp=function(){return function(t){this.ondata=t,zi([Bi,function(){return[Mt,wt]}],this,0,function(){var e=new wt;onmessage=Mt(e)},7)}}();function ap(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Bi],function(i){return vr(kn(i.data[0],ml(i.data[1])))},1,r)}function kn(t,e){return xn(t,e)}var lu=function(){function t(e,r){this.c=Li(),this.l=0,this.v=1,nr.call(this,e,r)}return t.prototype.push=function(e,r){nr.prototype.push.call(this,e,r)},t.prototype.p=function(e,r){this.c.p(e),this.l+=e.length;var i=Xr(e,this.o,this.v&&vl(this.o),r&&8,!r);this.v&&(gl(i,this.o),this.v=0),r&&(xe(i,i.length-8,this.c.d()),xe(i,i.length-4,this.l)),this.ondata(i,r)},t}(),wb=function(){return function(t,e){zi([Vi,Qu,function(){return[Mt,nr,lu]}],this,_l.call(this,t,e),function(r){var i=new lu(r.data);onmessage=Mt(i)},8)}}();function xb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Vi,Qu,function(){return[hu]}],function(i){return vr(hu(i.data[0],i.data[1]))},2,r)}function hu(t,e){e||(e={});var r=Li(),i=t.length;r.p(t);var n=Xr(t,e,vl(e),8),s=n.length;return gl(n,e),xe(n,s-8,r.d()),xe(n,s-4,i),n}var Ko=function(){function t(e){this.v=1,wt.call(this,e)}return t.prototype.push=function(e,r){if(wt.prototype.e.call(this,e),this.v){var i=this.p.length>3?yl(this.p):4;if(i>=this.p.length&&!r)return;this.p=this.p.subarray(i),this.v=0}r&&(this.p.length<8&&Q(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),wt.prototype.c.call(this,r)},t}(),xg=function(){return function(t){this.ondata=t,zi([Bi,ep,function(){return[Mt,wt,Ko]}],this,0,function(){var e=new Ko;onmessage=Mt(e)},9)}}();function Sg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Bi,ep,function(){return[Qo]}],function(i){return vr(Qo(i.data[0]))},3,r)}function Qo(t,e){return xn(t.subarray(yl(t),-8),e||new fe(ip(t)))}var cu=function(){function t(e,r){this.c=fl(),this.v=1,nr.call(this,e,r)}return t.prototype.push=function(e,r){nr.prototype.push.call(this,e,r)},t.prototype.p=function(e,r){this.c.p(e);var i=Xr(e,this.o,this.v&&2,r&&4,!r);this.v&&(bl(i,this.o),this.v=0),r&&xe(i,i.length-4,this.c.d()),this.ondata(i,r)},t}(),Sb=function(){return function(t,e){zi([Vi,tp,function(){return[Mt,nr,cu]}],this,_l.call(this,t,e),function(r){var i=new cu(r.data);onmessage=Mt(i)},10)}}();function kb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Vi,tp,function(){return[uu]}],function(i){return vr(uu(i.data[0],i.data[1]))},4,r)}function uu(t,e){e||(e={});var r=fl();r.p(t);var i=Xr(t,e,2,4);return bl(i,e),xe(i,i.length-4,r.d()),i}var el=function(){function t(e){this.v=1,wt.call(this,e)}return t.prototype.push=function(e,r){if(wt.prototype.e.call(this,e),this.v){if(this.p.length<2&&!r)return;this.p=this.p.subarray(2),this.v=0}r&&(this.p.length<4&&Q(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),wt.prototype.c.call(this,r)},t}(),kg=function(){return function(t){this.ondata=t,zi([Bi,rp,function(){return[Mt,wt,el]}],this,0,function(){var e=new el;onmessage=Mt(e)},11)}}();function Eg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),Ni(t,e,[Bi,rp,function(){return[tl]}],function(i){return vr(tl(i.data[0],ml(i.data[1])))},5,r)}function tl(t,e){return xn((np(t),t.subarray(2,-4)),e)}var Pg=function(){function t(e){this.G=Ko,this.I=wt,this.Z=el,this.ondata=e}return t.prototype.push=function(e,r){if(this.ondata||Q(5),this.s)this.s.push(e,r);else{if(this.p&&this.p.length){var i=new fe(this.p.length+e.length);i.set(this.p),i.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var n=this,s=function(){n.ondata.apply(n,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(s):(15&this.p[0])!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(s):new this.Z(s),this.s.push(this.p,r),this.p=null}}},t}(),Eb=function(){function t(e){this.G=xg,this.I=sp,this.Z=kg,this.ondata=e}return t.prototype.push=function(e,r){Pg.prototype.push.call(this,e,r)},t}();function Pb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&Q(7),t[0]==31&&t[1]==139&&t[2]==8?Sg(t,e,r):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?ap(t,e,r):Eg(t,e,r)}function Ab(t,e){return t[0]==31&&t[1]==139&&t[2]==8?Qo(t,e):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?kn(t,e):tl(t,e)}var wl=function(t,e,r,i){for(var n in t){var s=t[n],a=e+n,o=i;Array.isArray(s)&&(o=Sn(i,s[1]),s=s[0]),s instanceof fe?r[a]=[s,o]:(r[a+="/"]=[new fe(0),o],wl(s,a,r,i))}},pu=typeof TextEncoder<"u"&&new TextEncoder,rl=typeof TextDecoder<"u"&&new TextDecoder,op=0;try{rl.decode(ir,{stream:!0}),op=1}catch(t){}var lp=function(t){for(var e="",r=0;;){var i=t[r++],n=(i>127)+(i>223)+(i>239);if(r+n>t.length)return[e,It(t,r-1)];n?n==3?(i=((15&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,e+=String.fromCharCode(55296|i>>10,56320|1023&i)):e+=1&n?String.fromCharCode((31&i)<<6|63&t[r++]):String.fromCharCode((15&i)<<12|(63&t[r++])<<6|63&t[r++]):e+=String.fromCharCode(i)}},Cb=function(){function t(e){this.ondata=e,op?this.t=new TextDecoder:this.p=ir}return t.prototype.push=function(e,r){if(this.ondata||Q(5),r=!!r,this.t)return this.ondata(this.t.decode(e,{stream:!0}),r),void(r&&(this.t.decode().length&&Q(8),this.t=null));this.p||Q(4);var i=new fe(this.p.length+e.length);i.set(this.p),i.set(e,this.p.length);var n=lp(i),s=n[0],a=n[1];r?(a.length&&Q(8),this.p=null):this.p=a,this.ondata(s,r)},t}(),Tb=function(){function t(e){this.ondata=e}return t.prototype.push=function(e,r){this.ondata||Q(5),this.d&&Q(4),this.ondata(Jr(e),this.d=r||!1)},t}();function Jr(t,e){if(e){for(var r=new fe(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}if(pu)return pu.encode(t);var n=t.length,s=new fe(t.length+(t.length>>1)),a=0,o=function(c){s[a++]=c};for(i=0;i<n;++i){if(a+5>s.length){var l=new fe(a+8+(n-i<<1));l.set(s),s=l}var h=t.charCodeAt(i);h<128||e?o(h):h<2048?(o(192|h>>6),o(128|63&h)):h>55295&&h<57344?(o(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++i))>>18),o(128|h>>12&63),o(128|h>>6&63),o(128|63&h)):(o(224|h>>12),o(128|h>>6&63),o(128|63&h))}return It(s,0,a)}function mn(t,e){if(e){for(var r="",i=0;i<t.length;i+=16384)r+=String.fromCharCode.apply(null,t.subarray(i,i+16384));return r}if(rl)return rl.decode(t);var n=lp(t),s=n[0];return n[1].length&&Q(8),s}var hp=function(t){return t==1?3:t<6?2:t==9?1:0},cp=function(t,e){return e+30+it(t,e+26)+it(t,e+28)},up=function(t,e,r){var i=it(t,e+28),n=mn(t.subarray(e+46,e+46+i),!(2048&it(t,e+8))),s=e+46+i,a=Fe(t,e+20),o=r&&a==4294967295?pp(t,s):[a,Fe(t,e+24),Fe(t,e+42)],l=o[0],h=o[1],c=o[2];return[it(t,e+10),l,h,n,s+it(t,e+30)+it(t,e+32),c]},pp=function(t,e){for(;it(t,e)!=1;e+=4+it(t,e+2));return[Go(t,e+12),Go(t,e+4),Go(t,e+20)]},yr=function(t){var e=0;if(t)for(var r in t){var i=t[r].length;i>65535&&Q(9),e+=i+4}return e},Ii=function(t,e,r,i,n,s,a,o){var l=i.length,h=r.extra,c=o&&o.length,u=yr(h);xe(t,e,a!=null?33639248:67324752),e+=4,a!=null&&(t[e++]=20,t[e++]=r.os),t[e]=20,e+=2,t[e++]=r.flag<<1|(s<0&&8),t[e++]=n&&8,t[e++]=255&r.compression,t[e++]=r.compression>>8;var f=new Date(r.mtime==null?Date.now():r.mtime),p=f.getFullYear()-1980;if((p<0||p>119)&&Q(10),xe(t,e,p<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>>1),e+=4,s!=-1&&(xe(t,e,r.crc),xe(t,e+4,s<0?-s-2:s),xe(t,e+8,r.size)),xe(t,e+12,l),xe(t,e+14,u),e+=16,a!=null&&(xe(t,e,c),xe(t,e+6,r.attrs),xe(t,e+10,a),e+=14),t.set(i,e),e+=l,u)for(var m in h){var g=h[m],d=g.length;xe(t,e,+m),xe(t,e+2,d),t.set(g,e+4),e+=4+d}return c&&(t.set(o,e),e+=c),e},xl=function(t,e,r,i,n){xe(t,e,101010256),xe(t,e+8,r),xe(t,e+10,r),xe(t,e+12,i),xe(t,e+16,n)},Ws=function(){function t(e){this.filename=e,this.c=Li(),this.size=0,this.compression=0}return t.prototype.process=function(e,r){this.ondata(null,e,r)},t.prototype.push=function(e,r){this.ondata||Q(5),this.c.p(e),this.size+=e.length,r&&(this.crc=this.c.d()),this.process(e,r||!1)},t}(),Ib=function(){function t(e,r){var i=this;r||(r={}),Ws.call(this,e),this.d=new nr(r,function(n,s){i.ondata(null,n,s)}),this.compression=8,this.flag=hp(r.level)}return t.prototype.process=function(e,r){try{this.d.push(e,r)}catch(i){this.ondata(i,null,r)}},t.prototype.push=function(e,r){Ws.prototype.push.call(this,e,r)},t}(),Mb=function(){function t(e,r){var i=this;r||(r={}),Ws.call(this,e),this.d=new _g(r,function(n,s,a){i.ondata(n,s,a)}),this.compression=8,this.flag=hp(r.level),this.terminate=this.d.terminate}return t.prototype.process=function(e,r){this.d.push(e,r)},t.prototype.push=function(e,r){Ws.prototype.push.call(this,e,r)},t}(),Db=function(){function t(e){this.ondata=e,this.u=[],this.d=1}return t.prototype.add=function(e){var r=this;if(this.ondata||Q(5),2&this.d)this.ondata(Q(4+8*(1&this.d),0,1),null,!1);else{var i=Jr(e.filename),n=i.length,s=e.comment,a=s&&Jr(s),o=n!=e.filename.length||a&&s.length!=a.length,l=n+yr(e.extra)+30;n>65535&&this.ondata(Q(11,0,1),null,!1);var h=new fe(l);Ii(h,0,e,i,o,-1);var c=[h],u=function(){for(var d=0,y=c;d<y.length;d++){var v=y[d];r.ondata(null,v,!1)}c=[]},f=this.d;this.d=0;var p=this.u.length,m=Sn(e,{f:i,u:o,o:a,t:function(){e.terminate&&e.terminate()},r:function(){if(u(),f){var d=r.u[p+1];d?d.r():r.d=1}f=1}}),g=0;e.ondata=function(d,y,v){if(d)r.ondata(d,y,v),r.terminate();else if(g+=y.length,c.push(y),v){var b=new fe(16);xe(b,0,134695760),xe(b,4,e.crc),xe(b,8,g),xe(b,12,e.size),c.push(b),m.c=g,m.b=l+g+16,m.crc=e.crc,m.size=e.size,f&&m.r(),f=1}else f&&u()},this.u.push(m)}},t.prototype.end=function(){var e=this;2&this.d?this.ondata(Q(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},t.prototype.e=function(){for(var e=0,r=0,i=0,n=0,s=this.u;n<s.length;n++)i+=46+(h=s[n]).f.length+yr(h.extra)+(h.o?h.o.length:0);for(var a=new fe(i+22),o=0,l=this.u;o<l.length;o++){var h=l[o];Ii(a,e,h,h.f,h.u,-h.c-2,r,h.o),e+=46+h.f.length+yr(h.extra)+(h.o?h.o.length:0),r+=h.b}xl(a,e,this.u.length,i,r),this.ondata(null,a,!0),this.d=2},t.prototype.terminate=function(){for(var e=0,r=this.u;e<r.length;e++)r[e].t();this.d=2},t}();function Fb(t,e,r){r||(r=e,e={}),typeof r!="function"&&Q(7);var i={};wl(t,"",i,e);var n=Object.keys(i),s=n.length,a=0,o=0,l=s,h=new Array(s),c=[],u=function(){for(var d=0;d<c.length;++d)c[d]()},f=function(d,y){Zs(function(){r(d,y)})};Zs(function(){f=r});var p=function(){var d=new fe(o+22),y=a,v=o-a;o=0;for(var b=0;b<l;++b){var _=h[b];try{var x=_.c.length;Ii(d,o,_,_.f,_.u,x);var T=30+_.f.length+yr(_.extra),S=o+T;d.set(_.c,S),Ii(d,a,_,_.f,_.u,x,o,_.m),a+=16+T+(_.m?_.m.length:0),o=S+x}catch(w){return f(w,null)}}xl(d,a,h.length,v,y),f(null,d)};s||p();for(var m=function(d){var y=n[d],v=i[y],b=v[0],_=v[1],x=Li(),T=b.length;x.p(b);var S=Jr(y),w=S.length,M=_.comment,k=M&&Jr(M),I=k&&k.length,P=yr(_.extra),A=_.level==0?0:8,E=function(F,O){if(F)u(),f(F,null);else{var D=O.length;h[d]=Sn(_,{size:T,crc:x.d(),c:O,f:S,m:k,u:w!=y.length||k&&M.length!=I,compression:A}),a+=30+w+P+D,o+=76+2*(w+P)+(I||0)+D,--s||p()}};if(w>65535&&E(Q(11,0,1),null),A)if(T<16e4)try{E(null,Xs(b,_))}catch(F){E(F,null)}else c.push(wg(b,_,E));else E(null,b)},g=0;g<l;++g)m(g);return u}function Ob(t,e){e||(e={});var r={},i=[];wl(t,"",r,e);var n=0,s=0;for(var a in r){var o=r[a],l=o[0],h=o[1],c=h.level==0?0:8,u=(S=Jr(a)).length,f=h.comment,p=f&&Jr(f),m=p&&p.length,g=yr(h.extra);u>65535&&Q(11);var d=c?Xs(l,h):l,y=d.length,v=Li();v.p(l),i.push(Sn(h,{size:l.length,crc:v.d(),c:d,f:S,m:p,u:u!=a.length||p&&f.length!=m,o:n,compression:c})),n+=30+u+g+y,s+=76+2*(u+g)+(m||0)+y}for(var b=new fe(s+22),_=n,x=s-n,T=0;T<i.length;++T){var S=i[T];Ii(b,S.o,S,S.f,S.u,S.c.length);var w=30+S.f.length+yr(S.extra);b.set(S.c,S.o+w),Ii(b,n,S,S.f,S.u,S.c.length,S.o,S.m),n+=16+w+(S.m?S.m.length:0)}return xl(b,n,i.length,x,_),b}var Ag=function(){function t(){}return t.prototype.push=function(e,r){this.ondata(null,e,r)},t.compression=0,t}(),$b=function(){function t(){var e=this;this.i=new wt(function(r,i){e.ondata(null,r,i)})}return t.prototype.push=function(e,r){try{this.i.push(e,r)}catch(i){this.ondata(i,null,r)}},t.compression=8,t}(),Rb=function(){function t(e,r){var i=this;r<32e4?this.i=new wt(function(n,s){i.ondata(null,n,s)}):(this.i=new sp(function(n,s,a){i.ondata(n,s,a)}),this.terminate=this.i.terminate)}return t.prototype.push=function(e,r){this.i.terminate&&(e=It(e,0)),this.i.push(e,r)},t.compression=8,t}(),Lb=function(){function t(e){this.onfile=e,this.k=[],this.o={0:Ag},this.p=ir}return t.prototype.push=function(e,r){var i=this;if(this.onfile||Q(5),this.p||Q(4),this.c>0){var n=Math.min(this.c,e.length),s=e.subarray(0,n);if(this.c-=n,this.d?this.d.push(s,!this.c):this.k[0].push(s),(e=e.subarray(n)).length)return this.push(e,r)}else{var a=0,o=0,l=void 0,h=void 0;this.p.length?e.length?((h=new fe(this.p.length+e.length)).set(this.p),h.set(e,this.p.length)):h=this.p:h=e;for(var c=h.length,u=this.c,f=u&&this.d,p=function(){var d,y=Fe(h,o);if(y==67324752){a=1,l=o,m.d=null,m.c=0;var v=it(h,o+6),b=it(h,o+8),_=2048&v,x=8&v,T=it(h,o+26),S=it(h,o+28);if(c>o+30+T+S){var w=[];m.k.unshift(w),a=2;var M,k=Fe(h,o+18),I=Fe(h,o+22),P=mn(h.subarray(o+30,o+=30+T),!_);k==4294967295?(d=x?[-2]:pp(h,o),k=d[0],I=d[1]):x&&(k=-1),o+=S,m.c=k;var A={name:P,compression:b,start:function(){if(A.ondata||Q(5),k){var E=i.o[b];E||A.ondata(Q(14,"unknown compression type "+b,1),null,!1),(M=k<0?new E(P):new E(P,k,I)).ondata=function(C,$,L){A.ondata(C,$,L)};for(var F=0,O=w;F<O.length;F++){var D=O[F];M.push(D,!1)}i.k[0]==w&&i.c?i.d=M:M.push(ir,!0)}else A.ondata(null,ir,!0)},terminate:function(){M&&M.terminate&&M.terminate()}};k>=0&&(A.size=k,A.originalSize=I),m.onfile(A)}return"break"}if(u){if(y==134695760)return l=o+=12+(u==-2&&8),a=3,m.c=0,"break";if(y==33639248)return l=o-=4,a=3,m.c=0,"break"}},m=this;o<c-4&&p()!=="break";++o);if(this.p=ir,u<0){var g=a?h.subarray(0,l-12-(u==-2&&8)-(Fe(h,l-16)==134695760&&4)):h.subarray(0,o);f?f.push(g,!!a):this.k[+(a==2)].push(g)}if(2&a)return this.push(h.subarray(o),r);this.p=h.subarray(o)}r&&(this.c&&Q(13),this.p=null)},t.prototype.register=function(e){this.o[e.compression]=e},t}(),Zs=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(t){t()};function Cg(t,e,r){r||(r=e,e={}),typeof r!="function"&&Q(7);var i=[],n=function(){for(var d=0;d<i.length;++d)i[d]()},s={},a=function(d,y){Zs(function(){r(d,y)})};Zs(function(){a=r});for(var o=t.length-22;Fe(t,o)!=101010256;--o)if(!o||t.length-o>65558)return a(Q(13,0,1),null),n;var l=it(t,o+8);if(l){var h=l,c=Fe(t,o+16),u=c==4294967295||h==65535;if(u){var f=Fe(t,o-12);(u=Fe(t,f)==101075792)&&(h=l=Fe(t,f+32),c=Fe(t,f+48))}for(var p=e&&e.filter,m=function(d){var y=up(t,c,u),v=y[0],b=y[1],_=y[2],x=y[3],T=y[4],S=y[5],w=cp(t,S);c=T;var M=function(I,P){I?(n(),a(I,null)):(P&&(s[x]=P),--l||a(null,s))};if(!p||p({name:x,size:b,originalSize:_,compression:v}))if(v)if(v==8){var k=t.subarray(w,w+b);if(b<32e4)try{M(null,kn(k,new fe(_)))}catch(I){M(I,null)}else i.push(ap(k,{size:_},M))}else M(Q(14,"unknown compression type "+v,1),null);else M(null,It(t,w,w+b));else M(null,null)},g=0;g<h;++g)m()}else a(null,{});return n}function Bb(t,e){for(var r={},i=t.length-22;Fe(t,i)!=101010256;--i)(!i||t.length-i>65558)&&Q(13);var n=it(t,i+8);if(!n)return{};var s=Fe(t,i+16),a=s==4294967295||n==65535;if(a){var o=Fe(t,i-12);(a=Fe(t,o)==101075792)&&(n=Fe(t,o+32),s=Fe(t,o+48))}for(var l=e&&e.filter,h=0;h<n;++h){var c=up(t,s,a),u=c[0],f=c[1],p=c[2],m=c[3],g=c[4],d=c[5],y=cp(t,d);s=g,l&&!l({name:m,size:f,originalSize:p,compression:u})||(u?u==8?r[m]=kn(t.subarray(y,y+f),new fe(p)):Q(14,"unknown compression type "+u):r[m]=It(t,y,y+f))}return r}var Tg="@dotlottie/player-component",Ig="1.4.2",Mg="dotlottie animation player web component.",Dg="dist/dotlottie-player.js",Fg="dist/dotlottie-player.esm.js",Og="dist/dotlottie-player.esm.d.ts",$g="https://dotlottie.com/players",Rg="https://github.com/dotlottie/player-component.git",Lg="https://github.com/dotlottie/player-component/issues",Bg="Jawish Hameed <jawish@lottiefiles.com>",Vg="MIT",Ng={build:"yarn build-dotlottie",buildtsup:"tsup","build-with-coverage":"CODE_COVERAGE=true yarn build-dotlottie","build-dotlottie":"yarn cleanup && rollup -c","build:types":"tsc --declaration",dev:"yarn cleanup && rollup -c --watch",lint:"eslint","lint:fix":"eslint --fix",cleanup:"shx rm -rf dist && shx mkdir dist",serve:"node ./cypress/pages/server.js -p 8000 &","start-cypress":"npx cypress run && npx nyc report --reporter=text-summary","run-tests":"yarn build-with-coverage && yarn serve && yarn start-cypress","postrun-tests":"kill $(lsof -t -i:8000)"},zg={"@rollup/plugin-json":"^6.0.0",fflate:"^0.7.3",lit:"^2.4.1","lottie-web":"^5.10.0",tsup:"^6.1.3"},jg={"@babel/core":"^7.11.0","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-decorators":"^7.10.5","@babel/preset-env":"^7.11.0","@babel/preset-typescript":"^7.10.4","@changesets/cli":"^2.24.4","@cypress/code-coverage":"^3.9.12","@istanbuljs/nyc-config-typescript":"^1.0.2","@rollup/plugin-babel":"^5.1.0","@rollup/plugin-commonjs":"^14.0.0","@rollup/plugin-node-resolve":"^8.4.0","@typescript-eslint/eslint-plugin":"^2.6.1","@typescript-eslint/parser":"^2.6.1","babel-plugin-istanbul":"^6.1.1",changesets:"^1.0.2",cypress:"^9.4.1",eslint:"^6.6.0","eslint-config-prettier":"^6.5.0","eslint-plugin-prettier":"^3.1.1",fastify:"^3.27.1","fastify-static":"^4.5.0",lerna:"^4.0.0","parcel-bundler":"^1.12.4",prettier:"1.18.2",rollup:"^2.23.0","rollup-plugin-alias":"^2.2.0","rollup-plugin-copy":"^3.3.0","rollup-plugin-filesize":"^9.0.2","rollup-plugin-node-globals":"^1.4.0","rollup-plugin-serve":"^1.0.3","rollup-plugin-terser":"^6.1.0","rollup-plugin-typescript2":"^0.27.1","rollup-plugin-visualizer":"^4.0.4",shx:"^0.3.3","source-map-support":"^0.5.21","ts-node":"^10.5.0",typescript:"^3.7.5"},Gg=["dist"],Hg=["dotlottie","animation","web component","component","lit-element","player"],qg=["> 3%"],Ug={access:"public"},Wg={extends:"@istanbuljs/nyc-config-typescript",all:!0},du={name:Tg,version:Ig,description:Mg,main:Dg,module:Fg,types:Og,homepage:$g,repository:Rg,bugs:Lg,author:Bg,license:Vg,scripts:Ng,dependencies:zg,devDependencies:jg,files:Gg,keywords:Hg,browserslist:qg,publishConfig:Ug,nyc:Wg},lt=t=>new Error("[dotLottie-player-component] ".concat(t)),fu=t=>{let e="[dotLottie-player-component] ".concat(t);console.error(e)},Ho=t=>{let e="[dotLottie-player-component] ".concat(t);console.warn(e)},mu,gu,yu,vu,bu,Pe,er,je;(function(t){t.Loading="loading",t.Playing="playing",t.Paused="paused",t.Stopped="stopped",t.Frozen="frozen",t.Error="error"})(Pe||(Pe={})),function(t){t.Normal="normal",t.Bounce="bounce"}(er||(er={})),function(t){t.Load="load",t.Error="error",t.Ready="ready",t.Play="play",t.Pause="pause",t.Stop="stop",t.Freeze="freeze",t.Loop="loop",t.Complete="complete",t.Rendered="rendered",t.Frame="frame"}(je||(je={}));var _u="dotlottie-player",Ge=class t extends Ur{constructor(){super(),this.mode=er.Normal,this.autoplay=!1,this.background="transparent",this.controls=!1,this.direction=1,this.hover=!1,this.renderer="svg",this.speed=1,this.currentState=Pe.Loading,this.intermission=1,this.activeAnimationId=null,this._counter=1,this._activeAnimationIndex=0,this._manifest={animations:[]}}static get properties(){return{mode:{type:String},autoplay:{type:Boolean},background:{type:String},controls:{type:Boolean},direction:{type:Number},hover:{type:Boolean},loop:{type:String},renderer:{type:String},speed:{type:Number},src:{type:String},currentState:{type:String},seeker:{type:Object},intermission:{type:Number},activeAnimationId:{type:String}}}_parseLoop(e){let r=parseInt(e,10);return Number.isInteger(r)&&r>0?(this._count=r,this._loop=!0,!0):typeof e=="string"&&["true","false"].includes(e)?(this._loop=e==="true",this._loop):(Ho("loop must be a positive integer or a boolean"),!1)}_onVisibilityChange(){document.hidden&&this.currentState===Pe.Playing?this.freeze():this.currentState===Pe.Frozen&&this.play()}_handleSeekChange(e){if(!this._lottie||isNaN(e.target.value))return;let r=e.target.value/100*this._lottie.totalFrames;this.seek(r)}isLottie(e){let r=!1;return e.animations&&e.animations.length?(e.animations.forEach(i=>{this.isLottie(i)||(r=!0)}),r):["v","ip","op","layers","fr","w","h"].every(i=>Object.prototype.hasOwnProperty.call(e,i))}parseSrc(e){if(typeof e=="object")return e;try{return JSON.parse(e)}catch{return new URL(e,window.location.href).toString()}}async _fetchDotLottie(e){return await fetch(e,{method:"GET",mode:"cors",headers:{"Response-Type":"arraybuffer"}}).then(r=>r.arrayBuffer()).then(async r=>{let i=[],n={animations:[],manifest:void 0},s=await new Promise((o,l)=>{Cg(new Uint8Array(r),(h,c)=>{h&&l(h),o(c)})}),a;if(s["manifest.json"]){let o=mn(s["manifest.json"]),l=JSON.parse(o);if(!("animations"in l))throw lt("Manifest not found");if(l.animations.length===0)throw lt("No animations listed in the manifest");n.manifest=l;for(let h of l.animations)a=JSON.parse(mn(s["animations/".concat(h.id,".json")])),"assets"in a&&a.assets.map(c=>{if(!c.p||!s["images/".concat(c.p)])return;let u=btoa(mn(s["images/".concat(c.p)],!0));c.p="data:;base64,"+u,c.e=1}),i.push(a);return n.manifest=l,n.animations=i,n}throw lt("No manifest found in file.")}).catch(r=>{throw lt(r)})}async _fetchJsonFile(e){return await fetch(e,{method:"GET",mode:"cors",headers:{"Response-Type":"json"}}).then(r=>r.json()).then(r=>{let i=[],n={animations:[{id:e.substring(e.lastIndexOf("/")+1,e.lastIndexOf(".")),speed:1,loop:"true",direction:1}],description:"",author:"",generator:"dotLottie-player-component",revision:1,version:"1.0.0"},s={animations:[],manifest:void 0};return i.push(r),s.animations=i,s.manifest=n,s}).catch(r=>{throw lt(r)})}async _fetchFileAndLoad(e){var r;let i={animations:[],manifest:void 0};if(i=((r=e.split(/[#?]/)[0].split(".").pop())===null||r===void 0?void 0:r.toLowerCase())==="json"?await this._fetchJsonFile(e):await this._fetchDotLottie(e),!i.animations||!i.manifest||i.animations.length===0)throw this.currentState=Pe.Error,this.dispatchEvent(new CustomEvent(je.Error)),lt(i.animations&&i.animations.length?"Manifest not found":"Animations are empty");if(this._animations=i.animations,this._manifest=i.manifest,this.activeAnimationId){let s=this._manifest.animations.findIndex(a=>a.id===this.activeAnimationId);s!==-1?this._activeAnimationIndex=s:Ho("Active animation not found in manifest")}else if(this._manifest&&this._manifest.activeAnimationId){let s=this._manifest.animations.findIndex(a=>a.id===this._manifest.activeAnimationId);s!==-1?this._activeAnimationIndex=s:Ho("Active animation not found in manifest")}let n=this._animations[this._activeAnimationIndex];if(n===void 0)throw lt("No animation to load!");return n}_loadManifestOptions(e){if(this._requireAnimationsInTheManifest(),this._manifest.animations[e]===void 0)throw lt("Animation not found in manifest");let{autoplay:r,direction:i,loop:n,playMode:s,speed:a,hover:o,intermission:l}=this._manifest.animations[e];r!==void 0&&(this.autoplay=r),i!==void 0&&(this.direction=i),n!==void 0&&(this.loop=n),s!==void 0&&(this.mode=s),a!==void 0&&(this.speed=a),o!==void 0&&(this.hover=o),l!==void 0&&(this.intermission=l)}_initListeners(){this.dispatchEvent(new CustomEvent(je.Load)),this._lottie.addEventListener("enterFrame",()=>{this.seeker=this._lottie.currentFrame/this._lottie.totalFrames*100,this.dispatchEvent(new CustomEvent(je.Frame,{detail:{frame:this._lottie.currentFrame,seeker:this.seeker}}))}),this._lottie.addEventListener("complete",()=>{if(this.currentState===Pe.Playing){if((!this._loop||this._count&&this._counter>=this._count)&&(this.dispatchEvent(new CustomEvent(je.Complete)),this.mode!==er.Bounce||this._lottie.currentFrame===0))return;this.mode===er.Bounce?(this._count&&(this._counter+=.5),setTimeout(()=>{this.dispatchEvent(new CustomEvent(je.Loop)),this.currentState===Pe.Playing&&(this._lottie.setDirection(-1*this._lottie.playDirection),this._lottie.play())},this.intermission)):(this._count&&(this._counter+=1),window.setTimeout(()=>{this.dispatchEvent(new CustomEvent(je.Loop)),this.currentState===Pe.Playing&&(this.direction===-1?(this.seek("99%"),this.play()):(this._lottie.stop(),this.play()))},this.intermission))}else this.dispatchEvent(new CustomEvent(je.Complete))}),this._lottie.addEventListener("DOMLoaded",()=>{this.dispatchEvent(new CustomEvent(je.Ready))}),this._lottie.addEventListener("data_ready",()=>{this.dispatchEvent(new CustomEvent(je.Load))}),this._lottie.addEventListener("data_failed",()=>{this.currentState=Pe.Error,this.dispatchEvent(new CustomEvent(je.Error))}),this.container.addEventListener("mouseenter",()=>{this.hover&&this.currentState!==Pe.Playing&&this.play()}),this.container.addEventListener("mouseleave",()=>{this.hover&&this.currentState===Pe.Playing&&this.stop()})}async load(e,r,i){if(!this.shadowRoot)return;let n={container:this.container,loop:!1,autoplay:!1,renderer:this.renderer,rendererSettings:r||{scaleMode:"noScale",clearCanvas:!1,progressiveLoad:!0,hideOnTransparent:!0}};try{let s=this.parseSrc(e),a=null;if(typeof s=="string")a=await this._fetchFileAndLoad(s);else if(typeof s=="object"&&!this.isLottie(s))throw lt("Load method failing. Object is not a valid Lottie.");if(this._lottie&&this._lottie.destroy(),i!==void 0)for(let[o,l]of Object.entries(i))o==="playMode"?this.mode=l==="normal"?er.Normal:er.Bounce:l!==void 0&&(this[o]=l);else if(this._activeAnimationIndex===0||this._manifest.animations[this._activeAnimationIndex].id===this.activeAnimationId||this._manifest.animations[this._activeAnimationIndex].id===this._manifest.activeAnimationId){let o=this._manifest.animations[this._activeAnimationIndex],l=Object.keys(t.properties),h=Array.from(this.getAttributeNames());for(let u of h){let f=this.getAttribute(u);f&&(this[u]=f)}let c=l.filter(u=>!h.includes(u.toLowerCase())&&this._manifest.animations[this._activeAnimationIndex].hasOwnProperty(u));for(let u of c){let f=o[u];f!==void 0&&(u==="playMode"?this.mode=f==="normal"?er.Normal:er.Bounce:this[u]=f)}}else this._loadManifestOptions(this._activeAnimationIndex);this._lottie=gg.loadAnimation(Object.assign(Object.assign({},n),{animationData:a!==null?a:s}))}catch(s){return this.currentState=Pe.Error,this.dispatchEvent(new CustomEvent(je.Error)),void console.error(s)}if(!this._lottie)throw this.currentState=Pe.Error,this.dispatchEvent(new CustomEvent(je.Error)),lt("Player failed to initialize.");this._initListeners(),this.setSpeed(this.speed),this.setDirection(this.direction),this.autoplay&&(this.direction===-1&&this.seek("99%"),this.play())}getActiveId(){return this._manifest.animations?this._manifest.animations[this._activeAnimationIndex].id:null}getActiveAnimationIndex(){return this._activeAnimationIndex}animationCount(){return this._animations?this._animations.length:0}getManifest(){return this._manifest}getLottie(){return this._lottie}getVersions(){return{lottieWebVersion:"".concat(du.dependencies["lottie-web"]),dotLottiePlayerVersion:"".concat(du.version)}}_requireAnimationsInTheManifest(){if(!this._manifest.animations.length)throw lt("No animations found in manifest.")}_requireAnimationsToBeLoaded(){var e;if(!(!((e=this._animations)===null||e===void 0)&&e.length))throw lt("No animations have been loaded.")}previous(e){this._activeAnimationIndex=(this._activeAnimationIndex-1+this._manifest.animations.length)%this._manifest.animations.length,this.play(this._activeAnimationIndex,e)}next(e){this._activeAnimationIndex=(this._activeAnimationIndex+1)%this._manifest.animations.length,this.play(this._activeAnimationIndex,e)}reset(){this._manifest&&this._manifest.activeAnimationId?this.play(this._manifest.activeAnimationId):this.activeAnimationId?this.play(this.activeAnimationId):this.play(0)}_validateAnimationIndex(e){if(isNaN(e)||e<0||e>=this._manifest.animations.length)throw lt("Animation index ".concat(e," is out of bounds."))}play(e,r){if(this._lottie){if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),e===void 0)return this._lottie.play(),this.currentState=Pe.Playing,void this.dispatchEvent(new CustomEvent(je.Play));if(this._requireAnimationsToBeLoaded(),this._requireAnimationsInTheManifest(),e!==void 0){if(!this._animations)throw lt("No animations have been loaded.");if(this._requireAnimationsInTheManifest(),typeof e=="string"){let i=this._manifest.animations.findIndex(n=>n.id===e);i!==-1?(this._activeAnimationIndex=i,this.load(this._animations[this._activeAnimationIndex],{playbackOptions:r})):fu("No animation with the id '".concat(e,"' was found."))}else typeof e=="number"&&(this._validateAnimationIndex(e),this._manifest.animations&&this._manifest.animations[e]?(this._activeAnimationIndex=e,this.load(this._animations[this._activeAnimationIndex],{playbackOptions:r})):fu("Animation not found at index: ".concat(e)))}}}pause(){this._lottie&&(this._lottie.pause(),this.currentState=Pe.Paused,this.dispatchEvent(new CustomEvent(je.Pause)))}stop(){this._lottie&&(this._counter=0,this._lottie.stop(),this.direction===-1&&this._lottie.goToAndStop(this._lottie.totalFrames,!0),this.currentState=Pe.Stopped,this.dispatchEvent(new CustomEvent(je.Stop)))}seek(e){if(!this._lottie)return;typeof e=="number"&&(e=Math.round(e));let r=/^(\d+)(%?)$/.exec(e.toString());if(!r)return;let i=r[2]==="%"?this._lottie.totalFrames*Number(r[1])/100:Number(r[1]);this.seeker=i,this.currentState===Pe.Playing?this._lottie.goToAndPlay(i,!0):(this._lottie.goToAndStop(i,!0),this._lottie.pause())}snapshot(){let e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];if(!this.shadowRoot)return;let r=this.shadowRoot.querySelector(".animation svg"),i=new XMLSerializer().serializeToString(r);if(e){let n=document.createElement("a");n.href="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i),n.download="download_"+this.seeker+".svg",document.body.appendChild(n),n.click(),document.body.removeChild(n)}return i}freeze(){this._lottie&&(this._lottie.pause(),this.currentState=Pe.Frozen,this.dispatchEvent(new CustomEvent(je.Freeze)))}setSpeed(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this._lottie&&this._lottie.setSpeed(e)}setDirection(e){this._lottie&&this._lottie.setDirection(e)}setLooping(e){this._lottie&&(this._lottie.loop=this._parseLoop(e))}isLooping(){return!!this._loop&&this._loop}togglePlay(){return this.currentState===Pe.Playing?this.pause():this.play()}toggleLooping(){let e=!this._loop;this.setLooping(e.toString())}static get styles(){return yg}async firstUpdated(){"IntersectionObserver"in window&&(this._io=new IntersectionObserver(e=>{e[0].isIntersecting?this.currentState===Pe.Frozen&&this.play():this.currentState===Pe.Playing&&this.freeze()}),this._io.observe(this.container)),document.hidden!==void 0&&document.addEventListener("visibilitychange",()=>this._onVisibilityChange()),this.loop?this._parseLoop(this.loop):this.hasAttribute("loop")&&this._parseLoop("true"),this.src&&await this.load(this.src),this.dispatchEvent(new CustomEvent(je.Rendered))}disconnectedCallback(){this._io&&(this._io.disconnect(),this._io=void 0),this._lottie&&this._lottie.destroy(),document.removeEventListener("visibilitychange",()=>this._onVisibilityChange())}renderControls(){let e=this.currentState===Pe.Playing,r=this.currentState===Pe.Paused,i=this.currentState===Pe.Stopped;return Ps(mu||(mu=wi([`
|
|
196
196
|
<div id="lottie-controls" aria-label="lottie-animation-controls" class="toolbar">
|
|
197
197
|
<button
|
|
198
198
|
id="lottie-play-button"
|
|
@@ -264,7 +264,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
264
264
|
</div>
|
|
265
265
|
`,`
|
|
266
266
|
</div>
|
|
267
|
-
`])),e,r,this.background,this.currentState===Pe.Error?Ps(bu||(bu=wi([' <div class="error">\u26A0\uFE0F</div> ']))):void 0,this.controls?this.renderControls():void 0)}};tt([ug(".animation")],Ge.prototype,"container",void 0),tt([rt()],Ge.prototype,"mode",void 0),tt([rt({type:Boolean})],Ge.prototype,"autoplay",void 0),tt([rt({type:String})],Ge.prototype,"background",void 0),tt([rt({type:Boolean})],Ge.prototype,"controls",void 0),tt([rt({type:Number})],Ge.prototype,"direction",void 0),tt([rt({type:Boolean})],Ge.prototype,"hover",void 0),tt([rt({type:String})],Ge.prototype,"loop",void 0),tt([rt({type:String})],Ge.prototype,"renderer",void 0),tt([rt({type:Number})],Ge.prototype,"speed",void 0),tt([rt({type:String})],Ge.prototype,"src",void 0),tt([rt({type:String})],Ge.prototype,"currentState",void 0),tt([rt()],Ge.prototype,"seeker",void 0),tt([rt()],Ge.prototype,"intermission",void 0),tt([rt({type:String})],Ge.prototype,"activeAnimationId",void 0),customElements.get(_u)||hg(_u)(Ge);var Ks,En=class extends De(Ee){constructor(){super();
|
|
267
|
+
`])),e,r,this.background,this.currentState===Pe.Error?Ps(bu||(bu=wi([' <div class="error">\u26A0\uFE0F</div> ']))):void 0,this.controls?this.renderControls():void 0)}};tt([ug(".animation")],Ge.prototype,"container",void 0),tt([rt()],Ge.prototype,"mode",void 0),tt([rt({type:Boolean})],Ge.prototype,"autoplay",void 0),tt([rt({type:String})],Ge.prototype,"background",void 0),tt([rt({type:Boolean})],Ge.prototype,"controls",void 0),tt([rt({type:Number})],Ge.prototype,"direction",void 0),tt([rt({type:Boolean})],Ge.prototype,"hover",void 0),tt([rt({type:String})],Ge.prototype,"loop",void 0),tt([rt({type:String})],Ge.prototype,"renderer",void 0),tt([rt({type:Number})],Ge.prototype,"speed",void 0),tt([rt({type:String})],Ge.prototype,"src",void 0),tt([rt({type:String})],Ge.prototype,"currentState",void 0),tt([rt()],Ge.prototype,"seeker",void 0),tt([rt()],Ge.prototype,"intermission",void 0),tt([rt({type:String})],Ge.prototype,"activeAnimationId",void 0),customElements.get(_u)||hg(_u)(Ge);var Ks,En=class extends De(Ee){constructor(){super();me(this,"render",()=>pe`
|
|
268
268
|
<button class="leading-0 relative inline-block h-14 w-14 rounded-full shadow-xl">
|
|
269
269
|
<!-- -->
|
|
270
270
|
${R(this,Ks).call(this)}
|
|
@@ -286,11 +286,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
286
286
|
</svg>
|
|
287
287
|
</div>
|
|
288
288
|
</div>
|
|
289
|
-
`);this.dialogShown=!1,this.bubbleImageURL=""}};Ks=new WeakMap,
|
|
289
|
+
`);this.dialogShown=!1,this.bubbleImageURL=""}};Ks=new WeakMap,me(En,"styles",no`
|
|
290
290
|
:host {
|
|
291
291
|
line-height: 0;
|
|
292
292
|
}
|
|
293
|
-
`),
|
|
293
|
+
`),me(En,"properties",{dialogShown:{type:Boolean,attribute:"dialog-shown"},bubbleImageURL:{type:String,attribute:"bubble-image-url"}});customElements.define("mw-bubble",En);function Zg(t){return!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&t.keyCode==13}var ea,dp,ta,fp,ra,mp,ia,gp,na,yp,Qs=class extends De(Ee){constructor(){super();Z(this,ea);Z(this,ta);Z(this,ra);Z(this,ia);Z(this,na);me(this,"render",()=>pe`
|
|
294
294
|
<form class="flex items-center space-x-4 border-t bg-white px-4" @submit="${he(this,ra,mp)}">
|
|
295
295
|
<!-- text input -->
|
|
296
296
|
<textarea name="input" @keydown="${he(this,ta,fp)}" class="my-2 block w-full flex-1 resize-none rounded py-2 text-[16px] text-gray-800 outline-none transition-colors" placeholder="${this.config.input.placeholder}" autofocus></textarea>
|
|
@@ -310,7 +310,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
310
310
|
</button>
|
|
311
311
|
</div>
|
|
312
312
|
</form>
|
|
313
|
-
`);this.disabled=!1,this.config}};ea=new WeakSet,dp=function(){return this.shadowRoot?.querySelector("button")},ta=new WeakSet,fp=function(r){Zg(r)&&(r.preventDefault(),this.disabled||R(this,ea,dp)?.click())},ra=new WeakSet,mp=function(r){if(r.preventDefault(),this.disabled){he(this,na,yp).call(this);return}let i=r.target?.input,n=i.value;n&&(i.value="",he(this,ia,gp).call(this,n))},ia=new WeakSet,gp=function(r){let i={value:r};this.dispatchEvent(new CustomEvent("mw-submit",{detail:i}))},na=new WeakSet,yp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-cancel",{detail:r}))},
|
|
313
|
+
`);this.disabled=!1,this.config}};ea=new WeakSet,dp=function(){return this.shadowRoot?.querySelector("button")},ta=new WeakSet,fp=function(r){Zg(r)&&(r.preventDefault(),this.disabled||R(this,ea,dp)?.click())},ra=new WeakSet,mp=function(r){if(r.preventDefault(),this.disabled){he(this,na,yp).call(this);return}let i=r.target?.input,n=i.value;n&&(i.value="",he(this,ia,gp).call(this,n))},ia=new WeakSet,gp=function(r){let i={value:r};this.dispatchEvent(new CustomEvent("mw-submit",{detail:i}))},na=new WeakSet,yp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-cancel",{detail:r}))},me(Qs,"properties",{disabled:{type:Boolean},config:{type:Object}});customElements.define("mw-chat-input",Qs);var Pn=class extends fr{constructor(e){if(super(e),this.et=Me,e.type!==gi.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Me||e==null)return this.ft=void 0,this.et=e;if(e===vt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;let r=[e];return r.raw=r,this.ft={_$litType$:this.constructor.resultType,strings:r,values:[]}}};Pn.directiveName="unsafeHTML",Pn.resultType=1;var ji=yi(Pn);var sa=class extends De(Ee){constructor(){super(),this.side="assistant",this.config}render(){switch(this.side){case"user":return pe`
|
|
314
314
|
<div class="ml-20 flex justify-end">
|
|
315
315
|
<div class="max-w-full">
|
|
316
316
|
<!--
|
|
@@ -339,7 +339,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
339
339
|
</div>
|
|
340
340
|
</div>
|
|
341
341
|
</div>
|
|
342
|
-
`;default:throw new Error(`unknown side: ${this.side}`)}}};
|
|
342
|
+
`;default:throw new Error(`unknown side: ${this.side}`)}}};me(sa,"properties",{side:{type:String},config:{type:Object}});customElements.define("mw-chat-message",sa);var oa,vp,la,bp,aa=class extends De(Ee){constructor(){super();Z(this,oa);Z(this,la);me(this,"render",()=>pe`
|
|
343
343
|
<div class="flex items-center justify-between space-x-4 p-4">
|
|
344
344
|
<mw-pulse-dot class="contents" position="bottom-right" color="green-500">
|
|
345
345
|
<div class="h-10 w-10 overflow-hidden rounded">
|
|
@@ -367,7 +367,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
367
367
|
<span class="inline-block h-6 w-6 leading-6">✕</span>
|
|
368
368
|
</button>
|
|
369
369
|
</div>
|
|
370
|
-
`);this.config,this.messages=0}};oa=new WeakSet,vp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-close",{detail:r}))},la=new WeakSet,bp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-delete-history",{detail:r}))},
|
|
370
|
+
`);this.config,this.messages=0}};oa=new WeakSet,vp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-close",{detail:r}))},la=new WeakSet,bp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-delete-history",{detail:r}))},me(aa,"properties",{config:{type:Object},messages:{type:Number}});customElements.define("mw-header",aa);var Sl=class extends De(Ee){constructor(){super(...arguments);me(this,"render",()=>pe`
|
|
371
371
|
<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">
|
|
372
372
|
<circle fill="currentFill" stroke="none" cx="27" cy="50" r="6">
|
|
373
373
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1" />
|
|
@@ -379,7 +379,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
379
379
|
<animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3" />
|
|
380
380
|
</circle>
|
|
381
381
|
</svg>
|
|
382
|
-
`)}};customElements.define("mw-loading",Sl);var An,ha=class{constructor(e,r,i){Z(this,An,void 0);
|
|
382
|
+
`)}};customElements.define("mw-loading",Sl);var An,ha=class{constructor(e,r,i){Z(this,An,void 0);me(this,"delay");me(this,"callback");this.delay=r,this.callback=i,e.addController(this)}hostConnected(){de(this,An,setTimeout(()=>this.callback(),this.delay))}hostDisconnected(){clearTimeout(R(this,An))}};An=new WeakMap;var sr,br,Cn=class{constructor(e){Z(this,sr,[]);Z(this,br,new AbortController);e.addController(this),this.hostConnected()}deferCleanup(e){R(this,sr).push(e)}get signal(){return R(this,br).signal}hostConnected(){de(this,sr,R(this,sr)||[]),de(this,br,R(this,br)||new AbortController)}hostDisconnected(){for(;R(this,sr).length>0;)R(this,sr).pop()?.();de(this,sr,[]),R(this,br).abort(),de(this,br,new AbortController)}};sr=new WeakMap,br=new WeakMap;var ua,Gt,Tn,In,pa,_p,da,wp,fa,xp,ma,Sp,ga,kp,ca=class extends De(Ee){constructor(){super();Z(this,pa);Z(this,da);Z(this,fa);Z(this,ma);Z(this,ga);Z(this,ua,void 0);Z(this,Gt,!1);Z(this,Tn,!1);Z(this,In,new Cn(this));me(this,"_handleInteraction",()=>{R(this,Tn)||(de(this,Tn,!0),window.removeEventListener("click",this._handleInteraction),window.removeEventListener("keydown",this._handleInteraction),he(this,ga,kp).call(this))});this.position={},this.aiName="Molin AI",this.dialogShown=!1,this.popupDelayMs=5e3,this.popupText="Hello there. How can we help?"}render(){return pe`
|
|
383
383
|
<!-- shadow backdrop -->
|
|
384
384
|
<div class="${R(this,Gt)?"visible opacity-100":"invisible opacity-0"} fixed inset-0 z-[99999999] bg-black bg-opacity-50 transition-[opacity,visibility] sm:hidden"></div>
|
|
385
385
|
|
|
@@ -397,7 +397,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
397
397
|
|
|
398
398
|
<mw-powered-by class="sm:hidden"></mw-powered-by>
|
|
399
399
|
</div>
|
|
400
|
-
`}updated(r){let i=r.has("dialogShown"),n=this.dialogShown;i&&n===!0&&R(this,Gt)&&(
|
|
400
|
+
`}updated(r){let i=r.has("dialogShown"),n=this.dialogShown;i&&n===!0&&R(this,Gt)&&(de(this,Gt,!1),this.requestUpdate())}firstUpdated(){he(this,ma,Sp).call(this)}};ua=new WeakMap,Gt=new WeakMap,Tn=new WeakMap,In=new WeakMap,pa=new WeakSet,_p=function(){new Audio("https://molin.ai/sounds/widget/popup.aac").play().then(()=>{console.log("Audio played successfully.")}).catch(i=>{console.error("Error playing audio:",i)}),de(this,Gt,!0),this.requestUpdate()},da=new WeakSet,wp=function(r){r.preventDefault(),r.stopPropagation(),de(this,Gt,!1),sessionStorage.setItem("_molin_popup","user_dismissed"),this.requestUpdate()},fa=new WeakSet,xp=function(){de(this,Gt,!1),this.dispatchEvent(new CustomEvent("popup-chat-open",{})),this.requestUpdate()},ma=new WeakSet,Sp=function(){window.addEventListener("click",this._handleInteraction,{signal:R(this,In).signal}),window.addEventListener("keydown",this._handleInteraction,{signal:R(this,In).signal})},ga=new WeakSet,kp=function(){de(this,ua,new ha(this,this.popupDelayMs,()=>{let r=!this.dialogShown,i=sessionStorage.getItem("_molin_popup")!=="user_dismissed";r&&i&&he(this,pa,_p).call(this)}))},me(ca,"properties",{position:{type:Object},aiName:{type:String,attribute:"ai-name"},dialogShown:{type:Boolean,attribute:"dialog-shown"},popupDelayMs:{type:Number,attribute:"popup-delay-ms"},popupText:{type:String,attribute:"popup-text"}});customElements.define("mw-popup",ca);var kl=class extends De(Ee){constructor(){super(...arguments);me(this,"render",()=>pe`
|
|
401
401
|
<p class="flex items-center justify-center space-x-1 text-xs text-gray-400">
|
|
402
402
|
<span class="pointer-events-none">Powered by</span>
|
|
403
403
|
<a class="inline-flex items-center space-x-1 text-gray-600 underline" href="https://molin.ai/" target="_blank">
|
|
@@ -422,12 +422,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
422
422
|
<span class="bg-${this.color} relative inline-flex h-3 w-3 rounded-full"></span>
|
|
423
423
|
</span>
|
|
424
424
|
</span>
|
|
425
|
-
`}};va=new WeakSet,Ep=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:return""}},
|
|
425
|
+
`}};va=new WeakSet,Ep=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:return""}},me(ya,"properties",{color:{type:String,attribute:"color"},animated:{type:Boolean,attribute:"animated"},position:{type:String,attribute:"position"}});customElements.define("mw-pulse-dot",ya);var Pp=yi(class extends fr{constructor(t){var e;if(super(t),t.type!==gi.ATTRIBUTE||t.name!=="class"||((e=t.strings)===null||e===void 0?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var r,i;if(this.it===void 0){this.it=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(let s in e)e[s]&&!(!((r=this.nt)===null||r===void 0)&&r.has(s))&&this.it.add(s);return this.render(e)}let n=t.element.classList;this.it.forEach(s=>{s in e||(n.remove(s),this.it.delete(s))});for(let s in e){let a=!!e[s];a===this.it.has(s)||!((i=this.nt)===null||i===void 0)&&i.has(s)||(a?(n.add(s),this.it.add(s)):(n.remove(s),this.it.delete(s)))}return vt}});var El=t=>t??Me;var Mn,ht,Bt,Dn,Pl,ba=class{constructor(e,r){Z(this,Dn);Z(this,Mn,void 0);Z(this,ht,void 0);Z(this,Bt,void 0);if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");de(this,Mn,e),R(this,Mn).addController(this),de(this,ht,r)}reconnect(e){de(this,ht,e),R(this,Bt)?.close(),de(this,Bt,he(this,Dn,Pl).call(this))}hostConnected(){de(this,Bt,he(this,Dn,Pl).call(this))}hostDisconnected(){R(this,Bt)?.close(),de(this,Bt,void 0)}send(e){R(this,Bt)?.send(e)}close(){R(this,Bt)?.close(1e3,"new_chat")}render(e={}){switch(R(this,Bt)?.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?.()}}};Mn=new WeakMap,ht=new WeakMap,Bt=new WeakMap,Dn=new WeakSet,Pl=function(){let e=new WebSocket(R(this,ht).url());return R(this,ht).onClose&&(e.onclose=R(this,ht).onClose),R(this,ht).onOpen&&(e.onopen=R(this,ht).onOpen),R(this,ht).onError&&(e.onerror=R(this,ht).onError),R(this,ht).onMessage&&(e.onmessage=R(this,ht).onMessage),e};var Ht,Ke,Kr,Gi,Fn,Hi,_a,On,Al,$n,Cl,Rn,Tl,Ln,Il,xa,Ap,wa=class{constructor(e,r){Z(this,Hi);Z(this,On);Z(this,$n);Z(this,Rn);Z(this,Ln);Z(this,xa);Z(this,Ht,void 0);Z(this,Ke,void 0);Z(this,Kr,void 0);Z(this,Gi,!1);me(this,"isStreaming",!1);me(this,"messages",[]);me(this,"conversationId","");Z(this,Fn,0);e.addController(this),de(this,Ht,e),de(this,Ke,r),de(this,Kr,new ba(e,{url:()=>R(this,Ke).url(this.conversationId,{}),onOpen:i=>he(this,On,Al).call(this,i),onMessage:i=>he(this,$n,Cl).call(this,JSON.parse(i.data)),onError:i=>he(this,Rn,Tl).call(this,i),onClose:i=>he(this,Ln,Il).call(this,i)}))}sendUserInput(e){he(this,Hi,_a).call(this,{type:"USER_INPUT",value:e},{expectStreaming:!0})}sendUserCancel(){he(this,Hi,_a).call(this,{type:"USER_CANCEL"})}reconnect(){ch(this,Fn)._++,setTimeout(()=>{R(this,Ke).onReconnect?.(),R(this,Kr).reconnect({url:()=>R(this,Ke).url(this.conversationId,{resume:!0}),onOpen:e=>he(this,On,Al).call(this,e),onMessage:e=>he(this,$n,Cl).call(this,JSON.parse(e.data)),onError:e=>he(this,Rn,Tl).call(this,e),onClose:e=>he(this,Ln,Il).call(this,e)})},1e3*R(this,Fn))}hostConnected(){let e=R(this,Ke).restoreConversationState?.()||{conversationId:crypto.randomUUID(),messages:[]};this.messages=e.messages,this.conversationId=e.conversationId,de(this,Gi,!0)}hostDisconnected(){de(this,Gi,!1)}reset(){R(this,Kr).close(),R(this,Ke).onReset?.(),this.isStreaming=!1,this.messages=[],this.conversationId=crypto.randomUUID(),R(this,Ht).requestUpdate()}};Ht=new WeakMap,Ke=new WeakMap,Kr=new WeakMap,Gi=new WeakMap,Fn=new WeakMap,Hi=new WeakSet,_a=function(e,{expectStreaming:r=!1}={}){r&&(this.isStreaming=!0,R(this,Ht).requestUpdate()),R(this,Kr).send(JSON.stringify(e))},On=new WeakSet,Al=function(e){this.messages.length>0&&setTimeout(()=>{he(this,Hi,_a).call(this,{type:"RESUME",messages:he(this,xa,Ap).call(this)})},10)},$n=new WeakSet,Cl=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages.push(e.message),R(this,Ht).requestUpdate(),R(this,Ke).onNewMessage?.(e.message);break}case"UPDATE_MESSAGE":{let r=this.messages.find(i=>i.id===e.message.id);if(r)Object.assign(r,e.message),R(this,Ht).requestUpdate(),R(this,Ke).onUpdateMessage?.(e);else throw new Error(`Message with id ${e.message.id} not found`);break}case"MESSAGE_DONE":{let r=this.messages.find(i=>i.id===e.message.id);if(r?.content==="\xB7 \xB7 \xB7")this.messages=this.messages.filter(i=>i.id!==e.message.id);else if(r)Object.assign(r,e.message);else throw new Error(`Message with id ${e.message.id} not found`);R(this,Ke).persistConversationState?.(this.conversationId,this.messages),this.isStreaming=!1,R(this,Ht).requestUpdate(),R(this,Ke).onMessageDone?.(e);break}case"ERROR":{R(this,Ke).onMessageError?.(e);break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},Rn=new WeakSet,Tl=function(e){R(this,Ke).onError?.(e)},Ln=new WeakSet,Il=function(e){this.isStreaming=!1,R(this,Ht).requestUpdate(),R(this,Gi)&&this.reconnect(),R(this,Ke).onClose?.()},xa=new WeakSet,Ap=function(){return this.messages.map(({id:e,role:r,content:i,timestamp:n})=>({id:e,role:r,content:i,timestamp:n}))};function Cp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function ce(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Cp(Object(r),!0).forEach(function(i){Y(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cp(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Rl(t){return Rl=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},Rl(t)}function Re(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tp(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Le(t,e,r){return e&&Tp(t.prototype,e),r&&Tp(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ll(t,e)}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fa(t)}function Ll(t,e){return Ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ll(t,e)}function Yg(t,e){if(t==null)return{};var r,i,n=function(a,o){if(a==null)return{};var l,h,c={},u=Object.keys(a);for(h=0;h<u.length;h++)l=u[h],o.indexOf(l)>=0||(c[l]=a[l]);return c}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Jg(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function id(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,i=Fa(t);if(e){var n=Fa(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return Jg(this,r)}}function qn(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,i){var n=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(n!=null){var s,a,o=[],l=!0,h=!1;try{for(n=n.call(r);!(l=(s=n.next()).done)&&(o.push(s.value),!i||o.length!==i);l=!0);}catch(c){h=!0,a=c}finally{try{l||n.return==null||n.return()}finally{if(h)throw a}}return o}}(t,e)||eh(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
426
426
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Bl(t){return function(e){if(Array.isArray(e))return Vl(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||eh(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
427
427
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function eh(t,e){if(t){if(typeof t=="string")return Vl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vl(t,e):void 0}}function Vl(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function ri(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=eh(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
428
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{a||r.return==null||r.return()}finally{if(o)throw s}}}}var ii={DEBUG:!1,LIB_VERSION:"1.87.6"},Xg=Array.isArray,nd=Object.prototype,sd=nd.hasOwnProperty,Un=nd.toString,Ye=Xg||function(t){return Un.call(t)==="[object Array]"},Ip=function(t){return Un.call(t)==="[object Uint8Array]"},ni=function(t){try{return/^\s*\bfunction\b/.test(t)}catch{return!1}},kr=function(t){return t===Object(t)&&!Ye(t)},Kg=function(t){if(kr(t)){for(var e in t)if(sd.call(t,e))return!1;return!0}return!1},
|
|
428
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{a||r.return==null||r.return()}finally{if(o)throw s}}}}var ii={DEBUG:!1,LIB_VERSION:"1.87.6"},Xg=Array.isArray,nd=Object.prototype,sd=nd.hasOwnProperty,Un=nd.toString,Ye=Xg||function(t){return Un.call(t)==="[object Array]"},Ip=function(t){return Un.call(t)==="[object Uint8Array]"},ni=function(t){try{return/^\s*\bfunction\b/.test(t)}catch{return!1}},kr=function(t){return t===Object(t)&&!Ye(t)},Kg=function(t){if(kr(t)){for(var e in t)if(sd.call(t,e))return!1;return!0}return!1},ye=function(t){return t===void 0},xt=function(t){return Un.call(t)=="[object String]"},Wt=function(t){return t===null},or=function(t){return Un.call(t)=="[object Number]"},Nl=function(t){return Un.call(t)==="[object Boolean]"},ad=Array.prototype,Mp=ad.forEach,Dp=ad.indexOf,X=typeof window<"u"?window:{},Qg=X.navigator||{userAgent:""},Oe=X.document||{},ct=Qg.userAgent,Fp="[PostHog.js]",z={_log:function(t){if((ii.DEBUG||X.POSTHOG_DEBUG)&&!ye(X.console)&&X.console){for(var e=("__rrweb_original__"in X.console[t])?X.console[t].__rrweb_original__:X.console[t],r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];e.apply(void 0,[Fp].concat(i))}},info:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];z._log.apply(z,["log"].concat(e))},warn:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];z._log.apply(z,["warn"].concat(e))},error:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];z._log.apply(z,["error"].concat(e))},critical:function(){for(var t,e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];(t=console).error.apply(t,[Fp].concat(r))},uninitializedWarning:function(t){z.error("You must initialize PostHog before calling ".concat(t))}},th={},zl=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function Yi(t,e,r){if(Ye(t)){if(Mp&&t.forEach===Mp)t.forEach(e,r);else if("length"in t&&t.length===+t.length){for(var i=0,n=t.length;i<n;i++)if(i in t&&e.call(r,t[i],i)===th)return}}}function Ae(t,e,r){if(!Wt(t)&&!ye(t)){if(Ye(t))return Yi(t,e,r);for(var i in t)if(sd.call(t,i)&&e.call(r,t[i],i)===th)return}}var Qe=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return Yi(r,function(n){for(var s in n)n[s]!==void 0&&(t[s]=n[s])}),t};function we(t,e){return t.indexOf(e)!==-1}var od=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},Op=function(t){try{return t()}catch{return}},ld=function(t){return function(){try{for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t.apply(this,r)}catch(n){z.critical("Implementation error. Please turn on debug and contact support@posthog.com."),z.critical(n)}}},jl=function(t){var e={};return Ae(t,function(r,i){xt(r)&&r.length>0&&(e[i]=r)}),e},e0=["$performance_raw"];function t0(t,e){return r=t,i=function(s,a){return a&&e0.indexOf(a)>-1?s:xt(s)&&!Wt(e)?s.slice(0,e):s},n=new Set,function s(a,o){return a!==Object(a)?i?i(a,o):a:n.has(a)?void 0:(n.add(a),Ye(a)?(l=[],Yi(a,function(h){l.push(s(h))})):(l={},Ae(a,function(h,c){n.has(h)||(l[c]=s(h,c))})),l);var l}(r);var r,i,n}function rh(t){var e,r,i,n,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,h="",c=[];if(!t)return t;t=r0(t);do e=(s=t.charCodeAt(o++)<<16|t.charCodeAt(o++)<<8|t.charCodeAt(o++))>>18&63,r=s>>12&63,i=s>>6&63,n=63&s,c[l++]=a.charAt(e)+a.charAt(r)+a.charAt(i)+a.charAt(n);while(o<t.length);switch(h=c.join(""),t.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"="}return h}var r0=function(t){var e,r,i,n,s="";for(e=r=0,i=(t=(t+"").replace(/\r\n/g,`
|
|
429
429
|
`).replace(/\r/g,`
|
|
430
|
-
`)).length,n=0;n<i;n++){var a=t.charCodeAt(n),o=null;a<128?r++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),Wt(o)||(r>e&&(s+=t.substring(e,r)),s+=o,e=r=n+1)}return r>e&&(s+=t.substring(e,t.length)),s},i0=["ahrefsbot","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","duckduckbot","facebookexternal","facebookcatalog","gptbot","hubspot","linkedinbot","mj12bot","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","twitterbot","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"],n0=function(t,e){if(!t)return!1;var r=t.toLowerCase();return i0.concat(e||[]).some(function(i){var n=i.toLowerCase();return r.includes?r.includes(n):r.indexOf(n)!==-1})},zn=function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation),e}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,r,i,n,s){if(e)if(e.addEventListener&&!n)e.addEventListener(r,i,!!s);else{var a="on"+r,o=e[a];e[a]=function(l,h,c){return function(u){if(u=u||t(window.event)){var f,p=!0;ni(c)&&(f=c(u));var m=h.call(l,u);return f!==!1&&m!==!1||(p=!1),p}}}(e,i,o)}else z.error("No valid element provided to register_event")}}();function jn(t,e){var r=function(){var i=Oe.createElement("script");i.type="text/javascript",i.src=t,i.onload=function(a){return e(void 0,a)},i.onerror=function(a){return e(a)};var n,s=Oe.querySelectorAll("body > script");s.length>0?(n=s[0].parentNode)===null||n===void 0||n.insertBefore(i,s[0]):Oe.body.appendChild(i)};Oe.body?r():Oe.addEventListener("DOMContentLoaded",r)}function Oa(t){switch(Rl(t.className)){case"string":return t.className;case"object":return("baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";default:return""}}function $a(t){var e="";return Ca(t)&&!cd(t)&&t.childNodes&&t.childNodes.length&&Ae(t.childNodes,function(r){hd(r)&&r.textContent&&(e+=zl(r.textContent).split(/(\s+)/).filter(qi).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),zl(e)}function $p(t){return!!t&&t.nodeType===1}function ti(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function hd(t){return!!t&&t.nodeType===3}function Rp(t){return!!t&&t.nodeType===11}var Ml=["a","button","form","input","select","textarea","label"];function Ca(t){for(var e=t;e.parentNode&&!ti(e,"body");e=e.parentNode){var r=Oa(e).split(" ");if(we(r,"ph-sensitive")||we(r,"ph-no-capture"))return!1}if(we(Oa(t).split(" "),"ph-include"))return!0;var i=t.type||"";if(xt(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var n=t.name||t.id||"";return!(xt(n)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))}function cd(t){return!!(ti(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||ti(t,"select")||ti(t,"textarea")||t.getAttribute("contenteditable")==="true")}function qi(t){return!(Wt(t)||ge(t)||xt(t)&&(t=zl(t),/^(?:(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}))$/.test((t||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(t)))}function Lp(t){var e=$a(t);return qi(e="".concat(e," ").concat(ud(t)).trim())?e:""}function ud(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Ae(t.childNodes,function(r){var i;if(r&&((i=r.tagName)===null||i===void 0?void 0:i.toLowerCase())==="span")try{var n=$a(r);e="".concat(e," ").concat(n).trim(),r.childNodes&&r.childNodes.length&&(e="".concat(e," ").concat(ud(r)).trim())}catch(s){z.error(s)}}),e}var s0=function(){function t(e){Re(this,t),this.clicks=[],this.enabled=e}return Le(t,[{key:"isRageClick",value:function(e,r,i){if(!this.enabled)return!1;var n=this.clicks[this.clicks.length-1];if(n&&Math.abs(e-n.x)+Math.abs(r-n.y)<30&&i-n.timestamp<1e3){if(this.clicks.push({x:e,y:r,timestamp:i}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:r,timestamp:i}];return!1}}]),t}(),pd="$people_distinct_id",Ta="__alias",Nn="__timers",Bp="$autocapture_disabled_server_side",Gl="$session_recording_enabled_server_side",Vp="$console_log_recording_enabled_server_side",Np="$session_recording_recorder_version_server_side",Ra="$sesid",Ia="$session_is_sampled",Ui="$enabled_feature_flags",Hl="$early_access_features",Wi="$stored_person_properties",xr="$stored_group_properties",ql="$surveys",La="$flag_call_reported",Ul="$user_state",Wl="$posthog_quota_limited",a0=[pd,Ta,"__cmpns",Nn,Gl,Ra,Ui,Ul,Wl,Hl,xr,Wi,ql,La];function Dl(t,e){return e.length>t?e.slice(0,t)+"...":e}var Sr={_initializedTokens:[],_isDisabledServerSide:null,_isAutocaptureEnabled:!1,_setIsAutocaptureEnabled:function(t){var e,r=Wt(this._isDisabledServerSide)?!((e=t.persistence)===null||e===void 0||!e.props[Bp]):this._isDisabledServerSide,i=!!t.config.autocapture;this._isAutocaptureEnabled=i&&!r},_previousElementSibling:function(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!$p(e));return e},_getAugmentPropertiesFromElement:function(t){if(!Ca(t))return{};var e={};return Ae(t.attributes,function(r){if(r.name.indexOf("data-ph-capture-attribute")===0){var i=r.name.replace("data-ph-capture-attribute-",""),n=r.value;i&&n&&qi(n)&&(e[i]=n)}}),e},_getPropertiesFromElement:function(t,e,r){var i,n=t.tagName.toLowerCase(),s={tag_name:n};Ml.indexOf(n)>-1&&!r&&(n.toLowerCase()==="a"||n.toLowerCase()==="button"?s.$el_text=Dl(1024,Lp(t)):s.$el_text=Dl(1024,$a(t)));var a=Oa(t);a.length>0&&(s.classes=a.split(" ").filter(function(u){return u!==""}));var o=(i=this.config)===null||i===void 0?void 0:i.element_attribute_ignorelist;Ae(t.attributes,function(u){var f;cd(t)&&["name","id","class"].indexOf(u.name)===-1||o!=null&&o.includes(u.name)||!e&&qi(u.value)&&(f=u.name,!xt(f)||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")&&(s["attr__"+u.name]=Dl(1024,u.value))});for(var l=1,h=1,c=t;c=this._previousElementSibling(c);)l++,c.tagName===t.tagName&&h++;return s.nth_child=l,s.nth_of_type=h,s},_getDefaultProperties:function(t){return{$event_type:t,$ce_version:1}},_extractCustomPropertyValue:function(t){var e=[];return Ae(document.querySelectorAll(t.css_selector),function(r){var i;["input","select"].indexOf(r.tagName.toLowerCase())>-1?i=r.value:r.textContent&&(i=r.textContent),qi(i)&&e.push(i)}),e.join(", ")},_getCustomProperties:function(t){var e=this,r={};return Ae(this._customProperties,function(i){Ae(i.event_selectors,function(n){Ae(document.querySelectorAll(n),function(s){we(t,s)&&Ca(s)&&(r[i.name]=e._extractCustomPropertyValue(i))})})}),r},_getEventTarget:function(t){return ge(t.target)?t.srcElement||null:(e=t.target)!==null&&e!==void 0&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e},_captureEvent:function(t,e){var r,i=this,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",s=this._getEventTarget(t);if(hd(s)&&(s=s.parentNode||null),n==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&(r=this.rageclicks)!==null&&r!==void 0&&r.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this._captureEvent(t,e,"$rageclick"),s&&function(g,d){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!g||ti(g,"html")||!$p(g))return!1;if(y!=null&&y.url_allowlist){var v=window.location.href,b=y.url_allowlist;if(b&&!b.some(function(E){return v.match(E)}))return!1}if(y!=null&&y.dom_event_allowlist){var _=y.dom_event_allowlist;if(_&&!_.some(function(E){return d.type===E}))return!1}if(y!=null&&y.element_allowlist){var x=y.element_allowlist;if(x&&!x.some(function(E){return g.tagName.toLowerCase()===E}))return!1}if(y!=null&&y.css_selector_allowlist){var T=y.css_selector_allowlist;if(T&&!T.some(function(E){return g.matches(E)}))return!1}for(var S=!1,w=[g],M=!0,k=g;k.parentNode&&!ti(k,"body");)if(Rp(k.parentNode))w.push(k.parentNode.host),k=k.parentNode.host;else{if(!(M=k.parentNode||!1))break;if(Ml.indexOf(M.tagName.toLowerCase())>-1)S=!0;else{var I=window.getComputedStyle(M);I&&I.getPropertyValue("cursor")==="pointer"&&(S=!0)}w.push(M),k=M}var P=window.getComputedStyle(g);if(P&&P.getPropertyValue("cursor")==="pointer"&&d.type==="click")return!0;var A=g.tagName.toLowerCase();switch(A){case"html":return!1;case"form":return d.type==="submit";case"input":case"select":case"textarea":return d.type==="change"||d.type==="click";default:return S?d.type==="click":d.type==="click"&&(Ml.indexOf(A)>-1||g.getAttribute("contenteditable")==="true")}}(s,t,this.config)){for(var a,o,l=[s],h=s;h.parentNode&&!ti(h,"body");)Rp(h.parentNode)?(l.push(h.parentNode.host),h=h.parentNode.host):(l.push(h.parentNode),h=h.parentNode);var c,u=[],f={},p=!1;if(Ae(l,function(g){var d=Ca(g);g.tagName.toLowerCase()==="a"&&(c=g.getAttribute("href"),c=d&&qi(c)&&c),we(Oa(g).split(" "),"ph-no-capture")&&(p=!0),u.push(i._getPropertiesFromElement(g,e.config.mask_all_element_attributes,e.config.mask_all_text));var y=i._getAugmentPropertiesFromElement(g);Qe(f,y)}),e.config.mask_all_text||(s.tagName.toLowerCase()==="a"||s.tagName.toLowerCase()==="button"?u[0].$el_text=Lp(s):u[0].$el_text=$a(s)),c&&(u[0].attr__href=c),p)return!1;var m=Qe(this._getDefaultProperties(t.type),{$elements:u},(a=u[0])!==null&&a!==void 0&&a.$el_text?{$el_text:(o=u[0])===null||o===void 0?void 0:o.$el_text}:{},this._getCustomProperties(l),f);return e.capture(n,m),!0}},_navigate:function(t){window.location.href=t},_addDomEventHandlers:function(t){var e=this,r=function(i){i=i||window.event,e._captureEvent(i,t)};zn(document,"submit",r,!1,!0),zn(document,"change",r,!1,!0),zn(document,"click",r,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(t){var e;Nl(t.__autocapture)||(this.config=t.__autocapture),(e=this.config)!==null&&e!==void 0&&e.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(r){return new RegExp(r)})),this.rageclicks=new s0(t.config.rageclick)},afterDecideResponse:function(t,e){var r=e.config.token;this._initializedTokens.indexOf(r)>-1?z.info('autocapture already initialized for token "'+r+'"'):(e.persistence&&e.persistence.register(Y({},Bp,!!t.autocapture_opt_out)),this._isDisabledServerSide=!!t.autocapture_opt_out,this._setIsAutocaptureEnabled(e),this._initializedTokens.push(r),t&&t.config&&t.config.enable_collect_everything&&this._isAutocaptureEnabled?(t.custom_properties&&(this._customProperties=t.custom_properties),this._addDomEventHandlers(e)):e.__autocapture=!1)},enabledForProject:function(t,e,r){if(!t)return!0;e=ge(e)?10:e,r=ge(r)?10:r;for(var i=0,n=0;n<t.length;n++)i+=t.charCodeAt(n);return i%e<r},isBrowserSupported:function(){return ni(document.querySelectorAll)}};(function(t){for(var e in t)ni(t[e])&&(t[e]=t[e].bind(t))})(Sr),function(t){for(var e in t)ni(t[e])&&(t[e]=ld(t[e]))}(Sr);var Fl="$active_feature_flags",Sa="$override_feature_flags",zp="$feature_flag_payloads",jp=function(t){var e,r={},i=ri(function(o){for(var l=Object.keys(o),h=l.length,c=new Array(h);h--;)c[h]=[l[h],o[l[h]]];return c}(t||{}));try{for(i.s();!(e=i.n()).done;){var n=qn(e.value,2),s=n[0],a=n[1];a&&(r[s]=a)}}catch(o){i.e(o)}finally{i.f()}return r},o0=function(){function t(e){Re(this,t),this.instance=e,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return Le(t,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(Ui),r=this.instance.get_property(Sa);if(!r)return e||{};for(var i=Qe({},e),n=Object.keys(r),s=0;s<n.length;s++)r[n[s]]===!1?delete i[n[s]]:i[n[s]]=r[n[s]];return this._override_warning||(z.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:r,finalFlags:i}),this._override_warning=!0),i}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(zp)||{}}},{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;this.setReloadingPaused(!0);var r=this.instance.config.token,i=this.instance.get_property(Wi),n=this.instance.get_property(xr),s=rh(JSON.stringify({token:r,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:i,group_properties:n,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0}));this.instance._send_request(this.instance.config.api_host+"/decide/?v=3",{data:s},{method:"POST"},this.instance._prepare_callback(function(a){e.$anon_distinct_id=void 0,e.receivedFeatureFlags(a),e.setReloadingPaused(!1),e._startReloadTimer()}))}},{key:"getFeatureFlag",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var i,n=this.getFlagVariants()[e],s="".concat(n),a=this.instance.get_property(La)||{};return(r.send_event||!("send_event"in r))&&(!(e in a)||!a[e].includes(s))&&(Ye(a[e])?a[e].push(s):a[e]=[s],(i=this.instance.persistence)===null||i===void 0||i.register(Y({},La,a)),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}z.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 r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,r);z.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(r){return r!==e})}},{key:"receivedFeatureFlags",value:function(e){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads();(function(n,s){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=n.featureFlags,h=n.featureFlagPayloads;if(l)if(Ye(l)){var c,u={};if(l)for(var f=0;f<l.length;f++)u[l[f]]=!0;s&&s.register((Y(c={},Fl,l),Y(c,Ui,u),c))}else{var p,m=l,g=h;n.errorsWhileComputingFlags&&(m=ce(ce({},a),m),g=ce(ce({},o),g)),s&&s.register((Y(p={},Fl,Object.keys(jp(m))),Y(p,Ui,m||{}),Y(p,zp,g||{}),p))}})(e,this.instance.persistence,r,i),this._fireFeatureFlagsCallbacks()}}},{key:"override",value:function(e){if(!this.instance.__loaded||!this.instance.persistence)return z.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,e===!1)this.instance.persistence.unregister(Sa);else if(Ye(e)){for(var r={},i=0;i<e.length;i++)r[e[i]]=!0;this.instance.persistence.register(Y({},Sa,r))}else this.instance.persistence.register(Y({},Sa,e))}},{key:"onFeatureFlags",value:function(e){var r=this;if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){var i=this._prepareFeatureFlagsForCallbacks(),n=i.flags,s=i.flagVariants;e(n,s)}return function(){return r.removeFeatureFlagsHandler(e)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,r){var i,n,s=Y({},"$feature_enrollment/".concat(e),r);this.instance.capture("$feature_enrollment_update",{$feature_flag:e,$feature_enrollment:r,$set:s}),this.setPersonPropertiesForFlags(s,!1);var a=ce(ce({},this.getFlagVariants()),{},Y({},e,r));(i=this.instance.persistence)===null||i===void 0||i.register((Y(n={},Fl,Object.keys(jp(a))),Y(n,Ui,a),n)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.instance.get_property(Hl);if(n&&!i)return e(n);this.instance._send_request("".concat(this.instance.config.api_host,"/api/early_access_features/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var a,o=s.earlyAccessFeatures;return(a=r.instance.persistence)===null||a===void 0||a.register(Y({},Hl,o)),e(o)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var e=this.getFlags(),r=this.getFlagVariants();return{flags:e.filter(function(i){return r[i]}),flagVariants:Object.keys(r).filter(function(i){return r[i]}).reduce(function(i,n){return i[n]=r[n],i},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var e=this._prepareFeatureFlagsForCallbacks(),r=e.flags,i=e.flagVariants;this.featureFlagEventHandlers.forEach(function(n){return n(r,i)})}},{key:"setPersonPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(Wi)||{};this.instance.register(Y({},Wi,ce(ce({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(Wi)}},{key:"setGroupPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(xr)||{};Object.keys(i).length!==0&&Object.keys(i).forEach(function(n){i[n]=ce(ce({},i[n]),e[n]),delete e[n]}),this.instance.register(Y({},xr,ce(ce({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(e){if(e){var r=this.instance.get_property(xr)||{};this.instance.register(Y({},xr,ce(ce({},r),{},Y({},e,{}))))}else this.instance.unregister(xr)}}]),t}(),l0=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,lr={is_supported:function(){return!0},error:function(t){z.error("cookieStore error: "+t)},get:function(t){try{for(var e=t+"=",r=document.cookie.split(";").filter(function(s){return s.length}),i=0;i<r.length;i++){for(var n=r[i];n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(e)===0)return decodeURIComponent(n.substring(e.length,n.length))}}catch{}return null},parse:function(t){var e;try{e=JSON.parse(lr.get(t))||{}}catch{}return e},set:function(t,e,r,i,n){try{var s="",a="",o="";if(i){var l=document.location.hostname.match(l0),h=l?l[0]:"";s=h?"; domain=."+h:""}if(r){var c=new Date;c.setTime(c.getTime()+24*r*60*60*1e3),a="; expires="+c.toUTCString()}n&&(o="; secure");var u=t+"="+encodeURIComponent(JSON.stringify(e))+a+"; SameSite=Lax; path=/"+s+o;return document.cookie=u,u}catch{return}},remove:function(t,e){try{lr.set(t,"",-1,e)}catch{return}}},Ol=null,$e={is_supported:function(){if(!Wt(Ol))return Ol;var t=!0;if(ge(window))t=!1;else try{var e="__mplssupport__";$e.set(e,"xyz"),$e.get(e)!=='"xyz"'&&(t=!1),$e.remove(e)}catch{t=!1}return t||z.error("localStorage unsupported; falling back to cookie store"),Ol=t,t},error:function(t){z.error("localStorage error: "+t)},get:function(t){try{return window.localStorage.getItem(t)}catch(e){$e.error(e)}return null},parse:function(t){try{return JSON.parse($e.get(t))||{}}catch{}return null},set:function(t,e){try{window.localStorage.setItem(t,JSON.stringify(e))}catch(r){$e.error(r)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(e){$e.error(e)}}},h0=["distinct_id",Ra,Ia],Zl=ce(ce({},$e),{},{parse:function(t){try{var e={};try{e=lr.parse(t)||{}}catch{}var r=Qe(e,JSON.parse($e.get(t)||"{}"));return $e.set(t,r),r}catch{}return null},set:function(t,e,r,i,n){try{$e.set(t,e);var s={};h0.forEach(function(a){e[a]&&(s[a]=e[a])}),Object.keys(s).length&&lr.set(t,s,r,i,n)}catch(a){$e.error(a)}},remove:function(t,e){try{window.localStorage.removeItem(t),lr.remove(t,e)}catch(r){$e.error(r)}}}),ka={},c0={is_supported:function(){return!0},error:function(t){z.error("memoryStorage error: "+t)},get:function(t){return ka[t]||null},parse:function(t){return ka[t]||null},set:function(t,e){ka[t]=e},remove:function(t){delete ka[t]}},Qr=null,Ze={is_supported:function(){if(!Wt(Qr))return Qr;if(Qr=!0,ge(window))Qr=!1;else try{var t="__support__";Ze.set(t,"xyz"),Ze.get(t)!=='"xyz"'&&(Qr=!1),Ze.remove(t)}catch{Qr=!1}return Qr},error:function(t){z.error("sessionStorage error: ",t)},get:function(t){try{return window.sessionStorage.getItem(t)}catch(e){Ze.error(e)}return null},parse:function(t){try{return JSON.parse(Ze.get(t))||null}catch{}return null},set:function(t,e){try{window.sessionStorage.setItem(t,JSON.stringify(e))}catch(r){Ze.error(r)}},remove:function(t){try{window.sessionStorage.removeItem(t)}catch(e){Ze.error(e)}}},u0=["localhost","127.0.0.1"],p0=function(t,e){return!!function(r){try{new RegExp(r)}catch{return!1}return!0}(e)&&new RegExp(e).test(t)},Gp=function(t,e){for(var r,i=((t.split("#")[0]||"").split("?")[1]||"").split("&"),n=0;n<i.length;n++){var s=i[n].split("=");if(s[0]===e){r=s;break}}if(!Ye(r)||r.length<2)return"";var a=r[1];try{a=decodeURIComponent(a)}catch{z.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},Ba=function(t,e){var r=t.match(new RegExp(e+"=([^&]*)"));return r?r[1]:null},Ue={campaignParams:function(t){var e=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(t||[]),r={};return Ae(e,function(i){var n=Gp(Oe.URL,i);n.length&&(r[i]=n)}),r},searchEngine:function(){var t=Oe.referrer;return t?t.search("https?://(.*)google.([^/?]*)")===0?"google":t.search("https?://(.*)bing.com")===0?"bing":t.search("https?://(.*)yahoo.com")===0?"yahoo":t.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var t=Ue.searchEngine(),e=t!="yahoo"?"q":"p",r={};if(!Wt(t)){r.$search_engine=t;var i=Gp(Oe.referrer,e);i.length&&(r.ph_keyword=i)}return r},browser:function(t,e,r){return e=e||"",r||we(t," OPR/")?we(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":we(t,"IEMobile")||we(t,"WPDesktop")?"Internet Explorer Mobile":we(t,"SamsungBrowser/")?"Samsung Internet":we(t,"Edge")||we(t,"Edg/")?"Microsoft Edge":we(t,"FBIOS")?"Facebook Mobile":we(t,"Chrome")?"Chrome":we(t,"CriOS")?"Chrome iOS":we(t,"UCWEB")||we(t,"UCBrowser")?"UC Browser":we(t,"FxiOS")?"Firefox iOS":we(e,"Apple")||function(i){return we(i,"Safari")&&!we(i,"Chrome")&&!we(i,"Android")}(t)?we(t,"Mobile")?"Mobile Safari":"Safari":we(t,"Android")?"Android Mobile":we(t,"Konqueror")||we(t,"konqueror")?"Konqueror":we(t,"Firefox")?"Firefox":we(t,"MSIE")||we(t,"Trident/")?"Internet Explorer":we(t,"Gecko")?"Mozilla":""},browserVersion:function(t,e,r){var i={"Internet Explorer Mobile":[/rv:(\d+(\.\d+)?)/],"Microsoft Edge":[/Edge?\/(\d+(\.\d+)?)/],Chrome:[/Chrome\/(\d+(\.\d+)?)/],"Chrome iOS":[/CriOS\/(\d+(\.\d+)?)/],"UC Browser":[/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/],Safari:[/Version\/(\d+(\.\d+)?)/],"Mobile Safari":[/Version\/(\d+(\.\d+)?)/],Opera:[/(Opera|OPR)\/(\d+(\.\d+)?)/],Firefox:[/Firefox\/(\d+(\.\d+)?)/],"Firefox iOS":[/FxiOS\/(\d+(\.\d+)?)/],Konqueror:[/Konqueror[:/]?(\d+(\.\d+)?)/i],BlackBerry:[/BlackBerry (\d+(\.\d+)?)/,/Version\/(\d+(\.\d+)?)/],"Android Mobile":[/android\s(\d+(\.\d+)?)/],"Samsung Internet":[/SamsungBrowser\/(\d+(\.\d+)?)/],"Internet Explorer":[/(rv:|MSIE )(\d+(\.\d+)?)/],Mozilla:[/rv:(\d+(\.\d+)?)/]}[Ue.browser(t,e,r)];if(ge(i))return null;for(var n=0;n<i.length;n++){var s=i[n],a=t.match(s);if(a)return parseFloat(a[a.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(t){if(/Windows/i.test(t)){if(/Phone/.test(t)||/WPDesktop/.test(t))return{os_name:"Windows Phone",os_version:""};var e=/Windows NT ([0-9.]+)/i.exec(t);return e&&e[1]?{os_name:"Windows",os_version:e[1]}:{os_name:"Windows",os_version:""}}if(/(iPhone|iPad|iPod)/.test(t)){var r=/OS (\d+)_(\d+)_?(\d+)?/i.exec(t);return r&&r[1]?{os_name:"iOS",os_version:[r[1],r[2],r[3]||"0"].join(".")}:{os_name:"iOS",os_version:""}}if(/Android/.test(t)){var i=/Android (\d+)\.(\d+)\.?(\d+)?/i.exec(t);return i&&i[1]?{os_name:"Android",os_version:[i[1],i[2],i[3]||"0"].join(".")}:{os_name:"Android",os_version:""}}if(/(BlackBerry|PlayBook|BB10)/i.test(t))return{os_name:"BlackBerry",os_version:""};if(/Mac/i.test(t)){var n=/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i.exec(t);return n&&n[1]?{os_name:"Mac OS X",os_version:[n[1],n[2],n[3]||"0"].join(".")}:{os_name:"Mac OS X",os_version:""}}return/Linux/.test(t)?{os_name:"Linux",os_version:""}:/CrOS/.test(t)?{os_name:"Chrome OS",os_version:""}:{os_name:"",os_version:""}},device:function(t){return/Windows Phone/i.test(t)||/WPDesktop/.test(t)?"Windows Phone":/iPad/.test(t)?"iPad":/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Android/.test(t)&&!/Mobile/.test(t)?"Android Tablet":/Android/.test(t)?"Android":""},deviceType:function(t){var e=this.device(t);return e==="iPad"||e==="Android Tablet"?"Tablet":e?"Mobile":"Desktop"},referrer:function(){return Oe.referrer||"$direct"},referringDomain:function(){if(!Oe.referrer)return"$direct";var t=Oe.createElement("a");return t.href=Oe.referrer,t.host},properties:function(){var t,e,r,i,n,s,a,o=Ue.os(ct),l=o.os_name,h=o.os_version;return Qe(jl({$os:l,$os_version:h,$browser:Ue.browser(ct,navigator.vendor,window.opera),$device:Ue.device(ct),$device_type:Ue.deviceType(ct)}),{$current_url:(t=window)===null||t===void 0?void 0:t.location.href,$host:(e=window)===null||e===void 0?void 0:e.location.host,$pathname:(r=window)===null||r===void 0?void 0:r.location.pathname,$raw_user_agent:ct.length>1e3?ct.substring(0,997)+"...":ct,$browser_version:Ue.browserVersion(ct,navigator.vendor,window.opera),$browser_language:Ue.browserLanguage(),$screen_height:(i=window)===null||i===void 0?void 0:i.screen.height,$screen_width:(n=window)===null||n===void 0?void 0:n.screen.width,$viewport_height:(s=window)===null||s===void 0?void 0:s.innerHeight,$viewport_width:(a=window)===null||a===void 0?void 0:a.innerWidth,$lib:"web",$lib_version:ii.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:od()/1e3})},people_properties:function(){var t=Ue.os(ct),e=t.os_name,r=t.os_version;return Qe(jl({$os:e,$os_version:r,$browser:Ue.browser(ct,navigator.vendor,window.opera)}),{$browser_version:Ue.browserVersion(ct,navigator.vendor,window.opera)})}},d0=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],Hp=function(){function t(e){Re(this,t);var r="";e.token&&(r=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,this.custom_campaign_params=e.custom_campaign_params||[],e.persistence_name?this.name="ph_"+e.persistence_name:this.name="ph_"+r+"_posthog",d0.indexOf(e.persistence.toLowerCase())===-1&&(z.critical("Unknown persistence type "+e.persistence+"; falling back to cookie"),e.persistence="cookie");var i=e.persistence.toLowerCase();i==="localstorage"&&$e.is_supported()?this.storage=$e:i==="localstorage+cookie"&&Zl.is_supported()?this.storage=Zl:i==="sessionstorage"&&Ze.is_supported()?this.storage=Ze:this.storage=i==="memory"?c0:lr,this.user_state="anonymous",this.load(),this.update_config(e),this.save()}return Le(t,[{key:"properties",value:function(){var e={};return Ae(this.props,function(r,i){if(i===Ui&&kr(r))for(var n=Object.keys(r),s=0;s<n.length;s++)e["$feature/".concat(n[s])]=r[n[s]];else o=i,l=!1,(Wt(a=a0)?l:Dp&&a.indexOf===Dp?a.indexOf(o)!=-1:(Ae(a,function(h){if(l||(l=h===o))return th}),l))||(e[i]=r);var a,o,l}),e}},{key:"load",value:function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Qe({},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,r,i){var n=this;if(kr(e)){ge(r)&&(r="None"),this.expire_days=ge(i)?this.default_expiry:i;var s=!1;if(Ae(e,function(a,o){n.props.hasOwnProperty(o)&&n.props[o]!==r||(n.props[o]=a,s=!0)}),s)return this.save(),!0}return!1}},{key:"register",value:function(e,r){var i=this;if(kr(e)){this.expire_days=ge(r)?this.default_expiry:r;var n=!1;if(Ae(e,function(s,a){e.hasOwnProperty(a)&&i.props[a]!==s&&(i.props[a]=s,n=!0)}),n)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(Ue.campaignParams(this.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(Ue.searchInfo())}},{key:"update_referrer_info",value:function(){this.register({$referrer:this.props.$referrer||Ue.referrer(),$referring_domain:this.props.$referring_domain||Ue.referringDomain()})}},{key:"get_referrer_info",value:function(){return jl({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(e){return Ae(this.props,function(r,i){i in e||(e[i]=r)}),e}},{key:"update_config",value:function(e){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)}},{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,r){var i=this.props[Nn]||{};i[e]=r,this.props[Nn]=i,this.save()}},{key:"remove_event_timer",value:function(e){var r=(this.props[Nn]||{})[e];return ge(r)||(delete this.props[Nn][e],this.save()),r}},{key:"get_user_state",value:function(){return this.props[Ul]||"anonymous"}},{key:"set_user_state",value:function(e){this.props[Ul]=e,this.save()}},{key:"get_quota_limits",value:function(){return this.props[Wl]||{}}},{key:"set_quota_limits",value:function(e){this.props[Wl]=e,this.save()}}]),t}(),qp=2,f0=4,dd=3,m0=6,g0=0,y0="rrweb/console@1",Ut,v0=Le(function t(e){var r,i,n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Re(this,t),Y(this,"bucketSize",100),Y(this,"refillRate",10),Y(this,"mutationBuckets",{}),Y(this,"loggedTracker",{}),Y(this,"refillBuckets",function(){Object.keys(n.mutationBuckets).forEach(function(a){n.mutationBuckets[a]=n.mutationBuckets[a]+n.refillRate,n.mutationBuckets[a]>=n.bucketSize&&delete n.mutationBuckets[a]})}),Y(this,"getNodeOrRelevantParent",function(a){var o=n.rrweb.mirror.getNode(a);if(o?.nodeName!=="svg"&&o instanceof Element){var l=o.closest("svg");if(l)return[n.rrweb.mirror.getId(l),l]}return[a,o]}),Y(this,"numberOfChanges",function(a){var o,l,h,c,u,f,p,m;return((o=(l=a.removes)===null||l===void 0?void 0:l.length)!==null&&o!==void 0?o:0)+((h=(c=a.attributes)===null||c===void 0?void 0:c.length)!==null&&h!==void 0?h:0)+((u=(f=a.texts)===null||f===void 0?void 0:f.length)!==null&&u!==void 0?u:0)+((p=(m=a.adds)===null||m===void 0?void 0:m.length)!==null&&p!==void 0?p:0)}),Y(this,"throttleMutations",function(a){if(a.type!==dd||a.data.source!==g0)return a;var o=a.data,l=n.numberOfChanges(o);o.attributes&&(o.attributes=o.attributes.filter(function(c){var u,f,p,m=qn(n.getNodeOrRelevantParent(c.id),2),g=m[0],d=m[1];return n.mutationBuckets[g]===0?!1:(n.mutationBuckets[g]=(u=n.mutationBuckets[g])!==null&&u!==void 0?u:n.bucketSize,n.mutationBuckets[g]=Math.max(n.mutationBuckets[g]-1,0),n.mutationBuckets[g]===0&&(n.loggedTracker[g]||(n.loggedTracker[g]=!0,(f=(p=n.options).onBlockedNode)===null||f===void 0||f.call(p,g,d))),c)}));var h=n.numberOfChanges(o);return h!==0||l===h?a:void 0}),this.rrweb=e,this.options=s,this.refillRate=(r=this.options.refillRate)!==null&&r!==void 0?r:this.refillRate,this.bucketSize=(i=this.options.bucketSize)!==null&&i!==void 0?i:this.bucketSize,setInterval(function(){n.refillBuckets()},1e3)}),fd=function(t){return t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t}(fd||{}),b0="/s/";(function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet"})(Ut||(Ut={}));var _0=[Ut.MouseMove,Ut.MouseInteraction,Ut.Scroll,Ut.ViewportResize,Ut.Input,Ut.TouchMove,Ut.MediaInteraction,Ut.Drag],w0=function(){function t(e){var r=this;if(Re(this,t),Y(this,"_linkedFlagSeen",!1),Y(this,"_lastActivityTimestamp",Date.now()),Y(this,"isIdle",!1),Y(this,"_linkedFlag",null),Y(this,"_sampleRate",null),Y(this,"_minimumDuration",null),this.instance=e,this._captureStarted=!1,this._endpoint=b0,this.stopRrweb=void 0,this.receivedDecide=!1,window.addEventListener("beforeunload",function(){r._flushBuffer()}),!this.instance.sessionManager)throw z.error("Session recording started without valid sessionManager"),new Error("Session recording started without valid sessionManager. This is a bug.");var i=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=i.sessionId,s=i.windowId;this.windowId=s,this.sessionId=n,this.buffer=this.clearBuffer()}return Le(t,[{key:"started",get:function(){return this._captureStarted}},{key:"sessionManager",get:function(){if(!this.instance.sessionManager)throw z.error("Session recording started without valid sessionManager"),new Error("Session recording started without valid sessionManager. This is a bug.");return this.instance.sessionManager}},{key:"isSampled",get:function(){return or(this._sampleRate)?this.instance.get_property(Ia):null}},{key:"sessionDuration",get:function(){var e,r,i=(e=this.buffer)===null||e===void 0?void 0:e.data[((r=this.buffer)===null||r===void 0?void 0:r.data.length)-1],n=this.sessionManager.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp;return i?i.timestamp-n:null}},{key:"isRecordingEnabled",get:function(){var e=!!this.instance.get_property(Gl),r=!this.instance.config.disable_session_recording;return e&&r}},{key:"isConsoleLogCaptureEnabled",get:function(){var e=!!this.instance.get_property(Vp),r=this.instance.config.enable_recording_console_log;return r??e}},{key:"recordingVersion",get:function(){var e,r=this.instance.get_property(Np);return((e=this.instance.config.session_recording)===null||e===void 0?void 0:e.recorderVersion)||r||"v1"}},{key:"status",get:function(){return this.receivedDecide?this.isRecordingEnabled?xt(this._linkedFlag)&&!this._linkedFlagSeen?"buffering":Nl(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"disabled":"buffering"}},{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled?this.startCaptureAndTrySendingQueuedSnapshots():(this.stopRecording(),this.clearBuffer())}},{key:"stopRecording",value:function(){this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1)}},{key:"makeSamplingDecision",value:function(e){var r,i=this.sessionId!==e;if(or(this._sampleRate)){var n,s=this.isSampled;i||!Nl(s)?n=Math.random()<this._sampleRate:n=s,n||z.warn("[SessionSampling] Sample rate (".concat(this._sampleRate,") has determined that this sessionId (").concat(e,") will not be sent to the server.")),(r=this.instance.persistence)===null||r===void 0||r.register(Y({},Ia,n))}else{var a;(a=this.instance.persistence)===null||a===void 0||a.register(Y({},Ia,null))}}},{key:"afterDecideResponse",value:function(e){var r,i,n,s,a,o,l,h=this;this.instance.persistence&&this.instance.persistence.register((Y(l={},Gl,!!e.sessionRecording),Y(l,Vp,(a=e.sessionRecording)===null||a===void 0?void 0:a.consoleLogRecordingEnabled),Y(l,Np,(o=e.sessionRecording)===null||o===void 0?void 0:o.recorderVersion),l));var c=(r=e.sessionRecording)===null||r===void 0?void 0:r.sampleRate;this._sampleRate=ge(c)||Wt(c)?null:parseFloat(c);var u,f=(i=e.sessionRecording)===null||i===void 0?void 0:i.minimumDurationMilliseconds;if(this._minimumDuration=ge(f)?null:f,this._linkedFlag=((n=e.sessionRecording)===null||n===void 0?void 0:n.linkedFlag)||null,(s=e.sessionRecording)!==null&&s!==void 0&&s.endpoint&&(this._endpoint=(u=e.sessionRecording)===null||u===void 0?void 0:u.endpoint),or(this._sampleRate)&&this.sessionManager.onSessionId(function(m){h.makeSamplingDecision(m)}),xt(this._linkedFlag)){var p=this._linkedFlag;this.instance.onFeatureFlags(function(m){h._linkedFlagSeen=m.includes(p)})}this.receivedDecide=!0,this.startRecordingIfEnabled()}},{key:"log",value:function(e){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:i,trace:[],payload:[JSON.stringify(e)]}},timestamp:od()})}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){this._startCapture()}},{key:"_startCapture",value:function(){var e=this;if(!ge(Object.assign)&&!this._captureStarted&&!this.instance.config.disable_session_recording){this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId();var r=this.recordingVersion==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.recordingVersion?jn(this.instance.config.api_host+"/static/".concat(r,"?v=").concat(ii.LIB_VERSION),function(i){if(i)return z.error("Could not load ".concat(r),i);e._onScriptLoaded()}):this._onScriptLoaded()}}},{key:"_isInteractiveEvent",value:function(e){var r;return e.type===dd&&_0.indexOf((r=e.data)===null||r===void 0?void 0:r.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(e){var r=this._isInteractiveEvent(e);if(r||this.isIdle||e.timestamp-this._lastActivityTimestamp>3e5&&(this.isIdle=!0),r&&(this._lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryTakeFullSnapshot())),!this.isIdle){var i=this.sessionManager.checkAndGetSessionAndWindowId(!r,e.timestamp),n=i.windowId,s=i.sessionId,a=this.sessionId!==s,o=this.windowId!==n;this.windowId=n,this.sessionId=s,[qp,f0].indexOf(e.type)===-1&&(o||a)&&this._tryTakeFullSnapshot()}}},{key:"_tryTakeFullSnapshot",value:function(){if(!this._captureStarted)return!1;try{var e;return(e=this.rrwebRecord)===null||e===void 0||e.takeFullSnapshot(),!0}catch(r){return z.error("Error taking full snapshot.",r),!1}}},{key:"_onScriptLoaded",value:function(){var e,r=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};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var n=this.instance.config.session_recording,s=0,a=Object.entries(n||{});s<a.length;s++){var o=qn(a[s],2),l=o[0],h=o[1];l in i&&(i[l]=h)}this.rrwebRecord?(this.mutationRateLimiter=(e=this.mutationRateLimiter)!==null&&e!==void 0?e:new v0(this.rrwebRecord,{onBlockedNode:function(c,u){var f="Too many mutations on node '".concat(c,"'. Rate limiting. This could be due to SVG animations or something similar");z.info(f,{node:u}),r.log("[PostHog Recorder] "+f,"warn")}}),this.stopRrweb=this.rrwebRecord(ce({emit:function(c){r.onRRwebEmit(c)},plugins:window.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled?[window.rrwebConsoleRecord.getRecordConsolePlugin()]:[]},i)),this.instance._addCaptureHook(function(c){try{if(c==="$pageview"){var u,f=r._maskUrl(window.location.href);if(!f)return;(u=r.rrwebRecord)===null||u===void 0||u.addCustomEvent("$pageview",{href:f})}}catch(p){z.error("Could not add $pageview to rrweb session",p)}}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1):z.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"onRRwebEmit",value:function(e){if(e&&kr(e)){if(e.type===fd.Meta){var r=this._maskUrl(e.data.href);if(!r)return;e.data.href=r}var i=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(i){var n=function(a){var o=a;if(o&&kr(o)&&o.type===m0&&kr(o.data)&&o.data.plugin===y0){o.data.payload.payload.length>10&&(o.data.payload.payload=o.data.payload.payload.slice(0,10),o.data.payload.payload.push("...[truncated]"));for(var l=[],h=0;h<o.data.payload.payload.length;h++)o.data.payload.payload[h]&&o.data.payload.payload[h].length>2e3?l.push(o.data.payload.payload[h].slice(0,2e3)+"...[truncated]"):l.push(o.data.payload.payload[h]);return o.data.payload.payload=l,a}return a}(i),s={$snapshot_bytes:JSON.stringify(n).length,$snapshot_data:n,$session_id:this.sessionId,$window_id:this.windowId};this._updateWindowAndSessionIds(n),this.isIdle||(this.status!=="disabled"?this._captureSnapshotBuffered(s):this.clearBuffer())}}}},{key:"_maskUrl",value:function(e){var r=this.instance.config.session_recording;if(r.maskNetworkRequestFn){var i,n={url:e};return(i=n=r.maskNetworkRequestFn(n))===null||i===void 0?void 0:i.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 r=this._minimumDuration,i=this.sessionDuration,n=or(r)&&or(i)&&i<r;return this.status==="buffering"||n?(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 r,i=this,n=2+(((r=this.buffer)===null||r===void 0?void 0:r.data.length)||0);(!this.buffer||this.buffer.size+e.$snapshot_bytes+n>943718.4||this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),this.buffer.size+=e.$snapshot_bytes,this.buffer.data.push(e.$snapshot_data),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){i._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{transport:"XHR",method:"POST",endpoint:this._endpoint,_noTruncate:!0,_batchKey:"recordings",_metrics:{rrweb_full_snapshot:e.$snapshot_data.type===qp}})}}]),t}(),qt={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},x0=["first-input","navigation","paint","resource"],S0=["/s/","/e/"],k0=function(){function t(e){Re(this,t),Y(this,"_forceAllowLocalhost",!1),this.instance=e}return Le(t,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var e,r,i=this;if(!this.observer)if(ge((e=window)===null||e===void 0||(r=e.PerformanceObserver)===null||r===void 0?void 0:r.supportedEntryTypes))z.info("[PerformanceObserver] not started because PerformanceObserver is not supported by this browser.");else if(!u0.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(s){s.getEntries().forEach(function(a){i._capturePerformanceEvent(a)})});var n=PerformanceObserver.supportedEntryTypes.filter(function(s){return x0.includes(s)});n.forEach(function(s){var a;(a=i.observer)===null||a===void 0||a.observe({type:s,buffered:!0})})}catch(s){z.error("PostHog failed to start performance observer",s),this.stopObserving()}else z.info("[PerformanceObserver] not started because we are on localhost.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var e,r;return(e=(r=this.instance.config.capture_performance)!==null&&r!==void 0?r:this.remoteEnabled)!==null&&e!==void 0&&e}},{key:"afterDecideResponse",value:function(e){this.remoteEnabled=e.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(e){if(e.name.indexOf(this.instance.config.api_host)===0){var r=e.name.replace(this.instance.config.api_host,"");if(S0.find(function(p){return r.indexOf(p)===0}))return}var i={url:e.name},n=this.instance.config.session_recording;if(n.maskNetworkRequestFn&&(i=n.maskNetworkRequestFn(i)),i){var s=e.toJSON();s.name=i.url;var a={},o=Math.floor(Date.now()-performance.now());for(var l in a[qt.timeOrigin]=o,a[qt.timestamp]=Math.floor(o+e.startTime),qt)ge(s[l])||(a[qt[l]]=s[l]);if(this.capturePerformanceEvent(a),E0(e)){var h,c=ri(e.serverTiming||[]);try{for(c.s();!(h=c.n()).done;){var u,f=h.value;this.capturePerformanceEvent((Y(u={},qt.timeOrigin,o),Y(u,qt.timestamp,Math.floor(o+e.startTime)),Y(u,qt.name,f.name),Y(u,qt.duration,f.duration),Y(u,qt.entryType,"serverTiming"),u))}}catch(p){c.e(p)}finally{c.f()}}}}},{key:"capturePerformanceEvent",value:function(e){var r,i=e[qt.timestamp];(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:e},timestamp:i})}}]),t}(),E0=function(t){return t.entryType==="navigation"||t.entryType==="resource"},P0=function(){function t(e){Re(this,t),this.instance=e,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Le(t,[{key:"call",value:function(){var e=this,r=rh(JSON.stringify({token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(Wi),group_properties:this.instance.get_property(xr),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("".concat(this.instance.config.api_host,"/decide/?v=3"),{data:r,verbose:!0},{method:"POST"},function(i){return e.parseDecideResponse(i)})}},{key:"parseDecideResponse",value:function(e){var r,i,n,s,a=this;if(this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer(),e?.status!==0){if(!document||!document.body)return z.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){a.parseDecideResponse(e)},500);this.instance.toolbar.afterDecideResponse(e),(r=this.instance.sessionRecording)===null||r===void 0||r.afterDecideResponse(e),Sr.afterDecideResponse(e,this.instance),(i=this.instance.webPerformance)===null||i===void 0||i.afterDecideResponse(e),this.instance._afterDecideResponse(e),this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.featureFlags.receivedFeatureFlags(e);var o=(n=window)===null||n===void 0?void 0:n.extendPostHogWithSurveys;e.surveys&&!o&&jn(this.instance.config.api_host+"/static/surveys.js",function(p){if(p)return z.error("Could not load surveys script",p);window.extendPostHogWithSurveys(a.instance)});var l=(s=window)===null||s===void 0?void 0:s.extendPostHogWithExceptionAutoCapture;if(e.autocaptureExceptions&&e.autocaptureExceptions&&ge(l)&&jn(this.instance.config.api_host+"/static/exception-autocapture.js",function(p){if(p)return z.error("Could not load exception autocapture script",p);window.extendPostHogWithExceptionAutocapture(a.instance,e)}),e.siteApps)if(this.instance.config.opt_in_site_apps){var h,c=this.instance.config.api_host,u=ri(e.siteApps);try{var f=function(){var p=h.value,m=p.id,g=p.url,d=[c,c[c.length-1]==="/"&&g[0]==="/"?g.substring(1):g].join("");window["__$$ph_site_app_".concat(m)]=a.instance,jn(d,function(y){y&&z.error("Error while initializing PostHog app with config id ".concat(m),y)})};for(u.s();!(h=u.n()).done;)f()}catch(p){u.e(p)}finally{u.f()}}else e.siteApps.length>0&&z.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else z.error("Failed to fetch feature flags from PostHog.")}}]),t}(),A0=["https://app.posthog.com","https://eu.posthog.com"],C0=["source"],T0=X.location?Ba(X.location.hash,"__posthog")||Ba(location.hash,"state"):null,I0=function(){function t(e){Re(this,t),this.instance=e}return Le(t,[{key:"afterDecideResponse",value:function(e){var r=e.toolbarParams||e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});e.isAuthenticated&&r.toolbarVersion&&r.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(ce({},r))}},{key:"maybeLoadToolbar",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:X.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:X.history;try{if(!r){try{X.localStorage.setItem("test","test"),X.localStorage.removeItem("test")}catch{return!1}r=X.localStorage}var n,s=T0||Ba(e.hash,"__posthog")||Ba(e.hash,"state"),a=s?Op(function(){return JSON.parse(atob(decodeURIComponent(s)))})||Op(function(){return JSON.parse(decodeURIComponent(s))}):null;return a&&a.action==="ph_authorize"?((n=a).source="url",n&&Object.keys(n).length>0&&(a.desiredHash?e.hash=a.desiredHash:i?i.replaceState("",document.title,e.pathname+e.search):e.hash="")):((n=JSON.parse(r.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token)&&(this.loadToolbar(n),!0)}catch{return!1}}},{key:"loadToolbar",value:function(e){var r=this;if(X._postHogToolbarLoaded)return!1;X._postHogToolbarLoaded=!0;var i=this.instance.config.api_host,n=3e5,s=Math.floor(Date.now()/n)*n,a="".concat(i).concat(i.endsWith("/")?"":"/","static/toolbar.js?t=").concat(s),o=!A0.includes(this.instance.config.api_host)&&this.instance.config.advanced_disable_toolbar_metrics,l=ce(ce({token:this.instance.config.token},e),{},{apiURL:i},o?{instrument:!1}:{});l.source;var h=Yg(l,C0);return X.localStorage.setItem("_postHogToolbarParams",JSON.stringify(h)),jn(a,function(c){c?z.error("Failed to load toolbar",c):(X.ph_load_toolbar||X.ph_load_editor)(l,r.instance)}),zn(X,"turbolinks:load",function(){X._postHogToolbarLoaded=!1,r.loadToolbar(l)}),!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]:X.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:X.history;return this.maybeLoadToolbar(e,r,i)}}]),t}(),M0="__ph_opt_in_out_";function D0(t,e){gd(!0,t,e)}function F0(t,e){gd(!1,t,e)}function O0(t,e){return md(t,e)==="1"}function Up(t,e){return!!function(r){if(r&&r.respectDnt){var i=r&&r.window||X,n=i.navigator||{},s=!1;return Ae([n.doNotTrack,n.msDoNotTrack,i.doNotTrack],function(a){we([!0,1,"1","yes"],a)&&(s=!0)}),s}return!1}(e)||md(t,e)==="0"}function $0(t,e){ih(e=e||{}).remove(nh(t,e),!!e.crossSubdomainCookie)}function ih(t){return(t=t||{}).persistenceType==="localStorage"?$e:t.persistenceType==="localStorage+cookie"?Zl:lr}function nh(t,e){return((e=e||{}).persistencePrefix||M0)+t}function md(t,e){return ih(e).get(nh(t,e))}function gd(t,e,r){xt(e)&&e.length?(ih(r=r||{}).set(nh(e,r),t?1:0,or(r.cookieExpiration)?r.cookieExpiration:null,r.crossSubdomainCookie,r.secureCookie),r.capture&&t&&r.capture(r.captureEventName||"$opt_in",r.captureProperties||{},{send_instantly:!0})):z.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token")}var yd=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Re(this,t),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=e}return Le(t,[{key:"setPollInterval",value:function(e){this._pollInterval=e,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),t}(),R0=function(t){rd(r,yd);var e=id(r);function r(i){var n,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3;return Re(this,r),(n=e.call(this,s)).handlePollRequest=i,n}return Le(r,[{key:"enqueue",value:function(i,n,s){this._event_queue.push({url:i,data:n,options:s}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var i=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(i._event_queue.length>0){var n=i.formatQueue(),s=function(o){var l=n[o],h=l.url,c=l.data,u=l.options;Ae(c,function(f,p){c[p].offset=Math.abs(c[p].timestamp-i.getTime()),delete c[p].timestamp}),i.handlePollRequest(h,c,u)};for(var a in n)s(a);i._event_queue.length=0,i._empty_queue_count=0}else i._empty_queue_count++;i._empty_queue_count>4&&(i.isPolling=!1,i._empty_queue_count=0),i.isPolling&&i.poll()},this._pollInterval)}},{key:"unload",value:function(){var i=this;clearTimeout(this._poller);var n=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var s=Object.values(n);[].concat(Bl(s.filter(function(a){return a.url.indexOf("/e")===0})),Bl(s.filter(function(a){return a.url.indexOf("/e")!==0}))).map(function(a){var o=a.url,l=a.data,h=a.options;i.handlePollRequest(o,l,ce(ce({},h),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var i={};return Ae(this._event_queue,function(n){var s=n.url,a=n.data,o=n.options,l=(o?o._batchKey:null)||s;ge(i[l])&&(i[l]={data:[],url:s,options:o}),o&&i[l].options&&i[l].options._metrics&&!i[l].options._metrics.rrweb_full_snapshot&&(i[l].options._metrics.rrweb_full_snapshot=o._metrics.rrweb_full_snapshot),i[l].data.push(a)}),i}}]),r}(),St=Uint8Array,nt=Uint16Array,Ji=Uint32Array,sh=new St([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]),ah=new St([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]),Wp=new St([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vd=function(t,e){for(var r=new nt(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Ji(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return[r,n]},bd=vd(sh,2),L0=bd[0],Yl=bd[1];L0[28]=258,Yl[258]=28;for(Jl=vd(ah,0)[1],Va=new nt(32768),Te=0;Te<32768;++Te)_r=(43690&Te)>>>1|(21845&Te)<<1,_r=(61680&(_r=(52428&_r)>>>2|(13107&_r)<<2))>>>4|(3855&_r)<<4,Va[Te]=((65280&_r)>>>8|(255&_r)<<8)>>>1;var _r,Jl,Va,Te,Gn=function(t,e,r){for(var i=t.length,n=0,s=new nt(e);n<i;++n)++s[t[n]-1];var a,o=new nt(e);for(n=0;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;if(r){a=new nt(1<<e);var l=15-e;for(n=0;n<i;++n)if(t[n])for(var h=n<<4|t[n],c=e-t[n],u=o[t[n]-1]++<<c,f=u|(1<<c)-1;u<=f;++u)a[Va[u]>>>l]=h}else for(a=new nt(i),n=0;n<i;++n)a[n]=Va[o[t[n]-1]++]>>>15-t[n];return a},si=new St(288);for(Te=0;Te<144;++Te)si[Te]=8;for(Te=144;Te<256;++Te)si[Te]=9;for(Te=256;Te<280;++Te)si[Te]=7;for(Te=280;Te<288;++Te)si[Te]=8;var Na=new St(32);for(Te=0;Te<32;++Te)Na[Te]=5;var ei,B0=Gn(si,9,0),V0=Gn(Na,5,0),_d=function(t){return(t/8>>0)+(7&t&&1)},wd=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new(t instanceof nt?nt:t instanceof Ji?Ji:St)(r-e);return i.set(t.subarray(e,r)),i},ar=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8},Bn=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},$l=function(t,e){for(var r=[],i=0;i<t.length;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[new St(0),0];if(n==1){var a=new St(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort(function(x,T){return x.f-T.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],h=0,c=1,u=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=n-1;)o=r[r[h].f<r[u].f?h++:u++],l=r[h!=c&&r[h].f<r[u].f?h++:u++],r[c++]={s:-1,f:o.f+l.f,l:o,r:l};var f=s[0].s;for(i=1;i<n;++i)s[i].s>f&&(f=s[i].s);var p=new nt(f+1),m=N0(r[c-1],p,0);if(m>e){i=0;var g=0,d=m-e,y=1<<d;for(s.sort(function(x,T){return p[T.s]-p[x.s]||x.f-T.f});i<n;++i){var v=s[i].s;if(!(p[v]>e))break;g+=y-(1<<m-p[v]),p[v]=e}for(g>>>=d;g>0;){var b=s[i].s;p[b]<e?g-=1<<e-p[b]++-1:++i}for(;i>=0&&g;--i){var _=s[i].s;p[_]==e&&(--p[_],++g)}m=e}return[new St(p),m]},N0=function t(e,r,i){return e.s==-1?Math.max(t(e.l,r,i+1),t(e.r,r,i+1)):r[e.s]=i},Zp=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new nt(++e),i=0,n=t[0],s=1,a=function(l){r[i++]=l},o=1;o<=e;++o)if(t[o]==n&&o!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(n),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(n);s=1,n=t[o]}return[r.subarray(0,i),e]},Vn=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},Ma=function(t,e,r){var i=r.length,n=_d(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<i;++s)t[n+s+4]=r[s];return 8*(n+4+i)},Yp=function(t,e,r,i,n,s,a,o,l,h,c){ar(e,c++,r),++n[256];for(var u=$l(n,15),f=u[0],p=u[1],m=$l(s,15),g=m[0],d=m[1],y=Zp(f),v=y[0],b=y[1],_=Zp(g),x=_[0],T=_[1],S=new nt(19),w=0;w<v.length;++w)S[31&v[w]]++;for(w=0;w<x.length;++w)S[31&x[w]]++;for(var M=$l(S,7),k=M[0],I=M[1],P=19;P>4&&!k[Wp[P-1]];--P);var A,E,F,O,D=h+5<<3,C=Vn(n,si)+Vn(s,Na)+a,$=Vn(n,f)+Vn(s,g)+a+14+3*P+Vn(S,k)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return Ma(e,c,t.subarray(l,l+h));if(ar(e,c,1+($<C)),c+=2,$<C){A=Gn(f,p,0),E=f,F=Gn(g,d,0),O=g;var L=Gn(k,I,0);for(ar(e,c,b-257),ar(e,c+5,T-1),ar(e,c+10,P-4),c+=14,w=0;w<P;++w)ar(e,c+3*w,k[Wp[w]]);c+=3*P;for(var q=[v,x],U=0;U<2;++U){var J=q[U];for(w=0;w<J.length;++w){var G=31&J[w];ar(e,c,L[G]),c+=k[G],G>15&&(ar(e,c,J[w]>>>5&127),c+=J[w]>>>12)}}}else A=B0,E=si,F=V0,O=Na;for(w=0;w<o;++w)if(i[w]>255){G=i[w]>>>18&31,Bn(e,c,A[G+257]),c+=E[G+257],G>7&&(ar(e,c,i[w]>>>23&31),c+=sh[G]);var re=31&i[w];Bn(e,c,F[re]),c+=O[re],re>3&&(Bn(e,c,i[w]>>>5&8191),c+=ah[re])}else Bn(e,c,A[i[w]]),c+=E[i[w]];return Bn(e,c,A[256]),c+E[256]},z0=new Ji([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),j0=new St(0),G0=function(){for(var t=new Ji(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),H0=function(){var t=4294967295;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=G0[255&r^e[i]]^r>>>8;t=r},d:function(){return 4294967295^t}}},q0=function(t,e,r,i,n){return function(s,a,o,l,h,c){var u=s.length,f=new St(l+u+5*(1+Math.floor(u/7e3))+h),p=f.subarray(l,f.length-h),m=0;if(!a||u<8)for(var g=0;g<=u;g+=65535){var d=g+65535;d<u?m=Ma(p,m,s.subarray(g,d)):(p[g]=c,m=Ma(p,m,s.subarray(g,u)))}else{for(var y=z0[a-1],v=y>>>13,b=8191&y,_=(1<<o)-1,x=new nt(32768),T=new nt(_+1),S=Math.ceil(o/3),w=2*S,M=function(st){return(s[st]^s[st+1]<<S^s[st+2]<<w)&_},k=new Ji(25e3),I=new nt(288),P=new nt(32),A=0,E=0,F=(g=0,0),O=0,D=0;g<u;++g){var C=M(g),$=32767&g,L=T[C];if(x[$]=L,T[C]=$,O<=g){var q=u-g;if((A>7e3||F>24576)&&q>423){m=Yp(s,p,0,k,I,P,E,F,D,g-D,m),F=A=E=0,D=g;for(var U=0;U<286;++U)I[U]=0;for(U=0;U<30;++U)P[U]=0}var J=2,G=0,re=b,se=$-L&32767;if(q>2&&C==M(g-se))for(var ie=Math.min(v,q)-1,ee=Math.min(32767,g),Se=Math.min(258,q);se<=ee&&--re&&$!=L;){if(s[g+J]==s[g+J-se]){for(var ue=0;ue<Se&&s[g+ue]==s[g+ue-se];++ue);if(ue>J){if(J=ue,G=se,ue>ie)break;var Ie=Math.min(se,ue-2),ke=0;for(U=0;U<Ie;++U){var W=g-se+U+32768&32767,qe=W-x[W]+32768&32767;qe>ke&&(ke=qe,L=W)}}}se+=($=L)-(L=x[$])+32768&32767}if(G){k[F++]=268435456|Yl[J]<<18|Jl[G];var kt=31&Yl[J],Et=31&Jl[G];E+=sh[kt]+ah[Et],++I[257+kt],++P[Et],O=g+J,++A}else k[F++]=s[g],++I[s[g]]}}m=Yp(s,p,c,k,I,P,E,F,D,g-D,m),c||(m=Ma(p,m,j0))}return wd(f,0,l+_d(m)+h)}(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!n)},Xl=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},U0=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&Xl(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},W0=function(t){return 10+(t.filename&&t.filename.length+1||0)};function Z0(t,e){e===void 0&&(e={});var r=H0(),i=t.length;r.p(t);var n=q0(t,e,W0(e),8),s=n.length;return U0(n,e),Xl(n,s-8,r.d()),Xl(n,s-4,i),n}function Y0(t,e){var r=t.length;if(!e&&typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var i=new St(t.length+(t.length>>>1)),n=0,s=function(h){i[n++]=h},a=0;a<r;++a){if(n+5>i.length){var o=new St(n+8+(r-a<<1));o.set(i),i=o}var l=t.charCodeAt(a);l<128||e?s(l):l<2048?(s(192|l>>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++a))>>>18),s(128|l>>>12&63),s(128|l>>>6&63),s(128|63&l)):(s(224|l>>>12),s(128|l>>>6&63),s(128|63&l))}return wd(i,0,n)}(function(t){t.GZipJS="gzip-js",t.Base64="base64"})(ei||(ei={}));var xd=function(t,e,r){var i=e||{};i.ip=r.ip?1:0,i._=new Date().getTime().toString(),i.ver=ii.LIB_VERSION;var n=t.split("?");if(n.length>1){var s,a=ri(n[1].split("&"));try{for(a.s();!(s=a.n()).done;){var o=s.value.split("=")[0];ge(i[o])||delete i[o]}}catch(h){a.e(h)}finally{a.f()}}var l=t.indexOf("?")>-1?"&":"?";return t+l+function(h){var c,u,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",p=[];return Ae(h,function(m,g){ge(m)||ge(g)||g==="undefined"||(c=encodeURIComponent(m.toString()),u=encodeURIComponent(g),p[p.length]=u+"="+c)}),p.join(f)}(i)},oh=function t(e,r){if(r.blob&&e.buffer)return new Blob([Ip(e)?e:e.buffer],{type:"text/plain"});if(r.sendBeacon||r.blob){var i=t(e,{method:"POST"});return new Blob([i],{type:"application/x-www-form-urlencoded"})}return r.method!=="POST"?null:(n=Ye(e)||Ip(e)?"data="+encodeURIComponent(e):"data="+encodeURIComponent(e.data),"compression"in e&&e.compression&&(n+="&compression="+e.compression),n);var n},Sd=function(t){var e=t.url,r=t.data,i=t.headers,n=t.options,s=t.callback,a=t.retriesPerformedSoFar,o=t.retryQueue,l=t.onXHRError,h=t.timeout,c=h===void 0?6e4:h,u=t.onResponse;or(a)&&a>0&&(e=xd(e,{retry_count:a},{}));var f=new XMLHttpRequest;f.open(n.method||"GET",e,!0);var p=oh(r,n);Ae(i,function(m,g){f.setRequestHeader(g,m)}),n.method!=="POST"||n.blob||f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.timeout=c,f.withCredentials=!0,f.onreadystatechange=function(){if(f.readyState===4)if(u?.(f),f.status===200){if(s){var m;try{m=JSON.parse(f.responseText)}catch(g){return void z.error(g)}s(m)}}else ni(l)&&l(f),(f.status<400||f.status>500)&&o.enqueue({url:e,data:r,options:n,headers:i,retriesPerformedSoFar:(a||0)+1,callback:s}),s?.({status:0})},f.send(p)},J0=18e5,X0=function(t){rd(r,yd);var e=id(r);function r(i,n){var s;return Re(this,r),(s=e.call(this)).isPolling=!1,s.queue=[],s.areWeOnline=!0,s.onXHRError=i,s.rateLimiter=n,!ge(window)&&"onLine"in window.navigator&&(s.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){s._handleWeAreNowOnline()}),window.addEventListener("offline",function(){s.areWeOnline=!1})),s}return Le(r,[{key:"enqueue",value:function(i){var n=i.retriesPerformedSoFar||0;if(!(n>=10)){var s=function(l){var h=3e3*Math.pow(2,l),c=h/2,u=Math.min(J0,h),f=(Math.random()-.5)*(u-c);return Math.ceil(u+f)}(n),a=new Date(Date.now()+s);this.queue.push({retryAt:a,requestData:i});var o="Enqueued failed request for retry in ".concat(s);navigator.onLine||(o+=" (Browser is offline)"),z.warn(o),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var i=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){i.areWeOnline&&i.queue.length>0&&i.flush(),i.poll()},this._pollInterval)}},{key:"flush",value:function(){var i=new Date(Date.now()),n=this.queue.filter(function(l){return l.retryAt<i});if(n.length>0){this.queue=this.queue.filter(function(l){return l.retryAt>=i});var s,a=ri(n);try{for(a.s();!(s=a.n()).done;){var o=s.value.requestData;this._executeXhrRequest(o)}}catch(l){a.e(l)}finally{a.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var i,n=ri(this.queue);try{for(n.s();!(i=n.n()).done;){var s=i.value.requestData,a=s.url,o=s.data,l=s.options;if(this.rateLimiter.isRateLimited(l._batchKey))z.warn("[RetryQueue] is quota limited. Dropping request.");else try{window.navigator.sendBeacon(a,oh(o,ce(ce({},l),{},{sendBeacon:!0})))}catch(h){z.error(h)}}}catch(h){n.e(h)}finally{n.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(i){var n=i.url,s=i.data,a=i.options,o=i.headers,l=i.callback,h=i.retriesPerformedSoFar;this.rateLimiter.isRateLimited(a._batchKey)||Sd({url:n,data:s||{},options:a||{},headers:o||{},retriesPerformedSoFar:h||0,callback:l,retryQueue:this,onXHRError:this.onXHRError,onResponse:this.rateLimiter.checkForLimiting})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),r}();Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return or(t)&&isFinite(t)&&Math.floor(t)===t});var Jp="0123456789abcdef",K0=function(){function t(e){if(Re(this,t),this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}return Le(t,[{key:"toString",value:function(){for(var e="",r=0;r<this.bytes.length;r++)e=e+Jp.charAt(this.bytes[r]>>>4)+Jp.charAt(15&this.bytes[r]),r!==3&&r!==5&&r!==7&&r!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}},{key:"clone",value:function(){return new t(this.bytes.slice(0))}},{key:"equals",value:function(e){return this.compareTo(e)===0}},{key:"compareTo",value:function(e){for(var r=0;r<16;r++){var i=this.bytes[r]-e.bytes[r];if(i!==0)return Math.sign(i)}return 0}}],[{key:"fromFieldsV7",value:function(e,r,i,n){if(!Number.isInteger(e)||!Number.isInteger(r)||!Number.isInteger(i)||!Number.isInteger(n)||e<0||r<0||i<0||n<0||e>0xffffffffffff||r>4095||i>1073741823||n>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|r>>>8,s[7]=r,s[8]=128|i>>>24,s[9]=i>>>16,s[10]=i>>>8,s[11]=i,s[12]=n>>>24,s[13]=n>>>16,s[14]=n>>>8,s[15]=n,new t(s)}}]),t}(),Q0=function(){function t(){Re(this,t),Y(this,"timestamp",0),Y(this,"counter",0),Y(this,"random",new ey)}return Le(t,[{key:"generate",value:function(){var e=this.generateOrAbort();if(ge(e)){this.timestamp=0;var r=this.generateOrAbort();if(ge(r))throw new Error("Could not generate UUID after timestamp reset");return r}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 K0.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())}}]),t}(),kd=function(t){if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<t.length;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};!ge(X.crypto)&&crypto.getRandomValues&&(kd=function(t){return crypto.getRandomValues(t)});var Xp,ey=function(){function t(){Re(this,t),Y(this,"buffer",new Uint32Array(8)),Y(this,"cursor",1/0)}return Le(t,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(kd(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),t}(),Zi=function(){return ty().toString()},ty=function(){return(Xp||(Xp=new Q0)).generate()},Ea=1800,Kp=60,ry=864e5,iy=function(){function t(e,r,i,n){Re(this,t),Y(this,"_sessionIdChangedHandlers",[]),this.config=e,this.persistence=r,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=i||Zi,this._windowIdGenerator=n||Zi;var s=e.persistence_name||e.token,a=e.session_idle_timeout_seconds||Ea;if(or(a)?a>Ea?z.warn("session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):a<Kp&&z.warn("session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."):(z.warn("session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),a=Ea),this._sessionTimeoutMs=1e3*Math.min(Math.max(a,Kp),Ea),this._window_id_storage_key="ph_"+s+"_window_id",this._primary_window_exists_storage_key="ph_"+s+"_primary_window_exists",this._canUseSessionStorage()){var o=Ze.parse(this._window_id_storage_key),l=Ze.parse(this._primary_window_exists_storage_key);o&&!l?this._windowId=o:Ze.remove(this._window_id_storage_key),Ze.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return Le(t,[{key:"onSessionId",value:function(e){var r=this;return ge(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),function(){r._sessionIdChangedHandlers=r._sessionIdChangedHandlers.filter(function(i){return i!==e})}}},{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Ze.is_supported()}},{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&Ze.set(this._window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Ze.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(e,r,i){e===this._sessionId&&r===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=r,this._sessionId=e,this.persistence.register(Y({},Ra,[r,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[Ra];return Ye(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;X.addEventListener("beforeunload",function(){e._canUseSessionStorage()&&Ze.remove(e._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),i=qn(this._getSessionId(),3),n=i[0],s=i[1],a=i[2],o=this._getWindowId(),l=a&&a>0&&Math.abs(r-a)>ry,h=!1,c=!s,u=!e&&Math.abs(r-n)>this._sessionTimeoutMs;c||u||l?(s=this._sessionIdGenerator(),o=this._windowIdGenerator(),a=r,h=!0):o||(o=this._windowIdGenerator(),h=!0);var f=n===0||!e||l?r:n,p=a===0?new Date().getTime():a;return this._setWindowId(o),this._setSessionId(s,f,p),h&&this._sessionIdChangedHandlers.forEach(function(m){return m(s,o)}),{sessionId:s,windowId:o,sessionStartTimestamp:p}}}]),t}(),ny=Le(function t(e,r,i,n){Re(this,t),this.name="posthog-js",this.setupOnce=function(s){s(function(a){var o,l,h,c,u;if(a.level!=="error"||!e.__loaded)return a;a.tags||(a.tags={});var f=e.config.ui_host||e.config.api_host;a.tags["PostHog Person URL"]=f+"/person/"+e.get_distinct_id(),e.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=((o=a.exception)===null||o===void 0?void 0:o.values)||[],m={$exception_message:(l=p[0])===null||l===void 0?void 0:l.value,$exception_type:(h=p[0])===null||h===void 0?void 0:h.type,$exception_personURL:f+"/person/"+e.get_distinct_id(),$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:(c=p[0])===null||c===void 0?void 0:c.value,$sentry_exception_type:(u=p[0])===null||u===void 0?void 0:u.type,$sentry_tags:a.tags};return r&&i&&(m.$sentry_url=(n||"https://sentry.io/organizations/")+r+"/issues/?project="+i+"&query="+a.event_id),e.capture("$exception",m),a})}}),sy=function(t){Promise&&Promise.resolve||z.warn("This browser does not have Promise support, and can not use the segment integration");var e=function(r,i){r.event.userId||r.event.anonymousId===t.get_distinct_id()||t.reset(),r.event.userId&&r.event.userId!==t.get_distinct_id()&&(t.register({distinct_id:r.event.userId}),t.reloadFeatureFlags());var n=t._calculate_event_properties(i,r.event.properties);return r.event.properties=Object.assign({},n,r.event.properties),r};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(r){return e(r,r.event.event)},page:function(r){return e(r,"$pageview")},identify:function(r){return e(r,"$identify")},screen:function(r){return e(r,"$screen")}}},ay=function(){function t(){var e=this;Re(this,t),Y(this,"_hasSeenPageView",!1),Y(this,"_updateScrollData",function(){var r,i,n,s;e._pageViewData||(e._pageViewData=e._createPageViewData());var a=e._pageViewData,o=e._scrollY(),l=e._scrollHeight(),h=e._contentY(),c=e._contentHeight();a.lastScrollY=o,a.maxScrollY=Math.max(o,(r=a.maxScrollY)!==null&&r!==void 0?r:0),a.maxScrollHeight=Math.max(l,(i=a.maxScrollHeight)!==null&&i!==void 0?i:0),a.lastContentY=h,a.maxContentY=Math.max(h,(n=a.maxContentY)!==null&&n!==void 0?n:0),a.maxContentHeight=Math.max(c,(s=a.maxContentHeight)!==null&&s!==void 0?s:0)})}return Le(t,[{key:"_createPageViewData",value:function(){return{pathname:X.location.pathname}}},{key:"doPageView",value:function(){var e,r;return this._hasSeenPageView?(r=this._pageViewData,this._pageViewData=this._createPageViewData()):(this._hasSeenPageView=!0,r=void 0,this._pageViewData||(this._pageViewData=this._createPageViewData())),setTimeout(this._updateScrollData,0),ce({$prev_pageview_pathname:(e=r)===null||e===void 0?void 0:e.pathname},this._calculatePrevPageScrollProperties(r))}},{key:"doPageLeave",value:function(){var e=this._pageViewData;return ce({$prev_pageview_pathname:e?.pathname},this._calculatePrevPageScrollProperties(e))}},{key:"_calculatePrevPageScrollProperties",value:function(e){if(!e||e.maxScrollHeight==null||e.lastScrollY==null||e.maxScrollY==null||e.maxContentHeight==null||e.lastContentY==null||e.maxContentY==null)return{};var r=e.maxScrollHeight,i=e.lastScrollY,n=e.maxScrollY,s=e.maxContentHeight,a=e.lastContentY,o=e.maxContentY;return r=Math.ceil(r),i=Math.ceil(i),n=Math.ceil(n),s=Math.ceil(s),a=Math.ceil(a),o=Math.ceil(o),{$prev_pageview_last_scroll:i,$prev_pageview_last_scroll_percentage:r<=1?1:Pa(i/r,0,1),$prev_pageview_max_scroll:n,$prev_pageview_max_scroll_percentage:r<=1?1:Pa(n/r,0,1),$prev_pageview_last_content:a,$prev_pageview_last_content_percentage:s<=1?1:Pa(a/s,0,1),$prev_pageview_max_content:o,$prev_pageview_max_content_percentage:s<=1?1:Pa(o/s,0,1)}}},{key:"startMeasuringScrollPosition",value:function(){X.addEventListener("scroll",this._updateScrollData),X.addEventListener("scrollend",this._updateScrollData),X.addEventListener("resize",this._updateScrollData)}},{key:"stopMeasuringScrollPosition",value:function(){X.removeEventListener("scroll",this._updateScrollData),X.removeEventListener("scrollend",this._updateScrollData),X.removeEventListener("resize",this._updateScrollData)}},{key:"_scrollHeight",value:function(){return Math.max(0,X.document.documentElement.scrollHeight-X.document.documentElement.clientHeight)}},{key:"_scrollY",value:function(){return X.scrollY||X.pageYOffset||X.document.documentElement.scrollTop||0}},{key:"_contentHeight",value:function(){return X.document.documentElement.scrollHeight||0}},{key:"_contentY",value:function(){var e=X.document.documentElement.clientHeight||0;return this._scrollY()+e}}]),t}();function Pa(t,e,r){return Math.max(e,Math.min(t,r))}var Hn,lh,We,oy={icontains:function(t){return window.location.href.toLowerCase().indexOf(t.toLowerCase())>-1},regex:function(t){return p0(window.location.href,t)},exact:function(t){return window.location.href===t}},ly=function(){function t(e){Re(this,t),this.instance=e}return Le(t,[{key:"getSurveys",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.instance.get_property(ql);if(n&&!i)return e(n);this.instance._send_request("".concat(this.instance.config.api_host,"/api/surveys/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var a,o=s.surveys||[];return(a=r.instance.persistence)===null||a===void 0||a.register(Y({},ql,o)),e(o)})}},{key:"getActiveMatchingSurveys",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(function(n){var s=n.filter(function(a){return!(!a.start_date||a.end_date)}).filter(function(a){var o,l,h,c;if(!a.conditions)return!0;var u=(o=a.conditions)===null||o===void 0||!o.url||oy[(l=(h=a.conditions)===null||h===void 0?void 0:h.urlMatchType)!==null&&l!==void 0?l:"icontains"](a.conditions.url),f=(c=a.conditions)===null||c===void 0||!c.selector||document.querySelector(a.conditions.selector);return u&&f}).filter(function(a){if(!a.linked_flag_key&&!a.targeting_flag_key)return!0;var o=!a.linked_flag_key||r.instance.featureFlags.isFeatureEnabled(a.linked_flag_key),l=!a.targeting_flag_key||r.instance.featureFlags.isFeatureEnabled(a.targeting_flag_key);return o&&l});return e(s)},i)}}]),t}(),hy=6e4,cy=function(){function t(){var e=this;Re(this,t),Y(this,"limits",{}),Y(this,"checkForLimiting",function(r){try{var i=r.responseText;if(!i||!i.length)return;(JSON.parse(i).quota_limited||[]).forEach(function(n){z.info("[RateLimiter] ".concat(n||"events"," is quota limited.")),e.limits[n]=new Date().getTime()+hy})}catch(n){return void z.error(n)}})}return Le(t,[{key:"isRateLimited",value:function(e){var r=this.limits[e||"events"]||!1;return r!==!1&&new Date().getTime()<r}}]),t}();(function(t){t[t.INIT_MODULE=0]="INIT_MODULE",t[t.INIT_SNIPPET=1]="INIT_SNIPPET"})(Hn||(Hn={}));var Kl=function(){},Aa={},ut="posthog",Da=X.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Ed=!Da&&ct.indexOf("MSIE")===-1&&ct.indexOf("Mozilla")===-1,Qp=function(){var t,e,r;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(e=Oe?.location,r=e?.hostname,!!xt(r)&&r.split(".").slice(-2).join(".")!=="herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:Kl,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:!0,debug:!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(X==null||(t=X.location)===null||t===void 0?void 0:t.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_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,on_xhr_error:function(i){var n="Bad HTTP status: "+i.status+" "+i.statusText;z.error(n)},get_device_id:function(i){return i},_onCapture:Kl,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800}},Ql=function(t,e,r,i){var n,s=r!==ut&&We?r?We[r]:void 0:We,a={initComplete:!1,syncCode:!1},o=function(l){return function(h){a[l]||(a[l]=!0,a.initComplete&&a.syncCode&&i?.(h))}};if(s&&lh===Hn.INIT_MODULE)n=s;else{if(s&&!Ye(s))return void z.error("You have already initialized "+r);n=new hh}return n._init(t,e,r,o("initComplete")),n.toolbar.maybeLoadToolbar(),n.sessionRecording=new w0(n),n.sessionRecording.startRecordingIfEnabled(),n.webPerformance=new k0(n),n.webPerformance.startObservingIfEnabled(),n.config.__preview_measure_pageview_stats&&n.pageViewManager.startMeasuringScrollPosition(),n.__autocapture=n.config.autocapture,Sr._setIsAutocaptureEnabled(n),Sr._isAutocaptureEnabled&&(n.__autocapture=n.config.autocapture,Sr.enabledForProject(n.config.token,100,100)?Sr.isBrowserSupported()?Sr.init(n):(n.__autocapture=!1,z.info("Disabling Automatic Event Collection because this browser is not supported")):(n.__autocapture=!1,z.info("Not in active bucket: disabling Automatic Event Collection."))),ii.DEBUG=ii.DEBUG||n.config.debug,!ge(s)&&Ye(s)&&(n._execute_array.call(n.people,s.people),n._execute_array(s)),o("syncCode")(n),n},hh=function(){function t(){var e=this;Re(this,t),this.config=Qp(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=ny,this.segmentIntegration=function(){return sy(e)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.analyticsDefaultEndpoint="/e/",this.featureFlags=new o0(this),this.toolbar=new I0(this),this.pageViewManager=new ay,this.surveys=new ly(this),this.rateLimiter=new cy,this.people={set:function(r,i,n){var s=xt(r)?Y({},r,i):r;e.setPersonProperties(s),n?.({})},set_once:function(r,i,n){var s=xt(r)?Y({},r,i):r;e.setPersonProperties(void 0,s),n?.({})}}}return Le(t,[{key:"init",value:function(e,r,i){if(ge(i))z.critical("You must name your new library: init(token, config, name)");else{if(i!==ut){var n=Ql(e,r,i,function(s){We[i]=s,s._loaded()});return We[i]=n,n}z.critical("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(e){var r,i,n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var l,h={segmentRegister:!1,syncCode:!1},c=function(_){return function(){h[_]||(h[_]=!0,h.segmentRegister&&h.syncCode&&o?.(n))}};if(this.set_config(Qe({},Qp(),s,{name:a,token:e,callback_fn:(a===ut?a:ut+"."+a)+"._jsc"})),this._jsc=function(){},(X!=null&&(r=X.rrweb)!==null&&r!==void 0&&r.record||X!=null&&X.rrwebRecord)&&(this.__loaded_recorder_version=X==null||(l=X.rrweb)===null||l===void 0?void 0:l.version),this.persistence=new Hp(this.config),this._requestQueue=new R0(this._handle_queued_event.bind(this)),this._retryQueue=new X0(this.config.on_xhr_error,this.rateLimiter),this.__captureHooks=[],this.__request_queue=[],this.sessionManager=new iy(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new Hp(ce(ce({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),s.segment?(this.config.get_device_id=function(){return s.segment.user().anonymousId()},s.segment.user().id()&&(this.register({distinct_id:s.segment.user().id()}),this.persistence.set_user_state("identified")),s.segment.register(this.segmentIntegration()).then(c("segmentRegister"))):c("segmentRegister")(),((i=s.bootstrap)===null||i===void 0?void 0:i.distinctID)!==void 0){var u,f,p=this.config.get_device_id(Zi()),m=(u=s.bootstrap)!==null&&u!==void 0&&u.isIdentifiedID?p:s.bootstrap.distinctID;this.persistence.set_user_state((f=s.bootstrap)!==null&&f!==void 0&&f.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:m})}if(this._hasBootstrappedFeatureFlags()){var g,d,y=Object.keys(((g=s.bootstrap)===null||g===void 0?void 0:g.featureFlags)||{}).filter(function(_){var x,T;return!((x=s.bootstrap)===null||x===void 0||(T=x.featureFlags)===null||T===void 0||!T[_])}).reduce(function(_,x){var T,S;return _[x]=((T=s.bootstrap)===null||T===void 0||(S=T.featureFlags)===null||S===void 0?void 0:S[x])||!1,_},{}),v=Object.keys(((d=s.bootstrap)===null||d===void 0?void 0:d.featureFlagPayloads)||{}).filter(function(_){return y[_]}).reduce(function(_,x){var T,S,w,M;return(T=s.bootstrap)!==null&&T!==void 0&&(S=T.featureFlagPayloads)!==null&&S!==void 0&&S[x]&&(_[x]=(w=s.bootstrap)===null||w===void 0||(M=w.featureFlagPayloads)===null||M===void 0?void 0:M[x]),_},{});this.featureFlags.receivedFeatureFlags({featureFlags:y,featureFlagPayloads:v})}if(!this.get_distinct_id()){var b=this.config.get_device_id(Zi());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_user_state("anonymous")}X.addEventListener&&X.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),c("syncCode")()}},{key:"_afterDecideResponse",value:function(e){var r;if(this.compression={},e.supportedCompression&&!this.config.disable_compression){var i,n={},s=ri(e.supportedCompression);try{for(s.s();!(i=s.n()).done;)n[i.value]=!0}catch(a){s.e(a)}finally{s.f()}this.compression=n}(r=e.analytics)!==null&&r!==void 0&&r.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint)}},{key:"_loaded",value:function(){var e=this.config.advanced_disable_decide;e||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(r){z.critical("`loaded` function failed",r)}this._start_queue_if_opted_in(),this.config.capture_pageview&&this.capture("$pageview",{title:Oe.title},{send_instantly:!0}),e||(new P0(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.poll())}},{key:"_dom_loaded",value:function(){var e=this;this.has_opted_out_capturing()||Yi(this.__request_queue,function(r){e._send_request.apply(e,Bl(r))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(e,r){if(ge(e))return null;if(Da)return function(a){e(a,r)};var i=this._jsc,n=""+Math.floor(1e8*Math.random()),s=this.config.callback_fn+"["+n+"]";return i[n]=function(a){delete i[n],e(a,r)},s}},{key:"_handle_unload",value:function(){var e,r;this.config.request_batching?(this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave"),(e=this._requestQueue)===null||e===void 0||e.unload(),(r=this._retryQueue)===null||r===void 0||r.unload()):this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(e,r,i){var n=JSON.stringify(r);this.__compress_and_send_json_request(e,n,i||Aa,Kl)}},{key:"__compress_and_send_json_request",value:function(e,r,i,n){var s=function(h,c,u){return h===ei.GZipJS?[Z0(Y0(c),{mtime:0}),ce(ce({},u),{},{blob:!0,urlQueryArgs:{compression:ei.GZipJS}})]:[{data:rh(c)},u]}(this.compression[ei.GZipJS]?ei.GZipJS:ei.Base64,r,i),a=qn(s,2),o=a[0],l=a[1];this._send_request(e,o,l,n)}},{key:"_send_request",value:function(e,r,i,n){if(this.__loaded&&this._retryQueue&&!this.rateLimiter.isRateLimited(i._batchKey))if(Ed)this.__request_queue.push([e,r,i,n]);else{var s={method:this.config.api_method,transport:this.config.api_transport,verbose:this.config.verbose};i=Qe(s,i||{}),Da||(i.method="GET");var a="sendBeacon"in X.navigator&&i.transport==="sendBeacon";if(e=xd(e,i.urlQueryArgs||{},{ip:this.config.ip}),a)try{X.navigator.sendBeacon(e,oh(r,ce(ce({},i),{},{sendBeacon:!0})))}catch{}else if(Da)try{Sd({url:e,data:r,headers:this.config.xhr_headers,options:i,callback:n,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.config.on_xhr_error,onResponse:this.rateLimiter.checkForLimiting})}catch(c){z.error(c)}else{var o,l=Oe.createElement("script");l.type="text/javascript",l.async=!0,l.defer=!0,l.src=e;var h=Oe.getElementsByTagName("script")[0];(o=h.parentNode)===null||o===void 0||o.insertBefore(l,h)}}}},{key:"_execute_array",value:function(e){var r,i=this,n=[],s=[],a=[];Yi(e,function(l){l&&(r=l[0],Ye(r)?a.push(l):ni(l)?l.call(i):Ye(l)&&r==="alias"?n.push(l):Ye(l)&&r.indexOf("capture")!==-1&&ni(i[r])?a.push(l):s.push(l))});var o=function(l,h){Yi(l,function(c){if(Ye(c[0])){var u=h;Ae(c,function(f){u=u[f[0]].apply(u,f.slice(1))})}else this[c[0]].apply(this,c.slice(1))},h)};o(n,this),o(s,this),o(a,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var e,r;return((e=this.config.bootstrap)===null||e===void 0?void 0:e.featureFlags)&&Object.keys((r=this.config.bootstrap)===null||r===void 0?void 0:r.featureFlags).length>0||!1}},{key:"push",value:function(e){this._execute_array([e])}},{key:"capture",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Aa;if(!this.__loaded||!this.sessionPersistence||!this._requestQueue)return z.uninitializedWarning("posthog.capture");if(!function(c){var u=!1;try{var f=c.config.token,p=c.config.respect_dnt,m=c.config.opt_out_capturing_persistence_type,g=c.config.opt_out_capturing_cookie_prefix||void 0,d=c.config.window;f&&(u=Up(f,{respectDnt:p,persistenceType:m,persistencePrefix:g,window:d}))}catch(y){z.error("Unexpected error when checking capturing opt-out status: "+y)}return u}(this)){var n=(i=i||Aa).transport;if(n&&(i.transport=n),!ge(e)&&xt(e)){if(!n0(ct,this.config.custom_blocked_useragents)){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info();var s={uuid:Zi(),event:e,properties:this._calculate_event_properties(e,r||{})};e==="$identify"&&(s.$set=i.$set,s.$set_once=i.$set_once),(s=t0(s,i._noTruncate?null:this.config.properties_string_max_length)).timestamp=i.timestamp||new Date;var a=ce(ce({},s.properties.$set),s.$set);Kg(a)||this.setPersonPropertiesForFlags(a),z.info("send",s);var o=JSON.stringify(s),l=this.config.api_host+(i.endpoint||this.analyticsDefaultEndpoint),h=i!==Aa;return!this.config.request_batching||h&&!i._batchKey||i.send_instantly?this.__compress_and_send_json_request(l,o,i):this._requestQueue.enqueue(l,s,i),this._invokeCaptureHooks(e,s),s}}else z.error("No event name provided to posthog.capture")}}},{key:"_addCaptureHook",value:function(e){this.__captureHooks.push(e)}},{key:"_invokeCaptureHooks",value:function(e,r){this.config._onCapture(e,r),Ae(this.__captureHooks,function(i){return i(e)})}},{key:"_calculate_event_properties",value:function(e,r){if(!this.persistence||!this.sessionPersistence)return r;var i=this.persistence.remove_event_timer(e),n=ce({},r);if(n.token=this.config.token,e==="$snapshot"){var s=ce(ce({},this.persistence.properties()),this.sessionPersistence.properties());return n.distinct_id=s.distinct_id,n}var a=Ue.properties();if(this.sessionManager){var o=this.sessionManager.checkAndGetSessionAndWindowId(),l=o.sessionId,h=o.windowId;n.$session_id=l,n.$window_id=h}if(this.config.__preview_measure_pageview_stats){var c={};e==="$pageview"?c=this.pageViewManager.doPageView():e==="$pageleave"&&(c=this.pageViewManager.doPageLeave()),n=Qe(n,c)}if(e==="$pageview"&&(n.title=Oe.title),e==="$performance_event"){var u=this.persistence.properties();return n.distinct_id=u.distinct_id,n.$current_url=a.$current_url,n}if(!ge(i)){var f=new Date().getTime()-i;n.$duration=parseFloat((f/1e3).toFixed(3))}n=Qe({},Ue.properties(),this.persistence.properties(),this.sessionPersistence.properties(),n);var p=this.config.property_blacklist;Ye(p)?Ae(p,function(g){delete n[g]}):z.error("Invalid value for property_blacklist config: "+p);var m=this.config.sanitize_properties;return m&&(n=m(n,e)),n}},{key:"register",value:function(e,r){var i;(i=this.persistence)===null||i===void 0||i.register(e,r)}},{key:"register_once",value:function(e,r,i){var n;(n=this.persistence)===null||n===void 0||n.register_once(e,r,i)}},{key:"register_for_session",value:function(e){var r;(r=this.sessionPersistence)===null||r===void 0||r.register(e)}},{key:"unregister",value:function(e){var r;(r=this.persistence)===null||r===void 0||r.unregister(e)}},{key:"unregister_for_session",value:function(e){var r;(r=this.sessionPersistence)===null||r===void 0||r.unregister(e)}},{key:"_register_single",value:function(e,r){this.register(Y({},e,r))}},{key:"getFeatureFlag",value:function(e,r){return this.featureFlags.getFeatureFlag(e,r)}},{key:"getFeatureFlagPayload",value:function(e){var r=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(r)}catch{return r}}},{key:"isFeatureEnabled",value:function(e,r){return this.featureFlags.isFeatureEnabled(e,r)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,r)}},{key:"getEarlyAccessFeatures",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(e,r)}},{key:"onFeatureFlags",value:function(e){return this.featureFlags.onFeatureFlags(e)}},{key:"onSessionId",value:function(e){var r,i;return(r=(i=this.sessionManager)===null||i===void 0?void 0:i.onSessionId(e))!==null&&r!==void 0?r:function(){}}},{key:"getSurveys",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(e,r)}},{key:"getActiveMatchingSurveys",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(e,r)}},{key:"identify",value:function(e,r,i){if(!this.__loaded||!this.persistence)return z.uninitializedWarning("posthog.identify");if(e){var n=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=n;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==n&&e!==this.get_property(Ta)&&(this.unregister(Ta),this.register({distinct_id:e}));var a=this.persistence.get_user_state()==="anonymous";e!==n&&a?(this.persistence.set_user_state("identified"),this.setPersonPropertiesForFlags(r||{},!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:n},{$set:r||{},$set_once:i||{}}),this.featureFlags.setAnonymousDistinctId(n)):(r||i)&&this.setPersonProperties(r,i),e!==n&&(this.reloadFeatureFlags(),this.unregister(La))}else z.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(e,r){(e||r)&&(this.setPersonPropertiesForFlags(e||{}),this.capture("$set",{$set:e||{},$set_once:r||{}}))}},{key:"group",value:function(e,r,i){if(e&&r){var n=this.getGroups();n[e]!==r&&this.resetGroupPropertiesForFlags(e),this.register({$groups:ce(ce({},n),{},Y({},e,r))}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:r,$group_set:i}),this.setGroupPropertiesForFlags(Y({},e,i))),n[e]===r||i||this.reloadFeatureFlags()}else z.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 r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(e,r)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(e,r)}},{key:"resetGroupPropertiesForFlags",value:function(e){this.featureFlags.resetGroupPropertiesForFlags(e)}},{key:"reset",value:function(e){var r,i,n,s;if(!this.__loaded)return z.uninitializedWarning("posthog.reset");var a=this.get_property("$device_id");(r=this.persistence)===null||r===void 0||r.clear(),(i=this.sessionPersistence)===null||i===void 0||i.clear(),(n=this.persistence)===null||n===void 0||n.set_user_state("anonymous"),(s=this.sessionManager)===null||s===void 0||s.resetSessionId();var o=this.config.get_device_id(Zi());this.register_once({distinct_id:o,$device_id:e?o:a},"")}},{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,r;return(e=(r=this.sessionManager)===null||r===void 0?void 0:r.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}},{key:"get_session_replay_url",value:function(e){if(!this.sessionManager)return"";var r=this.config.ui_host||this.config.api_host,i=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=i.sessionId,s=i.sessionStartTimestamp,a=r+"/replay/"+n;if(e!=null&&e.withTimestamp&&s){var o,l=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!s)return a;var h=Math.max(Math.floor((new Date().getTime()-s)/1e3)-l,0);a+="?t=".concat(h)}return a}},{key:"alias",value:function(e,r){return e===this.get_property(pd)?(z.critical("Attempting to create alias for existing People user - aborting."),-2):(ge(r)&&(r=this.get_distinct_id()),e!==r?(this._register_single(Ta,e),this.capture("$create_alias",{alias:e,distinct_id:r})):(z.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1))}},{key:"set_config",value:function(e){var r,i,n=ce({},this.config);kr(e)&&(Qe(this.config,e),this.config.persistence_name||(this.config.persistence_name=this.config.cookie_name),this.config.disable_persistence||(this.config.disable_persistence=this.config.disable_cookie),(r=this.persistence)===null||r===void 0||r.update_config(this.config),(i=this.sessionPersistence)===null||i===void 0||i.update_config(this.config),$e.is_supported()&&$e.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(ii.DEBUG=!0),this.sessionRecording&&!ge(e.disable_session_recording)&&n.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){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 r;return(r=this.persistence)===null||r===void 0?void 0:r.props[e]}},{key:"getSessionProperty",value:function(e){var r;return(r=this.sessionPersistence)===null||r===void 0?void 0:r.props[e]}},{key:"toString",value:function(){var e,r=(e=this.config.name)!==null&&e!==void 0?e:ut;return r!==ut&&(r=ut+"."+r),r}},{key:"_gdpr_init",value:function(){this.config.opt_out_capturing_persistence_type==="localStorage"&&$e.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&&!lr.get("ph_optout")||(lr.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.config.opt_out_persistence_by_default}))}},{key:"_gdpr_update_persistence",value:function(e){var r,i,n,s,a;if(e&&e.clear_persistence)n=!0;else{if(!e||!e.enable_persistence)return;n=!1}this.config.disable_persistence||((r=this.persistence)===null||r===void 0?void 0:r.disabled)===n||(s=this.persistence)===null||s===void 0||s.set_disabled(n),this.config.disable_persistence||((i=this.sessionPersistence)===null||i===void 0?void 0:i.disabled)===n||(a=this.sessionPersistence)===null||a===void 0||a.set_disabled(n)}},{key:"_gdpr_call_func",value:function(e,r){return r=Qe({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},r||{}),$e.is_supported()||r.persistence_type!=="localStorage"||(r.persistence_type="cookie"),e(this.config.token,{capture:r.capture,captureEventName:r.capture_event_name,captureProperties:r.capture_properties,persistenceType:r.persistence_type,persistencePrefix:r.cookie_prefix,cookieExpiration:r.cookie_expiration,crossSubdomainCookie:r.cross_subdomain_cookie,secureCookie:r.secure_cookie})}},{key:"opt_in_capturing",value:function(e){e=Qe({enable_persistence:!0},e||{}),this._gdpr_call_func(D0,e),this._gdpr_update_persistence(e)}},{key:"opt_out_capturing",value:function(e){var r=Qe({clear_persistence:!0},e||{});this._gdpr_call_func(F0,r),this._gdpr_update_persistence(r)}},{key:"has_opted_in_capturing",value:function(e){return this._gdpr_call_func(O0,e)}},{key:"has_opted_out_capturing",value:function(e){return this._gdpr_call_func(Up,e)}},{key:"clear_opt_in_out_capturing",value:function(e){var r=Qe({enable_persistence:!0},e??{});this._gdpr_call_func($0,r),this._gdpr_update_persistence(r)}},{key:"debug",value:function(e){e===!1?(X.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(X.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}))}}]),t}();(function(t,e){for(var r=0;r<e.length;r++)t.prototype[e[r]]=ld(t.prototype[e[r]])})(hh,["identify"]);var ed,td,wr={},uy=function(){We.init=function(t,e,r){if(r)return We[r]||(We[r]=wr[r]=Ql(t||"",e||{},r,function(n){We[r]=wr[r]=n,n._loaded()})),We[r];var i=We;return wr[ut]?i=wr[ut]:t&&(i=Ql(t,e||{},ut,function(n){wr[ut]=n,n._loaded()}),wr[ut]=i),We=i,lh===Hn.INIT_SNIPPET&&(X[ut]=We),Ae(wr,function(n,s){s!==ut&&(We[s]=n)}),i}},py=function(){function t(){t.done||(t.done=!0,Ed=!1,Ae(wr,function(e){e._dom_loaded()}))}Oe.addEventListener&&(Oe.readyState==="complete"?t():Oe.addEventListener("DOMContentLoaded",t,!1)),zn(X,"load",t,!0)};(function(t){t.Popover="popover",t.API="api"})(ed||(ed={})),function(t){t.Open="open",t.MultipleChoice="multiple_choice",t.SingleChoice="single_choice",t.Rating="rating",t.Link="link"}(td||(td={}));var Pd=(lh=Hn.INIT_MODULE,We=new hh,uy(),We.init(),py(),We);var Ad=Pd.init("phc_OTZ3wJ6VemgVupCRKS5Sbqb9Ks0JYe0hMYZPtLwl0nu",{api_host:"https://ph-eu.molin.ai",ui_host:"https://eu.posthog.com",secure_cookie:document.location.protocol==="https:",persistence:"cookie",autocapture:!1,rageclick:!1,capture_pageview:!0,disable_session_recording:!0},"MolinShopAI");function pt(t,e){if(!Ad)throw new Error("Failed to initialize PostHog");Ad.capture(t,e)}var Xi,ja,Dt,Be,Ga,Cd,Ha,Td,qa,Id,Ua,Md,Wa,Dd,Za,Fd,Ya,Od,Ja,$d,za=class extends De(Ee){constructor(){super();Z(this,Xi);Z(this,Ga);Z(this,Ha);Z(this,qa);Z(this,Ua);Z(this,Wa);Z(this,Za);Z(this,Ya);Z(this,Ja);Z(this,Dt,new wa(this,{url:(r,{resume:i}={})=>{let n=new URL(this.config.wsApiUrl);return n.searchParams.set("widgetId",this.widgetId),n.searchParams.set("resume",i?"1":""),n.searchParams.set("conversationId",r),n.searchParams.set("pageUrl",window.location.href),n},onReconnect:()=>{},onError:r=>{console.error("ws error",r),pt("ShopAssistant: error",{widgetId:this.widgetId,error:"websocket onError"})},onClose:()=>{},onNewMessage:r=>{r.role==="assistant"&&pt("ShopAssistant: user received bot message (streaming started)",{widgetId:this.widgetId,message:r})},onUpdateMessage:r=>{},onMessageDone:r=>{let i={...R(this,Dt)?.messages.find(n=>n.id===r.message?.id)};Object.assign(i,r.message),i.role==="assistant"&&pt("ShopAssistant: user received bot message (streaming ended)",{widgetId:this.widgetId,text:i.content??"",message:i,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION})},onMessageError:r=>{console.error("ws message error",r),r.message&&R(this,Be)&&alert(r.message),pt("ShopAssistant: error",{widgetId:this.widgetId,error:"websocket ERROR message type: "+r.message})},persistConversationState:(r,i)=>{let n={conversationId:r,messages:i};localStorage.setItem(R(this,Xi,ja),JSON.stringify(n))},restoreConversationState:()=>{try{let r=JSON.parse(localStorage.getItem(R(this,Xi,ja))||"{}");return!(typeof r.conversationId=="string"&&r.conversationId)||!(Array.isArray(r.messages)&&r.messages.every(i=>typeof i=="object"&&i))?void 0:{conversationId:r.conversationId,messages:r.messages}}catch(r){console.error(r)}},onReset:()=>{localStorage.removeItem(R(this,Xi,ja))}}));Z(this,Be,!1);this.widgetId="",this.config}render(){console.assert(this.widgetId,"widget id is required"),console.assert(this.config,"config is required");let r=Object.entries(this.config.bubble.position).filter(([a,o])=>o).map(([a,o])=>`${a}-[${o}]`).reduce((a,o)=>(a[o]=!0,a),{}),i={bottom:"72px"},n=Object.entries(this.config.bubble.position).filter(([a,o])=>o).map(([a,o])=>`sm:${a}-[calc(${[i[a],o].filter(l=>!!l).join("+")})]`).reduce((a,o)=>(a[o]=!0,a),{}),s=n;return pe`
|
|
430
|
+
`)).length,n=0;n<i;n++){var a=t.charCodeAt(n),o=null;a<128?r++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),Wt(o)||(r>e&&(s+=t.substring(e,r)),s+=o,e=r=n+1)}return r>e&&(s+=t.substring(e,t.length)),s},i0=["ahrefsbot","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","duckduckbot","facebookexternal","facebookcatalog","gptbot","hubspot","linkedinbot","mj12bot","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","twitterbot","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"],n0=function(t,e){if(!t)return!1;var r=t.toLowerCase();return i0.concat(e||[]).some(function(i){var n=i.toLowerCase();return r.includes?r.includes(n):r.indexOf(n)!==-1})},zn=function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation),e}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,r,i,n,s){if(e)if(e.addEventListener&&!n)e.addEventListener(r,i,!!s);else{var a="on"+r,o=e[a];e[a]=function(l,h,c){return function(u){if(u=u||t(window.event)){var f,p=!0;ni(c)&&(f=c(u));var m=h.call(l,u);return f!==!1&&m!==!1||(p=!1),p}}}(e,i,o)}else z.error("No valid element provided to register_event")}}();function jn(t,e){var r=function(){var i=Oe.createElement("script");i.type="text/javascript",i.src=t,i.onload=function(a){return e(void 0,a)},i.onerror=function(a){return e(a)};var n,s=Oe.querySelectorAll("body > script");s.length>0?(n=s[0].parentNode)===null||n===void 0||n.insertBefore(i,s[0]):Oe.body.appendChild(i)};Oe.body?r():Oe.addEventListener("DOMContentLoaded",r)}function Oa(t){switch(Rl(t.className)){case"string":return t.className;case"object":return("baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";default:return""}}function $a(t){var e="";return Ca(t)&&!cd(t)&&t.childNodes&&t.childNodes.length&&Ae(t.childNodes,function(r){hd(r)&&r.textContent&&(e+=zl(r.textContent).split(/(\s+)/).filter(qi).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),zl(e)}function $p(t){return!!t&&t.nodeType===1}function ti(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function hd(t){return!!t&&t.nodeType===3}function Rp(t){return!!t&&t.nodeType===11}var Ml=["a","button","form","input","select","textarea","label"];function Ca(t){for(var e=t;e.parentNode&&!ti(e,"body");e=e.parentNode){var r=Oa(e).split(" ");if(we(r,"ph-sensitive")||we(r,"ph-no-capture"))return!1}if(we(Oa(t).split(" "),"ph-include"))return!0;var i=t.type||"";if(xt(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var n=t.name||t.id||"";return!(xt(n)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))}function cd(t){return!!(ti(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||ti(t,"select")||ti(t,"textarea")||t.getAttribute("contenteditable")==="true")}function qi(t){return!(Wt(t)||ye(t)||xt(t)&&(t=zl(t),/^(?:(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}))$/.test((t||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(t)))}function Lp(t){var e=$a(t);return qi(e="".concat(e," ").concat(ud(t)).trim())?e:""}function ud(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Ae(t.childNodes,function(r){var i;if(r&&((i=r.tagName)===null||i===void 0?void 0:i.toLowerCase())==="span")try{var n=$a(r);e="".concat(e," ").concat(n).trim(),r.childNodes&&r.childNodes.length&&(e="".concat(e," ").concat(ud(r)).trim())}catch(s){z.error(s)}}),e}var s0=function(){function t(e){Re(this,t),this.clicks=[],this.enabled=e}return Le(t,[{key:"isRageClick",value:function(e,r,i){if(!this.enabled)return!1;var n=this.clicks[this.clicks.length-1];if(n&&Math.abs(e-n.x)+Math.abs(r-n.y)<30&&i-n.timestamp<1e3){if(this.clicks.push({x:e,y:r,timestamp:i}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:r,timestamp:i}];return!1}}]),t}(),pd="$people_distinct_id",Ta="__alias",Nn="__timers",Bp="$autocapture_disabled_server_side",Gl="$session_recording_enabled_server_side",Vp="$console_log_recording_enabled_server_side",Np="$session_recording_recorder_version_server_side",Ra="$sesid",Ia="$session_is_sampled",Ui="$enabled_feature_flags",Hl="$early_access_features",Wi="$stored_person_properties",xr="$stored_group_properties",ql="$surveys",La="$flag_call_reported",Ul="$user_state",Wl="$posthog_quota_limited",a0=[pd,Ta,"__cmpns",Nn,Gl,Ra,Ui,Ul,Wl,Hl,xr,Wi,ql,La];function Dl(t,e){return e.length>t?e.slice(0,t)+"...":e}var Sr={_initializedTokens:[],_isDisabledServerSide:null,_isAutocaptureEnabled:!1,_setIsAutocaptureEnabled:function(t){var e,r=Wt(this._isDisabledServerSide)?!((e=t.persistence)===null||e===void 0||!e.props[Bp]):this._isDisabledServerSide,i=!!t.config.autocapture;this._isAutocaptureEnabled=i&&!r},_previousElementSibling:function(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!$p(e));return e},_getAugmentPropertiesFromElement:function(t){if(!Ca(t))return{};var e={};return Ae(t.attributes,function(r){if(r.name.indexOf("data-ph-capture-attribute")===0){var i=r.name.replace("data-ph-capture-attribute-",""),n=r.value;i&&n&&qi(n)&&(e[i]=n)}}),e},_getPropertiesFromElement:function(t,e,r){var i,n=t.tagName.toLowerCase(),s={tag_name:n};Ml.indexOf(n)>-1&&!r&&(n.toLowerCase()==="a"||n.toLowerCase()==="button"?s.$el_text=Dl(1024,Lp(t)):s.$el_text=Dl(1024,$a(t)));var a=Oa(t);a.length>0&&(s.classes=a.split(" ").filter(function(u){return u!==""}));var o=(i=this.config)===null||i===void 0?void 0:i.element_attribute_ignorelist;Ae(t.attributes,function(u){var f;cd(t)&&["name","id","class"].indexOf(u.name)===-1||o!=null&&o.includes(u.name)||!e&&qi(u.value)&&(f=u.name,!xt(f)||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")&&(s["attr__"+u.name]=Dl(1024,u.value))});for(var l=1,h=1,c=t;c=this._previousElementSibling(c);)l++,c.tagName===t.tagName&&h++;return s.nth_child=l,s.nth_of_type=h,s},_getDefaultProperties:function(t){return{$event_type:t,$ce_version:1}},_extractCustomPropertyValue:function(t){var e=[];return Ae(document.querySelectorAll(t.css_selector),function(r){var i;["input","select"].indexOf(r.tagName.toLowerCase())>-1?i=r.value:r.textContent&&(i=r.textContent),qi(i)&&e.push(i)}),e.join(", ")},_getCustomProperties:function(t){var e=this,r={};return Ae(this._customProperties,function(i){Ae(i.event_selectors,function(n){Ae(document.querySelectorAll(n),function(s){we(t,s)&&Ca(s)&&(r[i.name]=e._extractCustomPropertyValue(i))})})}),r},_getEventTarget:function(t){return ye(t.target)?t.srcElement||null:(e=t.target)!==null&&e!==void 0&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e},_captureEvent:function(t,e){var r,i=this,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",s=this._getEventTarget(t);if(hd(s)&&(s=s.parentNode||null),n==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&(r=this.rageclicks)!==null&&r!==void 0&&r.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this._captureEvent(t,e,"$rageclick"),s&&function(g,d){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!g||ti(g,"html")||!$p(g))return!1;if(y!=null&&y.url_allowlist){var v=window.location.href,b=y.url_allowlist;if(b&&!b.some(function(E){return v.match(E)}))return!1}if(y!=null&&y.dom_event_allowlist){var _=y.dom_event_allowlist;if(_&&!_.some(function(E){return d.type===E}))return!1}if(y!=null&&y.element_allowlist){var x=y.element_allowlist;if(x&&!x.some(function(E){return g.tagName.toLowerCase()===E}))return!1}if(y!=null&&y.css_selector_allowlist){var T=y.css_selector_allowlist;if(T&&!T.some(function(E){return g.matches(E)}))return!1}for(var S=!1,w=[g],M=!0,k=g;k.parentNode&&!ti(k,"body");)if(Rp(k.parentNode))w.push(k.parentNode.host),k=k.parentNode.host;else{if(!(M=k.parentNode||!1))break;if(Ml.indexOf(M.tagName.toLowerCase())>-1)S=!0;else{var I=window.getComputedStyle(M);I&&I.getPropertyValue("cursor")==="pointer"&&(S=!0)}w.push(M),k=M}var P=window.getComputedStyle(g);if(P&&P.getPropertyValue("cursor")==="pointer"&&d.type==="click")return!0;var A=g.tagName.toLowerCase();switch(A){case"html":return!1;case"form":return d.type==="submit";case"input":case"select":case"textarea":return d.type==="change"||d.type==="click";default:return S?d.type==="click":d.type==="click"&&(Ml.indexOf(A)>-1||g.getAttribute("contenteditable")==="true")}}(s,t,this.config)){for(var a,o,l=[s],h=s;h.parentNode&&!ti(h,"body");)Rp(h.parentNode)?(l.push(h.parentNode.host),h=h.parentNode.host):(l.push(h.parentNode),h=h.parentNode);var c,u=[],f={},p=!1;if(Ae(l,function(g){var d=Ca(g);g.tagName.toLowerCase()==="a"&&(c=g.getAttribute("href"),c=d&&qi(c)&&c),we(Oa(g).split(" "),"ph-no-capture")&&(p=!0),u.push(i._getPropertiesFromElement(g,e.config.mask_all_element_attributes,e.config.mask_all_text));var y=i._getAugmentPropertiesFromElement(g);Qe(f,y)}),e.config.mask_all_text||(s.tagName.toLowerCase()==="a"||s.tagName.toLowerCase()==="button"?u[0].$el_text=Lp(s):u[0].$el_text=$a(s)),c&&(u[0].attr__href=c),p)return!1;var m=Qe(this._getDefaultProperties(t.type),{$elements:u},(a=u[0])!==null&&a!==void 0&&a.$el_text?{$el_text:(o=u[0])===null||o===void 0?void 0:o.$el_text}:{},this._getCustomProperties(l),f);return e.capture(n,m),!0}},_navigate:function(t){window.location.href=t},_addDomEventHandlers:function(t){var e=this,r=function(i){i=i||window.event,e._captureEvent(i,t)};zn(document,"submit",r,!1,!0),zn(document,"change",r,!1,!0),zn(document,"click",r,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(t){var e;Nl(t.__autocapture)||(this.config=t.__autocapture),(e=this.config)!==null&&e!==void 0&&e.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(r){return new RegExp(r)})),this.rageclicks=new s0(t.config.rageclick)},afterDecideResponse:function(t,e){var r=e.config.token;this._initializedTokens.indexOf(r)>-1?z.info('autocapture already initialized for token "'+r+'"'):(e.persistence&&e.persistence.register(Y({},Bp,!!t.autocapture_opt_out)),this._isDisabledServerSide=!!t.autocapture_opt_out,this._setIsAutocaptureEnabled(e),this._initializedTokens.push(r),t&&t.config&&t.config.enable_collect_everything&&this._isAutocaptureEnabled?(t.custom_properties&&(this._customProperties=t.custom_properties),this._addDomEventHandlers(e)):e.__autocapture=!1)},enabledForProject:function(t,e,r){if(!t)return!0;e=ye(e)?10:e,r=ye(r)?10:r;for(var i=0,n=0;n<t.length;n++)i+=t.charCodeAt(n);return i%e<r},isBrowserSupported:function(){return ni(document.querySelectorAll)}};(function(t){for(var e in t)ni(t[e])&&(t[e]=t[e].bind(t))})(Sr),function(t){for(var e in t)ni(t[e])&&(t[e]=ld(t[e]))}(Sr);var Fl="$active_feature_flags",Sa="$override_feature_flags",zp="$feature_flag_payloads",jp=function(t){var e,r={},i=ri(function(o){for(var l=Object.keys(o),h=l.length,c=new Array(h);h--;)c[h]=[l[h],o[l[h]]];return c}(t||{}));try{for(i.s();!(e=i.n()).done;){var n=qn(e.value,2),s=n[0],a=n[1];a&&(r[s]=a)}}catch(o){i.e(o)}finally{i.f()}return r},o0=function(){function t(e){Re(this,t),this.instance=e,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return Le(t,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(Ui),r=this.instance.get_property(Sa);if(!r)return e||{};for(var i=Qe({},e),n=Object.keys(r),s=0;s<n.length;s++)r[n[s]]===!1?delete i[n[s]]:i[n[s]]=r[n[s]];return this._override_warning||(z.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:r,finalFlags:i}),this._override_warning=!0),i}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(zp)||{}}},{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;this.setReloadingPaused(!0);var r=this.instance.config.token,i=this.instance.get_property(Wi),n=this.instance.get_property(xr),s=rh(JSON.stringify({token:r,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:i,group_properties:n,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0}));this.instance._send_request(this.instance.config.api_host+"/decide/?v=3",{data:s},{method:"POST"},this.instance._prepare_callback(function(a){e.$anon_distinct_id=void 0,e.receivedFeatureFlags(a),e.setReloadingPaused(!1),e._startReloadTimer()}))}},{key:"getFeatureFlag",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var i,n=this.getFlagVariants()[e],s="".concat(n),a=this.instance.get_property(La)||{};return(r.send_event||!("send_event"in r))&&(!(e in a)||!a[e].includes(s))&&(Ye(a[e])?a[e].push(s):a[e]=[s],(i=this.instance.persistence)===null||i===void 0||i.register(Y({},La,a)),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}z.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 r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,r);z.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(r){return r!==e})}},{key:"receivedFeatureFlags",value:function(e){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads();(function(n,s){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=n.featureFlags,h=n.featureFlagPayloads;if(l)if(Ye(l)){var c,u={};if(l)for(var f=0;f<l.length;f++)u[l[f]]=!0;s&&s.register((Y(c={},Fl,l),Y(c,Ui,u),c))}else{var p,m=l,g=h;n.errorsWhileComputingFlags&&(m=ce(ce({},a),m),g=ce(ce({},o),g)),s&&s.register((Y(p={},Fl,Object.keys(jp(m))),Y(p,Ui,m||{}),Y(p,zp,g||{}),p))}})(e,this.instance.persistence,r,i),this._fireFeatureFlagsCallbacks()}}},{key:"override",value:function(e){if(!this.instance.__loaded||!this.instance.persistence)return z.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,e===!1)this.instance.persistence.unregister(Sa);else if(Ye(e)){for(var r={},i=0;i<e.length;i++)r[e[i]]=!0;this.instance.persistence.register(Y({},Sa,r))}else this.instance.persistence.register(Y({},Sa,e))}},{key:"onFeatureFlags",value:function(e){var r=this;if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){var i=this._prepareFeatureFlagsForCallbacks(),n=i.flags,s=i.flagVariants;e(n,s)}return function(){return r.removeFeatureFlagsHandler(e)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,r){var i,n,s=Y({},"$feature_enrollment/".concat(e),r);this.instance.capture("$feature_enrollment_update",{$feature_flag:e,$feature_enrollment:r,$set:s}),this.setPersonPropertiesForFlags(s,!1);var a=ce(ce({},this.getFlagVariants()),{},Y({},e,r));(i=this.instance.persistence)===null||i===void 0||i.register((Y(n={},Fl,Object.keys(jp(a))),Y(n,Ui,a),n)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.instance.get_property(Hl);if(n&&!i)return e(n);this.instance._send_request("".concat(this.instance.config.api_host,"/api/early_access_features/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var a,o=s.earlyAccessFeatures;return(a=r.instance.persistence)===null||a===void 0||a.register(Y({},Hl,o)),e(o)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var e=this.getFlags(),r=this.getFlagVariants();return{flags:e.filter(function(i){return r[i]}),flagVariants:Object.keys(r).filter(function(i){return r[i]}).reduce(function(i,n){return i[n]=r[n],i},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var e=this._prepareFeatureFlagsForCallbacks(),r=e.flags,i=e.flagVariants;this.featureFlagEventHandlers.forEach(function(n){return n(r,i)})}},{key:"setPersonPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(Wi)||{};this.instance.register(Y({},Wi,ce(ce({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(Wi)}},{key:"setGroupPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(xr)||{};Object.keys(i).length!==0&&Object.keys(i).forEach(function(n){i[n]=ce(ce({},i[n]),e[n]),delete e[n]}),this.instance.register(Y({},xr,ce(ce({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(e){if(e){var r=this.instance.get_property(xr)||{};this.instance.register(Y({},xr,ce(ce({},r),{},Y({},e,{}))))}else this.instance.unregister(xr)}}]),t}(),l0=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,lr={is_supported:function(){return!0},error:function(t){z.error("cookieStore error: "+t)},get:function(t){try{for(var e=t+"=",r=document.cookie.split(";").filter(function(s){return s.length}),i=0;i<r.length;i++){for(var n=r[i];n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(e)===0)return decodeURIComponent(n.substring(e.length,n.length))}}catch{}return null},parse:function(t){var e;try{e=JSON.parse(lr.get(t))||{}}catch{}return e},set:function(t,e,r,i,n){try{var s="",a="",o="";if(i){var l=document.location.hostname.match(l0),h=l?l[0]:"";s=h?"; domain=."+h:""}if(r){var c=new Date;c.setTime(c.getTime()+24*r*60*60*1e3),a="; expires="+c.toUTCString()}n&&(o="; secure");var u=t+"="+encodeURIComponent(JSON.stringify(e))+a+"; SameSite=Lax; path=/"+s+o;return document.cookie=u,u}catch{return}},remove:function(t,e){try{lr.set(t,"",-1,e)}catch{return}}},Ol=null,$e={is_supported:function(){if(!Wt(Ol))return Ol;var t=!0;if(ye(window))t=!1;else try{var e="__mplssupport__";$e.set(e,"xyz"),$e.get(e)!=='"xyz"'&&(t=!1),$e.remove(e)}catch{t=!1}return t||z.error("localStorage unsupported; falling back to cookie store"),Ol=t,t},error:function(t){z.error("localStorage error: "+t)},get:function(t){try{return window.localStorage.getItem(t)}catch(e){$e.error(e)}return null},parse:function(t){try{return JSON.parse($e.get(t))||{}}catch{}return null},set:function(t,e){try{window.localStorage.setItem(t,JSON.stringify(e))}catch(r){$e.error(r)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(e){$e.error(e)}}},h0=["distinct_id",Ra,Ia],Zl=ce(ce({},$e),{},{parse:function(t){try{var e={};try{e=lr.parse(t)||{}}catch{}var r=Qe(e,JSON.parse($e.get(t)||"{}"));return $e.set(t,r),r}catch{}return null},set:function(t,e,r,i,n){try{$e.set(t,e);var s={};h0.forEach(function(a){e[a]&&(s[a]=e[a])}),Object.keys(s).length&&lr.set(t,s,r,i,n)}catch(a){$e.error(a)}},remove:function(t,e){try{window.localStorage.removeItem(t),lr.remove(t,e)}catch(r){$e.error(r)}}}),ka={},c0={is_supported:function(){return!0},error:function(t){z.error("memoryStorage error: "+t)},get:function(t){return ka[t]||null},parse:function(t){return ka[t]||null},set:function(t,e){ka[t]=e},remove:function(t){delete ka[t]}},Qr=null,Ze={is_supported:function(){if(!Wt(Qr))return Qr;if(Qr=!0,ye(window))Qr=!1;else try{var t="__support__";Ze.set(t,"xyz"),Ze.get(t)!=='"xyz"'&&(Qr=!1),Ze.remove(t)}catch{Qr=!1}return Qr},error:function(t){z.error("sessionStorage error: ",t)},get:function(t){try{return window.sessionStorage.getItem(t)}catch(e){Ze.error(e)}return null},parse:function(t){try{return JSON.parse(Ze.get(t))||null}catch{}return null},set:function(t,e){try{window.sessionStorage.setItem(t,JSON.stringify(e))}catch(r){Ze.error(r)}},remove:function(t){try{window.sessionStorage.removeItem(t)}catch(e){Ze.error(e)}}},u0=["localhost","127.0.0.1"],p0=function(t,e){return!!function(r){try{new RegExp(r)}catch{return!1}return!0}(e)&&new RegExp(e).test(t)},Gp=function(t,e){for(var r,i=((t.split("#")[0]||"").split("?")[1]||"").split("&"),n=0;n<i.length;n++){var s=i[n].split("=");if(s[0]===e){r=s;break}}if(!Ye(r)||r.length<2)return"";var a=r[1];try{a=decodeURIComponent(a)}catch{z.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},Ba=function(t,e){var r=t.match(new RegExp(e+"=([^&]*)"));return r?r[1]:null},Ue={campaignParams:function(t){var e=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(t||[]),r={};return Ae(e,function(i){var n=Gp(Oe.URL,i);n.length&&(r[i]=n)}),r},searchEngine:function(){var t=Oe.referrer;return t?t.search("https?://(.*)google.([^/?]*)")===0?"google":t.search("https?://(.*)bing.com")===0?"bing":t.search("https?://(.*)yahoo.com")===0?"yahoo":t.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var t=Ue.searchEngine(),e=t!="yahoo"?"q":"p",r={};if(!Wt(t)){r.$search_engine=t;var i=Gp(Oe.referrer,e);i.length&&(r.ph_keyword=i)}return r},browser:function(t,e,r){return e=e||"",r||we(t," OPR/")?we(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":we(t,"IEMobile")||we(t,"WPDesktop")?"Internet Explorer Mobile":we(t,"SamsungBrowser/")?"Samsung Internet":we(t,"Edge")||we(t,"Edg/")?"Microsoft Edge":we(t,"FBIOS")?"Facebook Mobile":we(t,"Chrome")?"Chrome":we(t,"CriOS")?"Chrome iOS":we(t,"UCWEB")||we(t,"UCBrowser")?"UC Browser":we(t,"FxiOS")?"Firefox iOS":we(e,"Apple")||function(i){return we(i,"Safari")&&!we(i,"Chrome")&&!we(i,"Android")}(t)?we(t,"Mobile")?"Mobile Safari":"Safari":we(t,"Android")?"Android Mobile":we(t,"Konqueror")||we(t,"konqueror")?"Konqueror":we(t,"Firefox")?"Firefox":we(t,"MSIE")||we(t,"Trident/")?"Internet Explorer":we(t,"Gecko")?"Mozilla":""},browserVersion:function(t,e,r){var i={"Internet Explorer Mobile":[/rv:(\d+(\.\d+)?)/],"Microsoft Edge":[/Edge?\/(\d+(\.\d+)?)/],Chrome:[/Chrome\/(\d+(\.\d+)?)/],"Chrome iOS":[/CriOS\/(\d+(\.\d+)?)/],"UC Browser":[/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/],Safari:[/Version\/(\d+(\.\d+)?)/],"Mobile Safari":[/Version\/(\d+(\.\d+)?)/],Opera:[/(Opera|OPR)\/(\d+(\.\d+)?)/],Firefox:[/Firefox\/(\d+(\.\d+)?)/],"Firefox iOS":[/FxiOS\/(\d+(\.\d+)?)/],Konqueror:[/Konqueror[:/]?(\d+(\.\d+)?)/i],BlackBerry:[/BlackBerry (\d+(\.\d+)?)/,/Version\/(\d+(\.\d+)?)/],"Android Mobile":[/android\s(\d+(\.\d+)?)/],"Samsung Internet":[/SamsungBrowser\/(\d+(\.\d+)?)/],"Internet Explorer":[/(rv:|MSIE )(\d+(\.\d+)?)/],Mozilla:[/rv:(\d+(\.\d+)?)/]}[Ue.browser(t,e,r)];if(ye(i))return null;for(var n=0;n<i.length;n++){var s=i[n],a=t.match(s);if(a)return parseFloat(a[a.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(t){if(/Windows/i.test(t)){if(/Phone/.test(t)||/WPDesktop/.test(t))return{os_name:"Windows Phone",os_version:""};var e=/Windows NT ([0-9.]+)/i.exec(t);return e&&e[1]?{os_name:"Windows",os_version:e[1]}:{os_name:"Windows",os_version:""}}if(/(iPhone|iPad|iPod)/.test(t)){var r=/OS (\d+)_(\d+)_?(\d+)?/i.exec(t);return r&&r[1]?{os_name:"iOS",os_version:[r[1],r[2],r[3]||"0"].join(".")}:{os_name:"iOS",os_version:""}}if(/Android/.test(t)){var i=/Android (\d+)\.(\d+)\.?(\d+)?/i.exec(t);return i&&i[1]?{os_name:"Android",os_version:[i[1],i[2],i[3]||"0"].join(".")}:{os_name:"Android",os_version:""}}if(/(BlackBerry|PlayBook|BB10)/i.test(t))return{os_name:"BlackBerry",os_version:""};if(/Mac/i.test(t)){var n=/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i.exec(t);return n&&n[1]?{os_name:"Mac OS X",os_version:[n[1],n[2],n[3]||"0"].join(".")}:{os_name:"Mac OS X",os_version:""}}return/Linux/.test(t)?{os_name:"Linux",os_version:""}:/CrOS/.test(t)?{os_name:"Chrome OS",os_version:""}:{os_name:"",os_version:""}},device:function(t){return/Windows Phone/i.test(t)||/WPDesktop/.test(t)?"Windows Phone":/iPad/.test(t)?"iPad":/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Android/.test(t)&&!/Mobile/.test(t)?"Android Tablet":/Android/.test(t)?"Android":""},deviceType:function(t){var e=this.device(t);return e==="iPad"||e==="Android Tablet"?"Tablet":e?"Mobile":"Desktop"},referrer:function(){return Oe.referrer||"$direct"},referringDomain:function(){if(!Oe.referrer)return"$direct";var t=Oe.createElement("a");return t.href=Oe.referrer,t.host},properties:function(){var t,e,r,i,n,s,a,o=Ue.os(ct),l=o.os_name,h=o.os_version;return Qe(jl({$os:l,$os_version:h,$browser:Ue.browser(ct,navigator.vendor,window.opera),$device:Ue.device(ct),$device_type:Ue.deviceType(ct)}),{$current_url:(t=window)===null||t===void 0?void 0:t.location.href,$host:(e=window)===null||e===void 0?void 0:e.location.host,$pathname:(r=window)===null||r===void 0?void 0:r.location.pathname,$raw_user_agent:ct.length>1e3?ct.substring(0,997)+"...":ct,$browser_version:Ue.browserVersion(ct,navigator.vendor,window.opera),$browser_language:Ue.browserLanguage(),$screen_height:(i=window)===null||i===void 0?void 0:i.screen.height,$screen_width:(n=window)===null||n===void 0?void 0:n.screen.width,$viewport_height:(s=window)===null||s===void 0?void 0:s.innerHeight,$viewport_width:(a=window)===null||a===void 0?void 0:a.innerWidth,$lib:"web",$lib_version:ii.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:od()/1e3})},people_properties:function(){var t=Ue.os(ct),e=t.os_name,r=t.os_version;return Qe(jl({$os:e,$os_version:r,$browser:Ue.browser(ct,navigator.vendor,window.opera)}),{$browser_version:Ue.browserVersion(ct,navigator.vendor,window.opera)})}},d0=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],Hp=function(){function t(e){Re(this,t);var r="";e.token&&(r=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,this.custom_campaign_params=e.custom_campaign_params||[],e.persistence_name?this.name="ph_"+e.persistence_name:this.name="ph_"+r+"_posthog",d0.indexOf(e.persistence.toLowerCase())===-1&&(z.critical("Unknown persistence type "+e.persistence+"; falling back to cookie"),e.persistence="cookie");var i=e.persistence.toLowerCase();i==="localstorage"&&$e.is_supported()?this.storage=$e:i==="localstorage+cookie"&&Zl.is_supported()?this.storage=Zl:i==="sessionstorage"&&Ze.is_supported()?this.storage=Ze:this.storage=i==="memory"?c0:lr,this.user_state="anonymous",this.load(),this.update_config(e),this.save()}return Le(t,[{key:"properties",value:function(){var e={};return Ae(this.props,function(r,i){if(i===Ui&&kr(r))for(var n=Object.keys(r),s=0;s<n.length;s++)e["$feature/".concat(n[s])]=r[n[s]];else o=i,l=!1,(Wt(a=a0)?l:Dp&&a.indexOf===Dp?a.indexOf(o)!=-1:(Ae(a,function(h){if(l||(l=h===o))return th}),l))||(e[i]=r);var a,o,l}),e}},{key:"load",value:function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Qe({},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,r,i){var n=this;if(kr(e)){ye(r)&&(r="None"),this.expire_days=ye(i)?this.default_expiry:i;var s=!1;if(Ae(e,function(a,o){n.props.hasOwnProperty(o)&&n.props[o]!==r||(n.props[o]=a,s=!0)}),s)return this.save(),!0}return!1}},{key:"register",value:function(e,r){var i=this;if(kr(e)){this.expire_days=ye(r)?this.default_expiry:r;var n=!1;if(Ae(e,function(s,a){e.hasOwnProperty(a)&&i.props[a]!==s&&(i.props[a]=s,n=!0)}),n)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(Ue.campaignParams(this.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(Ue.searchInfo())}},{key:"update_referrer_info",value:function(){this.register({$referrer:this.props.$referrer||Ue.referrer(),$referring_domain:this.props.$referring_domain||Ue.referringDomain()})}},{key:"get_referrer_info",value:function(){return jl({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(e){return Ae(this.props,function(r,i){i in e||(e[i]=r)}),e}},{key:"update_config",value:function(e){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)}},{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,r){var i=this.props[Nn]||{};i[e]=r,this.props[Nn]=i,this.save()}},{key:"remove_event_timer",value:function(e){var r=(this.props[Nn]||{})[e];return ye(r)||(delete this.props[Nn][e],this.save()),r}},{key:"get_user_state",value:function(){return this.props[Ul]||"anonymous"}},{key:"set_user_state",value:function(e){this.props[Ul]=e,this.save()}},{key:"get_quota_limits",value:function(){return this.props[Wl]||{}}},{key:"set_quota_limits",value:function(e){this.props[Wl]=e,this.save()}}]),t}(),qp=2,f0=4,dd=3,m0=6,g0=0,y0="rrweb/console@1",Ut,v0=Le(function t(e){var r,i,n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Re(this,t),Y(this,"bucketSize",100),Y(this,"refillRate",10),Y(this,"mutationBuckets",{}),Y(this,"loggedTracker",{}),Y(this,"refillBuckets",function(){Object.keys(n.mutationBuckets).forEach(function(a){n.mutationBuckets[a]=n.mutationBuckets[a]+n.refillRate,n.mutationBuckets[a]>=n.bucketSize&&delete n.mutationBuckets[a]})}),Y(this,"getNodeOrRelevantParent",function(a){var o=n.rrweb.mirror.getNode(a);if(o?.nodeName!=="svg"&&o instanceof Element){var l=o.closest("svg");if(l)return[n.rrweb.mirror.getId(l),l]}return[a,o]}),Y(this,"numberOfChanges",function(a){var o,l,h,c,u,f,p,m;return((o=(l=a.removes)===null||l===void 0?void 0:l.length)!==null&&o!==void 0?o:0)+((h=(c=a.attributes)===null||c===void 0?void 0:c.length)!==null&&h!==void 0?h:0)+((u=(f=a.texts)===null||f===void 0?void 0:f.length)!==null&&u!==void 0?u:0)+((p=(m=a.adds)===null||m===void 0?void 0:m.length)!==null&&p!==void 0?p:0)}),Y(this,"throttleMutations",function(a){if(a.type!==dd||a.data.source!==g0)return a;var o=a.data,l=n.numberOfChanges(o);o.attributes&&(o.attributes=o.attributes.filter(function(c){var u,f,p,m=qn(n.getNodeOrRelevantParent(c.id),2),g=m[0],d=m[1];return n.mutationBuckets[g]===0?!1:(n.mutationBuckets[g]=(u=n.mutationBuckets[g])!==null&&u!==void 0?u:n.bucketSize,n.mutationBuckets[g]=Math.max(n.mutationBuckets[g]-1,0),n.mutationBuckets[g]===0&&(n.loggedTracker[g]||(n.loggedTracker[g]=!0,(f=(p=n.options).onBlockedNode)===null||f===void 0||f.call(p,g,d))),c)}));var h=n.numberOfChanges(o);return h!==0||l===h?a:void 0}),this.rrweb=e,this.options=s,this.refillRate=(r=this.options.refillRate)!==null&&r!==void 0?r:this.refillRate,this.bucketSize=(i=this.options.bucketSize)!==null&&i!==void 0?i:this.bucketSize,setInterval(function(){n.refillBuckets()},1e3)}),fd=function(t){return t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t}(fd||{}),b0="/s/";(function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet"})(Ut||(Ut={}));var _0=[Ut.MouseMove,Ut.MouseInteraction,Ut.Scroll,Ut.ViewportResize,Ut.Input,Ut.TouchMove,Ut.MediaInteraction,Ut.Drag],w0=function(){function t(e){var r=this;if(Re(this,t),Y(this,"_linkedFlagSeen",!1),Y(this,"_lastActivityTimestamp",Date.now()),Y(this,"isIdle",!1),Y(this,"_linkedFlag",null),Y(this,"_sampleRate",null),Y(this,"_minimumDuration",null),this.instance=e,this._captureStarted=!1,this._endpoint=b0,this.stopRrweb=void 0,this.receivedDecide=!1,window.addEventListener("beforeunload",function(){r._flushBuffer()}),!this.instance.sessionManager)throw z.error("Session recording started without valid sessionManager"),new Error("Session recording started without valid sessionManager. This is a bug.");var i=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=i.sessionId,s=i.windowId;this.windowId=s,this.sessionId=n,this.buffer=this.clearBuffer()}return Le(t,[{key:"started",get:function(){return this._captureStarted}},{key:"sessionManager",get:function(){if(!this.instance.sessionManager)throw z.error("Session recording started without valid sessionManager"),new Error("Session recording started without valid sessionManager. This is a bug.");return this.instance.sessionManager}},{key:"isSampled",get:function(){return or(this._sampleRate)?this.instance.get_property(Ia):null}},{key:"sessionDuration",get:function(){var e,r,i=(e=this.buffer)===null||e===void 0?void 0:e.data[((r=this.buffer)===null||r===void 0?void 0:r.data.length)-1],n=this.sessionManager.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp;return i?i.timestamp-n:null}},{key:"isRecordingEnabled",get:function(){var e=!!this.instance.get_property(Gl),r=!this.instance.config.disable_session_recording;return e&&r}},{key:"isConsoleLogCaptureEnabled",get:function(){var e=!!this.instance.get_property(Vp),r=this.instance.config.enable_recording_console_log;return r??e}},{key:"recordingVersion",get:function(){var e,r=this.instance.get_property(Np);return((e=this.instance.config.session_recording)===null||e===void 0?void 0:e.recorderVersion)||r||"v1"}},{key:"status",get:function(){return this.receivedDecide?this.isRecordingEnabled?xt(this._linkedFlag)&&!this._linkedFlagSeen?"buffering":Nl(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"disabled":"buffering"}},{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled?this.startCaptureAndTrySendingQueuedSnapshots():(this.stopRecording(),this.clearBuffer())}},{key:"stopRecording",value:function(){this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1)}},{key:"makeSamplingDecision",value:function(e){var r,i=this.sessionId!==e;if(or(this._sampleRate)){var n,s=this.isSampled;i||!Nl(s)?n=Math.random()<this._sampleRate:n=s,n||z.warn("[SessionSampling] Sample rate (".concat(this._sampleRate,") has determined that this sessionId (").concat(e,") will not be sent to the server.")),(r=this.instance.persistence)===null||r===void 0||r.register(Y({},Ia,n))}else{var a;(a=this.instance.persistence)===null||a===void 0||a.register(Y({},Ia,null))}}},{key:"afterDecideResponse",value:function(e){var r,i,n,s,a,o,l,h=this;this.instance.persistence&&this.instance.persistence.register((Y(l={},Gl,!!e.sessionRecording),Y(l,Vp,(a=e.sessionRecording)===null||a===void 0?void 0:a.consoleLogRecordingEnabled),Y(l,Np,(o=e.sessionRecording)===null||o===void 0?void 0:o.recorderVersion),l));var c=(r=e.sessionRecording)===null||r===void 0?void 0:r.sampleRate;this._sampleRate=ye(c)||Wt(c)?null:parseFloat(c);var u,f=(i=e.sessionRecording)===null||i===void 0?void 0:i.minimumDurationMilliseconds;if(this._minimumDuration=ye(f)?null:f,this._linkedFlag=((n=e.sessionRecording)===null||n===void 0?void 0:n.linkedFlag)||null,(s=e.sessionRecording)!==null&&s!==void 0&&s.endpoint&&(this._endpoint=(u=e.sessionRecording)===null||u===void 0?void 0:u.endpoint),or(this._sampleRate)&&this.sessionManager.onSessionId(function(m){h.makeSamplingDecision(m)}),xt(this._linkedFlag)){var p=this._linkedFlag;this.instance.onFeatureFlags(function(m){h._linkedFlagSeen=m.includes(p)})}this.receivedDecide=!0,this.startRecordingIfEnabled()}},{key:"log",value:function(e){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:i,trace:[],payload:[JSON.stringify(e)]}},timestamp:od()})}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){this._startCapture()}},{key:"_startCapture",value:function(){var e=this;if(!ye(Object.assign)&&!this._captureStarted&&!this.instance.config.disable_session_recording){this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId();var r=this.recordingVersion==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.recordingVersion?jn(this.instance.config.api_host+"/static/".concat(r,"?v=").concat(ii.LIB_VERSION),function(i){if(i)return z.error("Could not load ".concat(r),i);e._onScriptLoaded()}):this._onScriptLoaded()}}},{key:"_isInteractiveEvent",value:function(e){var r;return e.type===dd&&_0.indexOf((r=e.data)===null||r===void 0?void 0:r.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(e){var r=this._isInteractiveEvent(e);if(r||this.isIdle||e.timestamp-this._lastActivityTimestamp>3e5&&(this.isIdle=!0),r&&(this._lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryTakeFullSnapshot())),!this.isIdle){var i=this.sessionManager.checkAndGetSessionAndWindowId(!r,e.timestamp),n=i.windowId,s=i.sessionId,a=this.sessionId!==s,o=this.windowId!==n;this.windowId=n,this.sessionId=s,[qp,f0].indexOf(e.type)===-1&&(o||a)&&this._tryTakeFullSnapshot()}}},{key:"_tryTakeFullSnapshot",value:function(){if(!this._captureStarted)return!1;try{var e;return(e=this.rrwebRecord)===null||e===void 0||e.takeFullSnapshot(),!0}catch(r){return z.error("Error taking full snapshot.",r),!1}}},{key:"_onScriptLoaded",value:function(){var e,r=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};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var n=this.instance.config.session_recording,s=0,a=Object.entries(n||{});s<a.length;s++){var o=qn(a[s],2),l=o[0],h=o[1];l in i&&(i[l]=h)}this.rrwebRecord?(this.mutationRateLimiter=(e=this.mutationRateLimiter)!==null&&e!==void 0?e:new v0(this.rrwebRecord,{onBlockedNode:function(c,u){var f="Too many mutations on node '".concat(c,"'. Rate limiting. This could be due to SVG animations or something similar");z.info(f,{node:u}),r.log("[PostHog Recorder] "+f,"warn")}}),this.stopRrweb=this.rrwebRecord(ce({emit:function(c){r.onRRwebEmit(c)},plugins:window.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled?[window.rrwebConsoleRecord.getRecordConsolePlugin()]:[]},i)),this.instance._addCaptureHook(function(c){try{if(c==="$pageview"){var u,f=r._maskUrl(window.location.href);if(!f)return;(u=r.rrwebRecord)===null||u===void 0||u.addCustomEvent("$pageview",{href:f})}}catch(p){z.error("Could not add $pageview to rrweb session",p)}}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1):z.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"onRRwebEmit",value:function(e){if(e&&kr(e)){if(e.type===fd.Meta){var r=this._maskUrl(e.data.href);if(!r)return;e.data.href=r}var i=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(i){var n=function(a){var o=a;if(o&&kr(o)&&o.type===m0&&kr(o.data)&&o.data.plugin===y0){o.data.payload.payload.length>10&&(o.data.payload.payload=o.data.payload.payload.slice(0,10),o.data.payload.payload.push("...[truncated]"));for(var l=[],h=0;h<o.data.payload.payload.length;h++)o.data.payload.payload[h]&&o.data.payload.payload[h].length>2e3?l.push(o.data.payload.payload[h].slice(0,2e3)+"...[truncated]"):l.push(o.data.payload.payload[h]);return o.data.payload.payload=l,a}return a}(i),s={$snapshot_bytes:JSON.stringify(n).length,$snapshot_data:n,$session_id:this.sessionId,$window_id:this.windowId};this._updateWindowAndSessionIds(n),this.isIdle||(this.status!=="disabled"?this._captureSnapshotBuffered(s):this.clearBuffer())}}}},{key:"_maskUrl",value:function(e){var r=this.instance.config.session_recording;if(r.maskNetworkRequestFn){var i,n={url:e};return(i=n=r.maskNetworkRequestFn(n))===null||i===void 0?void 0:i.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 r=this._minimumDuration,i=this.sessionDuration,n=or(r)&&or(i)&&i<r;return this.status==="buffering"||n?(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 r,i=this,n=2+(((r=this.buffer)===null||r===void 0?void 0:r.data.length)||0);(!this.buffer||this.buffer.size+e.$snapshot_bytes+n>943718.4||this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),this.buffer.size+=e.$snapshot_bytes,this.buffer.data.push(e.$snapshot_data),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){i._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{transport:"XHR",method:"POST",endpoint:this._endpoint,_noTruncate:!0,_batchKey:"recordings",_metrics:{rrweb_full_snapshot:e.$snapshot_data.type===qp}})}}]),t}(),qt={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},x0=["first-input","navigation","paint","resource"],S0=["/s/","/e/"],k0=function(){function t(e){Re(this,t),Y(this,"_forceAllowLocalhost",!1),this.instance=e}return Le(t,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var e,r,i=this;if(!this.observer)if(ye((e=window)===null||e===void 0||(r=e.PerformanceObserver)===null||r===void 0?void 0:r.supportedEntryTypes))z.info("[PerformanceObserver] not started because PerformanceObserver is not supported by this browser.");else if(!u0.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(s){s.getEntries().forEach(function(a){i._capturePerformanceEvent(a)})});var n=PerformanceObserver.supportedEntryTypes.filter(function(s){return x0.includes(s)});n.forEach(function(s){var a;(a=i.observer)===null||a===void 0||a.observe({type:s,buffered:!0})})}catch(s){z.error("PostHog failed to start performance observer",s),this.stopObserving()}else z.info("[PerformanceObserver] not started because we are on localhost.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var e,r;return(e=(r=this.instance.config.capture_performance)!==null&&r!==void 0?r:this.remoteEnabled)!==null&&e!==void 0&&e}},{key:"afterDecideResponse",value:function(e){this.remoteEnabled=e.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(e){if(e.name.indexOf(this.instance.config.api_host)===0){var r=e.name.replace(this.instance.config.api_host,"");if(S0.find(function(p){return r.indexOf(p)===0}))return}var i={url:e.name},n=this.instance.config.session_recording;if(n.maskNetworkRequestFn&&(i=n.maskNetworkRequestFn(i)),i){var s=e.toJSON();s.name=i.url;var a={},o=Math.floor(Date.now()-performance.now());for(var l in a[qt.timeOrigin]=o,a[qt.timestamp]=Math.floor(o+e.startTime),qt)ye(s[l])||(a[qt[l]]=s[l]);if(this.capturePerformanceEvent(a),E0(e)){var h,c=ri(e.serverTiming||[]);try{for(c.s();!(h=c.n()).done;){var u,f=h.value;this.capturePerformanceEvent((Y(u={},qt.timeOrigin,o),Y(u,qt.timestamp,Math.floor(o+e.startTime)),Y(u,qt.name,f.name),Y(u,qt.duration,f.duration),Y(u,qt.entryType,"serverTiming"),u))}}catch(p){c.e(p)}finally{c.f()}}}}},{key:"capturePerformanceEvent",value:function(e){var r,i=e[qt.timestamp];(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:e},timestamp:i})}}]),t}(),E0=function(t){return t.entryType==="navigation"||t.entryType==="resource"},P0=function(){function t(e){Re(this,t),this.instance=e,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Le(t,[{key:"call",value:function(){var e=this,r=rh(JSON.stringify({token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(Wi),group_properties:this.instance.get_property(xr),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("".concat(this.instance.config.api_host,"/decide/?v=3"),{data:r,verbose:!0},{method:"POST"},function(i){return e.parseDecideResponse(i)})}},{key:"parseDecideResponse",value:function(e){var r,i,n,s,a=this;if(this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer(),e?.status!==0){if(!document||!document.body)return z.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){a.parseDecideResponse(e)},500);this.instance.toolbar.afterDecideResponse(e),(r=this.instance.sessionRecording)===null||r===void 0||r.afterDecideResponse(e),Sr.afterDecideResponse(e,this.instance),(i=this.instance.webPerformance)===null||i===void 0||i.afterDecideResponse(e),this.instance._afterDecideResponse(e),this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.featureFlags.receivedFeatureFlags(e);var o=(n=window)===null||n===void 0?void 0:n.extendPostHogWithSurveys;e.surveys&&!o&&jn(this.instance.config.api_host+"/static/surveys.js",function(p){if(p)return z.error("Could not load surveys script",p);window.extendPostHogWithSurveys(a.instance)});var l=(s=window)===null||s===void 0?void 0:s.extendPostHogWithExceptionAutoCapture;if(e.autocaptureExceptions&&e.autocaptureExceptions&&ye(l)&&jn(this.instance.config.api_host+"/static/exception-autocapture.js",function(p){if(p)return z.error("Could not load exception autocapture script",p);window.extendPostHogWithExceptionAutocapture(a.instance,e)}),e.siteApps)if(this.instance.config.opt_in_site_apps){var h,c=this.instance.config.api_host,u=ri(e.siteApps);try{var f=function(){var p=h.value,m=p.id,g=p.url,d=[c,c[c.length-1]==="/"&&g[0]==="/"?g.substring(1):g].join("");window["__$$ph_site_app_".concat(m)]=a.instance,jn(d,function(y){y&&z.error("Error while initializing PostHog app with config id ".concat(m),y)})};for(u.s();!(h=u.n()).done;)f()}catch(p){u.e(p)}finally{u.f()}}else e.siteApps.length>0&&z.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else z.error("Failed to fetch feature flags from PostHog.")}}]),t}(),A0=["https://app.posthog.com","https://eu.posthog.com"],C0=["source"],T0=X.location?Ba(X.location.hash,"__posthog")||Ba(location.hash,"state"):null,I0=function(){function t(e){Re(this,t),this.instance=e}return Le(t,[{key:"afterDecideResponse",value:function(e){var r=e.toolbarParams||e.editorParams||(e.toolbarVersion?{toolbarVersion:e.toolbarVersion}:{});e.isAuthenticated&&r.toolbarVersion&&r.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(ce({},r))}},{key:"maybeLoadToolbar",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:X.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:X.history;try{if(!r){try{X.localStorage.setItem("test","test"),X.localStorage.removeItem("test")}catch{return!1}r=X.localStorage}var n,s=T0||Ba(e.hash,"__posthog")||Ba(e.hash,"state"),a=s?Op(function(){return JSON.parse(atob(decodeURIComponent(s)))})||Op(function(){return JSON.parse(decodeURIComponent(s))}):null;return a&&a.action==="ph_authorize"?((n=a).source="url",n&&Object.keys(n).length>0&&(a.desiredHash?e.hash=a.desiredHash:i?i.replaceState("",document.title,e.pathname+e.search):e.hash="")):((n=JSON.parse(r.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token)&&(this.loadToolbar(n),!0)}catch{return!1}}},{key:"loadToolbar",value:function(e){var r=this;if(X._postHogToolbarLoaded)return!1;X._postHogToolbarLoaded=!0;var i=this.instance.config.api_host,n=3e5,s=Math.floor(Date.now()/n)*n,a="".concat(i).concat(i.endsWith("/")?"":"/","static/toolbar.js?t=").concat(s),o=!A0.includes(this.instance.config.api_host)&&this.instance.config.advanced_disable_toolbar_metrics,l=ce(ce({token:this.instance.config.token},e),{},{apiURL:i},o?{instrument:!1}:{});l.source;var h=Yg(l,C0);return X.localStorage.setItem("_postHogToolbarParams",JSON.stringify(h)),jn(a,function(c){c?z.error("Failed to load toolbar",c):(X.ph_load_toolbar||X.ph_load_editor)(l,r.instance)}),zn(X,"turbolinks:load",function(){X._postHogToolbarLoaded=!1,r.loadToolbar(l)}),!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]:X.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:X.history;return this.maybeLoadToolbar(e,r,i)}}]),t}(),M0="__ph_opt_in_out_";function D0(t,e){gd(!0,t,e)}function F0(t,e){gd(!1,t,e)}function O0(t,e){return md(t,e)==="1"}function Up(t,e){return!!function(r){if(r&&r.respectDnt){var i=r&&r.window||X,n=i.navigator||{},s=!1;return Ae([n.doNotTrack,n.msDoNotTrack,i.doNotTrack],function(a){we([!0,1,"1","yes"],a)&&(s=!0)}),s}return!1}(e)||md(t,e)==="0"}function $0(t,e){ih(e=e||{}).remove(nh(t,e),!!e.crossSubdomainCookie)}function ih(t){return(t=t||{}).persistenceType==="localStorage"?$e:t.persistenceType==="localStorage+cookie"?Zl:lr}function nh(t,e){return((e=e||{}).persistencePrefix||M0)+t}function md(t,e){return ih(e).get(nh(t,e))}function gd(t,e,r){xt(e)&&e.length?(ih(r=r||{}).set(nh(e,r),t?1:0,or(r.cookieExpiration)?r.cookieExpiration:null,r.crossSubdomainCookie,r.secureCookie),r.capture&&t&&r.capture(r.captureEventName||"$opt_in",r.captureProperties||{},{send_instantly:!0})):z.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token")}var yd=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Re(this,t),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=e}return Le(t,[{key:"setPollInterval",value:function(e){this._pollInterval=e,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),t}(),R0=function(t){rd(r,yd);var e=id(r);function r(i){var n,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3;return Re(this,r),(n=e.call(this,s)).handlePollRequest=i,n}return Le(r,[{key:"enqueue",value:function(i,n,s){this._event_queue.push({url:i,data:n,options:s}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var i=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(i._event_queue.length>0){var n=i.formatQueue(),s=function(o){var l=n[o],h=l.url,c=l.data,u=l.options;Ae(c,function(f,p){c[p].offset=Math.abs(c[p].timestamp-i.getTime()),delete c[p].timestamp}),i.handlePollRequest(h,c,u)};for(var a in n)s(a);i._event_queue.length=0,i._empty_queue_count=0}else i._empty_queue_count++;i._empty_queue_count>4&&(i.isPolling=!1,i._empty_queue_count=0),i.isPolling&&i.poll()},this._pollInterval)}},{key:"unload",value:function(){var i=this;clearTimeout(this._poller);var n=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var s=Object.values(n);[].concat(Bl(s.filter(function(a){return a.url.indexOf("/e")===0})),Bl(s.filter(function(a){return a.url.indexOf("/e")!==0}))).map(function(a){var o=a.url,l=a.data,h=a.options;i.handlePollRequest(o,l,ce(ce({},h),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var i={};return Ae(this._event_queue,function(n){var s=n.url,a=n.data,o=n.options,l=(o?o._batchKey:null)||s;ye(i[l])&&(i[l]={data:[],url:s,options:o}),o&&i[l].options&&i[l].options._metrics&&!i[l].options._metrics.rrweb_full_snapshot&&(i[l].options._metrics.rrweb_full_snapshot=o._metrics.rrweb_full_snapshot),i[l].data.push(a)}),i}}]),r}(),St=Uint8Array,nt=Uint16Array,Ji=Uint32Array,sh=new St([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]),ah=new St([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]),Wp=new St([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vd=function(t,e){for(var r=new nt(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Ji(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return[r,n]},bd=vd(sh,2),L0=bd[0],Yl=bd[1];L0[28]=258,Yl[258]=28;for(Jl=vd(ah,0)[1],Va=new nt(32768),Te=0;Te<32768;++Te)_r=(43690&Te)>>>1|(21845&Te)<<1,_r=(61680&(_r=(52428&_r)>>>2|(13107&_r)<<2))>>>4|(3855&_r)<<4,Va[Te]=((65280&_r)>>>8|(255&_r)<<8)>>>1;var _r,Jl,Va,Te,Gn=function(t,e,r){for(var i=t.length,n=0,s=new nt(e);n<i;++n)++s[t[n]-1];var a,o=new nt(e);for(n=0;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;if(r){a=new nt(1<<e);var l=15-e;for(n=0;n<i;++n)if(t[n])for(var h=n<<4|t[n],c=e-t[n],u=o[t[n]-1]++<<c,f=u|(1<<c)-1;u<=f;++u)a[Va[u]>>>l]=h}else for(a=new nt(i),n=0;n<i;++n)a[n]=Va[o[t[n]-1]++]>>>15-t[n];return a},si=new St(288);for(Te=0;Te<144;++Te)si[Te]=8;for(Te=144;Te<256;++Te)si[Te]=9;for(Te=256;Te<280;++Te)si[Te]=7;for(Te=280;Te<288;++Te)si[Te]=8;var Na=new St(32);for(Te=0;Te<32;++Te)Na[Te]=5;var ei,B0=Gn(si,9,0),V0=Gn(Na,5,0),_d=function(t){return(t/8>>0)+(7&t&&1)},wd=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var i=new(t instanceof nt?nt:t instanceof Ji?Ji:St)(r-e);return i.set(t.subarray(e,r)),i},ar=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8},Bn=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},$l=function(t,e){for(var r=[],i=0;i<t.length;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[new St(0),0];if(n==1){var a=new St(r[0].s+1);return a[r[0].s]=1,[a,1]}r.sort(function(x,T){return x.f-T.f}),r.push({s:-1,f:25001});var o=r[0],l=r[1],h=0,c=1,u=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=n-1;)o=r[r[h].f<r[u].f?h++:u++],l=r[h!=c&&r[h].f<r[u].f?h++:u++],r[c++]={s:-1,f:o.f+l.f,l:o,r:l};var f=s[0].s;for(i=1;i<n;++i)s[i].s>f&&(f=s[i].s);var p=new nt(f+1),m=N0(r[c-1],p,0);if(m>e){i=0;var g=0,d=m-e,y=1<<d;for(s.sort(function(x,T){return p[T.s]-p[x.s]||x.f-T.f});i<n;++i){var v=s[i].s;if(!(p[v]>e))break;g+=y-(1<<m-p[v]),p[v]=e}for(g>>>=d;g>0;){var b=s[i].s;p[b]<e?g-=1<<e-p[b]++-1:++i}for(;i>=0&&g;--i){var _=s[i].s;p[_]==e&&(--p[_],++g)}m=e}return[new St(p),m]},N0=function t(e,r,i){return e.s==-1?Math.max(t(e.l,r,i+1),t(e.r,r,i+1)):r[e.s]=i},Zp=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new nt(++e),i=0,n=t[0],s=1,a=function(l){r[i++]=l},o=1;o<=e;++o)if(t[o]==n&&o!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(n),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(n);s=1,n=t[o]}return[r.subarray(0,i),e]},Vn=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},Ma=function(t,e,r){var i=r.length,n=_d(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<i;++s)t[n+s+4]=r[s];return 8*(n+4+i)},Yp=function(t,e,r,i,n,s,a,o,l,h,c){ar(e,c++,r),++n[256];for(var u=$l(n,15),f=u[0],p=u[1],m=$l(s,15),g=m[0],d=m[1],y=Zp(f),v=y[0],b=y[1],_=Zp(g),x=_[0],T=_[1],S=new nt(19),w=0;w<v.length;++w)S[31&v[w]]++;for(w=0;w<x.length;++w)S[31&x[w]]++;for(var M=$l(S,7),k=M[0],I=M[1],P=19;P>4&&!k[Wp[P-1]];--P);var A,E,F,O,D=h+5<<3,C=Vn(n,si)+Vn(s,Na)+a,$=Vn(n,f)+Vn(s,g)+a+14+3*P+Vn(S,k)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return Ma(e,c,t.subarray(l,l+h));if(ar(e,c,1+($<C)),c+=2,$<C){A=Gn(f,p,0),E=f,F=Gn(g,d,0),O=g;var L=Gn(k,I,0);for(ar(e,c,b-257),ar(e,c+5,T-1),ar(e,c+10,P-4),c+=14,w=0;w<P;++w)ar(e,c+3*w,k[Wp[w]]);c+=3*P;for(var q=[v,x],U=0;U<2;++U){var J=q[U];for(w=0;w<J.length;++w){var G=31&J[w];ar(e,c,L[G]),c+=k[G],G>15&&(ar(e,c,J[w]>>>5&127),c+=J[w]>>>12)}}}else A=B0,E=si,F=V0,O=Na;for(w=0;w<o;++w)if(i[w]>255){G=i[w]>>>18&31,Bn(e,c,A[G+257]),c+=E[G+257],G>7&&(ar(e,c,i[w]>>>23&31),c+=sh[G]);var re=31&i[w];Bn(e,c,F[re]),c+=O[re],re>3&&(Bn(e,c,i[w]>>>5&8191),c+=ah[re])}else Bn(e,c,A[i[w]]),c+=E[i[w]];return Bn(e,c,A[256]),c+E[256]},z0=new Ji([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),j0=new St(0),G0=function(){for(var t=new Ji(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),H0=function(){var t=4294967295;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=G0[255&r^e[i]]^r>>>8;t=r},d:function(){return 4294967295^t}}},q0=function(t,e,r,i,n){return function(s,a,o,l,h,c){var u=s.length,f=new St(l+u+5*(1+Math.floor(u/7e3))+h),p=f.subarray(l,f.length-h),m=0;if(!a||u<8)for(var g=0;g<=u;g+=65535){var d=g+65535;d<u?m=Ma(p,m,s.subarray(g,d)):(p[g]=c,m=Ma(p,m,s.subarray(g,u)))}else{for(var y=z0[a-1],v=y>>>13,b=8191&y,_=(1<<o)-1,x=new nt(32768),T=new nt(_+1),S=Math.ceil(o/3),w=2*S,M=function(st){return(s[st]^s[st+1]<<S^s[st+2]<<w)&_},k=new Ji(25e3),I=new nt(288),P=new nt(32),A=0,E=0,F=(g=0,0),O=0,D=0;g<u;++g){var C=M(g),$=32767&g,L=T[C];if(x[$]=L,T[C]=$,O<=g){var q=u-g;if((A>7e3||F>24576)&&q>423){m=Yp(s,p,0,k,I,P,E,F,D,g-D,m),F=A=E=0,D=g;for(var U=0;U<286;++U)I[U]=0;for(U=0;U<30;++U)P[U]=0}var J=2,G=0,re=b,se=$-L&32767;if(q>2&&C==M(g-se))for(var ie=Math.min(v,q)-1,ee=Math.min(32767,g),Se=Math.min(258,q);se<=ee&&--re&&$!=L;){if(s[g+J]==s[g+J-se]){for(var ue=0;ue<Se&&s[g+ue]==s[g+ue-se];++ue);if(ue>J){if(J=ue,G=se,ue>ie)break;var Ie=Math.min(se,ue-2),ke=0;for(U=0;U<Ie;++U){var W=g-se+U+32768&32767,qe=W-x[W]+32768&32767;qe>ke&&(ke=qe,L=W)}}}se+=($=L)-(L=x[$])+32768&32767}if(G){k[F++]=268435456|Yl[J]<<18|Jl[G];var kt=31&Yl[J],Et=31&Jl[G];E+=sh[kt]+ah[Et],++I[257+kt],++P[Et],O=g+J,++A}else k[F++]=s[g],++I[s[g]]}}m=Yp(s,p,c,k,I,P,E,F,D,g-D,m),c||(m=Ma(p,m,j0))}return wd(f,0,l+_d(m)+h)}(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!n)},Xl=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},U0=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&Xl(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},W0=function(t){return 10+(t.filename&&t.filename.length+1||0)};function Z0(t,e){e===void 0&&(e={});var r=H0(),i=t.length;r.p(t);var n=q0(t,e,W0(e),8),s=n.length;return U0(n,e),Xl(n,s-8,r.d()),Xl(n,s-4,i),n}function Y0(t,e){var r=t.length;if(!e&&typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var i=new St(t.length+(t.length>>>1)),n=0,s=function(h){i[n++]=h},a=0;a<r;++a){if(n+5>i.length){var o=new St(n+8+(r-a<<1));o.set(i),i=o}var l=t.charCodeAt(a);l<128||e?s(l):l<2048?(s(192|l>>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++a))>>>18),s(128|l>>>12&63),s(128|l>>>6&63),s(128|63&l)):(s(224|l>>>12),s(128|l>>>6&63),s(128|63&l))}return wd(i,0,n)}(function(t){t.GZipJS="gzip-js",t.Base64="base64"})(ei||(ei={}));var xd=function(t,e,r){var i=e||{};i.ip=r.ip?1:0,i._=new Date().getTime().toString(),i.ver=ii.LIB_VERSION;var n=t.split("?");if(n.length>1){var s,a=ri(n[1].split("&"));try{for(a.s();!(s=a.n()).done;){var o=s.value.split("=")[0];ye(i[o])||delete i[o]}}catch(h){a.e(h)}finally{a.f()}}var l=t.indexOf("?")>-1?"&":"?";return t+l+function(h){var c,u,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",p=[];return Ae(h,function(m,g){ye(m)||ye(g)||g==="undefined"||(c=encodeURIComponent(m.toString()),u=encodeURIComponent(g),p[p.length]=u+"="+c)}),p.join(f)}(i)},oh=function t(e,r){if(r.blob&&e.buffer)return new Blob([Ip(e)?e:e.buffer],{type:"text/plain"});if(r.sendBeacon||r.blob){var i=t(e,{method:"POST"});return new Blob([i],{type:"application/x-www-form-urlencoded"})}return r.method!=="POST"?null:(n=Ye(e)||Ip(e)?"data="+encodeURIComponent(e):"data="+encodeURIComponent(e.data),"compression"in e&&e.compression&&(n+="&compression="+e.compression),n);var n},Sd=function(t){var e=t.url,r=t.data,i=t.headers,n=t.options,s=t.callback,a=t.retriesPerformedSoFar,o=t.retryQueue,l=t.onXHRError,h=t.timeout,c=h===void 0?6e4:h,u=t.onResponse;or(a)&&a>0&&(e=xd(e,{retry_count:a},{}));var f=new XMLHttpRequest;f.open(n.method||"GET",e,!0);var p=oh(r,n);Ae(i,function(m,g){f.setRequestHeader(g,m)}),n.method!=="POST"||n.blob||f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.timeout=c,f.withCredentials=!0,f.onreadystatechange=function(){if(f.readyState===4)if(u?.(f),f.status===200){if(s){var m;try{m=JSON.parse(f.responseText)}catch(g){return void z.error(g)}s(m)}}else ni(l)&&l(f),(f.status<400||f.status>500)&&o.enqueue({url:e,data:r,options:n,headers:i,retriesPerformedSoFar:(a||0)+1,callback:s}),s?.({status:0})},f.send(p)},J0=18e5,X0=function(t){rd(r,yd);var e=id(r);function r(i,n){var s;return Re(this,r),(s=e.call(this)).isPolling=!1,s.queue=[],s.areWeOnline=!0,s.onXHRError=i,s.rateLimiter=n,!ye(window)&&"onLine"in window.navigator&&(s.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){s._handleWeAreNowOnline()}),window.addEventListener("offline",function(){s.areWeOnline=!1})),s}return Le(r,[{key:"enqueue",value:function(i){var n=i.retriesPerformedSoFar||0;if(!(n>=10)){var s=function(l){var h=3e3*Math.pow(2,l),c=h/2,u=Math.min(J0,h),f=(Math.random()-.5)*(u-c);return Math.ceil(u+f)}(n),a=new Date(Date.now()+s);this.queue.push({retryAt:a,requestData:i});var o="Enqueued failed request for retry in ".concat(s);navigator.onLine||(o+=" (Browser is offline)"),z.warn(o),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var i=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){i.areWeOnline&&i.queue.length>0&&i.flush(),i.poll()},this._pollInterval)}},{key:"flush",value:function(){var i=new Date(Date.now()),n=this.queue.filter(function(l){return l.retryAt<i});if(n.length>0){this.queue=this.queue.filter(function(l){return l.retryAt>=i});var s,a=ri(n);try{for(a.s();!(s=a.n()).done;){var o=s.value.requestData;this._executeXhrRequest(o)}}catch(l){a.e(l)}finally{a.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var i,n=ri(this.queue);try{for(n.s();!(i=n.n()).done;){var s=i.value.requestData,a=s.url,o=s.data,l=s.options;if(this.rateLimiter.isRateLimited(l._batchKey))z.warn("[RetryQueue] is quota limited. Dropping request.");else try{window.navigator.sendBeacon(a,oh(o,ce(ce({},l),{},{sendBeacon:!0})))}catch(h){z.error(h)}}}catch(h){n.e(h)}finally{n.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(i){var n=i.url,s=i.data,a=i.options,o=i.headers,l=i.callback,h=i.retriesPerformedSoFar;this.rateLimiter.isRateLimited(a._batchKey)||Sd({url:n,data:s||{},options:a||{},headers:o||{},retriesPerformedSoFar:h||0,callback:l,retryQueue:this,onXHRError:this.onXHRError,onResponse:this.rateLimiter.checkForLimiting})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),r}();Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return or(t)&&isFinite(t)&&Math.floor(t)===t});var Jp="0123456789abcdef",K0=function(){function t(e){if(Re(this,t),this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}return Le(t,[{key:"toString",value:function(){for(var e="",r=0;r<this.bytes.length;r++)e=e+Jp.charAt(this.bytes[r]>>>4)+Jp.charAt(15&this.bytes[r]),r!==3&&r!==5&&r!==7&&r!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}},{key:"clone",value:function(){return new t(this.bytes.slice(0))}},{key:"equals",value:function(e){return this.compareTo(e)===0}},{key:"compareTo",value:function(e){for(var r=0;r<16;r++){var i=this.bytes[r]-e.bytes[r];if(i!==0)return Math.sign(i)}return 0}}],[{key:"fromFieldsV7",value:function(e,r,i,n){if(!Number.isInteger(e)||!Number.isInteger(r)||!Number.isInteger(i)||!Number.isInteger(n)||e<0||r<0||i<0||n<0||e>0xffffffffffff||r>4095||i>1073741823||n>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|r>>>8,s[7]=r,s[8]=128|i>>>24,s[9]=i>>>16,s[10]=i>>>8,s[11]=i,s[12]=n>>>24,s[13]=n>>>16,s[14]=n>>>8,s[15]=n,new t(s)}}]),t}(),Q0=function(){function t(){Re(this,t),Y(this,"timestamp",0),Y(this,"counter",0),Y(this,"random",new ey)}return Le(t,[{key:"generate",value:function(){var e=this.generateOrAbort();if(ye(e)){this.timestamp=0;var r=this.generateOrAbort();if(ye(r))throw new Error("Could not generate UUID after timestamp reset");return r}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 K0.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())}}]),t}(),kd=function(t){if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<t.length;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};!ye(X.crypto)&&crypto.getRandomValues&&(kd=function(t){return crypto.getRandomValues(t)});var Xp,ey=function(){function t(){Re(this,t),Y(this,"buffer",new Uint32Array(8)),Y(this,"cursor",1/0)}return Le(t,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(kd(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),t}(),Zi=function(){return ty().toString()},ty=function(){return(Xp||(Xp=new Q0)).generate()},Ea=1800,Kp=60,ry=864e5,iy=function(){function t(e,r,i,n){Re(this,t),Y(this,"_sessionIdChangedHandlers",[]),this.config=e,this.persistence=r,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=i||Zi,this._windowIdGenerator=n||Zi;var s=e.persistence_name||e.token,a=e.session_idle_timeout_seconds||Ea;if(or(a)?a>Ea?z.warn("session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):a<Kp&&z.warn("session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."):(z.warn("session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),a=Ea),this._sessionTimeoutMs=1e3*Math.min(Math.max(a,Kp),Ea),this._window_id_storage_key="ph_"+s+"_window_id",this._primary_window_exists_storage_key="ph_"+s+"_primary_window_exists",this._canUseSessionStorage()){var o=Ze.parse(this._window_id_storage_key),l=Ze.parse(this._primary_window_exists_storage_key);o&&!l?this._windowId=o:Ze.remove(this._window_id_storage_key),Ze.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return Le(t,[{key:"onSessionId",value:function(e){var r=this;return ye(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),function(){r._sessionIdChangedHandlers=r._sessionIdChangedHandlers.filter(function(i){return i!==e})}}},{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Ze.is_supported()}},{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&Ze.set(this._window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Ze.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(e,r,i){e===this._sessionId&&r===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=r,this._sessionId=e,this.persistence.register(Y({},Ra,[r,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[Ra];return Ye(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;X.addEventListener("beforeunload",function(){e._canUseSessionStorage()&&Ze.remove(e._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),i=qn(this._getSessionId(),3),n=i[0],s=i[1],a=i[2],o=this._getWindowId(),l=a&&a>0&&Math.abs(r-a)>ry,h=!1,c=!s,u=!e&&Math.abs(r-n)>this._sessionTimeoutMs;c||u||l?(s=this._sessionIdGenerator(),o=this._windowIdGenerator(),a=r,h=!0):o||(o=this._windowIdGenerator(),h=!0);var f=n===0||!e||l?r:n,p=a===0?new Date().getTime():a;return this._setWindowId(o),this._setSessionId(s,f,p),h&&this._sessionIdChangedHandlers.forEach(function(m){return m(s,o)}),{sessionId:s,windowId:o,sessionStartTimestamp:p}}}]),t}(),ny=Le(function t(e,r,i,n){Re(this,t),this.name="posthog-js",this.setupOnce=function(s){s(function(a){var o,l,h,c,u;if(a.level!=="error"||!e.__loaded)return a;a.tags||(a.tags={});var f=e.config.ui_host||e.config.api_host;a.tags["PostHog Person URL"]=f+"/person/"+e.get_distinct_id(),e.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p=((o=a.exception)===null||o===void 0?void 0:o.values)||[],m={$exception_message:(l=p[0])===null||l===void 0?void 0:l.value,$exception_type:(h=p[0])===null||h===void 0?void 0:h.type,$exception_personURL:f+"/person/"+e.get_distinct_id(),$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:(c=p[0])===null||c===void 0?void 0:c.value,$sentry_exception_type:(u=p[0])===null||u===void 0?void 0:u.type,$sentry_tags:a.tags};return r&&i&&(m.$sentry_url=(n||"https://sentry.io/organizations/")+r+"/issues/?project="+i+"&query="+a.event_id),e.capture("$exception",m),a})}}),sy=function(t){Promise&&Promise.resolve||z.warn("This browser does not have Promise support, and can not use the segment integration");var e=function(r,i){r.event.userId||r.event.anonymousId===t.get_distinct_id()||t.reset(),r.event.userId&&r.event.userId!==t.get_distinct_id()&&(t.register({distinct_id:r.event.userId}),t.reloadFeatureFlags());var n=t._calculate_event_properties(i,r.event.properties);return r.event.properties=Object.assign({},n,r.event.properties),r};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(r){return e(r,r.event.event)},page:function(r){return e(r,"$pageview")},identify:function(r){return e(r,"$identify")},screen:function(r){return e(r,"$screen")}}},ay=function(){function t(){var e=this;Re(this,t),Y(this,"_hasSeenPageView",!1),Y(this,"_updateScrollData",function(){var r,i,n,s;e._pageViewData||(e._pageViewData=e._createPageViewData());var a=e._pageViewData,o=e._scrollY(),l=e._scrollHeight(),h=e._contentY(),c=e._contentHeight();a.lastScrollY=o,a.maxScrollY=Math.max(o,(r=a.maxScrollY)!==null&&r!==void 0?r:0),a.maxScrollHeight=Math.max(l,(i=a.maxScrollHeight)!==null&&i!==void 0?i:0),a.lastContentY=h,a.maxContentY=Math.max(h,(n=a.maxContentY)!==null&&n!==void 0?n:0),a.maxContentHeight=Math.max(c,(s=a.maxContentHeight)!==null&&s!==void 0?s:0)})}return Le(t,[{key:"_createPageViewData",value:function(){return{pathname:X.location.pathname}}},{key:"doPageView",value:function(){var e,r;return this._hasSeenPageView?(r=this._pageViewData,this._pageViewData=this._createPageViewData()):(this._hasSeenPageView=!0,r=void 0,this._pageViewData||(this._pageViewData=this._createPageViewData())),setTimeout(this._updateScrollData,0),ce({$prev_pageview_pathname:(e=r)===null||e===void 0?void 0:e.pathname},this._calculatePrevPageScrollProperties(r))}},{key:"doPageLeave",value:function(){var e=this._pageViewData;return ce({$prev_pageview_pathname:e?.pathname},this._calculatePrevPageScrollProperties(e))}},{key:"_calculatePrevPageScrollProperties",value:function(e){if(!e||e.maxScrollHeight==null||e.lastScrollY==null||e.maxScrollY==null||e.maxContentHeight==null||e.lastContentY==null||e.maxContentY==null)return{};var r=e.maxScrollHeight,i=e.lastScrollY,n=e.maxScrollY,s=e.maxContentHeight,a=e.lastContentY,o=e.maxContentY;return r=Math.ceil(r),i=Math.ceil(i),n=Math.ceil(n),s=Math.ceil(s),a=Math.ceil(a),o=Math.ceil(o),{$prev_pageview_last_scroll:i,$prev_pageview_last_scroll_percentage:r<=1?1:Pa(i/r,0,1),$prev_pageview_max_scroll:n,$prev_pageview_max_scroll_percentage:r<=1?1:Pa(n/r,0,1),$prev_pageview_last_content:a,$prev_pageview_last_content_percentage:s<=1?1:Pa(a/s,0,1),$prev_pageview_max_content:o,$prev_pageview_max_content_percentage:s<=1?1:Pa(o/s,0,1)}}},{key:"startMeasuringScrollPosition",value:function(){X.addEventListener("scroll",this._updateScrollData),X.addEventListener("scrollend",this._updateScrollData),X.addEventListener("resize",this._updateScrollData)}},{key:"stopMeasuringScrollPosition",value:function(){X.removeEventListener("scroll",this._updateScrollData),X.removeEventListener("scrollend",this._updateScrollData),X.removeEventListener("resize",this._updateScrollData)}},{key:"_scrollHeight",value:function(){return Math.max(0,X.document.documentElement.scrollHeight-X.document.documentElement.clientHeight)}},{key:"_scrollY",value:function(){return X.scrollY||X.pageYOffset||X.document.documentElement.scrollTop||0}},{key:"_contentHeight",value:function(){return X.document.documentElement.scrollHeight||0}},{key:"_contentY",value:function(){var e=X.document.documentElement.clientHeight||0;return this._scrollY()+e}}]),t}();function Pa(t,e,r){return Math.max(e,Math.min(t,r))}var Hn,lh,We,oy={icontains:function(t){return window.location.href.toLowerCase().indexOf(t.toLowerCase())>-1},regex:function(t){return p0(window.location.href,t)},exact:function(t){return window.location.href===t}},ly=function(){function t(e){Re(this,t),this.instance=e}return Le(t,[{key:"getSurveys",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.instance.get_property(ql);if(n&&!i)return e(n);this.instance._send_request("".concat(this.instance.config.api_host,"/api/surveys/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var a,o=s.surveys||[];return(a=r.instance.persistence)===null||a===void 0||a.register(Y({},ql,o)),e(o)})}},{key:"getActiveMatchingSurveys",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(function(n){var s=n.filter(function(a){return!(!a.start_date||a.end_date)}).filter(function(a){var o,l,h,c;if(!a.conditions)return!0;var u=(o=a.conditions)===null||o===void 0||!o.url||oy[(l=(h=a.conditions)===null||h===void 0?void 0:h.urlMatchType)!==null&&l!==void 0?l:"icontains"](a.conditions.url),f=(c=a.conditions)===null||c===void 0||!c.selector||document.querySelector(a.conditions.selector);return u&&f}).filter(function(a){if(!a.linked_flag_key&&!a.targeting_flag_key)return!0;var o=!a.linked_flag_key||r.instance.featureFlags.isFeatureEnabled(a.linked_flag_key),l=!a.targeting_flag_key||r.instance.featureFlags.isFeatureEnabled(a.targeting_flag_key);return o&&l});return e(s)},i)}}]),t}(),hy=6e4,cy=function(){function t(){var e=this;Re(this,t),Y(this,"limits",{}),Y(this,"checkForLimiting",function(r){try{var i=r.responseText;if(!i||!i.length)return;(JSON.parse(i).quota_limited||[]).forEach(function(n){z.info("[RateLimiter] ".concat(n||"events"," is quota limited.")),e.limits[n]=new Date().getTime()+hy})}catch(n){return void z.error(n)}})}return Le(t,[{key:"isRateLimited",value:function(e){var r=this.limits[e||"events"]||!1;return r!==!1&&new Date().getTime()<r}}]),t}();(function(t){t[t.INIT_MODULE=0]="INIT_MODULE",t[t.INIT_SNIPPET=1]="INIT_SNIPPET"})(Hn||(Hn={}));var Kl=function(){},Aa={},ut="posthog",Da=X.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Ed=!Da&&ct.indexOf("MSIE")===-1&&ct.indexOf("Mozilla")===-1,Qp=function(){var t,e,r;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(e=Oe?.location,r=e?.hostname,!!xt(r)&&r.split(".").slice(-2).join(".")!=="herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:Kl,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:!0,debug:!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(X==null||(t=X.location)===null||t===void 0?void 0:t.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_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,on_xhr_error:function(i){var n="Bad HTTP status: "+i.status+" "+i.statusText;z.error(n)},get_device_id:function(i){return i},_onCapture:Kl,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800}},Ql=function(t,e,r,i){var n,s=r!==ut&&We?r?We[r]:void 0:We,a={initComplete:!1,syncCode:!1},o=function(l){return function(h){a[l]||(a[l]=!0,a.initComplete&&a.syncCode&&i?.(h))}};if(s&&lh===Hn.INIT_MODULE)n=s;else{if(s&&!Ye(s))return void z.error("You have already initialized "+r);n=new hh}return n._init(t,e,r,o("initComplete")),n.toolbar.maybeLoadToolbar(),n.sessionRecording=new w0(n),n.sessionRecording.startRecordingIfEnabled(),n.webPerformance=new k0(n),n.webPerformance.startObservingIfEnabled(),n.config.__preview_measure_pageview_stats&&n.pageViewManager.startMeasuringScrollPosition(),n.__autocapture=n.config.autocapture,Sr._setIsAutocaptureEnabled(n),Sr._isAutocaptureEnabled&&(n.__autocapture=n.config.autocapture,Sr.enabledForProject(n.config.token,100,100)?Sr.isBrowserSupported()?Sr.init(n):(n.__autocapture=!1,z.info("Disabling Automatic Event Collection because this browser is not supported")):(n.__autocapture=!1,z.info("Not in active bucket: disabling Automatic Event Collection."))),ii.DEBUG=ii.DEBUG||n.config.debug,!ye(s)&&Ye(s)&&(n._execute_array.call(n.people,s.people),n._execute_array(s)),o("syncCode")(n),n},hh=function(){function t(){var e=this;Re(this,t),this.config=Qp(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=ny,this.segmentIntegration=function(){return sy(e)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.analyticsDefaultEndpoint="/e/",this.featureFlags=new o0(this),this.toolbar=new I0(this),this.pageViewManager=new ay,this.surveys=new ly(this),this.rateLimiter=new cy,this.people={set:function(r,i,n){var s=xt(r)?Y({},r,i):r;e.setPersonProperties(s),n?.({})},set_once:function(r,i,n){var s=xt(r)?Y({},r,i):r;e.setPersonProperties(void 0,s),n?.({})}}}return Le(t,[{key:"init",value:function(e,r,i){if(ye(i))z.critical("You must name your new library: init(token, config, name)");else{if(i!==ut){var n=Ql(e,r,i,function(s){We[i]=s,s._loaded()});return We[i]=n,n}z.critical("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(e){var r,i,n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var l,h={segmentRegister:!1,syncCode:!1},c=function(_){return function(){h[_]||(h[_]=!0,h.segmentRegister&&h.syncCode&&o?.(n))}};if(this.set_config(Qe({},Qp(),s,{name:a,token:e,callback_fn:(a===ut?a:ut+"."+a)+"._jsc"})),this._jsc=function(){},(X!=null&&(r=X.rrweb)!==null&&r!==void 0&&r.record||X!=null&&X.rrwebRecord)&&(this.__loaded_recorder_version=X==null||(l=X.rrweb)===null||l===void 0?void 0:l.version),this.persistence=new Hp(this.config),this._requestQueue=new R0(this._handle_queued_event.bind(this)),this._retryQueue=new X0(this.config.on_xhr_error,this.rateLimiter),this.__captureHooks=[],this.__request_queue=[],this.sessionManager=new iy(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new Hp(ce(ce({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),s.segment?(this.config.get_device_id=function(){return s.segment.user().anonymousId()},s.segment.user().id()&&(this.register({distinct_id:s.segment.user().id()}),this.persistence.set_user_state("identified")),s.segment.register(this.segmentIntegration()).then(c("segmentRegister"))):c("segmentRegister")(),((i=s.bootstrap)===null||i===void 0?void 0:i.distinctID)!==void 0){var u,f,p=this.config.get_device_id(Zi()),m=(u=s.bootstrap)!==null&&u!==void 0&&u.isIdentifiedID?p:s.bootstrap.distinctID;this.persistence.set_user_state((f=s.bootstrap)!==null&&f!==void 0&&f.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:m})}if(this._hasBootstrappedFeatureFlags()){var g,d,y=Object.keys(((g=s.bootstrap)===null||g===void 0?void 0:g.featureFlags)||{}).filter(function(_){var x,T;return!((x=s.bootstrap)===null||x===void 0||(T=x.featureFlags)===null||T===void 0||!T[_])}).reduce(function(_,x){var T,S;return _[x]=((T=s.bootstrap)===null||T===void 0||(S=T.featureFlags)===null||S===void 0?void 0:S[x])||!1,_},{}),v=Object.keys(((d=s.bootstrap)===null||d===void 0?void 0:d.featureFlagPayloads)||{}).filter(function(_){return y[_]}).reduce(function(_,x){var T,S,w,M;return(T=s.bootstrap)!==null&&T!==void 0&&(S=T.featureFlagPayloads)!==null&&S!==void 0&&S[x]&&(_[x]=(w=s.bootstrap)===null||w===void 0||(M=w.featureFlagPayloads)===null||M===void 0?void 0:M[x]),_},{});this.featureFlags.receivedFeatureFlags({featureFlags:y,featureFlagPayloads:v})}if(!this.get_distinct_id()){var b=this.config.get_device_id(Zi());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_user_state("anonymous")}X.addEventListener&&X.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),c("syncCode")()}},{key:"_afterDecideResponse",value:function(e){var r;if(this.compression={},e.supportedCompression&&!this.config.disable_compression){var i,n={},s=ri(e.supportedCompression);try{for(s.s();!(i=s.n()).done;)n[i.value]=!0}catch(a){s.e(a)}finally{s.f()}this.compression=n}(r=e.analytics)!==null&&r!==void 0&&r.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint)}},{key:"_loaded",value:function(){var e=this.config.advanced_disable_decide;e||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(r){z.critical("`loaded` function failed",r)}this._start_queue_if_opted_in(),this.config.capture_pageview&&this.capture("$pageview",{title:Oe.title},{send_instantly:!0}),e||(new P0(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.poll())}},{key:"_dom_loaded",value:function(){var e=this;this.has_opted_out_capturing()||Yi(this.__request_queue,function(r){e._send_request.apply(e,Bl(r))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(e,r){if(ye(e))return null;if(Da)return function(a){e(a,r)};var i=this._jsc,n=""+Math.floor(1e8*Math.random()),s=this.config.callback_fn+"["+n+"]";return i[n]=function(a){delete i[n],e(a,r)},s}},{key:"_handle_unload",value:function(){var e,r;this.config.request_batching?(this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave"),(e=this._requestQueue)===null||e===void 0||e.unload(),(r=this._retryQueue)===null||r===void 0||r.unload()):this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(e,r,i){var n=JSON.stringify(r);this.__compress_and_send_json_request(e,n,i||Aa,Kl)}},{key:"__compress_and_send_json_request",value:function(e,r,i,n){var s=function(h,c,u){return h===ei.GZipJS?[Z0(Y0(c),{mtime:0}),ce(ce({},u),{},{blob:!0,urlQueryArgs:{compression:ei.GZipJS}})]:[{data:rh(c)},u]}(this.compression[ei.GZipJS]?ei.GZipJS:ei.Base64,r,i),a=qn(s,2),o=a[0],l=a[1];this._send_request(e,o,l,n)}},{key:"_send_request",value:function(e,r,i,n){if(this.__loaded&&this._retryQueue&&!this.rateLimiter.isRateLimited(i._batchKey))if(Ed)this.__request_queue.push([e,r,i,n]);else{var s={method:this.config.api_method,transport:this.config.api_transport,verbose:this.config.verbose};i=Qe(s,i||{}),Da||(i.method="GET");var a="sendBeacon"in X.navigator&&i.transport==="sendBeacon";if(e=xd(e,i.urlQueryArgs||{},{ip:this.config.ip}),a)try{X.navigator.sendBeacon(e,oh(r,ce(ce({},i),{},{sendBeacon:!0})))}catch{}else if(Da)try{Sd({url:e,data:r,headers:this.config.xhr_headers,options:i,callback:n,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.config.on_xhr_error,onResponse:this.rateLimiter.checkForLimiting})}catch(c){z.error(c)}else{var o,l=Oe.createElement("script");l.type="text/javascript",l.async=!0,l.defer=!0,l.src=e;var h=Oe.getElementsByTagName("script")[0];(o=h.parentNode)===null||o===void 0||o.insertBefore(l,h)}}}},{key:"_execute_array",value:function(e){var r,i=this,n=[],s=[],a=[];Yi(e,function(l){l&&(r=l[0],Ye(r)?a.push(l):ni(l)?l.call(i):Ye(l)&&r==="alias"?n.push(l):Ye(l)&&r.indexOf("capture")!==-1&&ni(i[r])?a.push(l):s.push(l))});var o=function(l,h){Yi(l,function(c){if(Ye(c[0])){var u=h;Ae(c,function(f){u=u[f[0]].apply(u,f.slice(1))})}else this[c[0]].apply(this,c.slice(1))},h)};o(n,this),o(s,this),o(a,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var e,r;return((e=this.config.bootstrap)===null||e===void 0?void 0:e.featureFlags)&&Object.keys((r=this.config.bootstrap)===null||r===void 0?void 0:r.featureFlags).length>0||!1}},{key:"push",value:function(e){this._execute_array([e])}},{key:"capture",value:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Aa;if(!this.__loaded||!this.sessionPersistence||!this._requestQueue)return z.uninitializedWarning("posthog.capture");if(!function(c){var u=!1;try{var f=c.config.token,p=c.config.respect_dnt,m=c.config.opt_out_capturing_persistence_type,g=c.config.opt_out_capturing_cookie_prefix||void 0,d=c.config.window;f&&(u=Up(f,{respectDnt:p,persistenceType:m,persistencePrefix:g,window:d}))}catch(y){z.error("Unexpected error when checking capturing opt-out status: "+y)}return u}(this)){var n=(i=i||Aa).transport;if(n&&(i.transport=n),!ye(e)&&xt(e)){if(!n0(ct,this.config.custom_blocked_useragents)){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info();var s={uuid:Zi(),event:e,properties:this._calculate_event_properties(e,r||{})};e==="$identify"&&(s.$set=i.$set,s.$set_once=i.$set_once),(s=t0(s,i._noTruncate?null:this.config.properties_string_max_length)).timestamp=i.timestamp||new Date;var a=ce(ce({},s.properties.$set),s.$set);Kg(a)||this.setPersonPropertiesForFlags(a),z.info("send",s);var o=JSON.stringify(s),l=this.config.api_host+(i.endpoint||this.analyticsDefaultEndpoint),h=i!==Aa;return!this.config.request_batching||h&&!i._batchKey||i.send_instantly?this.__compress_and_send_json_request(l,o,i):this._requestQueue.enqueue(l,s,i),this._invokeCaptureHooks(e,s),s}}else z.error("No event name provided to posthog.capture")}}},{key:"_addCaptureHook",value:function(e){this.__captureHooks.push(e)}},{key:"_invokeCaptureHooks",value:function(e,r){this.config._onCapture(e,r),Ae(this.__captureHooks,function(i){return i(e)})}},{key:"_calculate_event_properties",value:function(e,r){if(!this.persistence||!this.sessionPersistence)return r;var i=this.persistence.remove_event_timer(e),n=ce({},r);if(n.token=this.config.token,e==="$snapshot"){var s=ce(ce({},this.persistence.properties()),this.sessionPersistence.properties());return n.distinct_id=s.distinct_id,n}var a=Ue.properties();if(this.sessionManager){var o=this.sessionManager.checkAndGetSessionAndWindowId(),l=o.sessionId,h=o.windowId;n.$session_id=l,n.$window_id=h}if(this.config.__preview_measure_pageview_stats){var c={};e==="$pageview"?c=this.pageViewManager.doPageView():e==="$pageleave"&&(c=this.pageViewManager.doPageLeave()),n=Qe(n,c)}if(e==="$pageview"&&(n.title=Oe.title),e==="$performance_event"){var u=this.persistence.properties();return n.distinct_id=u.distinct_id,n.$current_url=a.$current_url,n}if(!ye(i)){var f=new Date().getTime()-i;n.$duration=parseFloat((f/1e3).toFixed(3))}n=Qe({},Ue.properties(),this.persistence.properties(),this.sessionPersistence.properties(),n);var p=this.config.property_blacklist;Ye(p)?Ae(p,function(g){delete n[g]}):z.error("Invalid value for property_blacklist config: "+p);var m=this.config.sanitize_properties;return m&&(n=m(n,e)),n}},{key:"register",value:function(e,r){var i;(i=this.persistence)===null||i===void 0||i.register(e,r)}},{key:"register_once",value:function(e,r,i){var n;(n=this.persistence)===null||n===void 0||n.register_once(e,r,i)}},{key:"register_for_session",value:function(e){var r;(r=this.sessionPersistence)===null||r===void 0||r.register(e)}},{key:"unregister",value:function(e){var r;(r=this.persistence)===null||r===void 0||r.unregister(e)}},{key:"unregister_for_session",value:function(e){var r;(r=this.sessionPersistence)===null||r===void 0||r.unregister(e)}},{key:"_register_single",value:function(e,r){this.register(Y({},e,r))}},{key:"getFeatureFlag",value:function(e,r){return this.featureFlags.getFeatureFlag(e,r)}},{key:"getFeatureFlagPayload",value:function(e){var r=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(r)}catch{return r}}},{key:"isFeatureEnabled",value:function(e,r){return this.featureFlags.isFeatureEnabled(e,r)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,r)}},{key:"getEarlyAccessFeatures",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(e,r)}},{key:"onFeatureFlags",value:function(e){return this.featureFlags.onFeatureFlags(e)}},{key:"onSessionId",value:function(e){var r,i;return(r=(i=this.sessionManager)===null||i===void 0?void 0:i.onSessionId(e))!==null&&r!==void 0?r:function(){}}},{key:"getSurveys",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(e,r)}},{key:"getActiveMatchingSurveys",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(e,r)}},{key:"identify",value:function(e,r,i){if(!this.__loaded||!this.persistence)return z.uninitializedWarning("posthog.identify");if(e){var n=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=n;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==n&&e!==this.get_property(Ta)&&(this.unregister(Ta),this.register({distinct_id:e}));var a=this.persistence.get_user_state()==="anonymous";e!==n&&a?(this.persistence.set_user_state("identified"),this.setPersonPropertiesForFlags(r||{},!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:n},{$set:r||{},$set_once:i||{}}),this.featureFlags.setAnonymousDistinctId(n)):(r||i)&&this.setPersonProperties(r,i),e!==n&&(this.reloadFeatureFlags(),this.unregister(La))}else z.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(e,r){(e||r)&&(this.setPersonPropertiesForFlags(e||{}),this.capture("$set",{$set:e||{},$set_once:r||{}}))}},{key:"group",value:function(e,r,i){if(e&&r){var n=this.getGroups();n[e]!==r&&this.resetGroupPropertiesForFlags(e),this.register({$groups:ce(ce({},n),{},Y({},e,r))}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:r,$group_set:i}),this.setGroupPropertiesForFlags(Y({},e,i))),n[e]===r||i||this.reloadFeatureFlags()}else z.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 r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(e,r)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(e,r)}},{key:"resetGroupPropertiesForFlags",value:function(e){this.featureFlags.resetGroupPropertiesForFlags(e)}},{key:"reset",value:function(e){var r,i,n,s;if(!this.__loaded)return z.uninitializedWarning("posthog.reset");var a=this.get_property("$device_id");(r=this.persistence)===null||r===void 0||r.clear(),(i=this.sessionPersistence)===null||i===void 0||i.clear(),(n=this.persistence)===null||n===void 0||n.set_user_state("anonymous"),(s=this.sessionManager)===null||s===void 0||s.resetSessionId();var o=this.config.get_device_id(Zi());this.register_once({distinct_id:o,$device_id:e?o:a},"")}},{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,r;return(e=(r=this.sessionManager)===null||r===void 0?void 0:r.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}},{key:"get_session_replay_url",value:function(e){if(!this.sessionManager)return"";var r=this.config.ui_host||this.config.api_host,i=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=i.sessionId,s=i.sessionStartTimestamp,a=r+"/replay/"+n;if(e!=null&&e.withTimestamp&&s){var o,l=(o=e.timestampLookBack)!==null&&o!==void 0?o:10;if(!s)return a;var h=Math.max(Math.floor((new Date().getTime()-s)/1e3)-l,0);a+="?t=".concat(h)}return a}},{key:"alias",value:function(e,r){return e===this.get_property(pd)?(z.critical("Attempting to create alias for existing People user - aborting."),-2):(ye(r)&&(r=this.get_distinct_id()),e!==r?(this._register_single(Ta,e),this.capture("$create_alias",{alias:e,distinct_id:r})):(z.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1))}},{key:"set_config",value:function(e){var r,i,n=ce({},this.config);kr(e)&&(Qe(this.config,e),this.config.persistence_name||(this.config.persistence_name=this.config.cookie_name),this.config.disable_persistence||(this.config.disable_persistence=this.config.disable_cookie),(r=this.persistence)===null||r===void 0||r.update_config(this.config),(i=this.sessionPersistence)===null||i===void 0||i.update_config(this.config),$e.is_supported()&&$e.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(ii.DEBUG=!0),this.sessionRecording&&!ye(e.disable_session_recording)&&n.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){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 r;return(r=this.persistence)===null||r===void 0?void 0:r.props[e]}},{key:"getSessionProperty",value:function(e){var r;return(r=this.sessionPersistence)===null||r===void 0?void 0:r.props[e]}},{key:"toString",value:function(){var e,r=(e=this.config.name)!==null&&e!==void 0?e:ut;return r!==ut&&(r=ut+"."+r),r}},{key:"_gdpr_init",value:function(){this.config.opt_out_capturing_persistence_type==="localStorage"&&$e.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&&!lr.get("ph_optout")||(lr.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.config.opt_out_persistence_by_default}))}},{key:"_gdpr_update_persistence",value:function(e){var r,i,n,s,a;if(e&&e.clear_persistence)n=!0;else{if(!e||!e.enable_persistence)return;n=!1}this.config.disable_persistence||((r=this.persistence)===null||r===void 0?void 0:r.disabled)===n||(s=this.persistence)===null||s===void 0||s.set_disabled(n),this.config.disable_persistence||((i=this.sessionPersistence)===null||i===void 0?void 0:i.disabled)===n||(a=this.sessionPersistence)===null||a===void 0||a.set_disabled(n)}},{key:"_gdpr_call_func",value:function(e,r){return r=Qe({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},r||{}),$e.is_supported()||r.persistence_type!=="localStorage"||(r.persistence_type="cookie"),e(this.config.token,{capture:r.capture,captureEventName:r.capture_event_name,captureProperties:r.capture_properties,persistenceType:r.persistence_type,persistencePrefix:r.cookie_prefix,cookieExpiration:r.cookie_expiration,crossSubdomainCookie:r.cross_subdomain_cookie,secureCookie:r.secure_cookie})}},{key:"opt_in_capturing",value:function(e){e=Qe({enable_persistence:!0},e||{}),this._gdpr_call_func(D0,e),this._gdpr_update_persistence(e)}},{key:"opt_out_capturing",value:function(e){var r=Qe({clear_persistence:!0},e||{});this._gdpr_call_func(F0,r),this._gdpr_update_persistence(r)}},{key:"has_opted_in_capturing",value:function(e){return this._gdpr_call_func(O0,e)}},{key:"has_opted_out_capturing",value:function(e){return this._gdpr_call_func(Up,e)}},{key:"clear_opt_in_out_capturing",value:function(e){var r=Qe({enable_persistence:!0},e??{});this._gdpr_call_func($0,r),this._gdpr_update_persistence(r)}},{key:"debug",value:function(e){e===!1?(X.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(X.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}))}}]),t}();(function(t,e){for(var r=0;r<e.length;r++)t.prototype[e[r]]=ld(t.prototype[e[r]])})(hh,["identify"]);var ed,td,wr={},uy=function(){We.init=function(t,e,r){if(r)return We[r]||(We[r]=wr[r]=Ql(t||"",e||{},r,function(n){We[r]=wr[r]=n,n._loaded()})),We[r];var i=We;return wr[ut]?i=wr[ut]:t&&(i=Ql(t,e||{},ut,function(n){wr[ut]=n,n._loaded()}),wr[ut]=i),We=i,lh===Hn.INIT_SNIPPET&&(X[ut]=We),Ae(wr,function(n,s){s!==ut&&(We[s]=n)}),i}},py=function(){function t(){t.done||(t.done=!0,Ed=!1,Ae(wr,function(e){e._dom_loaded()}))}Oe.addEventListener&&(Oe.readyState==="complete"?t():Oe.addEventListener("DOMContentLoaded",t,!1)),zn(X,"load",t,!0)};(function(t){t.Popover="popover",t.API="api"})(ed||(ed={})),function(t){t.Open="open",t.MultipleChoice="multiple_choice",t.SingleChoice="single_choice",t.Rating="rating",t.Link="link"}(td||(td={}));var Pd=(lh=Hn.INIT_MODULE,We=new hh,uy(),We.init(),py(),We);var Ad=Pd.init("phc_OTZ3wJ6VemgVupCRKS5Sbqb9Ks0JYe0hMYZPtLwl0nu",{api_host:"https://ph-eu.molin.ai",ui_host:"https://eu.posthog.com",secure_cookie:document.location.protocol==="https:",persistence:"cookie",autocapture:!1,rageclick:!1,capture_pageview:!0,disable_session_recording:!0},"MolinShopAI");function pt(t,e){if(!Ad)throw new Error("Failed to initialize PostHog");Ad.capture(t,e)}var Xi,ja,Dt,Be,Ga,Cd,Ha,Td,qa,Id,Ua,Md,Wa,Dd,Za,Fd,Ya,Od,Ja,$d,za=class extends De(Ee){constructor(){super();Z(this,Xi);Z(this,Ga);Z(this,Ha);Z(this,qa);Z(this,Ua);Z(this,Wa);Z(this,Za);Z(this,Ya);Z(this,Ja);Z(this,Dt,new wa(this,{url:(r,{resume:i}={})=>{let n=new URL(this.config.wsApiUrl);return n.searchParams.set("widgetId",this.widgetId),n.searchParams.set("resume",i?"1":""),n.searchParams.set("conversationId",r),n.searchParams.set("pageUrl",window.location.href),n},onReconnect:()=>{},onError:r=>{console.error("ws error",r),pt("ShopAssistant: error",{widgetId:this.widgetId,error:"websocket onError"})},onClose:()=>{},onNewMessage:r=>{r.role==="assistant"&&pt("ShopAssistant: user received bot message (streaming started)",{widgetId:this.widgetId,message:r})},onUpdateMessage:r=>{},onMessageDone:r=>{let i={...R(this,Dt)?.messages.find(n=>n.id===r.message?.id)};Object.assign(i,r.message),i.role==="assistant"&&pt("ShopAssistant: user received bot message (streaming ended)",{widgetId:this.widgetId,text:i.content??"",message:i,usage_TOKENS_COMPLETION:r.message.usage.TOKENS_COMPLETION})},onMessageError:r=>{console.error("ws message error",r),r.message&&R(this,Be)&&alert(r.message),pt("ShopAssistant: error",{widgetId:this.widgetId,error:"websocket ERROR message type: "+r.message})},persistConversationState:(r,i)=>{let n={conversationId:r,messages:i};localStorage.setItem(R(this,Xi,ja),JSON.stringify(n))},restoreConversationState:()=>{try{let r=JSON.parse(localStorage.getItem(R(this,Xi,ja))||"{}");return!(typeof r.conversationId=="string"&&r.conversationId)||!(Array.isArray(r.messages)&&r.messages.every(i=>typeof i=="object"&&i))?void 0:{conversationId:r.conversationId,messages:r.messages}}catch(r){console.error(r)}},onReset:()=>{localStorage.removeItem(R(this,Xi,ja))}}));Z(this,Be,!1);this.widgetId="",this.config}render(){console.assert(this.widgetId,"widget id is required"),console.assert(this.config,"config is required");let r=Object.entries(this.config.bubble.position).filter(([a,o])=>o).map(([a,o])=>`${a}-[${o}]`).reduce((a,o)=>(a[o]=!0,a),{}),i={bottom:"72px"},n=Object.entries(this.config.bubble.position).filter(([a,o])=>o).map(([a,o])=>`sm:${a}-[calc(${[i[a],o].filter(l=>!!l).join("+")})]`).reduce((a,o)=>(a[o]=!0,a),{}),s=n;return pe`
|
|
431
431
|
<mw-bubble class="${Pp(r)} fixed z-[99999999]" @click=${he(this,Ua,Md)} ?dialog-shown="${R(this,Be)}" bubble-image-url="${this.config.bubble?.imageUrl||""}"></mw-bubble>
|
|
432
432
|
|
|
433
433
|
${this.config.popup?.enabled?pe`
|
|
@@ -473,7 +473,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
473
473
|
</div>
|
|
474
474
|
</div>
|
|
475
475
|
</div>
|
|
476
|
-
`}openChat(){R(this,Be)||(
|
|
476
|
+
`}openChat(){R(this,Be)||(de(this,Be,!0),this.requestUpdate(),pt("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:R(this,Be)?"open":"close"}))}closeChat(){R(this,Be)&&(de(this,Be,!1),this.requestUpdate(),pt("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:R(this,Be)?"open":"close"}))}injectConfig(r){this.config=r,this.requestUpdate()}};Xi=new WeakSet,ja=function(){if(!this.widgetId)throw new Error("widgetId is required");return`_molin_${this.widgetId}`},Dt=new WeakMap,Be=new WeakMap,Ga=new WeakSet,Cd=function(r){let i=r.target;i&&i instanceof HTMLAnchorElement&&i.tagName==="A"&&pt("ShopAssistant: user clicked link",{widgetId:this.widgetId,url:i.href})},Ha=new WeakSet,Td=function(){de(this,Be,!0),this.requestUpdate(),pt("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:R(this,Be)?"open":"close"})},qa=new WeakSet,Id=function(r){let i=r.detail.example;R(this,Dt)?.sendUserInput(i),pt("ShopAssistant: user sent input",{widgetId:this.widgetId,text:i,example:!0})},Ua=new WeakSet,Md=function(){de(this,Be,!R(this,Be)),this.requestUpdate(),pt("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:R(this,Be)?"open":"close"})},Wa=new WeakSet,Dd=function(r){de(this,Be,!1),this.requestUpdate(),pt("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:R(this,Be)?"open":"close"})},Za=new WeakSet,Fd=function(r){R(this,Dt)?.reset()},Ya=new WeakSet,Od=function(r){let i=r.detail.value;R(this,Dt)?.sendUserInput(i),pt("ShopAssistant: user sent input",{widgetId:this.widgetId,text:i,example:!1})},Ja=new WeakSet,$d=function(r){R(this,Dt)?.sendUserCancel(),pt("ShopAssistant: user canceled streaming",{widgetId:this.widgetId})},me(za,"properties",{widgetId:{type:String,attribute:"widget"},config:{type:Object,attribute:!1}});customElements.define("molin-shop-ai",za);
|
|
477
477
|
/*! Bundled license information:
|
|
478
478
|
|
|
479
479
|
@lit/reactive-element/css-tag.js:
|