@molin.ai/shop-ai 0.4.14 → 0.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
- var dd=Object.defineProperty;var fd=(t,e,r)=>e in t?dd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Se=(t,e,r)=>(fd(t,typeof e!="symbol"?e+"":e,r),r),$a=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var z=(t,e,r)=>($a(t,e,"read from private field"),r?r.call(t):e.get(t)),se=(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)},Le=(t,e,r,i)=>($a(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r);var Wl=(t,e,r,i)=>({set _(n){Le(t,e,n,r)},get _(){return z(t,e,i)}}),de=(t,e,r)=>($a(t,e,"access private method"),r);var ge;(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})(ge||(ge={}));var La;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(La||(La={}));var j=ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),lr=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}},L=ge.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"]),md=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),mt=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,ge.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()}};mt.create=t=>new mt(t);var Yi=(t,e)=>{let r;switch(t.code){case L.invalid_type:t.received===j.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case L.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ge.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:r=`Unrecognized key(s) in object: ${ge.joinValues(t.keys,", ")}`;break;case L.invalid_union:r="Invalid input";break;case L.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ge.joinValues(t.options)}`;break;case L.invalid_enum_value:r=`Invalid enum value. Expected ${ge.joinValues(t.options)}, received '${t.received}'`;break;case L.invalid_arguments:r="Invalid function arguments";break;case L.invalid_return_type:r="Invalid function return type";break;case L.invalid_date:r="Invalid date";break;case L.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}"`:ge.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case L.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 L.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 L.custom:r="Invalid input";break;case L.invalid_intersection_types:r="Intersection results could not be merged";break;case L.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case L.not_finite:r="Number must be finite";break;default:r=e.defaultError,ge.assertNever(t)}return{message:r}},Jl=Yi;function gd(t){Jl=t}function Hn(){return Jl}var qn=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}},yd=[];function H(t,e){let r=qn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Hn(),Yi].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"}),Xl=t=>({status:"dirty",value:t}),et=t=>({status:"valid",value:t}),Ba=t=>t.status==="aborted",Va=t=>t.status==="dirty",Ji=t=>t.status==="valid",Un=t=>typeof Promise<"u"&&t instanceof Promise,ee;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(ee||(ee={}));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}},Zl=(t,e)=>{if(Ji(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 mt(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 lr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:lr(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:lr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Un(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:lr(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Zl(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:lr(e)},n=this._parse({data:e,path:i.path,parent:i}),s=await(Un(n)?n:Promise.resolve(n));return Zl(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:L.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 gt({schema:this,typeName:ie.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return $t.create(this,this._def)}nullable(){return Yt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Zt.create(this,this._def)}promise(){return ur.create(this,this._def)}or(e){return Tr.create([this,e],this._def)}and(e){return Ir.create(this,e,this._def)}transform(e){return new gt({...oe(this._def),schema:this,typeName:ie.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new $r({...oe(this._def),innerType:this,defaultValue:r,typeName:ie.ZodDefault})}brand(){return new Jn({typeName:ie.ZodBranded,type:this,...oe(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new li({...oe(this._def),innerType:this,catchValue:r,typeName:ie.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Xi.create(this,e)}readonly(){return ci.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},vd=/^c[^\s-]{8,}$/i,bd=/^[a-z][a-z0-9]*$/,_d=/^[0-9A-HJKMNP-TV-Z]{26}$/,wd=/^[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,xd=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Sd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ra,kd=/^(((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}))$/,Ed=/^(([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})))$/,Pd=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 Ad(t,e){return!!((e==="v4"||!e)&&kd.test(t)||(e==="v6"||!e)&&Ed.test(t))}var hr=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:L.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:L.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:L.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:L.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&H(n,{code:L.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")xd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"email",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")Ra||(Ra=new RegExp(Sd,"u")),Ra.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"emoji",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")wd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"uuid",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")vd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")bd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid2",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")_d.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ulid",code:L.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:L.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:L.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:L.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:L.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:L.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?Pd(s).test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:L.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="ip"?Ad(e.data,s.version)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ip",code:L.invalid_string,message:s.message}),i.dirty()):ge.assertNever(s);return{status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(n=>e.test(n),{validation:r,code:L.invalid_string,...ee.errToObj(i)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ee.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ee.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ee.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ee.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ee.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ee.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ee.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ee.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,...ee.errToObj(e?.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...ee.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...ee.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...ee.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...ee.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...ee.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...ee.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...ee.errToObj(r)})}nonempty(e){return this.min(1,ee.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}};hr.create=t=>{var e;return new hr({checks:[],typeName:ie.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};function Cd(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 Sr=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:L.invalid_type,expected:j.number,received:s.parsedType}),ae}let i,n=new Je;for(let s of this._def.checks)s.kind==="int"?ge.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),H(i,{code:L.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:L.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:L.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?Cd(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.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:L.not_finite,message:s.message}),n.dirty()):ge.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ee.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ee.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ee.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ee.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:ee.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ee.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ee.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:ee.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ee.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ee.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"&&ge.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)}};Sr.create=t=>new Sr({checks:[],typeName:ie.ZodNumber,coerce:t?.coerce||!1,...oe(t)});var kr=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:L.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:L.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:L.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:L.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):ge.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,ee.toString(r))}gt(e,r){return this.setLimit("min",e,!1,ee.toString(r))}lte(e,r){return this.setLimit("max",e,!0,ee.toString(r))}lt(e,r){return this.setLimit("max",e,!1,ee.toString(r))}setLimit(e,r,i,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:ee.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:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:ee.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}};kr.create=t=>{var e;return new kr({checks:[],typeName:ie.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};var Er=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:L.invalid_type,expected:j.boolean,received:i.parsedType}),ae}return et(e.data)}};Er.create=t=>new Er({typeName:ie.ZodBoolean,coerce:t?.coerce||!1,...oe(t)});var Pr=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:L.invalid_type,expected:j.date,received:s.parsedType}),ae}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return H(s,{code:L.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:L.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:L.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):ge.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:ee.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:ee.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}};Pr.create=t=>new Pr({checks:[],coerce:t?.coerce||!1,typeName:ie.ZodDate,...oe(t)});var ni=class extends le{_parse(e){if(this._getType(e)!==j.symbol){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:j.symbol,received:i.parsedType}),ae}return et(e.data)}};ni.create=t=>new ni({typeName:ie.ZodSymbol,...oe(t)});var Ar=class extends le{_parse(e){if(this._getType(e)!==j.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:j.undefined,received:i.parsedType}),ae}return et(e.data)}};Ar.create=t=>new Ar({typeName:ie.ZodUndefined,...oe(t)});var Cr=class extends le{_parse(e){if(this._getType(e)!==j.null){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:j.null,received:i.parsedType}),ae}return et(e.data)}};Cr.create=t=>new Cr({typeName:ie.ZodNull,...oe(t)});var cr=class extends le{constructor(){super(...arguments),this._any=!0}_parse(e){return et(e.data)}};cr.create=t=>new cr({typeName:ie.ZodAny,...oe(t)});var Wt=class extends le{constructor(){super(...arguments),this._unknown=!0}_parse(e){return et(e.data)}};Wt.create=t=>new Wt({typeName:ie.ZodUnknown,...oe(t)});var Rt=class extends le{_parse(e){let r=this._getOrReturnCtx(e);return H(r,{code:L.invalid_type,expected:j.never,received:r.parsedType}),ae}};Rt.create=t=>new Rt({typeName:ie.ZodNever,...oe(t)});var si=class extends le{_parse(e){if(this._getType(e)!==j.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:j.void,received:i.parsedType}),ae}return et(e.data)}};si.create=t=>new si({typeName:ie.ZodVoid,...oe(t)});var Zt=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:L.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?L.too_big:L.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:L.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:L.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:ee.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:ee.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:ee.toString(r)}})}nonempty(e){return this.min(1,e)}};Zt.create=(t,e)=>new Zt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ie.ZodArray,...oe(e)});function ii(t){if(t instanceof ot){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=$t.create(ii(i))}return new ot({...t._def,shape:()=>e})}else return t instanceof Zt?new Zt({...t._def,type:ii(t.element)}):t instanceof $t?$t.create(ii(t.unwrap())):t instanceof Yt?Yt.create(ii(t.unwrap())):t instanceof Vt?Vt.create(t.items.map(e=>ii(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=ge.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:L.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:L.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 ee.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=ee.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:ie.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return ge.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 ge.objectKeys(this.shape).forEach(i=>{e[i]||(r[i]=this.shape[i])}),new t({...this._def,shape:()=>r})}deepPartial(){return ii(this)}partial(e){let r={};return ge.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 ge.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 Kl(ge.objectKeys(this.shape))}};ot.create=(t,e)=>new ot({shape:()=>t,unknownKeys:"strip",catchall:Rt.create(),typeName:ie.ZodObject,...oe(e)});ot.strictCreate=(t,e)=>new ot({shape:()=>t,unknownKeys:"strict",catchall:Rt.create(),typeName:ie.ZodObject,...oe(e)});ot.lazycreate=(t,e)=>new ot({shape:t,unknownKeys:"strip",catchall:Rt.create(),typeName:ie.ZodObject,...oe(e)});var Tr=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 mt(o.ctx.common.issues));return H(r,{code:L.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 mt(l));return H(r,{code:L.invalid_union,unionErrors:o}),ae}}get options(){return this._def.options}};Tr.create=(t,e)=>new Tr({options:t,typeName:ie.ZodUnion,...oe(e)});var Gn=t=>t instanceof Mr?Gn(t.schema):t instanceof gt?Gn(t.innerType()):t instanceof Dr?[t.value]:t instanceof Fr?t.options:t instanceof Or?Object.keys(t.enum):t instanceof $r?Gn(t._def.innerType):t instanceof Ar?[void 0]:t instanceof Cr?[null]:null,Wn=class t extends le{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==j.object)return H(r,{code:L.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:L.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=Gn(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:ie.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...oe(i)})}};function za(t,e){let r=lr(t),i=lr(e);if(t===e)return{valid:!0,data:t};if(r===j.object&&i===j.object){let n=ge.objectKeys(e),s=ge.objectKeys(t).filter(o=>n.indexOf(o)!==-1),a={...t,...e};for(let o of s){let l=za(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=za(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 Ir=class extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=(s,a)=>{if(Ba(s)||Ba(a))return ae;let o=za(s.value,a.value);return o.valid?((Va(s)||Va(a))&&r.dirty(),{status:r.value,value:o.data}):(H(i,{code:L.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}))}};Ir.create=(t,e,r)=>new Ir({left:t,right:e,typeName:ie.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:L.invalid_type,expected:j.array,received:i.parsedType}),ae;if(i.data.length<this._def.items.length)return H(i,{code:L.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:L.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:ie.ZodTuple,rest:null,...oe(e)})};var Zn=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:L.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:ie.ZodRecord,...oe(i)}):new t({keyType:hr.create(),valueType:e,typeName:ie.ZodRecord,...oe(r)})}},ai=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:L.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}}}};ai.create=(t,e,r)=>new ai({valueType:e,keyType:t,typeName:ie.ZodMap,...oe(r)});var oi=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==j.set)return H(i,{code:L.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:L.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:L.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:ee.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:ee.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};oi.create=(t,e)=>new oi({valueType:t,minSize:null,maxSize:null,typeName:ie.ZodSet,...oe(e)});var Yn=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:L.invalid_type,expected:j.function,received:r.parsedType}),ae;function i(o,l){return qn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Hn(),Yi].filter(h=>!!h),issueData:{code:L.invalid_arguments,argumentsError:l}})}function n(o,l){return qn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Hn(),Yi].filter(h=>!!h),issueData:{code:L.invalid_return_type,returnTypeError:l}})}let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof ur){let o=this;return et(async function(...l){let h=new mt([]),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 mt([i(l,h.error)]);let c=Reflect.apply(a,this,h.data),u=o._def.returns.safeParse(c,s);if(!u.success)throw new mt([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(Wt.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(Wt.create()),returns:r||Wt.create(),typeName:ie.ZodFunction,...oe(i)})}},Mr=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})}};Mr.create=(t,e)=>new Mr({getter:t,typeName:ie.ZodLazy,...oe(e)});var Dr=class extends le{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return H(r,{received:r.data,code:L.invalid_literal,expected:this._def.value}),ae}return{status:"valid",value:e.data}}get value(){return this._def.value}};Dr.create=(t,e)=>new Dr({value:t,typeName:ie.ZodLiteral,...oe(e)});function Kl(t,e){return new Fr({values:t,typeName:ie.ZodEnum,...oe(e)})}var Fr=class t extends le{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return H(r,{expected:ge.joinValues(i),received:r.parsedType,code:L.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:L.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)))}};Fr.create=Kl;var Or=class extends le{_parse(e){let r=ge.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==j.string&&i.parsedType!==j.number){let n=ge.objectValues(r);return H(i,{expected:ge.joinValues(n),received:i.parsedType,code:L.invalid_type}),ae}if(r.indexOf(e.data)===-1){let n=ge.objectValues(r);return H(i,{received:i.data,code:L.invalid_enum_value,options:n}),ae}return et(e.data)}get enum(){return this._def.values}};Or.create=(t,e)=>new Or({values:t,typeName:ie.ZodNativeEnum,...oe(e)});var ur=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:L.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})))}};ur.create=(t,e)=>new ur({type:t,typeName:ie.ZodPromise,...oe(e)});var gt=class extends le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ie.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(!Ji(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=>Ji(a)?Promise.resolve(n.transform(a.value,s)).then(o=>({status:r.value,value:o})):a);ge.assertNever(n)}};gt.create=(t,e,r)=>new gt({schema:t,typeName:ie.ZodEffects,effect:e,...oe(r)});gt.createWithPreprocess=(t,e,r)=>new gt({schema:e,effect:{type:"preprocess",transform:t},typeName:ie.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:ie.ZodOptional,...oe(e)});var Yt=class extends le{_parse(e){return this._getType(e)===j.null?et(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Yt.create=(t,e)=>new Yt({innerType:t,typeName:ie.ZodNullable,...oe(e)});var $r=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}};$r.create=(t,e)=>new $r({innerType:t,typeName:ie.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...oe(e)});var li=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 Un(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new mt(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new mt(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};li.create=(t,e)=>new li({innerType:t,typeName:ie.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...oe(e)});var hi=class extends le{_parse(e){if(this._getType(e)!==j.nan){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:j.nan,received:i.parsedType}),ae}return{status:"valid",value:e.data}}};hi.create=t=>new hi({typeName:ie.ZodNaN,...oe(t)});var Td=Symbol("zod_brand"),Jn=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}},Xi=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(),Xl(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:ie.ZodPipeline})}},ci=class extends le{_parse(e){let r=this._def.innerType._parse(e);return Ji(r)&&(r.value=Object.freeze(r.value)),r}};ci.create=(t,e)=>new ci({innerType:t,typeName:ie.ZodReadonly,...oe(e)});var Ql=(t,e={},r)=>t?cr.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})}}):cr.create(),Id={object:ot.lazycreate},ie;(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"})(ie||(ie={}));var Md=(t,e={message:`Input not instance of ${t.name}`})=>Ql(r=>r instanceof t,e),eh=hr.create,th=Sr.create,Dd=hi.create,Fd=kr.create,rh=Er.create,Od=Pr.create,$d=ni.create,Rd=Ar.create,Ld=Cr.create,Bd=cr.create,Vd=Wt.create,zd=Rt.create,Nd=si.create,jd=Zt.create,Gd=ot.create,Hd=ot.strictCreate,qd=Tr.create,Ud=Wn.create,Wd=Ir.create,Zd=Vt.create,Yd=Zn.create,Jd=ai.create,Xd=oi.create,Kd=Yn.create,Qd=Mr.create,ef=Dr.create,tf=Fr.create,rf=Or.create,nf=ur.create,Yl=gt.create,sf=$t.create,af=Yt.create,of=gt.createWithPreprocess,lf=Xi.create,hf=()=>eh().optional(),cf=()=>th().optional(),uf=()=>rh().optional(),pf={string:t=>hr.create({...t,coerce:!0}),number:t=>Sr.create({...t,coerce:!0}),boolean:t=>Er.create({...t,coerce:!0}),bigint:t=>kr.create({...t,coerce:!0}),date:t=>Pr.create({...t,coerce:!0})},df=ae,be=Object.freeze({__proto__:null,defaultErrorMap:Yi,setErrorMap:gd,getErrorMap:Hn,makeIssue:qn,EMPTY_PATH:yd,addIssueToContext:H,ParseStatus:Je,INVALID:ae,DIRTY:Xl,OK:et,isAborted:Ba,isDirty:Va,isValid:Ji,isAsync:Un,get util(){return ge},get objectUtil(){return La},ZodParsedType:j,getParsedType:lr,ZodType:le,ZodString:hr,ZodNumber:Sr,ZodBigInt:kr,ZodBoolean:Er,ZodDate:Pr,ZodSymbol:ni,ZodUndefined:Ar,ZodNull:Cr,ZodAny:cr,ZodUnknown:Wt,ZodNever:Rt,ZodVoid:si,ZodArray:Zt,ZodObject:ot,ZodUnion:Tr,ZodDiscriminatedUnion:Wn,ZodIntersection:Ir,ZodTuple:Vt,ZodRecord:Zn,ZodMap:ai,ZodSet:oi,ZodFunction:Yn,ZodLazy:Mr,ZodLiteral:Dr,ZodEnum:Fr,ZodNativeEnum:Or,ZodPromise:ur,ZodEffects:gt,ZodTransformer:gt,ZodOptional:$t,ZodNullable:Yt,ZodDefault:$r,ZodCatch:li,ZodNaN:hi,BRAND:Td,ZodBranded:Jn,ZodPipeline:Xi,ZodReadonly:ci,custom:Ql,Schema:le,ZodSchema:le,late:Id,get ZodFirstPartyTypeKind(){return ie},coerce:pf,any:Bd,array:jd,bigint:Fd,boolean:rh,date:Od,discriminatedUnion:Ud,effect:Yl,enum:tf,function:Kd,instanceof:Md,intersection:Wd,lazy:Qd,literal:ef,map:Jd,nan:Dd,nativeEnum:rf,never:zd,null:Ld,nullable:af,number:th,object:Gd,oboolean:uf,onumber:cf,optional:sf,ostring:hf,pipeline:lf,preprocess:of,promise:nf,record:Yd,set:Xd,strictObject:Hd,string:eh,symbol:$d,transformer:Yl,tuple:Zd,undefined:Rd,union:qd,unknown:Vd,void:Nd,NEVER:df,ZodIssueCode:L,quotelessJson:md,ZodError:mt});var Z0=be.object({wsApiUrl:be.string(),url:be.string(),logoSvg:be.string().optional(),logoUrl:be.string().optional(),title:be.string(),status:be.string(),color:be.string(),input:be.object({placeholder:be.string()}),bubble:be.object({imageUrl:be.string().optional(),position:be.object({bottom:be.string().optional(),right:be.string().optional(),left:be.string().optional()})}),header:be.object({background:be.string()}),limitations:be.object({title:be.string(),items:be.array(be.string())}),examples:be.object({title:be.string(),items:be.array(be.string())}),instructions:be.object({items:be.array(be.string())})});function ff(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=ff(r);let n=document.createElement("molin-shop-ai");n.setAttribute("widget",r),n.config=i,document.body.appendChild(n)};var Xn=window,Kn=Xn.ShadowRoot&&(Xn.ShadyCSS===void 0||Xn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Na=Symbol(),ih=new WeakMap,Ki=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==Na)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(Kn&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=ih.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&ih.set(r,e))}return e}toString(){return this.cssText}},nh=t=>new Ki(typeof t=="string"?t:t+"",void 0,Na),ja=(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 Ki(r,t,Na)},Ga=(t,e)=>{Kn?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let i=document.createElement("style"),n=Xn.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)})},Qn=Kn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return nh(r)})(t):t;var Ha,es=window,sh=es.trustedTypes,mf=sh?sh.emptyScript:"",ah=es.reactiveElementPolyfillSupport,Ua={toAttribute(t,e){switch(e){case Boolean:t=t?mf: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}},oh=(t,e)=>e!==t&&(e==e||t==t),qa={attribute:!0,type:String,converter:Ua,reflect:!1,hasChanged:oh},Wa="finalized",Jt=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=qa){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)||qa}static finalize(){if(this.hasOwnProperty(Wa))return!1;this[Wa]=!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(Qn(n))}else e!==void 0&&r.push(Qn(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 Ga(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=qa){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:Ua).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:Ua;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||oh)(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){}};Jt[Wa]=!0,Jt.elementProperties=new Map,Jt.elementStyles=[],Jt.shadowRootOptions={mode:"open"},ah?.({ReactiveElement:Jt}),((Ha=es.reactiveElementVersions)!==null&&Ha!==void 0?Ha:es.reactiveElementVersions=[]).push("1.6.3");var Za,ts=window,ui=ts.trustedTypes,lh=ui?ui.createPolicy("lit-html",{createHTML:t=>t}):void 0,rs="$lit$",Xt=`lit$${(Math.random()+"").slice(9)}$`,Ja="?"+Xt,gf=`<${Ja}>`,Br=document,en=()=>Br.createComment(""),tn=t=>t===null||typeof t!="object"&&typeof t!="function",mh=Array.isArray,gh=t=>mh(t)||typeof t?.[Symbol.iterator]=="function",Ya=`[
2
- \f\r]`,Qi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hh=/-->/g,ch=/>/g,Rr=RegExp(`>|${Ya}(?:([^\\s"'>=/]+)(${Ya}*=${Ya}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),uh=/'/g,ph=/"/g,yh=/^(?:script|style|textarea|title)$/i,vh=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),fe=vh(1),ny=vh(2),yt=Symbol.for("lit-noChange"),Ie=Symbol.for("lit-nothing"),dh=new WeakMap,Lr=Br.createTreeWalker(Br,129,null,!1);function bh(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return lh!==void 0?lh.createHTML(e):e}var _h=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":"",a=Qi;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===Qi?c[1]==="!--"?a=hh:c[1]!==void 0?a=ch:c[2]!==void 0?(yh.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=Rr):c[3]!==void 0&&(a=Rr):a===Rr?c[0]===">"?(a=n??Qi,u=-1):c[1]===void 0?u=-2:(u=a.lastIndex-c[2].length,h=c[1],a=c[3]===void 0?Rr:c[3]==='"'?ph:uh):a===ph||a===uh?a=Rr:a===hh||a===ch?a=Qi:(a=Rr,n=void 0);let p=a===Rr&&t[o+1].startsWith("/>")?" ":"";s+=a===Qi?l+gf:u>=0?(i.push(h),l.slice(0,u)+rs+l.slice(u)+Xt+p):l+Xt+(u===-2?(i.push(void 0),o):p)}return[bh(t,s+(t[r]||"<?>")+(e===2?"</svg>":"")),i]},rn=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]=_h(e,r);if(this.el=t.createElement(h,i),Lr.currentNode=this.el.content,r===2){let u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(n=Lr.nextNode())!==null&&l.length<o;){if(n.nodeType===1){if(n.hasAttributes()){let u=[];for(let f of n.getAttributeNames())if(f.endsWith(rs)||f.startsWith(Xt)){let p=c[a++];if(u.push(f),p!==void 0){let m=n.getAttribute(p.toLowerCase()+rs).split(Xt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:g[2],strings:m,ctor:g[1]==="."?ns:g[1]==="?"?ss:g[1]==="@"?as:zr})}else l.push({type:6,index:s})}for(let f of u)n.removeAttribute(f)}if(yh.test(n.tagName)){let u=n.textContent.split(Xt),f=u.length-1;if(f>0){n.textContent=ui?ui.emptyScript:"";for(let p=0;p<f;p++)n.append(u[p],en()),Lr.nextNode(),l.push({type:2,index:++s});n.append(u[f],en())}}}else if(n.nodeType===8)if(n.data===Ja)l.push({type:2,index:s});else{let u=-1;for(;(u=n.data.indexOf(Xt,u+1))!==-1;)l.push({type:7,index:s}),u+=Xt.length-1}s++}}static createElement(e,r){let i=Br.createElement("template");return i.innerHTML=e,i}};function Vr(t,e,r=t,i){var n,s,a,o;if(e===yt)return e;let l=i!==void 0?(n=r._$Co)===null||n===void 0?void 0:n[i]:r._$Cl,h=tn(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=Vr(t,l._$AS(t,e.values),l,i)),e}var is=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:Br).importNode(i,!0);Lr.currentNode=s;let a=Lr.nextNode(),o=0,l=0,h=n[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new pi(a,a.nextSibling,this,e):h.type===1?c=new h.ctor(a,h.name,h.strings,this,e):h.type===6&&(c=new os(a,this,e)),this._$AV.push(c),h=n[++l]}o!==h?.index&&(a=Lr.nextNode(),o++)}return Lr.currentNode=Br,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++}},pi=class t{constructor(e,r,i,n){var s;this.type=2,this._$AH=Ie,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=Vr(this,e,r),tn(e)?e===Ie||e==null||e===""?(this._$AH!==Ie&&this._$AR(),this._$AH=Ie):e!==this._$AH&&e!==yt&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):gh(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!==Ie&&tn(this._$AH)?this._$AA.nextSibling.data=e:this.$(Br.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=rn.createElement(bh(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 is(s,this),o=a.u(this.options);a.v(i),this.$(o),this._$AH=a}}_$AC(e){let r=dh.get(e.strings);return r===void 0&&dh.set(e.strings,r=new rn(e)),r}T(e){mh(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(en()),this.k(en()),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))}},zr=class{constructor(e,r,i,n,s){this.type=1,this._$AH=Ie,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=Ie}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=Vr(this,e,r,0),a=!tn(e)||e!==this._$AH&&e!==yt,a&&(this._$AH=e);else{let o=e,l,h;for(e=s[0],l=0;l<s.length-1;l++)h=Vr(this,o[i+l],r,l),h===yt&&(h=this._$AH[l]),a||(a=!tn(h)||h!==this._$AH[l]),h===Ie?e=Ie:e!==Ie&&(e+=(h??"")+s[l+1]),this._$AH[l]=h}a&&!n&&this.j(e)}j(e){e===Ie?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},ns=class extends zr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Ie?void 0:e}},yf=ui?ui.emptyScript:"",ss=class extends zr{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Ie?this.element.setAttribute(this.name,yf):this.element.removeAttribute(this.name)}},as=class extends zr{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){var i;if((e=(i=Vr(this,e,r,0))!==null&&i!==void 0?i:Ie)===yt)return;let n=this._$AH,s=e===Ie&&n!==Ie||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==Ie&&(n===Ie||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)}},os=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){Vr(this,e)}},wh={O:rs,P:Xt,A:Ja,C:1,M:_h,L:is,R:gh,D:Vr,I:pi,V:zr,H:ss,N:as,U:ns,F:os},fh=ts.litHtmlPolyfillSupport;fh?.(rn,pi),((Za=ts.litHtmlVersions)!==null&&Za!==void 0?Za:ts.litHtmlVersions=[]).push("2.8.0");var xh=(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 pi(e.insertBefore(en(),o),o,void 0,r??{})}return a._$AI(t),a};var Xa,Ka;var Te=class extends Jt{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=xh(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 yt}};Te.finalized=!0,Te._$litElement$=!0,(Xa=globalThis.litElementHydrateSupport)===null||Xa===void 0||Xa.call(globalThis,{LitElement:Te});var Sh=globalThis.litElementPolyfillSupport;Sh?.({LitElement:Te});((Ka=globalThis.litElementVersions)!==null&&Ka!==void 0?Ka:globalThis.litElementVersions=[]).push("3.3.3");var di={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},fi=t=>(...e)=>({_$litDirective$:t,values:e}),pr=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:vf}=wh;var kh=()=>document.createComment(""),mi=(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(kh(),s),o=n.insertBefore(kh(),s);r=new vf(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},dr=(t,e,r=t)=>(t._$AI(e,r),t),bf={},Eh=(t,e=bf)=>t._$AH=e,Ph=t=>t._$AH,ls=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 Ah=(t,e,r)=>{let i=new Map;for(let n=e;n<=r;n++)i.set(t[n],n);return i},nn=fi(class extends pr{constructor(t){if(super(t),t.type!==di.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=Ph(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]=dr(s[f],a[m]),f++,m++;else if(l[p]===o[g])h[g]=dr(s[p],a[g]),p--,g--;else if(l[f]===o[g])h[g]=dr(s[f],a[g]),mi(t,h[g+1],s[f]),f++,g--;else if(l[p]===o[m])h[m]=dr(s[p],a[m]),mi(t,s[f],s[p]),p--,m++;else if(c===void 0&&(c=Ah(o,m,g),u=Ah(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=mi(t,s[f]);dr(v,a[m]),h[m]=v}else h[m]=dr(y,a[m]),mi(t,s[f],y),s[d]=null;m++}else ls(s[p]),p--;else ls(s[f]),f++;for(;m<=g;){let d=mi(t,h[g+1]);dr(d,a[m]),h[m++]=d}for(;f<=p;){let d=s[f++];d!==null&&ls(d)}return this.ut=o,Eh(t,h),yt}});function lo(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function _f(t,e=","){return t.map(lo).join(e)}var Oh=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function hs(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 ps(t,e="@media "){return e+Pe(t).map(r=>(typeof r=="string"&&(r={min:r}),r.raw||Object.keys(r).map(i=>`(${i}-width:${r[i]})`).join(" and "))).join(",")}function Pe(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function Ch(t){return t}function ds(){}var Be={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function $h(t){return t.match(/[-=:;]/g)?.length||0}function io(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($h(t),15)<<18}var wf=["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 ho({n:t,i:e,v:r=[]},i,n,s){t&&(t=lo({n:t,i:e,v:r})),s=[...Pe(s)];for(let o of r){let l=i.theme("screens",o);for(let h of Pe(l&&ps(l)||i.v(o))){var a;s.push(h),n|=l?67108864|io(h):o=="dark"?1073741824:h[0]=="@"?io(h):(a=h,1<<~(/:([a-z-]+)/.test(a)&&~wf.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:n,r:s,i:e}}var Rh=new Map;function no(t){if(t.d){let e=[],r=Qa(t.r.reduce((i,n)=>n[0]=="@"?(e.push(n),i):n?Qa(i,s=>Qa(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):eo(s,a)}return eo(a,s)})):i,"&"),i=>eo(i,t.n?"."+Oh(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((i,n)=>n+"{"+i+"}",t.d)}}function Qa(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,i,n)=>e(i)+n)}function eo(t,e){return t.replace(/&/g,e)}var Th=new Intl.Collator("en",{numeric:!0});function Lh(t,e){for(var r=0,i=t.length;r<i;){let n=i+r>>1;0>=Bh(t[n],e)?r=n+1:i=n}return i}function Bh(t,e){let r=t.p&Be.o;return r==(e.p&Be.o)&&(r==Be.b||r==Be.o)?0:t.p-e.p||t.o-e.o||Th.compare(Ih(t.n),Ih(e.n))||Th.compare(Mh(t.n),Mh(e.n))}function Ih(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function Mh(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function to(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(${[to(t.substr(1,s),a),to(t.substr(1+s,s),a),to(t.substr(1+2*s,s),a),n]})`}return n=="1"?t:n=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${n})`)}function Vh(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(...uo(o,l,us(""+b),u,l,h,c,!0));continue}if(v[1]=="l"){for(let _ of Pe(b))f.push(...s(_,{n:o,p:(d=Be[v[7]],l&~Be.o|d),r:v[7]=="d"?[]:h,i:c},u));continue}if(v[1]=="i"){f.push(...Pe(b).map(_=>({p:-1,o:0,r:[],d:v+" "+_})));continue}if(v[1]=="k"){f.push({p:Be.d,o:0,r:[v],d:s(b,{p:Be.d},u).map(no).join("")});continue}if(v[1]=="f"){f.push(...Pe(b).map(_=>({p:Be.d,o:0,r:[v],d:s(_,{p:Be.d},u).map(no).join("")})));continue}}if(typeof b!="object"||Array.isArray(b))v=="label"&&b?o=b+hs(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:$h(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?";":"")+Pe(b).map(_=>u.s(v,co(""+_,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,ps(S,"")):x}),_|=io(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(Bh)}(t,ho(e,r,i,n),r)}function co(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):""+Pe(o).filter(l=>Object(l)!==l)})}function zh(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 cs(t,e,r=Be.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=Rh.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}=ho(l,h,c,u),zh(cs(us(p),h,c,u,l.i),l.n)):Array.isArray(p)?p.map(m=>{var g,d;return{o:0,...m,r:[...Pe(u),...Pe(m.r)],p:(g=c,d=m.p??c,g&~Be.o|d)}}):Vh(p,l,h,c,u):[{c:lo(l),p:0,o:0,r:[]}]}(a,e,r,i,n))s.splice(Lh(s,o),0,o);return s}function uo(t,e,r,i,n,s,a,o){return zh((o?r.flatMap(l=>cs([l],i,n,s,a)):cs(r,i,n,s,a)).map(l=>l.p&Be.o&&(l.n||e==Be.b)?{...l,p:l.p&~Be.o|e,o:0}:l),t)}function xf(t,e,r,i){var n;return n=(s,a)=>{let{n:o,p:l,r:h,i:c}=ho(s,a,e);return r&&uo(o,e,r,a,l,h,c,i)},Rh.set(t,n),t}function ro(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(Sf),i:n}))}}function Sf(t,e,r){return r.indexOf(t)==e}var Dh=new Map;function us(t){let e=Dh.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&&ro(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,ro([...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);ro([...r,xf(u.length>1?u.slice(0,-1)+hs(JSON.stringify([u,f])):u+"("+_f(f)+")",Be.a,f,/@$/.test(u))],i)}c=r.lastIndexOf("(",c-1)}r.length=c+1}else/[~@]/.test(h)&&t[o+1]=="("&&i.unshift([])}l(!0),Dh.set(t,e=i[0])}return e}function B(t,e,r){return[t,so(e,r)]}function so(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,i)=>({[t]:e?e(r,i):ao(r,1)}):r=>t||{[r[1]]:ao(r,2)}}function ao(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function V(t,e,r,i){return[t,po(e,r,i)]}function po(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=Nh(t||n[1]),o=s.theme(a,n.$$)??zt(n.$$,a,s);if(o!=null)return n._=ao(n,0,o),i(n,s,a)}}function Ve(t,e={},r){return[t,kf(e,r)]}function kf(t={},e){return(r,i)=>{let{section:n=Nh(r[0]).replace("-","")+"Color"}=t,[s,a]=Ef(r.$$);if(!s)return;let o=i.theme(n,s)||zt(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&&zt(a,h,i),p=e||(({_:g})=>{let d=sn(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 Ef(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function sn(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 zt(t,e,r){if(t[0]=="["&&t.slice(-1)=="]"){if(t=gi(co(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 Nh(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function gi(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",i,n="")=>gi(r)+i+gi(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 fo({presets:t=[],...e}){let r={darkMode:void 0,darkColor:void 0,preflight:e.preflight!==!1&&[],theme:{},variants:Pe(e.variants),rules:Pe(e.rules),ignorelist:Pe(e.ignorelist),hash:void 0,stringify:(i,n)=>i+":"+n,finalize:[]};for(let i of Pe([...t,{darkMode:e.darkMode,darkColor:e.darkColor,preflight:e.preflight!==!1&&Pe(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,...Pe(n)],darkMode:s,darkColor:a,theme:{...r.theme,...o,extend:{...r.theme.extend,...o?.extend}},variants:[...r.variants,...Pe(l)],rules:[...r.rules,...Pe(h)],ignorelist:[...r.ignorelist,...Pe(c)],hash:u,stringify:f,finalize:[...r.finalize,...Pe(p)]}}return r}function Fh(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 Pf(t){var e;return oo(t[0],typeof(e=t[1])=="function"?e:()=>e)}function Af(t){var e,r;return Array.isArray(t)?oo(t[0],so(t[1],t[2])):oo(t,so(e,r))}function oo(t,e){return jh(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 jh(t,e){let r=Pe(t).map(Cf);return(i,n,s)=>{for(let a of r){let o=e(i,a,n,s);if(o)return o}}}function Cf(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function Gh(t,e){let r=fo(t),i=function({theme:l,darkMode:h,darkColor:c=ds,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=jh(g,(w,M)=>M.test(w));u.push(["dark",Array.isArray(h)||h=="class"?`${Pe(h)[1]||".dark"} &`:typeof h=="string"&&h!="media"?h:"@media (prefers-color-scheme:dark)"]);let T=typeof p=="function"?w=>p(w,hs):p?hs:Ch;T!==Ch&&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,Y,G=Y)=>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 R=$[F]??F.split("-").reduce((q,U)=>q?.[U],$)??O;return D?At(R,{opacityValue:co(D,P)}):R}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 R={};for(let q in C){let U=C[q],Y=[...$,q];R[Y.join("-")]=U,q=="DEFAULT"&&(Y=$,R[$.join("-")]=U),typeof U=="object"&&Object.assign(R,D(U,Y))}return R}(O):O}}(l),e:Oh,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,Fh(w,u,v,Pf,S)||"&:"+w),y.get(w)},r(w,M){let k=JSON.stringify([w,M]);return b.has(k)||b.set(k,!x(w,S)&&Fh(w,f,_,Af,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=no(h);if(c&&!a.has(c)){a.add(c);let u=Lh(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 Pe(r.preflight))typeof u=="function"&&(u=u(i)),u&&(typeof u=="string"?uo("",Be.b,us(u),i,Be.b,[],!1,!0):Vh(u,{},i,Be.b)).forEach(o);h=""+h;let c=n.get(h);if(!c){let u=new Set;for(let f of cs(us(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 Tf(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function Hh(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&&Tf(a,s=t(a))&&n.setAttribute("class",s)}}function If(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 fs(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:If(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:ds}}var Mf=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 qh(t){return Mf.get(t)}function Uh(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 Wh(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 Df=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Zh(){return({stringify:t})=>({stringify(e,r,i){let n="",s=qh(e);s&&(n+=t(s,r,i)+";");let a=Uh(e),o=Wh(e,r);for(let l of Df)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 Jh(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",po("lineClamp",({_:t})=>Yh(t))],["line-clamp-(\\d+)",({1:t})=>Yh(t)]]}}function Yh(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var on={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",...vt(4,"rem",4,.5,.5),...vt(12,"rem",4,5),14:"3.5rem",...vt(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:me("blur"),backdropBrightness:me("brightness"),backdropContrast:me("contrast"),backdropGrayscale:me("grayscale"),backdropHueRotate:me("hueRotate"),backdropInvert:me("invert"),backdropOpacity:me("opacity"),backdropSaturate:me("saturate"),backdropSepia:me("sepia"),backgroundColor:me("colors"),backgroundImage:{none:"none"},backgroundOpacity:me("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:{...vt(200,"",100,0,50),...vt(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:me("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:me("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:me("colors"),caretColor:me("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...vt(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:me("borderColor"),divideOpacity:me("borderOpacity"),divideWidth:me("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"),...an(2,6),...an(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:me("spacing"),gradientColorStops:me("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"),...an(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...an(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:{...vt(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:{...vt(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:me("spacing"),placeholderColor:me("colors"),placeholderOpacity:me("opacity"),outlineColor:me("colors"),outlineOffset:Ct(8,"px"),outlineWidth:Ct(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:me("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:vt(200,"",100,0,50),scale:{...vt(150,"",100,0,50),...vt(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:me("spacing"),scrollPadding:me("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Ct(2,"deg"),...Ct(12,"deg",3)},space:me("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:vt(2),textColor:me("colors"),textDecorationColor:me("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Ct(8,"px")},textUnderlineOffset:{auto:"auto",...Ct(8,"px")},textIndent:me("spacing"),textOpacity:me("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:me("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"),...an(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:{...vt(50,"",1,0,10),auto:"auto"}};function an(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 vt(t,e="",r=1,i=0,n=1,s={}){for(;i<=t;i+=n)s[i]=i/r+e;return s}function me(t){return({theme:e})=>e(t)}var Xh={"*,::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, ${on.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, ${on.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 ic=[B("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:zt(`[${e}]`,"",r)}}})),B("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),V("aspect-","aspectRatio"),B("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[ps(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}}}),V("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),B("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),B("box-(border|content)","boxSizing",({1:t})=>t+"-box"),B("hidden",{display:"none"}),B("table-(auto|fixed)","tableLayout"),B(["(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)",B("isolate","isolation"),B("object-(contain|cover|fill|none|scale-down)","objectFit"),V("object-","objectPosition"),B("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",ms),B("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),B("(static|fixed|absolute|relative|sticky)","position"),V("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),V("-?(top|bottom|left|right)(?:$|-)","inset"),B("(visible|collapse)","visibility"),B("invisible",{visibility:"hidden"}),V("-?z-","zIndex"),B("flex-((row|col)(-reverse)?)","flexDirection",Kh),B("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),V("(flex-(?:grow|shrink))(?:$|-)"),V("(flex)-"),V("grow(?:$|-)","flexGrow"),V("shrink(?:$|-)","flexShrink"),V("basis-","flexBasis"),V("-?(order)-"),"-?(order)-(\\d+)",V("grid-cols-","gridTemplateColumns"),B("grid-cols-(\\d+)","gridTemplateColumns",rc),V("col-","gridColumn"),B("col-(span)-(\\d+)","gridColumn",tc),V("col-start-","gridColumnStart"),B("col-start-(auto|\\d+)","gridColumnStart"),V("col-end-","gridColumnEnd"),B("col-end-(auto|\\d+)","gridColumnEnd"),V("grid-rows-","gridTemplateRows"),B("grid-rows-(\\d+)","gridTemplateRows",rc),V("row-","gridRow"),B("row-(span)-(\\d+)","gridRow",tc),V("row-start-","gridRowStart"),B("row-start-(auto|\\d+)","gridRowStart"),V("row-end-","gridRowEnd"),B("row-end-(auto|\\d+)","gridRowEnd"),B("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>ms(Kh(t))),B("grid-flow-(dense)","gridAutoFlow"),V("auto-cols-","gridAutoColumns"),V("auto-rows-","gridAutoRows"),V("gap-x(?:$|-)","gap","columnGap"),V("gap-y(?:$|-)","gap","rowGap"),V("gap(?:$|-)","gap"),"(justify-(?:items|self))-",B("justify-","justifyContent",Qh),B("(content|items|self)-",t=>({["align-"+t[1]]:Qh(t)})),B("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),V("p([xytrbl])?(?:$|-)","padding",yi("padding")),V("-?m([xytrbl])?(?:$|-)","margin",yi("margin")),V("-?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))`}})),B("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),V("w-","width"),V("min-w-","minWidth"),V("max-w-","maxWidth"),V("h-","height"),V("min-h-","minHeight"),V("max-h-","maxHeight"),V("font-","fontWeight"),V("font-","fontFamily",({_:t})=>typeof(t=Pe(t))[1]=="string"?{fontFamily:Lt(t)}:{fontFamily:Lt(t[0]),...t[1]}),B("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),B("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),B("italic","fontStyle"),B("not-italic",{fontStyle:"normal"}),B("(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)",...fr({"--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,/*!*/ /*!*/)"})}),V("tracking-","letterSpacing"),V("leading-","lineHeight"),B("list-(inside|outside)","listStylePosition"),V("list-","listStyleType"),B("list-","listStyleType"),V("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),Ve("placeholder-",{property:"color",selector:"&::placeholder"}),B("text-(left|center|right|justify|start|end)","textAlign"),B("text-(ellipsis|clip)","textOverflow"),V("text-opacity-","textOpacity","--tw-text-opacity"),Ve("text-",{property:"color"}),V("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),V("indent-","textIndent"),B("(overline|underline|line-through)","textDecorationLine"),B("no-underline",{textDecorationLine:"none"}),V("underline-offset-","textUnderlineOffset"),Ve("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),V("decoration-","textDecorationThickness"),B("decoration-","textDecorationStyle"),B("(uppercase|lowercase|capitalize)","textTransform"),B("normal-case",{textTransform:"none"}),B("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),B("align-","verticalAlign"),B("whitespace-","whiteSpace"),B("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),B("break-words",{overflowWrap:"break-word"}),B("break-all",{wordBreak:"break-all"}),B("break-keep",{wordBreak:"keep-all"}),Ve("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Ve("accent-",{opacityVariable:!1,opacitySection:"opacity"}),B("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${Nr(t," ")},var(--tw-gradient-stops))`),Ve("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)"})),Ve("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)`})),Ve("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),B("bg-(fixed|local|scroll)","backgroundAttachment"),B("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),B(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),B("bg-blend-","backgroundBlendMode"),B("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),V("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Ve("bg-",{section:"backgroundColor"}),V("bg-","backgroundImage"),V("bg-","backgroundPosition"),B("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",ms),V("bg-","backgroundSize"),V("rounded(?:$|-)","borderRadius"),V("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-${Nr(r[0])}-radius`]:e,[`border-${Nr(r[1])}-radius`]:e}}),B("border-(collapse|separate)","borderCollapse"),V("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),B("border-(solid|dashed|dotted|double|none)","borderStyle"),V("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...fr({"--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)"})),Ve("border-([xytrbl])-",{section:"borderColor"},yi("border","Color")),Ve("border-"),V("border-([xytrbl])(?:$|-)","borderWidth",yi("border","Width")),V("border(?:$|-)","borderWidth"),V("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),B("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),B("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),V("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${Nr(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${Nr(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),Ve("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),V("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Ve("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),V("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),B("ring-inset",{"--tw-ring-inset":"inset"}),Ve("ring-",{property:"--tw-ring-color"}),V("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...fr({"--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)"})),Ve("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),V("shadow(?:$|-)","boxShadow",({_:t})=>({...fr({"--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)"})),V("(opacity)-"),B("mix-blend-","mixBlendMode"),...ec(),...ec("backdrop-"),V("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:Lt(t),transitionTimingFunction:t._=="none"?void 0:Lt(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:Lt(e("transitionDuration",""))})),V("duration(?:$|-)","transitionDuration","transitionDuration",Lt),V("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Lt),V("delay(?:$|-)","transitionDelay","transitionDelay",Lt),V("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)",B("transform",go),B("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":nc(t=="gpu")})),V("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...go()})),V("-?(rotate)-","rotate",mo),V("-?(translate-[xy])-","translate",mo),V("-?(skew-[xy])-","skew",mo),B("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",ms),"(appearance)-",V("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",V("(cursor)-"),"(cursor)-",B("snap-(none)","scroll-snap-type"),B("snap-(x|y|both)",({1:t})=>({...fr({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),B("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),B("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),B("snap-(normal|always)","scroll-snap-stop"),B("scroll-(auto|smooth)","scroll-behavior"),V("scroll-p([xytrbl])?(?:$|-)","padding",yi("scroll-padding")),V("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",yi("scroll-margin")),B("touch-(auto|none|manipulation)","touch-action"),B("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...fr({"--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)"})),B("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),B("outline",{outlineStyle:"solid"}),B("outline-(dashed|dotted|double)","outlineStyle"),V("-?(outline-offset)-"),Ve("outline-",{opacityVariable:!1,opacitySection:"opacity"}),V("outline-","outlineWidth"),"(pointer-events)-",V("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],B("select-(none|text|all|auto)","userSelect"),Ve("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Ve("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),V("stroke-","strokeWidth"),B("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),B("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function ms(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function Kh(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function Nr(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 Qh({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function yi(t,e=""){return({1:r,_:i})=>{let n={x:"lr",y:"tb"}[r]||r+r;return n?{...sn(t+"-"+Nr(n[0])+e,i),...sn(t+"-"+Nr(n[1])+e,i)}:sn(t+e,i)}}function ec(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={...fr(r),[`${t}filter`]:e.map(i=>`var(--tw-${t}${i})`).join(" ")},[`(${t}filter)-(none)`,B(`${t}filter`,r),...e.map(i=>V(`${i[0]=="h"?"-?":""}(${t}${i})(?:$|-)`,i,({1:n,_:s})=>({[`--tw-${n}`]:Pe(s).map(a=>`${i}(${a})`).join(" "),...r})))]}function mo({1:t,_:e}){return{["--tw-"+t]:e,...go()}}function go(){return{...fr({"--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":nc()}),transform:"var(--tw-transform)"}}function nc(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 tc({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function rc({1:t}){return`repeat(${t},minmax(0,1fr))`}function fr(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var sc=[["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)||zt(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=gi(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)||zt(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)||zt(t,"",e)),typeof t=="string")return`@media not all and (min-width:${t})`}],["min-",({$$:t},e)=>(t&&(t=zt(t,"",e)),t&&`@media (min-width:${t})`)],[/^\[(.+)]$/,({1:t})=>/[&@]/.test(t)&&gi(t).replace(/[}]+$/,"").split("{")]];function ac({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:Xh,theme:{...on,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:sc,rules:ic,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 Ff={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Of={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},$f={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Rf={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Lf={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Bf={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},Vf={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},zf={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},Nf={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},jf={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},Gf={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},Hf={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},qf={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},Uf={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Wf={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Zf={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},Yf={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},Jf={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},Xf={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},Kf={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},Qf={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},em={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},oc={__proto__:null,slate:Ff,gray:Of,zinc:$f,neutral:Rf,stone:Lf,red:Bf,orange:Vf,amber:zf,yellow:Nf,lime:jf,green:Gf,emerald:Hf,teal:qf,cyan:Uf,sky:Wf,blue:Zf,indigo:Yf,violet:Jf,purple:Xf,fuchsia:Kf,pink:Qf,rose:em};function lc({disablePreflight:t}={}){return ac({colors:oc,disablePreflight:t})}function uc({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)=>pc(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=cc(a.theme("fontSize",s));return o&&{"@layer components":o}}],[t+"-",({$$:s},a)=>n(s,a)],[t,(s,a)=>({...n(e,a),"@layer base":[hc(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:X(20,16),marginBottom:X(20,16),paddingLeft:X(26,16)},li:{marginTop:X(8,16),marginBottom:X(8,16)},"ol>li,ul>li":{paddingLeft:X(6,16)},">ul>li p":{marginTop:X(12,16),marginBottom:X(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:X(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:X(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:X(12,16),marginBottom:X(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:X(48,16),marginBottom:X(48,16)},blockquote:{marginTop:X(32,20),marginBottom:X(32,20),paddingLeft:X(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:X(20,16),marginBottom:X(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:X(36,16),marginTop:"0",marginBottom:X(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:X(24,16),marginTop:X(48,24),marginBottom:X(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:X(20,16),marginTop:X(32,20),marginBottom:X(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:X(24,16),marginBottom:X(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:X(32,16),marginBottom:X(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:X(14,16),lineHeight:"1.4",marginTop:X(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:X(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:X(21,24)},"h3 code":{fontSize:X(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:X(14,16),lineHeight:"1.7",marginTop:X(24,14),marginBottom:X(24,14),borderRadius:"0.375rem",paddingTop:X(12,14),paddingRight:X(16,14),paddingBottom:X(12,14),paddingLeft:X(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:X(32,16),marginBottom:X(32,16),fontSize:X(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:X(8,14),paddingBottom:X(8,14),paddingLeft:X(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:X(8,14),paddingRight:X(8,14),paddingBottom:X(8,14),paddingLeft:X(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:X(20,16),lineHeight:"1.6",marginTop:X(24,20),marginBottom:X(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),hc(t,a,r)],"@layer components":{...cc(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 hc(t,e,r){let i={};for(let n in r)i[pc(t,n,e,s=>`.${e.e(e.h(t))}${s}`)]=r[n];return i}function pc(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 cc(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function X(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var yo=fo({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:[lc(),Zh(),Jh(),uc()],hash:!1});function dc(t,e=!0){let r=function(){if(tm)try{let l=fs(new CSSStyleSheet);return l.connect=h=>{let c=vo(h);c.adoptedStyleSheets=[...c.adoptedStyleSheets,l.target]},l.disconnect=ds,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let a=[fs(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");vo(l).appendChild(h);let c=fs(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=Gh({...t,hash:t.hash??e},r),n=Hh(i);return function(a){return class extends a{connectedCallback(){super.connectedCallback?.(),r.connect(this),n.observe(vo(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=i}}}}var tm=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function vo(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var ze=t=>dc(yo)(t);var ys,fc,vs,mc,gs=class extends ze(Te){constructor(){super();se(this,ys);se(this,vs);Se(this,"render",()=>fe`
4
- <div class="${z(this,ys,fc)?"block":"hidden"} flex h-full w-full flex-col items-stretch justify-center space-y-8 px-4">
1
+ var Ad=Object.defineProperty;var Cd=(t,e,r)=>e in t?Ad(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ye=(t,e,r)=>(Cd(t,typeof e!="symbol"?e+"":e,r),r),Ha=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var N=(t,e,r)=>(Ha(t,e,"read from private field"),r?r.call(t):e.get(t)),ee=(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)},ke=(t,e,r,i)=>(Ha(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r);var ih=(t,e,r,i)=>({set _(n){ke(t,e,n,r)},get _(){return N(t,e,i)}}),ce=(t,e,r)=>(Ha(t,e,"access private method"),r);var ve;(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})(ve||(ve={}));var Ua;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Ua||(Ua={}));var j=ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),hr=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}},L=ve.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"]),Td=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,ve.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 Ji=(t,e)=>{let r;switch(t.code){case L.invalid_type:t.received===j.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case L.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,ve.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:r=`Unrecognized key(s) in object: ${ve.joinValues(t.keys,", ")}`;break;case L.invalid_union:r="Invalid input";break;case L.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ve.joinValues(t.options)}`;break;case L.invalid_enum_value:r=`Invalid enum value. Expected ${ve.joinValues(t.options)}, received '${t.received}'`;break;case L.invalid_arguments:r="Invalid function arguments";break;case L.invalid_return_type:r="Invalid function return type";break;case L.invalid_date:r="Invalid date";break;case L.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}"`:ve.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case L.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 L.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 L.custom:r="Invalid input";break;case L.invalid_intersection_types:r="Intersection results could not be merged";break;case L.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case L.not_finite:r="Number must be finite";break;default:r=e.defaultError,ve.assertNever(t)}return{message:r}},ah=Ji;function Id(t){ah=t}function Un(){return ah}var Wn=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}},Md=[];function H(t,e){let r=Wn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Un(),Ji].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"}),oh=t=>({status:"dirty",value:t}),et=t=>({status:"valid",value:t}),Wa=t=>t.status==="aborted",Za=t=>t.status==="dirty",Xi=t=>t.status==="valid",Zn=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}},nh=(t,e)=>{if(Xi(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 hr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:hr(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:hr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Zn(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:hr(e)},s=this._parseSync({data:e,path:n.path,parent:n});return nh(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:hr(e)},n=this._parse({data:e,path:i.path,parent:i}),s=await(Zn(n)?n:Promise.resolve(n));return nh(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:L.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 pr.create(this,this._def)}or(e){return Ir.create([this,e],this._def)}and(e){return Mr.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 Rr({...oe(this._def),innerType:this,defaultValue:r,typeName:ne.ZodDefault})}brand(){return new Kn({typeName:ne.ZodBranded,type:this,...oe(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new hi({...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 Ki.create(this,e)}readonly(){return ui.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Dd=/^c[^\s-]{8,}$/i,Fd=/^[a-z][a-z0-9]*$/,Od=/^[0-9A-HJKMNP-TV-Z]{26}$/,$d=/^[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,Rd=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ld="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",qa,Bd=/^(((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}))$/,Vd=/^(([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})))$/,Nd=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 zd(t,e){return!!((e==="v4"||!e)&&Bd.test(t)||(e==="v6"||!e)&&Vd.test(t))}var cr=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:L.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:L.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:L.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:L.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&H(n,{code:L.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),i.dirty())}else if(s.kind==="email")Rd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"email",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="emoji")qa||(qa=new RegExp(Ld,"u")),qa.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"emoji",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")$d.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"uuid",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")Dd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid2")Fd.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"cuid2",code:L.invalid_string,message:s.message}),i.dirty());else if(s.kind==="ulid")Od.test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ulid",code:L.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:L.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:L.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:L.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:L.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:L.invalid_string,validation:{endsWith:s.value},message:s.message}),i.dirty()):s.kind==="datetime"?Nd(s).test(e.data)||(n=this._getOrReturnCtx(e,n),H(n,{code:L.invalid_string,validation:"datetime",message:s.message}),i.dirty()):s.kind==="ip"?zd(e.data,s.version)||(n=this._getOrReturnCtx(e,n),H(n,{validation:"ip",code:L.invalid_string,message:s.message}),i.dirty()):ve.assertNever(s);return{status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(n=>e.test(n),{validation:r,code:L.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}};cr.create=t=>{var e;return new cr({checks:[],typeName:ne.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};function jd(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 kr=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:L.invalid_type,expected:j.number,received:s.parsedType}),ae}let i,n=new Je;for(let s of this._def.checks)s.kind==="int"?ve.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),H(i,{code:L.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:L.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:L.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?jd(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),H(i,{code:L.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:L.not_finite,message:s.message}),n.dirty()):ve.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"&&ve.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)}};kr.create=t=>new kr({checks:[],typeName:ne.ZodNumber,coerce:t?.coerce||!1,...oe(t)});var Er=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:L.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:L.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:L.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:L.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):ve.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}};Er.create=t=>{var e;return new Er({checks:[],typeName:ne.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...oe(t)})};var Pr=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:L.invalid_type,expected:j.boolean,received:i.parsedType}),ae}return et(e.data)}};Pr.create=t=>new Pr({typeName:ne.ZodBoolean,coerce:t?.coerce||!1,...oe(t)});var Ar=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:L.invalid_type,expected:j.date,received:s.parsedType}),ae}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return H(s,{code:L.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:L.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:L.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),i.dirty()):ve.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}};Ar.create=t=>new Ar({checks:[],coerce:t?.coerce||!1,typeName:ne.ZodDate,...oe(t)});var si=class extends le{_parse(e){if(this._getType(e)!==j.symbol){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:j.symbol,received:i.parsedType}),ae}return et(e.data)}};si.create=t=>new si({typeName:ne.ZodSymbol,...oe(t)});var Cr=class extends le{_parse(e){if(this._getType(e)!==j.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:j.undefined,received:i.parsedType}),ae}return et(e.data)}};Cr.create=t=>new Cr({typeName:ne.ZodUndefined,...oe(t)});var Tr=class extends le{_parse(e){if(this._getType(e)!==j.null){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:j.null,received:i.parsedType}),ae}return et(e.data)}};Tr.create=t=>new Tr({typeName:ne.ZodNull,...oe(t)});var ur=class extends le{constructor(){super(...arguments),this._any=!0}_parse(e){return et(e.data)}};ur.create=t=>new ur({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:L.invalid_type,expected:j.never,received:r.parsedType}),ae}};Rt.create=t=>new Rt({typeName:ne.ZodNever,...oe(t)});var ai=class extends le{_parse(e){if(this._getType(e)!==j.undefined){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:j.void,received:i.parsedType}),ae}return et(e.data)}};ai.create=t=>new ai({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:L.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?L.too_big:L.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:L.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:L.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 ni(t){if(t instanceof ot){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=$t.create(ni(i))}return new ot({...t._def,shape:()=>e})}else return t instanceof Yt?new Yt({...t._def,type:ni(t.element)}):t instanceof $t?$t.create(ni(t.unwrap())):t instanceof Jt?Jt.create(ni(t.unwrap())):t instanceof Vt?Vt.create(t.items.map(e=>ni(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=ve.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:L.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:L.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 ve.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 ve.objectKeys(this.shape).forEach(i=>{e[i]||(r[i]=this.shape[i])}),new t({...this._def,shape:()=>r})}deepPartial(){return ni(this)}partial(e){let r={};return ve.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 ve.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 lh(ve.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 Ir=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:L.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:L.invalid_union,unionErrors:o}),ae}}get options(){return this._def.options}};Ir.create=(t,e)=>new Ir({options:t,typeName:ne.ZodUnion,...oe(e)});var qn=t=>t instanceof Dr?qn(t.schema):t instanceof yt?qn(t.innerType()):t instanceof Fr?[t.value]:t instanceof Or?t.options:t instanceof $r?Object.keys(t.enum):t instanceof Rr?qn(t._def.innerType):t instanceof Cr?[void 0]:t instanceof Tr?[null]:null,Yn=class t extends le{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==j.object)return H(r,{code:L.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:L.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=qn(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 Ya(t,e){let r=hr(t),i=hr(e);if(t===e)return{valid:!0,data:t};if(r===j.object&&i===j.object){let n=ve.objectKeys(e),s=ve.objectKeys(t).filter(o=>n.indexOf(o)!==-1),a={...t,...e};for(let o of s){let l=Ya(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=Ya(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 Mr=class extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=(s,a)=>{if(Wa(s)||Wa(a))return ae;let o=Ya(s.value,a.value);return o.valid?((Za(s)||Za(a))&&r.dirty(),{status:r.value,value:o.data}):(H(i,{code:L.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}))}};Mr.create=(t,e,r)=>new Mr({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:L.invalid_type,expected:j.array,received:i.parsedType}),ae;if(i.data.length<this._def.items.length)return H(i,{code:L.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:L.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 Jn=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:L.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:cr.create(),valueType:e,typeName:ne.ZodRecord,...oe(r)})}},oi=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:L.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}}}};oi.create=(t,e,r)=>new oi({valueType:e,keyType:t,typeName:ne.ZodMap,...oe(r)});var li=class t extends le{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==j.set)return H(i,{code:L.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:L.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:L.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)}};li.create=(t,e)=>new li({valueType:t,minSize:null,maxSize:null,typeName:ne.ZodSet,...oe(e)});var Xn=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:L.invalid_type,expected:j.function,received:r.parsedType}),ae;function i(o,l){return Wn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Un(),Ji].filter(h=>!!h),issueData:{code:L.invalid_arguments,argumentsError:l}})}function n(o,l){return Wn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Un(),Ji].filter(h=>!!h),issueData:{code:L.invalid_return_type,returnTypeError:l}})}let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof pr){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)})}},Dr=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})}};Dr.create=(t,e)=>new Dr({getter:t,typeName:ne.ZodLazy,...oe(e)});var Fr=class extends le{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return H(r,{received:r.data,code:L.invalid_literal,expected:this._def.value}),ae}return{status:"valid",value:e.data}}get value(){return this._def.value}};Fr.create=(t,e)=>new Fr({value:t,typeName:ne.ZodLiteral,...oe(e)});function lh(t,e){return new Or({values:t,typeName:ne.ZodEnum,...oe(e)})}var Or=class t extends le{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return H(r,{expected:ve.joinValues(i),received:r.parsedType,code:L.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:L.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)))}};Or.create=lh;var $r=class extends le{_parse(e){let r=ve.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==j.string&&i.parsedType!==j.number){let n=ve.objectValues(r);return H(i,{expected:ve.joinValues(n),received:i.parsedType,code:L.invalid_type}),ae}if(r.indexOf(e.data)===-1){let n=ve.objectValues(r);return H(i,{received:i.data,code:L.invalid_enum_value,options:n}),ae}return et(e.data)}get enum(){return this._def.values}};$r.create=(t,e)=>new $r({values:t,typeName:ne.ZodNativeEnum,...oe(e)});var pr=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:L.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})))}};pr.create=(t,e)=>new pr({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(!Xi(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=>Xi(a)?Promise.resolve(n.transform(a.value,s)).then(o=>({status:r.value,value:o})):a);ve.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 Rr=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}};Rr.create=(t,e)=>new Rr({innerType:t,typeName:ne.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...oe(e)});var hi=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 Zn(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}};hi.create=(t,e)=>new hi({innerType:t,typeName:ne.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...oe(e)});var ci=class extends le{_parse(e){if(this._getType(e)!==j.nan){let i=this._getOrReturnCtx(e);return H(i,{code:L.invalid_type,expected:j.nan,received:i.parsedType}),ae}return{status:"valid",value:e.data}}};ci.create=t=>new ci({typeName:ne.ZodNaN,...oe(t)});var Gd=Symbol("zod_brand"),Kn=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}},Ki=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(),oh(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})}},ui=class extends le{_parse(e){let r=this._def.innerType._parse(e);return Xi(r)&&(r.value=Object.freeze(r.value)),r}};ui.create=(t,e)=>new ui({innerType:t,typeName:ne.ZodReadonly,...oe(e)});var hh=(t,e={},r)=>t?ur.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})}}):ur.create(),Hd={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 qd=(t,e={message:`Input not instance of ${t.name}`})=>hh(r=>r instanceof t,e),ch=cr.create,uh=kr.create,Ud=ci.create,Wd=Er.create,ph=Pr.create,Zd=Ar.create,Yd=si.create,Jd=Cr.create,Xd=Tr.create,Kd=ur.create,Qd=Zt.create,ef=Rt.create,tf=ai.create,rf=Yt.create,nf=ot.create,sf=ot.strictCreate,af=Ir.create,of=Yn.create,lf=Mr.create,hf=Vt.create,cf=Jn.create,uf=oi.create,pf=li.create,df=Xn.create,ff=Dr.create,mf=Fr.create,gf=Or.create,yf=$r.create,vf=pr.create,sh=yt.create,bf=$t.create,_f=Jt.create,wf=yt.createWithPreprocess,xf=Ki.create,Sf=()=>ch().optional(),kf=()=>uh().optional(),Ef=()=>ph().optional(),Pf={string:t=>cr.create({...t,coerce:!0}),number:t=>kr.create({...t,coerce:!0}),boolean:t=>Pr.create({...t,coerce:!0}),bigint:t=>Er.create({...t,coerce:!0}),date:t=>Ar.create({...t,coerce:!0})},Af=ae,me=Object.freeze({__proto__:null,defaultErrorMap:Ji,setErrorMap:Id,getErrorMap:Un,makeIssue:Wn,EMPTY_PATH:Md,addIssueToContext:H,ParseStatus:Je,INVALID:ae,DIRTY:oh,OK:et,isAborted:Wa,isDirty:Za,isValid:Xi,isAsync:Zn,get util(){return ve},get objectUtil(){return Ua},ZodParsedType:j,getParsedType:hr,ZodType:le,ZodString:cr,ZodNumber:kr,ZodBigInt:Er,ZodBoolean:Pr,ZodDate:Ar,ZodSymbol:si,ZodUndefined:Cr,ZodNull:Tr,ZodAny:ur,ZodUnknown:Zt,ZodNever:Rt,ZodVoid:ai,ZodArray:Yt,ZodObject:ot,ZodUnion:Ir,ZodDiscriminatedUnion:Yn,ZodIntersection:Mr,ZodTuple:Vt,ZodRecord:Jn,ZodMap:oi,ZodSet:li,ZodFunction:Xn,ZodLazy:Dr,ZodLiteral:Fr,ZodEnum:Or,ZodNativeEnum:$r,ZodPromise:pr,ZodEffects:yt,ZodTransformer:yt,ZodOptional:$t,ZodNullable:Jt,ZodDefault:Rr,ZodCatch:hi,ZodNaN:ci,BRAND:Gd,ZodBranded:Kn,ZodPipeline:Ki,ZodReadonly:ui,custom:hh,Schema:le,ZodSchema:le,late:Hd,get ZodFirstPartyTypeKind(){return ne},coerce:Pf,any:Kd,array:rf,bigint:Wd,boolean:ph,date:Zd,discriminatedUnion:of,effect:sh,enum:gf,function:df,instanceof:qd,intersection:lf,lazy:ff,literal:mf,map:uf,nan:Ud,nativeEnum:yf,never:ef,null:Xd,nullable:_f,number:uh,object:nf,oboolean:Ef,onumber:kf,optional:bf,ostring:Sf,pipeline:xf,preprocess:wf,promise:vf,record:cf,set:pf,strictObject:sf,string:ch,symbol:Yd,transformer:sh,tuple:hf,undefined:Jd,union:af,unknown:Qd,void:tf,NEVER:Af,ZodIssueCode:L,quotelessJson:Td,ZodError:gt});var ly=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(),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 Cf(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=Cf(r);let n=document.createElement("molin-shop-ai");n.setAttribute("widget",r),n.config=i,document.body.appendChild(n)};var Qn=window,es=Qn.ShadowRoot&&(Qn.ShadyCSS===void 0||Qn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ja=Symbol(),dh=new WeakMap,Qi=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==Ja)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(es&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=dh.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&dh.set(r,e))}return e}toString(){return this.cssText}},fh=t=>new Qi(typeof t=="string"?t:t+"",void 0,Ja),Xa=(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 Qi(r,t,Ja)},Ka=(t,e)=>{es?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let i=document.createElement("style"),n=Qn.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)})},ts=es?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return fh(r)})(t):t;var Qa,rs=window,mh=rs.trustedTypes,Tf=mh?mh.emptyScript:"",gh=rs.reactiveElementPolyfillSupport,to={toAttribute(t,e){switch(e){case Boolean:t=t?Tf: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}},yh=(t,e)=>e!==t&&(e==e||t==t),eo={attribute:!0,type:String,converter:to,reflect:!1,hasChanged:yh},ro="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=eo){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)||eo}static finalize(){if(this.hasOwnProperty(ro))return!1;this[ro]=!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(ts(n))}else e!==void 0&&r.push(ts(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 Ka(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=eo){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:to).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:to;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||yh)(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[ro]=!0,Xt.elementProperties=new Map,Xt.elementStyles=[],Xt.shadowRootOptions={mode:"open"},gh?.({ReactiveElement:Xt}),((Qa=rs.reactiveElementVersions)!==null&&Qa!==void 0?Qa:rs.reactiveElementVersions=[]).push("1.6.3");var io,is=window,pi=is.trustedTypes,vh=pi?pi.createPolicy("lit-html",{createHTML:t=>t}):void 0,ns="$lit$",Kt=`lit$${(Math.random()+"").slice(9)}$`,so="?"+Kt,If=`<${so}>`,Vr=document,tn=()=>Vr.createComment(""),rn=t=>t===null||typeof t!="object"&&typeof t!="function",Eh=Array.isArray,Ph=t=>Eh(t)||typeof t?.[Symbol.iterator]=="function",no=`[
2
+ \f\r]`,en=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bh=/-->/g,_h=/>/g,Lr=RegExp(`>|${no}(?:([^\\s"'>=/]+)(${no}*=${no}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),wh=/'/g,xh=/"/g,Ah=/^(?:script|style|textarea|title)$/i,Ch=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),pe=Ch(1),vy=Ch(2),vt=Symbol.for("lit-noChange"),Me=Symbol.for("lit-nothing"),Sh=new WeakMap,Br=Vr.createTreeWalker(Vr,129,null,!1);function Th(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return vh!==void 0?vh.createHTML(e):e}var Ih=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":"",a=en;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===en?c[1]==="!--"?a=bh:c[1]!==void 0?a=_h:c[2]!==void 0?(Ah.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=Lr):c[3]!==void 0&&(a=Lr):a===Lr?c[0]===">"?(a=n??en,u=-1):c[1]===void 0?u=-2:(u=a.lastIndex-c[2].length,h=c[1],a=c[3]===void 0?Lr:c[3]==='"'?xh:wh):a===xh||a===wh?a=Lr:a===bh||a===_h?a=en:(a=Lr,n=void 0);let p=a===Lr&&t[o+1].startsWith("/>")?" ":"";s+=a===en?l+If:u>=0?(i.push(h),l.slice(0,u)+ns+l.slice(u)+Kt+p):l+Kt+(u===-2?(i.push(void 0),o):p)}return[Th(t,s+(t[r]||"<?>")+(e===2?"</svg>":"")),i]},nn=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]=Ih(e,r);if(this.el=t.createElement(h,i),Br.currentNode=this.el.content,r===2){let u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(n=Br.nextNode())!==null&&l.length<o;){if(n.nodeType===1){if(n.hasAttributes()){let u=[];for(let f of n.getAttributeNames())if(f.endsWith(ns)||f.startsWith(Kt)){let p=c[a++];if(u.push(f),p!==void 0){let m=n.getAttribute(p.toLowerCase()+ns).split(Kt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:g[2],strings:m,ctor:g[1]==="."?as:g[1]==="?"?os:g[1]==="@"?ls:zr})}else l.push({type:6,index:s})}for(let f of u)n.removeAttribute(f)}if(Ah.test(n.tagName)){let u=n.textContent.split(Kt),f=u.length-1;if(f>0){n.textContent=pi?pi.emptyScript:"";for(let p=0;p<f;p++)n.append(u[p],tn()),Br.nextNode(),l.push({type:2,index:++s});n.append(u[f],tn())}}}else if(n.nodeType===8)if(n.data===so)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=Vr.createElement("template");return i.innerHTML=e,i}};function Nr(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=rn(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=Nr(t,l._$AS(t,e.values),l,i)),e}var ss=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:Vr).importNode(i,!0);Br.currentNode=s;let a=Br.nextNode(),o=0,l=0,h=n[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new di(a,a.nextSibling,this,e):h.type===1?c=new h.ctor(a,h.name,h.strings,this,e):h.type===6&&(c=new hs(a,this,e)),this._$AV.push(c),h=n[++l]}o!==h?.index&&(a=Br.nextNode(),o++)}return Br.currentNode=Vr,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++}},di=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=Nr(this,e,r),rn(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):Ph(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&&rn(this._$AH)?this._$AA.nextSibling.data=e:this.$(Vr.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=nn.createElement(Th(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 ss(s,this),o=a.u(this.options);a.v(i),this.$(o),this._$AH=a}}_$AC(e){let r=Sh.get(e.strings);return r===void 0&&Sh.set(e.strings,r=new nn(e)),r}T(e){Eh(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(tn()),this.k(tn()),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))}},zr=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=Nr(this,e,r,0),a=!rn(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=Nr(this,o[i+l],r,l),h===vt&&(h=this._$AH[l]),a||(a=!rn(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??"")}},as=class extends zr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Me?void 0:e}},Mf=pi?pi.emptyScript:"",os=class extends zr{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Me?this.element.setAttribute(this.name,Mf):this.element.removeAttribute(this.name)}},ls=class extends zr{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){var i;if((e=(i=Nr(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)}},hs=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){Nr(this,e)}},Mh={O:ns,P:Kt,A:so,C:1,M:Ih,L:ss,R:Ph,D:Nr,I:di,V:zr,H:os,N:ls,U:as,F:hs},kh=is.litHtmlPolyfillSupport;kh?.(nn,di),((io=is.litHtmlVersions)!==null&&io!==void 0?io:is.litHtmlVersions=[]).push("2.8.0");var Dh=(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 di(e.insertBefore(tn(),o),o,void 0,r??{})}return a._$AI(t),a};var ao,oo;var Ae=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=Dh(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}};Ae.finalized=!0,Ae._$litElement$=!0,(ao=globalThis.litElementHydrateSupport)===null||ao===void 0||ao.call(globalThis,{LitElement:Ae});var Fh=globalThis.litElementPolyfillSupport;Fh?.({LitElement:Ae});((oo=globalThis.litElementVersions)!==null&&oo!==void 0?oo:globalThis.litElementVersions=[]).push("3.3.3");var fi={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},mi=t=>(...e)=>({_$litDirective$:t,values:e}),dr=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:Df}=Mh;var Oh=()=>document.createComment(""),gi=(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(Oh(),s),o=n.insertBefore(Oh(),s);r=new Df(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},fr=(t,e,r=t)=>(t._$AI(e,r),t),Ff={},$h=(t,e=Ff)=>t._$AH=e,Rh=t=>t._$AH,cs=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 Lh=(t,e,r)=>{let i=new Map;for(let n=e;n<=r;n++)i.set(t[n],n);return i},sn=mi(class extends dr{constructor(t){if(super(t),t.type!==fi.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=Rh(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]=fr(s[f],a[m]),f++,m++;else if(l[p]===o[g])h[g]=fr(s[p],a[g]),p--,g--;else if(l[f]===o[g])h[g]=fr(s[f],a[g]),gi(t,h[g+1],s[f]),f++,g--;else if(l[p]===o[m])h[m]=fr(s[p],a[m]),gi(t,s[f],s[p]),p--,m++;else if(c===void 0&&(c=Lh(o,m,g),u=Lh(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=gi(t,s[f]);fr(v,a[m]),h[m]=v}else h[m]=fr(y,a[m]),gi(t,s[f],y),s[d]=null;m++}else cs(s[p]),p--;else cs(s[f]),f++;for(;m<=g;){let d=gi(t,h[g+1]);fr(d,a[m]),h[m++]=d}for(;f<=p;){let d=s[f++];d!==null&&cs(d)}return this.ut=o,$h(t,h),vt}});function vo(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function Of(t,e=","){return t.map(vo).join(e)}var Hh=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function us(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 fs(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 Bh(t){return t}function ms(){}var Ne={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function qh(t){return t.match(/[-=:;]/g)?.length||0}function po(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(qh(t),15)<<18}var $f=["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 bo({n:t,i:e,v:r=[]},i,n,s){t&&(t=vo({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&&fs(l)||i.v(o))){var a;s.push(h),n|=l?67108864|po(h):o=="dark"?1073741824:h[0]=="@"?po(h):(a=h,1<<~(/:([a-z-]+)/.test(a)&&~$f.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:n,r:s,i:e}}var Uh=new Map;function fo(t){if(t.d){let e=[],r=lo(t.r.reduce((i,n)=>n[0]=="@"?(e.push(n),i):n?lo(i,s=>lo(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):ho(s,a)}return ho(a,s)})):i,"&"),i=>ho(i,t.n?"."+Hh(t.n):""));return r&&e.push(r.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((i,n)=>n+"{"+i+"}",t.d)}}function lo(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(r,i,n)=>e(i)+n)}function ho(t,e){return t.replace(/&/g,e)}var Vh=new Intl.Collator("en",{numeric:!0});function Wh(t,e){for(var r=0,i=t.length;r<i;){let n=i+r>>1;0>=Zh(t[n],e)?r=n+1:i=n}return i}function Zh(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||Vh.compare(Nh(t.n),Nh(e.n))||Vh.compare(zh(t.n),zh(e.n))}function Nh(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 co(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(${[co(t.substr(1,s),a),co(t.substr(1+s,s),a),co(t.substr(1+2*s,s),a),n]})`}return n=="1"?t:n=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${n})`)}function Yh(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(...wo(o,l,ds(""+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(fo).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(fo).join("")})));continue}}if(typeof b!="object"||Array.isArray(b))v=="label"&&b?o=b+us(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:qh(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,_o(""+_,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,fs(S,"")):x}),_|=po(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(Zh)}(t,bo(e,r,i,n),r)}function _o(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 Jh(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 ps(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=Uh.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}=bo(l,h,c,u),Jh(ps(ds(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)}}):Yh(p,l,h,c,u):[{c:vo(l),p:0,o:0,r:[]}]}(a,e,r,i,n))s.splice(Wh(s,o),0,o);return s}function wo(t,e,r,i,n,s,a,o){return Jh((o?r.flatMap(l=>ps([l],i,n,s,a)):ps(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 Rf(t,e,r,i){var n;return n=(s,a)=>{let{n:o,p:l,r:h,i:c}=bo(s,a,e);return r&&wo(o,e,r,a,l,h,c,i)},Uh.set(t,n),t}function uo(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(Lf),i:n}))}}function Lf(t,e,r){return r.indexOf(t)==e}var jh=new Map;function ds(t){let e=jh.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&&uo(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,uo([...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);uo([...r,Rf(u.length>1?u.slice(0,-1)+us(JSON.stringify([u,f])):u+"("+Of(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),jh.set(t,e=i[0])}return e}function B(t,e,r){return[t,mo(e,r)]}function mo(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(r,i)=>({[t]:e?e(r,i):go(r,1)}):r=>t||{[r[1]]:go(r,2)}}function go(t,e,r=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${r} * -1)`:r}function V(t,e,r,i){return[t,xo(e,r,i)]}function xo(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=Xh(t||n[1]),o=s.theme(a,n.$$)??Nt(n.$$,a,s);if(o!=null)return n._=go(n,0,o),i(n,s,a)}}function ze(t,e={},r){return[t,Bf(e,r)]}function Bf(t={},e){return(r,i)=>{let{section:n=Xh(r[0]).replace("-","")+"Color"}=t,[s,a]=Vf(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=an(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 Vf(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function an(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=yi(_o(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 Xh(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function yi(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,r="",i,n="")=>yi(r)+i+yi(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 So({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 Gh(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 Nf(t){var e;return yo(t[0],typeof(e=t[1])=="function"?e:()=>e)}function zf(t){var e,r;return Array.isArray(t)?yo(t[0],mo(t[1],t[2])):yo(t,mo(e,r))}function yo(t,e){return Kh(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 Kh(t,e){let r=Ce(t).map(jf);return(i,n,s)=>{for(let a of r){let o=e(i,a,n,s);if(o)return o}}}function jf(t){return typeof t=="string"?RegExp("^"+t+(t.includes("$")||t.slice(-1)=="-"?"":"$")):t}function Qh(t,e){let r=So(t),i=function({theme:l,darkMode:h,darkColor:c=ms,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=Kh(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,us):p?us:Bh;T!==Bh&&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,Y,G=Y)=>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 R=$[F]??F.split("-").reduce((q,U)=>q?.[U],$)??O;return D?At(R,{opacityValue:_o(D,P)}):R}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 R={};for(let q in C){let U=C[q],Y=[...$,q];R[Y.join("-")]=U,q=="DEFAULT"&&(Y=$,R[$.join("-")]=U),typeof U=="object"&&Object.assign(R,D(U,Y))}return R}(O):O}}(l),e:Hh,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,Gh(w,u,v,Nf,S)||"&:"+w),y.get(w)},r(w,M){let k=JSON.stringify([w,M]);return b.has(k)||b.set(k,!x(w,S)&&Gh(w,f,_,zf,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=fo(h);if(c&&!a.has(c)){a.add(c);let u=Wh(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"?wo("",Ne.b,ds(u),i,Ne.b,[],!1,!0):Yh(u,{},i,Ne.b)).forEach(o);h=""+h;let c=n.get(h);if(!c){let u=new Set;for(let f of ps(ds(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 Gf(t,e){return t!=e&&""+t.split(" ").sort()!=""+e.split(" ").sort()}function ec(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&&Gf(a,s=t(a))&&n.setAttribute("class",s)}}function Hf(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 gs(t){let e=t?.cssRules?t:(t&&typeof t!="string"?t:Hf(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:ms}}var qf=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 tc(t){return qf.get(t)}function rc(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 ic(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 Uf=[["-webkit-",1],["-moz-",2],["-ms-",4]];function nc(){return({stringify:t})=>({stringify(e,r,i){let n="",s=tc(e);s&&(n+=t(s,r,i)+";");let a=rc(e),o=ic(e,r);for(let l of Uf)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 ac(){return{rules:[["line-clamp-none",{"-webkit-line-clamp":"unset"}],["line-clamp-",xo("lineClamp",({_:t})=>sc(t))],["line-clamp-(\\d+)",({1:t})=>sc(t)]]}}function sc(t){return{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${t}`}}var ln={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:ge("blur"),backdropBrightness:ge("brightness"),backdropContrast:ge("contrast"),backdropGrayscale:ge("grayscale"),backdropHueRotate:ge("hueRotate"),backdropInvert:ge("invert"),backdropOpacity:ge("opacity"),backdropSaturate:ge("saturate"),backdropSepia:ge("sepia"),backgroundColor:ge("colors"),backgroundImage:{none:"none"},backgroundOpacity:ge("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:ge("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:ge("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:ge("colors"),caretColor:ge("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...bt(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:ge("borderColor"),divideOpacity:ge("borderOpacity"),divideWidth:ge("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"),...on(2,6),...on(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:ge("spacing"),gradientColorStops:ge("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"),...on(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...on(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:ge("spacing"),placeholderColor:ge("colors"),placeholderOpacity:ge("opacity"),outlineColor:ge("colors"),outlineOffset:Ct(8,"px"),outlineWidth:Ct(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:ge("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:ge("spacing"),scrollPadding:ge("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Ct(2,"deg"),...Ct(12,"deg",3)},space:ge("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:bt(2),textColor:ge("colors"),textDecorationColor:ge("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Ct(8,"px")},textUnderlineOffset:{auto:"auto",...Ct(8,"px")},textIndent:ge("spacing"),textOpacity:ge("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:ge("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"),...on(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 on(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 ge(t){return({theme:e})=>e(t)}var oc={"*,::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, ${ln.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, ${ln.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 dc=[B("\\[([-\\w]+):(.+)]",({1:t,2:e},r)=>({"@layer overrides":{"&":{[t]:Nt(`[${e}]`,"",r)}}})),B("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),V("aspect-","aspectRatio"),B("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[fs(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}}}),V("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),B("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),B("box-(border|content)","boxSizing",({1:t})=>t+"-box"),B("hidden",{display:"none"}),B("table-(auto|fixed)","tableLayout"),B(["(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)",B("isolate","isolation"),B("object-(contain|cover|fill|none|scale-down)","objectFit"),V("object-","objectPosition"),B("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",ys),B("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),B("(static|fixed|absolute|relative|sticky)","position"),V("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),V("-?(top|bottom|left|right)(?:$|-)","inset"),B("(visible|collapse)","visibility"),B("invisible",{visibility:"hidden"}),V("-?z-","zIndex"),B("flex-((row|col)(-reverse)?)","flexDirection",lc),B("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),V("(flex-(?:grow|shrink))(?:$|-)"),V("(flex)-"),V("grow(?:$|-)","flexGrow"),V("shrink(?:$|-)","flexShrink"),V("basis-","flexBasis"),V("-?(order)-"),"-?(order)-(\\d+)",V("grid-cols-","gridTemplateColumns"),B("grid-cols-(\\d+)","gridTemplateColumns",pc),V("col-","gridColumn"),B("col-(span)-(\\d+)","gridColumn",uc),V("col-start-","gridColumnStart"),B("col-start-(auto|\\d+)","gridColumnStart"),V("col-end-","gridColumnEnd"),B("col-end-(auto|\\d+)","gridColumnEnd"),V("grid-rows-","gridTemplateRows"),B("grid-rows-(\\d+)","gridTemplateRows",pc),V("row-","gridRow"),B("row-(span)-(\\d+)","gridRow",uc),V("row-start-","gridRowStart"),B("row-start-(auto|\\d+)","gridRowStart"),V("row-end-","gridRowEnd"),B("row-end-(auto|\\d+)","gridRowEnd"),B("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>ys(lc(t))),B("grid-flow-(dense)","gridAutoFlow"),V("auto-cols-","gridAutoColumns"),V("auto-rows-","gridAutoRows"),V("gap-x(?:$|-)","gap","columnGap"),V("gap-y(?:$|-)","gap","rowGap"),V("gap(?:$|-)","gap"),"(justify-(?:items|self))-",B("justify-","justifyContent",hc),B("(content|items|self)-",t=>({["align-"+t[1]]:hc(t)})),B("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),V("p([xytrbl])?(?:$|-)","padding",vi("padding")),V("-?m([xytrbl])?(?:$|-)","margin",vi("margin")),V("-?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))`}})),B("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),V("w-","width"),V("min-w-","minWidth"),V("max-w-","maxWidth"),V("h-","height"),V("min-h-","minHeight"),V("max-h-","maxHeight"),V("font-","fontWeight"),V("font-","fontFamily",({_:t})=>typeof(t=Ce(t))[1]=="string"?{fontFamily:Lt(t)}:{fontFamily:Lt(t[0]),...t[1]}),B("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),B("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),B("italic","fontStyle"),B("not-italic",{fontStyle:"normal"}),B("(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)",...mr({"--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,/*!*/ /*!*/)"})}),V("tracking-","letterSpacing"),V("leading-","lineHeight"),B("list-(inside|outside)","listStylePosition"),V("list-","listStyleType"),B("list-","listStyleType"),V("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),ze("placeholder-",{property:"color",selector:"&::placeholder"}),B("text-(left|center|right|justify|start|end)","textAlign"),B("text-(ellipsis|clip)","textOverflow"),V("text-opacity-","textOpacity","--tw-text-opacity"),ze("text-",{property:"color"}),V("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),V("indent-","textIndent"),B("(overline|underline|line-through)","textDecorationLine"),B("no-underline",{textDecorationLine:"none"}),V("underline-offset-","textUnderlineOffset"),ze("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),V("decoration-","textDecorationThickness"),B("decoration-","textDecorationStyle"),B("(uppercase|lowercase|capitalize)","textTransform"),B("normal-case",{textTransform:"none"}),B("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),B("align-","verticalAlign"),B("whitespace-","whiteSpace"),B("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),B("break-words",{overflowWrap:"break-word"}),B("break-all",{wordBreak:"break-all"}),B("break-keep",{wordBreak:"keep-all"}),ze("caret-",{opacityVariable:!1,opacitySection:"opacity"}),ze("accent-",{opacityVariable:!1,opacitySection:"opacity"}),B("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${jr(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"}),B("bg-(fixed|local|scroll)","backgroundAttachment"),B("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),B(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),B("bg-blend-","backgroundBlendMode"),B("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),V("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),ze("bg-",{section:"backgroundColor"}),V("bg-","backgroundImage"),V("bg-","backgroundPosition"),B("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",ys),V("bg-","backgroundSize"),V("rounded(?:$|-)","borderRadius"),V("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-${jr(r[0])}-radius`]:e,[`border-${jr(r[1])}-radius`]:e}}),B("border-(collapse|separate)","borderCollapse"),V("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),B("border-(solid|dashed|dotted|double|none)","borderStyle"),V("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...mr({"--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"},vi("border","Color")),ze("border-"),V("border-([xytrbl])(?:$|-)","borderWidth",vi("border","Width")),V("border(?:$|-)","borderWidth"),V("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),B("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),B("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),V("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let r={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${jr(r[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${jr(r[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),ze("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),V("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),ze("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),V("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),B("ring-inset",{"--tw-ring-inset":"inset"}),ze("ring-",{property:"--tw-ring-color"}),V("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...mr({"--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)"})),V("shadow(?:$|-)","boxShadow",({_:t})=>({...mr({"--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)"})),V("(opacity)-"),B("mix-blend-","mixBlendMode"),...cc(),...cc("backdrop-"),V("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:Lt(t),transitionTimingFunction:t._=="none"?void 0:Lt(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:Lt(e("transitionDuration",""))})),V("duration(?:$|-)","transitionDuration","transitionDuration",Lt),V("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Lt),V("delay(?:$|-)","transitionDelay","transitionDelay",Lt),V("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)",B("transform",Eo),B("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":fc(t=="gpu")})),V("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...Eo()})),V("-?(rotate)-","rotate",ko),V("-?(translate-[xy])-","translate",ko),V("-?(skew-[xy])-","skew",ko),B("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",ys),"(appearance)-",V("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",V("(cursor)-"),"(cursor)-",B("snap-(none)","scroll-snap-type"),B("snap-(x|y|both)",({1:t})=>({...mr({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),B("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),B("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),B("snap-(normal|always)","scroll-snap-stop"),B("scroll-(auto|smooth)","scroll-behavior"),V("scroll-p([xytrbl])?(?:$|-)","padding",vi("scroll-padding")),V("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",vi("scroll-margin")),B("touch-(auto|none|manipulation)","touch-action"),B("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:r})=>({...mr({"--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)"})),B("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),B("outline",{outlineStyle:"solid"}),B("outline-(dashed|dotted|double)","outlineStyle"),V("-?(outline-offset)-"),ze("outline-",{opacityVariable:!1,opacitySection:"opacity"}),V("outline-","outlineWidth"),"(pointer-events)-",V("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],B("select-(none|text|all|auto)","userSelect"),ze("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),ze("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),V("stroke-","strokeWidth"),B("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),B("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function ys(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function lc(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function jr(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 hc({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function vi(t,e=""){return({1:r,_:i})=>{let n={x:"lr",y:"tb"}[r]||r+r;return n?{...an(t+"-"+jr(n[0])+e,i),...an(t+"-"+jr(n[1])+e,i)}:an(t+e,i)}}function cc(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={...mr(r),[`${t}filter`]:e.map(i=>`var(--tw-${t}${i})`).join(" ")},[`(${t}filter)-(none)`,B(`${t}filter`,r),...e.map(i=>V(`${i[0]=="h"?"-?":""}(${t}${i})(?:$|-)`,i,({1:n,_:s})=>({[`--tw-${n}`]:Ce(s).map(a=>`${i}(${a})`).join(" "),...r})))]}function ko({1:t,_:e}){return{["--tw-"+t]:e,...Eo()}}function Eo(){return{...mr({"--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":fc()}),transform:"var(--tw-transform)"}}function fc(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 uc({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function pc({1:t}){return`repeat(${t},minmax(0,1fr))`}function mr(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}var mc=[["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=yi(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)&&yi(t).replace(/[}]+$/,"").split("{")]];function gc({colors:t,disablePreflight:e}={}){return{preflight:e?void 0:oc,theme:{...ln,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...t}},variants:mc,rules:dc,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 Wf={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},Zf={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},Yf={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},Jf={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},Xf={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},Kf={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},Qf={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},em={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},tm={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},rm={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},im={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},nm={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},sm={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},am={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},om={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},lm={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},hm={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},cm={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},um={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},pm={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},dm={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},fm={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},yc={__proto__:null,slate:Wf,gray:Zf,zinc:Yf,neutral:Jf,stone:Xf,red:Kf,orange:Qf,amber:em,yellow:tm,lime:rm,green:im,emerald:nm,teal:sm,cyan:am,sky:om,blue:lm,indigo:hm,violet:cm,purple:um,fuchsia:pm,pink:dm,rose:fm};function vc({disablePreflight:t}={}){return gc({colors:yc,disablePreflight:t})}function wc({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)=>xc(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=_c(a.theme("fontSize",s));return o&&{"@layer components":o}}],[t+"-",({$$:s},a)=>n(s,a)],[t,(s,a)=>({...n(e,a),"@layer base":[bc(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:X(20,16),marginBottom:X(20,16),paddingLeft:X(26,16)},li:{marginTop:X(8,16),marginBottom:X(8,16)},"ol>li,ul>li":{paddingLeft:X(6,16)},">ul>li p":{marginTop:X(12,16),marginBottom:X(12,16)},">ul>li>*:first-child,>ol>li>*:last-child":{marginTop:X(20,16)},">ul>li>*:last-child,>ol>li>*:last-child":{marginBottom:X(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:X(12,16),marginBottom:X(12,16)},hr:{borderColor:"var(--tw-prose-hr)",borderTopWidth:"1",marginTop:X(48,16),marginBottom:X(48,16)},blockquote:{marginTop:X(32,20),marginBottom:X(32,20),paddingLeft:X(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:X(20,16),marginBottom:X(20,16)},h1:{color:"var(--tw-prose-headings)",fontWeight:"800",fontSize:X(36,16),marginTop:"0",marginBottom:X(32,36),lineHeight:1.15},"h1 strong":{fontWeight:"900",color:"inherit"},h2:{color:"var(--tw-prose-headings)",fontWeight:"700",fontSize:X(24,16),marginTop:X(48,24),marginBottom:X(24,24),lineHeight:"1.35"},"h2 strong":{fontWeight:"800",color:"inherit"},h3:{color:"var(--tw-prose-headings)",fontWeight:"600",fontSize:X(20,16),marginTop:X(32,20),marginBottom:X(12,20),lineHeight:"1.6"},"h3 strong":{fontWeight:"700",color:"inherit"},h4:{color:"var(--tw-prose-headings)",fontWeight:"600",marginTop:X(24,16),marginBottom:X(8,16),lineHeight:"1.5"},"h4 strong":{fontWeight:"700",color:"inherit"},"hr+*,h2+*,h3+*,h4+*":{marginTop:"0"},"img,video,figure":{marginTop:X(32,16),marginBottom:X(32,16)},"figure>*":{marginTop:"0",marginBottom:"0"},figcaption:{color:"var(--tw-prose-captions)",fontSize:X(14,16),lineHeight:"1.4",marginTop:X(12,14)},code:{color:"var(--tw-prose-code)",fontWeight:"600",fontSize:X(14,16)},"code::before,code::after":{content:'"`"'},"h2 code":{fontSize:X(21,24)},"h3 code":{fontSize:X(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:X(14,16),lineHeight:"1.7",marginTop:X(24,14),marginBottom:X(24,14),borderRadius:"0.375rem",paddingTop:X(12,14),paddingRight:X(16,14),paddingBottom:X(12,14),paddingLeft:X(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:X(32,16),marginBottom:X(32,16),fontSize:X(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:X(8,14),paddingBottom:X(8,14),paddingLeft:X(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:X(8,14),paddingRight:X(8,14),paddingBottom:X(8,14),paddingLeft:X(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:X(20,16),lineHeight:"1.6",marginTop:X(24,20),marginBottom:X(24,20)},">:first-child":{marginTop:"0"},">:last-child":{marginBottom:"0"}}),bc(t,a,r)],"@layer components":{..._c(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 bc(t,e,r){let i={};for(let n in r)i[xc(t,n,e,s=>`.${e.e(e.h(t))}${s}`)]=r[n];return i}function xc(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 _c(t){return t?typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}:void 0}function X(t,e){return`${(t/e).toFixed(3).replace(/^0|\.?0+$/g,"")}em`}var Po=So({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:[vc(),nc(),ac(),wc()],hash:!1});function Sc(t,e=!0){let r=function(){if(mm)try{let l=gs(new CSSStyleSheet);return l.connect=h=>{let c=Ao(h);c.adoptedStyleSheets=[...c.adoptedStyleSheets,l.target]},l.disconnect=ms,l}catch{}let s=document.createElement("style");s.media="not all",document.head.prepend(s);let a=[gs(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");Ao(l).appendChild(h);let c=gs(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=Qh({...t,hash:t.hash??e},r),n=ec(i);return function(a){return class extends a{connectedCallback(){super.connectedCallback?.(),r.connect(this),n.observe(Ao(this))}disconnectedCallback(){r.disconnect(this),super.disconnectedCallback?.()}constructor(...l){super(...l),this.tw=i}}}}var mm=typeof ShadowRoot<"u"&&(typeof ShadyCSS>"u"||ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;function Ao(t){return t.shadowRoot||t.attachShadow({mode:"open"})}var De=t=>Sc(Po)(t);var bs,kc,_s,Ec,vs=class extends De(Ae){constructor(){super();ee(this,bs);ee(this,_s);ye(this,"render",()=>pe`
4
+ <div class="${N(this,bs,kc)?"block":"hidden"} flex h-full w-full flex-col items-stretch justify-center space-y-8 px-4">
5
5
  <!-- limitations section -->
6
- ${this.config.limitations&&this.config.limitations.items.length>0?fe`
6
+ ${this.config.limitations&&this.config.limitations.items.length>0?pe`
7
7
  <div class="text-gray-500">
8
8
  <p class="text-md text-center font-semibold">${this.config.limitations.title}</p>
9
9
  <ul class="prose mt-2 text-left text-gray-400">
10
- ${nn(this.config.limitations.items,r=>r,r=>fe`<li class="w-full rounded-2xl bg-gray-100 px-4 py-3 text-sm">${r}</li>`)}
10
+ ${sn(this.config.limitations.items,r=>r,r=>pe`<li class="w-full rounded-2xl bg-gray-100 px-4 py-3 text-sm">${r}</li>`)}
11
11
  </ul>
12
12
  </div>
13
13
  `:""}
14
14
 
15
15
  <!-- examples section -->
16
- ${this.config.examples&&this.config.examples.items.length>0?fe`
16
+ ${this.config.examples&&this.config.examples.items.length>0?pe`
17
17
  <div class="text-gray-500">
18
18
  <p class="text-md text-center font-semibold">${this.config.examples.title}</p>
19
19
  <ul class="prose mt-2 text-left text-gray-400">
20
- ${nn(this.config.examples.items,r=>r,r=>fe`<li class="w-full rounded-2xl bg-white px-4 py-3 text-sm outline outline-1 outline-[#eeedf1] transition-[color,outline] hover:cursor-pointer hover:outline-[#999]" @click="${()=>de(this,vs,mc).call(this,r)}">“${r}” →</li>`)}
20
+ ${sn(this.config.examples.items,r=>r,r=>pe`<li class="w-full rounded-2xl bg-white px-4 py-3 text-sm outline outline-1 outline-[#eeedf1] transition-[color,outline] hover:cursor-pointer hover:outline-[#999]" @click="${()=>ce(this,_s,Ec).call(this,r)}">“${r}” →</li>`)}
21
21
  </ul>
22
22
  </div>
23
23
  `:""}
@@ -25,16 +25,16 @@ var dd=Object.defineProperty;var fd=(t,e,r)=>e in t?dd(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}};ys=new WeakSet,fc=function(){return this.messages===0},vs=new WeakSet,mc=function(r){let i={example:r};this.dispatchEvent(new CustomEvent("mw-example-click",{detail:i}))},Se(gs,"properties",{config:{type:Object},messages:{type:Number}});customElements.define("mw-background",gs);function hn(t){var e,r;function i(s,a){try{var o=t[s](a),l=o.value,h=l instanceof No;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 No(t,e){this.v=t,this.k=e}function nu(t,e,r,i){return{getMetadata:function(n){To(i,"getMetadata"),vc(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){To(i,"setMetadata"),vc(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 gc(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 su(t,e){return function(r){To(e,"addInitializer"),cn(r,"An initializer"),t.push(r)}}function yc(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=su(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,nu(i,c,u,p)))}finally{p.v=!0}}function To(t,e){if(t.v)throw new Error("attempted to call "+e+" after decoration was finished")}function vc(t){if(typeof t!="symbol")throw new TypeError("Metadata keys must be symbols, received: "+t)}function cn(t,e){if(typeof t!="function")throw new TypeError(e+" must be a function")}function Io(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&&cn(e.get,"accessor.get"),e.set!==void 0&&cn(e.set,"accessor.set"),e.init!==void 0&&cn(e.init,"accessor.init"),e.initializer!==void 0&&cn(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 bc(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 rm(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=yc(g,i,h,o,l,n,s,a,u))!==void 0&&(Io(n,f),n===0?c=f:n===1?(c=bc(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=yc(g[d],i,h,o,l,n,s,a,u))!==void 0&&(Io(n,f),n===0?y=f:n===1?(y=bc(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 im(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)}rm(t,u,c,g,m,y,d,f,p)}}_c(t,s),_c(t,a)}function _c(t,e){e&&t.push(function(r){for(var i=0;i<e.length;i++)e[i].call(r);return r})}function nm(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:su(n,l)},nu(r,0,a,l)),c=i[o](s,h)}finally{l.v=!0}c!==void 0&&(Io(10,c),s=c)}t.push(s,function(){for(var u=0;u<n.length;u++)n[u].call(s)})}}function gv(t,e,r){var i=[],n={},s={};return im(i,t,s,n,e),gc(t.prototype,s),nm(i,t,n,r),gc(t,n),i}function au(t,e){return function(r){sm(e,"addInitializer"),ws(r,"An initializer"),t.push(r)}}function wc(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=au(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 sm(t,e){if(t.v)throw new Error("attempted to call "+e+" after decoration was finished")}function ws(t,e){if(typeof t!="function")throw new TypeError(e+" must be a function")}function Mo(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&&ws(e.get,"accessor.get"),e.set!==void 0&&ws(e.set,"accessor.set"),e.init!==void 0&&ws(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 am(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=wc(m,i,l,o,n,s,a,c))!==void 0&&(Mo(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=wc(m[g],i,l,o,n,s,a,c))!==void 0&&(Mo(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 om(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)}am(t,h,l,f,u,m,p,c)}}xc(t,i),xc(t,n)}function xc(t,e){e&&t.push(function(r){for(var i=0;i<e.length;i++)e[i].call(r);return r})}function lm(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:au(i,o)})}finally{o.v=!0}l!==void 0&&(Mo(10,l),n=l)}t.push(n,function(){for(var h=0;h<i.length;h++)i[h].call(n)})}}function yv(t,e,r){var i=[];return om(i,t,e),lm(i,t,r),i}function vv(t){var e={},r=!1;function i(n,s){return r=!0,{done:!1,value:new No(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 bv(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 Do(e.call(t));r="@@asyncIterator",i="@@iterator"}throw new TypeError("Object is not async iterable")}function Do(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(Do=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 Do(t)}function _v(t){return new No(t,0)}function wv(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 hm(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 cm(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 bo;function xv(t,e,r,i){bo||(bo=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:bo,type:t,key:r===void 0?null:""+r,ref:null,props:e,_owner:null}}function Sc(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 Sv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sc(Object(r),!0).forEach(function(i){jo(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function um(){um=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 R(q,U,Y,G){var te=c(P[q],P,U);if(te.type!=="throw"){var ne=te.arg,re=ne.value;return re&&typeof re=="object"&&r.call(re,"__await")?A.resolve(re.__await).then(function(Q){R("next",Q,Y,G)},function(Q){R("throw",Q,Y,G)}):A.resolve(re).then(function(Q){ne.value=Q,Y(ne)},function(Q){return R("throw",Q,Y,G)})}G(te.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 R=c(P,A,E);if(R.type==="normal"){if(F=E.done?"completed":"suspendedYield",R.arg===u)continue;return{value:R.arg,done:E.done}}R.type==="throw"&&(F="completed",E.method="throw",E.arg=R.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(R,q){return D.type="throw",D.arg=P,A.next=R,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 pm(t){return(pm=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 kc(){kc=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)),Ci(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 fm(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)},kc.apply(this,arguments)}function kv(t){this.wrapped=t}function Ev(t){return function(){return new hn(t.apply(this,arguments))}}function Ec(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 Pv(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Ec(s,i,n,a,o,"next",l)}function o(l){Ec(s,i,n,a,o,"throw",l)}a(void 0)})}}function Av(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pc(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,js(i.key),i)}}function Cv(t,e,r){return e&&Pc(t.prototype,e),r&&Pc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Tv(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 Iv(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 jo(t,e,r){return(e=js(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dm(){return(dm=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 Mv(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){jo(t,n,r[n])})}return t}function fm(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&&Ci(t,e)}function Dv(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ci(t,e)}function dn(t){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function Ci(t,e){return(Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r})(t,e)}function ou(){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 lu(t,e,r){return(lu=ou()?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&&Ci(o,s.prototype),o}).apply(null,arguments)}function mm(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function gm(t){var e=typeof Map=="function"?new Map:void 0;return(gm=function(r){if(r===null||!mm(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 lu(r,arguments,dn(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ci(i,r)})(t)}function Fv(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function Ov(t){return t&&t.__esModule?t:{default:t}}function hu(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(hu=function(i){return i?r:e})(t)}function $v(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=hu(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 Rv(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function Lv(t){if(t==null)throw new TypeError("Cannot destructure "+t)}function ym(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 Bv(t,e){if(t==null)return{};var r,i,n=ym(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 vm(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bm(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 vm(t)}function Vv(t){var e=ou();return function(){var r,i=dn(t);if(e){var n=dn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return bm(this,r)}}function cu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=dn(t))!==null;);return t}function _m(){return(_m=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=cu(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 uu(t,e,r,i){return(uu=typeof Reflect<"u"&&Reflect.set?Reflect.set:function(n,s,a,o){var l,h=cu(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 jo(o,s,a);return!0})(t,e,r,i)}function zv(t,e,r,i,n){if(!uu(t,e,r,i||t)&&n)throw new Error("failed to set property");return r}function vi(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Nv(t,e){return e||(e=t.slice(0)),t.raw=e,t}function jv(t){throw new TypeError('"'+t+'" is read-only')}function Gv(t){throw new TypeError('"'+t+'" is write-only')}function Hv(t){throw new Error('Class "'+t+'" cannot be referenced in computed property keys.')}function wm(){}function xm(t){throw new ReferenceError(t+" is not defined - temporal dead zone")}function qv(t,e){return t===wm?xm(e):t}function Uv(t,e){return Go(t)||hm(t,e)||Ti(t,e)||Ho()}function Wv(t,e){return Go(t)||cm(t,e)||Ti(t,e)||Ho()}function Sm(t){return Go(t)||pu(t)||Ti(t)||Ho()}function Zv(t){return km(t)||pu(t)||Ti(t)||Em()}function km(t){if(Array.isArray(t))return Ps(t)}function Go(t){if(Array.isArray(t))return t}function Yv(t,e,r){if(e&&!Array.isArray(e)&&typeof e.length=="number"){var i=e.length;return Ps(e,r!==void 0&&r<i?r:i)}return t(e,r)}function pu(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ti(t,e){if(t){if(typeof t=="string")return Ps(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)?Ps(t,e):void 0}}function Ps(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 Em(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
29
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ho(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jv(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ti(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
- 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 Xv(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=Ti(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.
32
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kv(t){return function(){var e=t.apply(this,arguments);return e.next(),e}}function Pm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function js(t){var e=Pm(t,"string");return typeof e=="symbol"?e:String(e)}function Qv(t,e){throw new Error("Decorating class property failed. Please ensure that proposal-class-properties is enabled and runs after the decorators transform.")}function e1(t,e,r,i){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(i):void 0})}function t1(t,e,r,i,n){var s={};return Object.keys(i).forEach(function(a){s[a]=i[a]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=r.slice().reverse().reduce(function(a,o){return o(t,e,a)||a},s),n&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(n):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(t,e,s),s=null),s}hn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},hn.prototype.next=function(t){return this._invoke("next",t)},hn.prototype.throw=function(t){return this._invoke("throw",t)},hn.prototype.return=function(t){return this._invoke("return",t)};var Am=0;function r1(t){return"__private_"+Am+++"_"+t}function i1(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}function n1(t,e){return du(t,qo(t,e,"get"))}function s1(t,e,r){return fu(t,qo(t,e,"set"),r),r}function a1(t,e){return mu(t,qo(t,e,"set"))}function qo(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function o1(t,e,r){return Gs(t,e),Uo(r,"get"),du(t,r)}function l1(t,e,r,i){return Gs(t,e),Uo(r,"set"),fu(t,r,i),i}function h1(t,e,r){return Gs(t,e),r}function c1(){throw new TypeError("attempted to set read only static private field")}function du(t,e){return e.get?e.get.call(t):e.value}function fu(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}function mu(t,e){if(e.set)return"__destrObj"in e||(e.__destrObj={set value(r){e.set.call(t,r)}}),e.__destrObj;if(!e.writable)throw new TypeError("attempted to set read only private field");return e}function u1(t,e,r){return Gs(t,e),Uo(r,"set"),mu(t,r)}function Gs(t,e){if(t!==e)throw new TypeError("Private static access of wrong provenance")}function Uo(t,e){if(t===void 0)throw new TypeError("attempted to "+e+" private static field before its declaration")}function p1(t,e,r,i){var n=gu();if(i)for(var s=0;s<i.length;s++)n=i[s](n);var a=e(function(l){n.initializeInstanceElements(l,o.elements)},r),o=n.decorateClass(Im(a.d.map(Cm)),t);return n.initializeClassElements(a.F,o.elements),n.runClassFinishers(a.F,o.finishers)}function gu(){gu=function(){return t};var t={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,r){["method","field"].forEach(function(i){r.forEach(function(n){n.kind===i&&n.placement==="own"&&this.defineClassElement(e,n)},this)},this)},initializeClassElements:function(e,r){var i=e.prototype;["method","field"].forEach(function(n){r.forEach(function(s){var a=s.placement;if(s.kind===n&&(a==="static"||a==="prototype")){var o=a==="static"?e:i;this.defineClassElement(o,s)}},this)},this)},defineClassElement:function(e,r){var i=r.descriptor;if(r.kind==="field"){var n=r.initializer;i={enumerable:i.enumerable,writable:i.writable,configurable:i.configurable,value:n===void 0?void 0:n.call(e)}}Object.defineProperty(e,r.key,i)},decorateClass:function(e,r){var i=[],n=[],s={static:[],prototype:[],own:[]};if(e.forEach(function(o){this.addElementPlacement(o,s)},this),e.forEach(function(o){if(!un(o))return i.push(o);var l=this.decorateElement(o,s);i.push(l.element),i.push.apply(i,l.extras),n.push.apply(n,l.finishers)},this),!r)return{elements:i,finishers:n};var a=this.decorateConstructor(i,r);return n.push.apply(n,a.finishers),a.finishers=n,a},addElementPlacement:function(e,r,i){var n=r[e.placement];if(!i&&n.indexOf(e.key)!==-1)throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,r){for(var i=[],n=[],s=e.decorators,a=s.length-1;a>=0;a--){var o=r[e.placement];o.splice(o.indexOf(e.key),1);var l=this.fromElementDescriptor(e),h=this.toElementFinisherExtras((0,s[a])(l)||l);e=h.element,this.addElementPlacement(e,r),h.finisher&&n.push(h.finisher);var c=h.extras;if(c){for(var u=0;u<c.length;u++)this.addElementPlacement(c[u],r);i.push.apply(i,c)}}return{element:e,finishers:n,extras:i}},decorateConstructor:function(e,r){for(var i=[],n=r.length-1;n>=0;n--){var s=this.fromClassDescriptor(e),a=this.toClassDescriptor((0,r[n])(s)||s);if(a.finisher!==void 0&&i.push(a.finisher),a.elements!==void 0){e=a.elements;for(var o=0;o<e.length-1;o++)for(var l=o+1;l<e.length;l++)if(e[o].key===e[l].key&&e[o].placement===e[l].placement)throw new TypeError("Duplicated element ("+e[o].key+")")}}return{elements:e,finishers:i}},fromElementDescriptor:function(e){var r={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),e.kind==="field"&&(r.initializer=e.initializer),r},toElementDescriptors:function(e){if(e!==void 0)return Sm(e).map(function(r){var i=this.toElementDescriptor(r);return this.disallowProperty(r,"finisher","An element descriptor"),this.disallowProperty(r,"extras","An element descriptor"),i},this)},toElementDescriptor:function(e){var r=String(e.kind);if(r!=="method"&&r!=="field")throw new TypeError(`An element descriptor's .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "`+r+'"');var i=js(e.key),n=String(e.placement);if(n!=="static"&&n!=="prototype"&&n!=="own")throw new TypeError(`An element descriptor's .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "`+n+'"');var s=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var a={kind:r,key:i,placement:n,descriptor:Object.assign({},s)};return r!=="field"?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(s,"get","The property descriptor of a field descriptor"),this.disallowProperty(s,"set","The property descriptor of a field descriptor"),this.disallowProperty(s,"value","The property descriptor of a field descriptor"),a.initializer=e.initializer),a},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:Cc(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var r={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),r},toClassDescriptor:function(e){var r=String(e.kind);if(r!=="class")throw new TypeError(`A class descriptor's .kind property must be "class", but a decorator created a class descriptor with .kind "`+r+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var i=Cc(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:i}},runClassFinishers:function(e,r){for(var i=0;i<r.length;i++){var n=(0,r[i])(e);if(n!==void 0){if(typeof n!="function")throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,r,i){if(e[r]!==void 0)throw new TypeError(i+" can't have a ."+r+" property.")}};return t}function Cm(t){var e,r=js(t.key);t.kind==="method"?e={value:t.value,writable:!0,configurable:!0,enumerable:!1}:t.kind==="get"?e={get:t.value,configurable:!0,enumerable:!1}:t.kind==="set"?e={set:t.value,configurable:!0,enumerable:!1}:t.kind==="field"&&(e={configurable:!0,writable:!0,enumerable:!0});var i={kind:t.kind==="field"?"field":"method",key:r,placement:t.static?"static":t.kind==="field"?"own":"prototype",descriptor:e};return t.decorators&&(i.decorators=t.decorators),t.kind==="field"&&(i.initializer=t.value),i}function Tm(t,e){t.descriptor.get!==void 0?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function Im(t){for(var e=[],r=function(a){return a.kind==="method"&&a.key===s.key&&a.placement===s.placement},i=0;i<t.length;i++){var n,s=t[i];if(s.kind==="method"&&(n=e.find(r)))if(Ac(s.descriptor)||Ac(n.descriptor)){if(un(s)||un(n))throw new ReferenceError("Duplicated methods ("+s.key+") can't be decorated.");n.descriptor=s.descriptor}else{if(un(s)){if(un(n))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+s.key+").");n.decorators=s.decorators}Tm(s,n)}else e.push(s)}return e}function un(t){return t.decorators&&t.decorators.length}function Ac(t){return t!==void 0&&!(t.value===void 0&&t.writable===void 0)}function Cc(t,e){var r=t[e];if(r!==void 0&&typeof r!="function")throw new TypeError("Expected '"+e+"' to be a function");return r}function d1(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function yu(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f1(t,e,r){yu(t,e),e.set(t,r)}function m1(t,e){yu(t,e),e.add(t)}function g1(){throw new TypeError("attempted to reassign private method")}function y1(t){return t}var vu=function(t,e){return(vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)i.hasOwnProperty(n)&&(r[n]=i[n])})(t,e)};function v1(t,e){function r(){this.constructor=t}vu(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Mm=function(){return(Mm=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function b1(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var n=0;for(i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]])}return r}function tt(t,e,r,i){var n,s=arguments.length,a=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(s<3?n(a):s>3?n(e,r,a):n(e,r))||a);return s>3&&a&&Object.defineProperty(e,r,a),a}function _1(t,e){return function(r,i){e(r,i,t)}}function w1(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function x1(t,e,r,i){return new(r||(r=Promise))(function(n,s){function a(h){try{l(i.next(h))}catch(c){s(c)}}function o(h){try{l(i.throw(h))}catch(c){s(c)}}function l(h){var c;h.done?n(h.value):(c=h.value,c instanceof r?c:new r(function(u){u(c)})).then(a,o)}l((i=i.apply(t,e||[])).next())})}function S1(t,e){var r,i,n,s,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(h){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(n=2&c[0]?i.return:c[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,c[1])).done)return n;switch(i=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,i=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!((n=n.length>0&&n[n.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(c[0]===6&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(u){c=[6,u],i=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([l,h])}}}function k1(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}function E1(t,e){for(var r in t)r==="default"||e.hasOwnProperty(r)||(e[r]=t[r])}function Tc(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Dm(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i,n,s=r.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(o){n={error:o}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return a}function P1(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Dm(arguments[e]));return t}function A1(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var i=Array(t),n=0;for(e=0;e<r;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,n++)i[n]=s[a];return i}function As(t){return this instanceof As?(this.v=t,this):new As(t)}function C1(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(t,e||[]),s=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(u){n[u]&&(i[u]=function(f){return new Promise(function(p,m){s.push([u,f,p,m])>1||o(u,f)})})}function o(u,f){try{(function(p){p.value instanceof As?Promise.resolve(p.value.v).then(l,h):c(s[0][2],p)})(n[u](f))}catch(p){c(s[0][3],p)}}function l(u){o("next",u)}function h(u){o("throw",u)}function c(u,f){u(f),s.shift(),s.length&&o(s[0][0],s[0][1])}}function T1(t){var e,r;return e={},i("next"),i("throw",function(n){throw n}),i("return"),e[Symbol.iterator]=function(){return this},e;function i(n,s){e[n]=t[n]?function(a){return(r=!r)?{value:As(t[n](a)),done:n==="return"}:s?s(a):a}:s}}function I1(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=typeof Tc=="function"?Tc(t):t[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(s){return new Promise(function(a,o){(function(l,h,c,u){Promise.resolve(u).then(function(f){l({value:f,done:c})},h)})(a,o,(s=t[n](s)).done,s.value)})}}}function M1(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function D1(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function F1(t){return t&&t.__esModule?t:{default:t}}function O1(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function $1(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var xs=window,Wo=xs.ShadowRoot&&(xs.ShadyCSS===void 0||xs.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Zo=Symbol(),Ic=new WeakMap,Cs=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==Zo)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(Wo&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=Ic.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ic.set(r,e))}return e}toString(){return this.cssText}},Fm=t=>new Cs(typeof t=="string"?t:t+"",void 0,Zo),Om=(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 Cs(r,t,Zo)},$m=(t,e)=>{Wo?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let i=document.createElement("style"),n=xs.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)})},Mc=Wo?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return Fm(r)})(t):t,_o,Ts=window,Dc=Ts.trustedTypes,Rm=Dc?Dc.emptyScript:"",Fc=Ts.reactiveElementPolyfillSupport,Fo={toAttribute(t,e){switch(e){case Boolean:t=t?Rm: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}},bu=(t,e)=>e!==t&&(e==e||t==t),wo={attribute:!0,type:String,converter:Fo,reflect:!1,hasChanged:bu},er=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}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=wo){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)||wo}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!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(Mc(n))}else e!==void 0&&r.push(Mc(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}u(){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 $m(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=wo){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:Fo).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:Fo;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||bu)(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){}};var xo;er.finalized=!0,er.elementProperties=new Map,er.elementStyles=[],er.shadowRootOptions={mode:"open"},Fc?.({ReactiveElement:er}),((_o=Ts.reactiveElementVersions)!==null&&_o!==void 0?_o:Ts.reactiveElementVersions=[]).push("1.5.0");var Is=window,xi=Is.trustedTypes,Oc=xi?xi.createPolicy("lit-html",{createHTML:t=>t}):void 0,tr=`lit$${(Math.random()+"").slice(9)}$`,Yo="?"+tr,Lm=`<${Yo}>`,Si=document,fn=(t="")=>Si.createComment(t),mn=t=>t===null||typeof t!="object"&&typeof t!="function",_u=Array.isArray,wu=t=>_u(t)||typeof t?.[Symbol.iterator]=="function",ln=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$c=/-->/g,Rc=/>/g,jr=RegExp(`>|[
28
+ `);this.config,this.messages=0}};bs=new WeakSet,kc=function(){return this.messages===0},_s=new WeakSet,Ec=function(r){let i={example:r};this.dispatchEvent(new CustomEvent("mw-example-click",{detail:i}))},ye(vs,"properties",{config:{type:Object},messages:{type:Number}});customElements.define("mw-background",vs);function cn(t){var e,r;function i(s,a){try{var o=t[s](a),l=o.value,h=l instanceof Jo;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 Jo(t,e){this.v=t,this.k=e}function fu(t,e,r,i){return{getMetadata:function(n){Bo(i,"getMetadata"),Cc(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){Bo(i,"setMetadata"),Cc(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 Pc(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 mu(t,e){return function(r){Bo(e,"addInitializer"),un(r,"An initializer"),t.push(r)}}function Ac(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=mu(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,fu(i,c,u,p)))}finally{p.v=!0}}function Bo(t,e){if(t.v)throw new Error("attempted to call "+e+" after decoration was finished")}function Cc(t){if(typeof t!="symbol")throw new TypeError("Metadata keys must be symbols, received: "+t)}function un(t,e){if(typeof t!="function")throw new TypeError(e+" must be a function")}function Vo(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&&un(e.get,"accessor.get"),e.set!==void 0&&un(e.set,"accessor.set"),e.init!==void 0&&un(e.init,"accessor.init"),e.initializer!==void 0&&un(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 Tc(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 gm(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=Ac(g,i,h,o,l,n,s,a,u))!==void 0&&(Vo(n,f),n===0?c=f:n===1?(c=Tc(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=Ac(g[d],i,h,o,l,n,s,a,u))!==void 0&&(Vo(n,f),n===0?y=f:n===1?(y=Tc(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 ym(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)}gm(t,u,c,g,m,y,d,f,p)}}Ic(t,s),Ic(t,a)}function Ic(t,e){e&&t.push(function(r){for(var i=0;i<e.length;i++)e[i].call(r);return r})}function vm(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:mu(n,l)},fu(r,0,a,l)),c=i[o](s,h)}finally{l.v=!0}c!==void 0&&(Vo(10,c),s=c)}t.push(s,function(){for(var u=0;u<n.length;u++)n[u].call(s)})}}function Iv(t,e,r){var i=[],n={},s={};return ym(i,t,s,n,e),Pc(t.prototype,s),vm(i,t,n,r),Pc(t,n),i}function gu(t,e){return function(r){bm(e,"addInitializer"),Ss(r,"An initializer"),t.push(r)}}function Mc(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=gu(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 bm(t,e){if(t.v)throw new Error("attempted to call "+e+" after decoration was finished")}function Ss(t,e){if(typeof t!="function")throw new TypeError(e+" must be a function")}function No(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&&Ss(e.get,"accessor.get"),e.set!==void 0&&Ss(e.set,"accessor.set"),e.init!==void 0&&Ss(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 _m(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=Mc(m,i,l,o,n,s,a,c))!==void 0&&(No(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=Mc(m[g],i,l,o,n,s,a,c))!==void 0&&(No(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 wm(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)}_m(t,h,l,f,u,m,p,c)}}Dc(t,i),Dc(t,n)}function Dc(t,e){e&&t.push(function(r){for(var i=0;i<e.length;i++)e[i].call(r);return r})}function xm(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:gu(i,o)})}finally{o.v=!0}l!==void 0&&(No(10,l),n=l)}t.push(n,function(){for(var h=0;h<i.length;h++)i[h].call(n)})}}function Mv(t,e,r){var i=[];return wm(i,t,e),xm(i,t,r),i}function Dv(t){var e={},r=!1;function i(n,s){return r=!0,{done:!1,value:new Jo(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 Fv(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 Ov(t){return new Jo(t,0)}function $v(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 Sm(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 km(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 Co;function Rv(t,e,r,i){Co||(Co=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:Co,type:t,key:r===void 0?null:""+r,ref:null,props:e,_owner:null}}function Fc(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 Lv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fc(Object(r),!0).forEach(function(i){Xo(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Em(){Em=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 R(q,U,Y,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(Q){R("next",Q,Y,G)},function(Q){R("throw",Q,Y,G)}):A.resolve(ie).then(function(Q){se.value=Q,Y(se)},function(Q){return R("throw",Q,Y,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 R=c(P,A,E);if(R.type==="normal"){if(F=E.done?"completed":"suspendedYield",R.arg===u)continue;return{value:R.arg,done:E.done}}R.type==="throw"&&(F="completed",E.method="throw",E.arg=R.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(R,q){return D.type="throw",D.arg=P,A.next=R,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 Pm(t){return(Pm=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 Oc(){Oc=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)),Ti(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 Cm(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)},Oc.apply(this,arguments)}function Bv(t){this.wrapped=t}function Vv(t){return function(){return new cn(t.apply(this,arguments))}}function $c(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 Nv(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){$c(s,i,n,a,o,"next",l)}function o(l){$c(s,i,n,a,o,"throw",l)}a(void 0)})}}function zv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rc(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,Hs(i.key),i)}}function jv(t,e,r){return e&&Rc(t.prototype,e),r&&Rc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gv(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 Hv(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 Xo(t,e,r){return(e=Hs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Am(){return(Am=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 qv(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){Xo(t,n,r[n])})}return t}function Cm(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&&Ti(t,e)}function Uv(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ti(t,e)}function fn(t){return(fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function Ti(t,e){return(Ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r})(t,e)}function yu(){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 vu(t,e,r){return(vu=yu()?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&&Ti(o,s.prototype),o}).apply(null,arguments)}function Tm(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Im(t){var e=typeof Map=="function"?new Map:void 0;return(Im=function(r){if(r===null||!Tm(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 vu(r,arguments,fn(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ti(i,r)})(t)}function Wv(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function Zv(t){return t&&t.__esModule?t:{default:t}}function bu(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(bu=function(i){return i?r:e})(t)}function Yv(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=bu(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 Jv(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function Xv(t){if(t==null)throw new TypeError("Cannot destructure "+t)}function Mm(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 Kv(t,e){if(t==null)return{};var r,i,n=Mm(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 Dm(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fm(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 Dm(t)}function Qv(t){var e=yu();return function(){var r,i=fn(t);if(e){var n=fn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return Fm(this,r)}}function _u(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=fn(t))!==null;);return t}function Om(){return(Om=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=_u(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 wu(t,e,r,i){return(wu=typeof Reflect<"u"&&Reflect.set?Reflect.set:function(n,s,a,o){var l,h=_u(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 Xo(o,s,a);return!0})(t,e,r,i)}function e1(t,e,r,i,n){if(!wu(t,e,r,i||t)&&n)throw new Error("failed to set property");return r}function bi(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function t1(t,e){return e||(e=t.slice(0)),t.raw=e,t}function r1(t){throw new TypeError('"'+t+'" is read-only')}function i1(t){throw new TypeError('"'+t+'" is write-only')}function n1(t){throw new Error('Class "'+t+'" cannot be referenced in computed property keys.')}function $m(){}function Rm(t){throw new ReferenceError(t+" is not defined - temporal dead zone")}function s1(t,e){return t===$m?Rm(e):t}function a1(t,e){return Ko(t)||Sm(t,e)||Ii(t,e)||Qo()}function o1(t,e){return Ko(t)||km(t,e)||Ii(t,e)||Qo()}function Lm(t){return Ko(t)||xu(t)||Ii(t)||Qo()}function l1(t){return Bm(t)||xu(t)||Ii(t)||Vm()}function Bm(t){if(Array.isArray(t))return Cs(t)}function Ko(t){if(Array.isArray(t))return t}function h1(t,e,r){if(e&&!Array.isArray(e)&&typeof e.length=="number"){var i=e.length;return Cs(e,r!==void 0&&r<i?r:i)}return t(e,r)}function xu(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ii(t,e){if(t){if(typeof t=="string")return Cs(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)?Cs(t,e):void 0}}function Cs(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 Vm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c1(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ii(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
+ 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 u1(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=Ii(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.
32
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p1(t){return function(){var e=t.apply(this,arguments);return e.next(),e}}function Nm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Hs(t){var e=Nm(t,"string");return typeof e=="symbol"?e:String(e)}function d1(t,e){throw new Error("Decorating class property failed. Please ensure that proposal-class-properties is enabled and runs after the decorators transform.")}function f1(t,e,r,i){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(i):void 0})}function m1(t,e,r,i,n){var s={};return Object.keys(i).forEach(function(a){s[a]=i[a]}),s.enumerable=!!s.enumerable,s.configurable=!!s.configurable,("value"in s||s.initializer)&&(s.writable=!0),s=r.slice().reverse().reduce(function(a,o){return o(t,e,a)||a},s),n&&s.initializer!==void 0&&(s.value=s.initializer?s.initializer.call(n):void 0,s.initializer=void 0),s.initializer===void 0&&(Object.defineProperty(t,e,s),s=null),s}cn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},cn.prototype.next=function(t){return this._invoke("next",t)},cn.prototype.throw=function(t){return this._invoke("throw",t)},cn.prototype.return=function(t){return this._invoke("return",t)};var zm=0;function g1(t){return"__private_"+zm+++"_"+t}function y1(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}function v1(t,e){return Su(t,el(t,e,"get"))}function b1(t,e,r){return ku(t,el(t,e,"set"),r),r}function _1(t,e){return Eu(t,el(t,e,"set"))}function el(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function w1(t,e,r){return qs(t,e),tl(r,"get"),Su(t,r)}function x1(t,e,r,i){return qs(t,e),tl(r,"set"),ku(t,r,i),i}function S1(t,e,r){return qs(t,e),r}function k1(){throw new TypeError("attempted to set read only static private field")}function Su(t,e){return e.get?e.get.call(t):e.value}function ku(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}function Eu(t,e){if(e.set)return"__destrObj"in e||(e.__destrObj={set value(r){e.set.call(t,r)}}),e.__destrObj;if(!e.writable)throw new TypeError("attempted to set read only private field");return e}function E1(t,e,r){return qs(t,e),tl(r,"set"),Eu(t,r)}function qs(t,e){if(t!==e)throw new TypeError("Private static access of wrong provenance")}function tl(t,e){if(t===void 0)throw new TypeError("attempted to "+e+" private static field before its declaration")}function P1(t,e,r,i){var n=Pu();if(i)for(var s=0;s<i.length;s++)n=i[s](n);var a=e(function(l){n.initializeInstanceElements(l,o.elements)},r),o=n.decorateClass(Hm(a.d.map(jm)),t);return n.initializeClassElements(a.F,o.elements),n.runClassFinishers(a.F,o.finishers)}function Pu(){Pu=function(){return t};var t={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,r){["method","field"].forEach(function(i){r.forEach(function(n){n.kind===i&&n.placement==="own"&&this.defineClassElement(e,n)},this)},this)},initializeClassElements:function(e,r){var i=e.prototype;["method","field"].forEach(function(n){r.forEach(function(s){var a=s.placement;if(s.kind===n&&(a==="static"||a==="prototype")){var o=a==="static"?e:i;this.defineClassElement(o,s)}},this)},this)},defineClassElement:function(e,r){var i=r.descriptor;if(r.kind==="field"){var n=r.initializer;i={enumerable:i.enumerable,writable:i.writable,configurable:i.configurable,value:n===void 0?void 0:n.call(e)}}Object.defineProperty(e,r.key,i)},decorateClass:function(e,r){var i=[],n=[],s={static:[],prototype:[],own:[]};if(e.forEach(function(o){this.addElementPlacement(o,s)},this),e.forEach(function(o){if(!pn(o))return i.push(o);var l=this.decorateElement(o,s);i.push(l.element),i.push.apply(i,l.extras),n.push.apply(n,l.finishers)},this),!r)return{elements:i,finishers:n};var a=this.decorateConstructor(i,r);return n.push.apply(n,a.finishers),a.finishers=n,a},addElementPlacement:function(e,r,i){var n=r[e.placement];if(!i&&n.indexOf(e.key)!==-1)throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,r){for(var i=[],n=[],s=e.decorators,a=s.length-1;a>=0;a--){var o=r[e.placement];o.splice(o.indexOf(e.key),1);var l=this.fromElementDescriptor(e),h=this.toElementFinisherExtras((0,s[a])(l)||l);e=h.element,this.addElementPlacement(e,r),h.finisher&&n.push(h.finisher);var c=h.extras;if(c){for(var u=0;u<c.length;u++)this.addElementPlacement(c[u],r);i.push.apply(i,c)}}return{element:e,finishers:n,extras:i}},decorateConstructor:function(e,r){for(var i=[],n=r.length-1;n>=0;n--){var s=this.fromClassDescriptor(e),a=this.toClassDescriptor((0,r[n])(s)||s);if(a.finisher!==void 0&&i.push(a.finisher),a.elements!==void 0){e=a.elements;for(var o=0;o<e.length-1;o++)for(var l=o+1;l<e.length;l++)if(e[o].key===e[l].key&&e[o].placement===e[l].placement)throw new TypeError("Duplicated element ("+e[o].key+")")}}return{elements:e,finishers:i}},fromElementDescriptor:function(e){var r={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),e.kind==="field"&&(r.initializer=e.initializer),r},toElementDescriptors:function(e){if(e!==void 0)return Lm(e).map(function(r){var i=this.toElementDescriptor(r);return this.disallowProperty(r,"finisher","An element descriptor"),this.disallowProperty(r,"extras","An element descriptor"),i},this)},toElementDescriptor:function(e){var r=String(e.kind);if(r!=="method"&&r!=="field")throw new TypeError(`An element descriptor's .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "`+r+'"');var i=Hs(e.key),n=String(e.placement);if(n!=="static"&&n!=="prototype"&&n!=="own")throw new TypeError(`An element descriptor's .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "`+n+'"');var s=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var a={kind:r,key:i,placement:n,descriptor:Object.assign({},s)};return r!=="field"?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(s,"get","The property descriptor of a field descriptor"),this.disallowProperty(s,"set","The property descriptor of a field descriptor"),this.disallowProperty(s,"value","The property descriptor of a field descriptor"),a.initializer=e.initializer),a},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:Bc(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var r={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(r,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),r},toClassDescriptor:function(e){var r=String(e.kind);if(r!=="class")throw new TypeError(`A class descriptor's .kind property must be "class", but a decorator created a class descriptor with .kind "`+r+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var i=Bc(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:i}},runClassFinishers:function(e,r){for(var i=0;i<r.length;i++){var n=(0,r[i])(e);if(n!==void 0){if(typeof n!="function")throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,r,i){if(e[r]!==void 0)throw new TypeError(i+" can't have a ."+r+" property.")}};return t}function jm(t){var e,r=Hs(t.key);t.kind==="method"?e={value:t.value,writable:!0,configurable:!0,enumerable:!1}:t.kind==="get"?e={get:t.value,configurable:!0,enumerable:!1}:t.kind==="set"?e={set:t.value,configurable:!0,enumerable:!1}:t.kind==="field"&&(e={configurable:!0,writable:!0,enumerable:!0});var i={kind:t.kind==="field"?"field":"method",key:r,placement:t.static?"static":t.kind==="field"?"own":"prototype",descriptor:e};return t.decorators&&(i.decorators=t.decorators),t.kind==="field"&&(i.initializer=t.value),i}function Gm(t,e){t.descriptor.get!==void 0?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function Hm(t){for(var e=[],r=function(a){return a.kind==="method"&&a.key===s.key&&a.placement===s.placement},i=0;i<t.length;i++){var n,s=t[i];if(s.kind==="method"&&(n=e.find(r)))if(Lc(s.descriptor)||Lc(n.descriptor)){if(pn(s)||pn(n))throw new ReferenceError("Duplicated methods ("+s.key+") can't be decorated.");n.descriptor=s.descriptor}else{if(pn(s)){if(pn(n))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+s.key+").");n.decorators=s.decorators}Gm(s,n)}else e.push(s)}return e}function pn(t){return t.decorators&&t.decorators.length}function Lc(t){return t!==void 0&&!(t.value===void 0&&t.writable===void 0)}function Bc(t,e){var r=t[e];if(r!==void 0&&typeof r!="function")throw new TypeError("Expected '"+e+"' to be a function");return r}function A1(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function Au(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C1(t,e,r){Au(t,e),e.set(t,r)}function T1(t,e){Au(t,e),e.add(t)}function I1(){throw new TypeError("attempted to reassign private method")}function M1(t){return t}var Cu=function(t,e){return(Cu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)i.hasOwnProperty(n)&&(r[n]=i[n])})(t,e)};function D1(t,e){function r(){this.constructor=t}Cu(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var qm=function(){return(qm=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function F1(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var n=0;for(i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]])}return r}function tt(t,e,r,i){var n,s=arguments.length,a=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,i);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(a=(s<3?n(a):s>3?n(e,r,a):n(e,r))||a);return s>3&&a&&Object.defineProperty(e,r,a),a}function O1(t,e){return function(r,i){e(r,i,t)}}function $1(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function R1(t,e,r,i){return new(r||(r=Promise))(function(n,s){function a(h){try{l(i.next(h))}catch(c){s(c)}}function o(h){try{l(i.throw(h))}catch(c){s(c)}}function l(h){var c;h.done?n(h.value):(c=h.value,c instanceof r?c:new r(function(u){u(c)})).then(a,o)}l((i=i.apply(t,e||[])).next())})}function L1(t,e){var r,i,n,s,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(h){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(n=2&c[0]?i.return:c[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,c[1])).done)return n;switch(i=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,i=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(n=a.trys,!((n=n.length>0&&n[n.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(c[0]===6&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(u){c=[6,u],i=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([l,h])}}}function B1(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}function V1(t,e){for(var r in t)r==="default"||e.hasOwnProperty(r)||(e[r]=t[r])}function Vc(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Um(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i,n,s=r.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(o){n={error:o}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return a}function N1(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Um(arguments[e]));return t}function z1(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var i=Array(t),n=0;for(e=0;e<r;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,n++)i[n]=s[a];return i}function Ts(t){return this instanceof Ts?(this.v=t,this):new Ts(t)}function j1(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(t,e||[]),s=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(u){n[u]&&(i[u]=function(f){return new Promise(function(p,m){s.push([u,f,p,m])>1||o(u,f)})})}function o(u,f){try{(function(p){p.value instanceof Ts?Promise.resolve(p.value.v).then(l,h):c(s[0][2],p)})(n[u](f))}catch(p){c(s[0][3],p)}}function l(u){o("next",u)}function h(u){o("throw",u)}function c(u,f){u(f),s.shift(),s.length&&o(s[0][0],s[0][1])}}function G1(t){var e,r;return e={},i("next"),i("throw",function(n){throw n}),i("return"),e[Symbol.iterator]=function(){return this},e;function i(n,s){e[n]=t[n]?function(a){return(r=!r)?{value:Ts(t[n](a)),done:n==="return"}:s?s(a):a}:s}}function H1(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=typeof Vc=="function"?Vc(t):t[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(s){return new Promise(function(a,o){(function(l,h,c,u){Promise.resolve(u).then(function(f){l({value:f,done:c})},h)})(a,o,(s=t[n](s)).done,s.value)})}}}function q1(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function U1(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function W1(t){return t&&t.__esModule?t:{default:t}}function Z1(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Y1(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var ks=window,rl=ks.ShadowRoot&&(ks.ShadyCSS===void 0||ks.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,il=Symbol(),Nc=new WeakMap,Is=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==il)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(rl&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=Nc.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Nc.set(r,e))}return e}toString(){return this.cssText}},Wm=t=>new Is(typeof t=="string"?t:t+"",void 0,il),Zm=(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 Is(r,t,il)},Ym=(t,e)=>{rl?t.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):e.forEach(r=>{let i=document.createElement("style"),n=ks.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=r.cssText,t.appendChild(i)})},zc=rl?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return Wm(r)})(t):t,To,Ms=window,jc=Ms.trustedTypes,Jm=jc?jc.emptyScript:"",Gc=Ms.reactiveElementPolyfillSupport,jo={toAttribute(t,e){switch(e){case Boolean:t=t?Jm: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}},Tu=(t,e)=>e!==t&&(e==e||t==t),Io={attribute:!0,type:String,converter:jo,reflect:!1,hasChanged:Tu},tr=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}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=Io){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)||Io}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!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(zc(n))}else e!==void 0&&r.push(zc(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}u(){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 Ym(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=Io){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:jo).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:jo;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||Tu)(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){}};var Mo;tr.finalized=!0,tr.elementProperties=new Map,tr.elementStyles=[],tr.shadowRootOptions={mode:"open"},Gc?.({ReactiveElement:tr}),((To=Ms.reactiveElementVersions)!==null&&To!==void 0?To:Ms.reactiveElementVersions=[]).push("1.5.0");var Ds=window,Si=Ds.trustedTypes,Hc=Si?Si.createPolicy("lit-html",{createHTML:t=>t}):void 0,rr=`lit$${(Math.random()+"").slice(9)}$`,nl="?"+rr,Xm=`<${nl}>`,ki=document,mn=(t="")=>ki.createComment(t),gn=t=>t===null||typeof t!="object"&&typeof t!="function",Iu=Array.isArray,Mu=t=>Iu(t)||typeof t?.[Symbol.iterator]=="function",hn=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,qc=/-->/g,Uc=/>/g,Gr=RegExp(`>|[
33
33
  \f\r](?:([^\\s"'>=/]+)([
34
34
  \f\r]*=[
35
35
  \f\r]*(?:[^
36
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Lc=/'/g,Bc=/"/g,xu=/^(?:script|style|textarea|title)$/i,Su=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),bs=Su(1),R1=Su(2),ki=Symbol.for("lit-noChange"),Ge=Symbol.for("lit-nothing"),Vc=new WeakMap,wi=Si.createTreeWalker(Si,129,null,!1),ku=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":"",a=ln;for(let l=0;l<r;l++){let h=t[l],c,u,f=-1,p=0;for(;p<h.length&&(a.lastIndex=p,u=a.exec(h),u!==null);)p=a.lastIndex,a===ln?u[1]==="!--"?a=$c:u[1]!==void 0?a=Rc:u[2]!==void 0?(xu.test(u[2])&&(n=RegExp("</"+u[2],"g")),a=jr):u[3]!==void 0&&(a=jr):a===jr?u[0]===">"?(a=n??ln,f=-1):u[1]===void 0?f=-2:(f=a.lastIndex-u[2].length,c=u[1],a=u[3]===void 0?jr:u[3]==='"'?Bc:Lc):a===Bc||a===Lc?a=jr:a===$c||a===Rc?a=ln:(a=jr,n=void 0);let m=a===jr&&t[l+1].startsWith("/>")?" ":"";s+=a===ln?h+Lm:f>=0?(i.push(c),h.slice(0,f)+"$lit$"+h.slice(f)+tr+m):h+tr+(f===-2?(i.push(void 0),l):m)}let o=s+(t[r]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Oc!==void 0?Oc.createHTML(o):o,i]},gn=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]=ku(e,r);if(this.el=t.createElement(h,i),wi.currentNode=this.el.content,r===2){let u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(n=wi.nextNode())!==null&&l.length<o;){if(n.nodeType===1){if(n.hasAttributes()){let u=[];for(let f of n.getAttributeNames())if(f.endsWith("$lit$")||f.startsWith(tr)){let p=c[a++];if(u.push(f),p!==void 0){let m=n.getAttribute(p.toLowerCase()+"$lit$").split(tr),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:g[2],strings:m,ctor:g[1]==="."?Ds:g[1]==="?"?Fs:g[1]==="@"?Os:qr})}else l.push({type:6,index:s})}for(let f of u)n.removeAttribute(f)}if(xu.test(n.tagName)){let u=n.textContent.split(tr),f=u.length-1;if(f>0){n.textContent=xi?xi.emptyScript:"";for(let p=0;p<f;p++)n.append(u[p],fn()),wi.nextNode(),l.push({type:2,index:++s});n.append(u[f],fn())}}}else if(n.nodeType===8)if(n.data===Yo)l.push({type:2,index:s});else{let u=-1;for(;(u=n.data.indexOf(tr,u+1))!==-1;)l.push({type:7,index:s}),u+=tr.length-1}s++}}static createElement(e,r){let i=Si.createElement("template");return i.innerHTML=e,i}};function Hr(t,e,r=t,i){var n,s,a,o;if(e===ki)return e;let l=i!==void 0?(n=r._$Co)===null||n===void 0?void 0:n[i]:r._$Cl,h=mn(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=Hr(t,l._$AS(t,e.values),l,i)),e}var Ms=class{constructor(e,r){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var r;let{el:{content:i},parts:n}=this._$AD,s=((r=e?.creationScope)!==null&&r!==void 0?r:Si).importNode(i,!0);wi.currentNode=s;let a=wi.nextNode(),o=0,l=0,h=n[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new Ei(a,a.nextSibling,this,e):h.type===1?c=new h.ctor(a,h.name,h.strings,this,e):h.type===6&&(c=new $s(a,this,e)),this.u.push(c),h=n[++l]}o!==h?.index&&(a=wi.nextNode(),o++)}return s}p(e){let r=0;for(let i of this.u)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},Ei=class t{constructor(e,r,i,n){var s;this.type=2,this._$AH=Ge,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cm=(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._$Cm}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=Hr(this,e,r),mn(e)?e===Ge||e==null||e===""?(this._$AH!==Ge&&this._$AR(),this._$AH=Ge):e!==this._$AH&&e!==ki&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):wu(e)?this.k(e):this.g(e)}O(e,r=this._$AB){return this._$AA.parentNode.insertBefore(e,r)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==Ge&&mn(this._$AH)?this._$AA.nextSibling.data=e:this.T(Si.createTextNode(e)),this._$AH=e}$(e){var r;let{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=gn.createElement(n.h,this.options)),n);if(((r=this._$AH)===null||r===void 0?void 0:r._$AD)===s)this._$AH.p(i);else{let a=new Ms(s,this),o=a.v(this.options);a.p(i),this.T(o),this._$AH=a}}_$AC(e){let r=Vc.get(e.strings);return r===void 0&&Vc.set(e.strings,r=new gn(e)),r}k(e){_u(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.O(fn()),this.O(fn()),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._$Cm=e,(r=this._$AP)===null||r===void 0||r.call(this,e))}},qr=class{constructor(e,r,i,n,s){this.type=1,this._$AH=Ge,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=Ge}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=Hr(this,e,r,0),a=!mn(e)||e!==this._$AH&&e!==ki,a&&(this._$AH=e);else{let o=e,l,h;for(e=s[0],l=0;l<s.length-1;l++)h=Hr(this,o[i+l],r,l),h===ki&&(h=this._$AH[l]),a||(a=!mn(h)||h!==this._$AH[l]),h===Ge?e=Ge:e!==Ge&&(e+=(h??"")+s[l+1]),this._$AH[l]=h}a&&!n&&this.j(e)}j(e){e===Ge?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ds=class extends qr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Ge?void 0:e}},Bm=xi?xi.emptyScript:"",Fs=class extends qr{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Ge?this.element.setAttribute(this.name,Bm):this.element.removeAttribute(this.name)}},Os=class extends qr{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){var i;if((e=(i=Hr(this,e,r,0))!==null&&i!==void 0?i:Ge)===ki)return;let n=this._$AH,s=e===Ge&&n!==Ge||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==Ge&&(n===Ge||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)}},$s=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){Hr(this,e)}},L1={P:"$lit$",A:tr,M:Yo,C:1,L:ku,R:Ms,D:wu,V:Hr,I:Ei,H:qr,N:Fs,U:Os,B:Ds,F:$s},zc=Is.litHtmlPolyfillSupport;zc?.(gn,Ei),((xo=Is.litHtmlVersions)!==null&&xo!==void 0?xo:Is.litHtmlVersions=[]).push("2.5.0");var Vm=(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 Ei(e.insertBefore(fn(),o),o,void 0,r??{})}return a._$AI(t),a;},So,ko,B1=er,Gr=class extends er{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=Vm(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 ki}};Gr.finalized=!0,Gr._$litElement$=!0,(So=globalThis.litElementHydrateSupport)===null||So===void 0||So.call(globalThis,{LitElement:Gr});var Nc=globalThis.litElementPolyfillSupport;Nc?.({LitElement:Gr});var V1={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};((ko=globalThis.litElementVersions)!==null&&ko!==void 0?ko:globalThis.litElementVersions=[]).push("3.2.2");var z1=!1,zm=t=>e=>typeof e=="function"?((r,i)=>(customElements.define(r,i),i))(t,e):((r,i)=>{let{kind:n,elements:s}=i;return{kind:n,elements:s,finisher(a){customElements.define(r,a)}}})(t,e),Nm=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(r){r.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(r){r.createProperty(e.key,t)}};function rt(t){return(e,r)=>r!==void 0?((i,n,s)=>{n.constructor.createProperty(s,i)})(t,e,r):Nm(t,e);}function N1(t){return rt({...t,state:!0})}var j1=(t,e,r)=>{Object.defineProperty(e,r,t)},G1=(t,e)=>({kind:"method",placement:"prototype",key:e.key,descriptor:t}),Ii=({finisher:t,descriptor:e})=>(r,i)=>{var n;if(i===void 0){let s=(n=r.originalKey)!==null&&n!==void 0?n:r.key,a=e!=null?{kind:"method",placement:"prototype",key:s,descriptor:e(r.key)}:{...r,key:s};return t!=null&&(a.finisher=function(o){t(o,s)}),a}{let s=r.constructor;e!==void 0&&Object.defineProperty(r,i,e(i)),t?.(s,i)}};function H1(t){return Ii({finisher:(e,r)=>{Object.assign(e.prototype[r],t)}})}function jm(t,e){return Ii({descriptor:r=>{let i={get(){var n,s;return(s=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(t))!==null&&s!==void 0?s:null},enumerable:!0,configurable:!0};if(e){let n=typeof r=="symbol"?Symbol():"__"+r;i.get=function(){var s,a;return this[n]===void 0&&(this[n]=(a=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(t))!==null&&a!==void 0?a:null),this[n]}}return i}})}function q1(t){return Ii({descriptor:e=>({get(){var r,i;return(i=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelectorAll(t))!==null&&i!==void 0?i:[]},enumerable:!0,configurable:!0})})}function U1(t){return Ii({descriptor:e=>({async get(){var r;return await this.updateComplete,(r=this.renderRoot)===null||r===void 0?void 0:r.querySelector(t)},enumerable:!0,configurable:!0})})}var Eo,Gm=((Eo=window.HTMLSlotElement)===null||Eo===void 0?void 0:Eo.prototype.assignedElements)!=null?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter(r=>r.nodeType===Node.ELEMENT_NODE);function Hm(t){let{slot:e,selector:r}=t??{};return Ii({descriptor:i=>({get(){var n;let s="slot"+(e?`[name=${e}]`:":not([name])"),a=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(s),o=a!=null?Gm(a,t):[];return r?o.filter(l=>l.matches(r)):o},enumerable:!0,configurable:!0})})}function W1(t,e,r){let i,n=t;return typeof t=="object"?(n=t.slot,i=t):i={flatten:e},r?Hm({slot:n,flatten:e,selector:r}):Ii({descriptor:s=>({get(){var a,o;let l="slot"+(n?`[name=${n}]`:":not([name])"),h=(a=this.renderRoot)===null||a===void 0?void 0:a.querySelector(l);return(o=h?.assignedNodes(i))!==null&&o!==void 0?o:[]},enumerable:!0,configurable:!0})})}var Z1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qm(t,e,r){return t(r={path:e,exports:{},require:function(i,n){return Um(i,n??r.path)}},r.exports),r.exports}function Y1(t){return t&&t.default||t}function Um(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Wm=qm(function(module,exports){typeof navigator<"u"&&function(t,e){module.exports=e()}(0,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i,n=t.length;for(r=0;r<n;r+=1)for(var s in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,s)&&(e.prototype[s]=i[s])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].pause()},resume:function(){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].resume()},setRate:function(e){var r,i=this.audios.length;for(r=0;r<i;r+=1)this.audios[r].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function t(e,r){var i,n=0,s=[];switch(e){case"int16":case"uint8c":i=1;break;default:i=1.1}for(n=0;n<r;n+=1)s.push(i);return s}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?function(e,r){return e==="float32"?new Float32Array(r):e==="int16"?new Int16Array(r):e==="uint8c"?new Uint8ClampedArray(r):t(e,r)}:t}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){return(_typeof$6=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)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}(function(){var t,e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]})(),BMMath.random=Math.random,BMMath.abs=function(t){if(_typeof$6(t)==="object"&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){_shouldRoundValues=!!t}function bmRnd(t){return _shouldRoundValues?Math.round(t):t}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(t,e,r){var i,n,s,a,o,l,h,c;switch(l=r*(1-e),h=r*(1-(o=6*t-(a=Math.floor(6*t)))*e),c=r*(1-(1-o)*e),a%6){case 0:i=r,n=c,s=l;break;case 1:i=h,n=r,s=l;break;case 2:i=l,n=r,s=c;break;case 3:i=l,n=h,s=r;break;case 4:i=c,n=l,s=r;break;case 5:i=r,n=l,s=h}return[i,n,s]}function RGBtoHSV(t,e,r){var i,n=Math.max(t,e,r),s=Math.min(t,e,r),a=n-s,o=n===0?0:a/n,l=n/255;switch(n){case s:i=0;break;case t:i=e-r+a*(e<r?6:0),i/=6*a;break;case e:i=r-t+2*a,i/=6*a;break;case r:i=t-e+4*a,i/=6*a}return[i,o,l]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=e.length===1?"0"+e:e;return function(i,n,s){return i<0&&(i=0),n<0&&(n=0),s<0&&(s=0),"#"+r[i]+r[n]+r[s]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t},getIdPrefix=function(){return idPrefix$1};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return(_typeof$5=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)}var dataManager=function(){var t,e,r=1,i=[],n={onmessage:function(){},postMessage:function(l){t({data:l})}},s={postMessage:function(l){n.onmessage({data:l})}};function a(){e||((e=function(l){if(window.Worker&&window.Blob&&getWebWorker()){var h=new Blob(["var _workerSelf = self; self.onmessage = ",l.toString()],{type:"text/javascript"}),c=URL.createObjectURL(h);return new Worker(c)}return t=l,n}(function(l){if(s.dataManager||(s.dataManager=function(){function c(S,w){var M,k,I,P,A,E,F=S.length;for(k=0;k<F;k+=1)if("ks"in(M=S[k])&&!M.completed){if(M.completed=!0,M.hasMask){var O=M.masksProperties;for(P=O.length,I=0;I<P;I+=1)if(O[I].pt.k.i)p(O[I].pt.k);else for(E=O[I].pt.k.length,A=0;A<E;A+=1)O[I].pt.k[A].s&&p(O[I].pt.k[A].s[0]),O[I].pt.k[A].e&&p(O[I].pt.k[A].e[0])}M.ty===0?(M.layers=u(M.refId,w),c(M.layers,w)):M.ty===4?f(M.shapes):M.ty===5&&x(M)}}function u(S,w){var M=function(k,I){for(var P=0,A=I.length;P<A;){if(I[P].id===k)return I[P];P+=1}return null}(S,w);return M?M.layers.__used?JSON.parse(JSON.stringify(M.layers)):(M.layers.__used=!0,M.layers):null}function f(S){var w,M,k;for(w=S.length-1;w>=0;w-=1)if(S[w].ty==="sh")if(S[w].ks.k.i)p(S[w].ks.k);else for(k=S[w].ks.k.length,M=0;M<k;M+=1)S[w].ks.k[M].s&&p(S[w].ks.k[M].s[0]),S[w].ks.k[M].e&&p(S[w].ks.k[M].e[0]);else S[w].ty==="gr"&&f(S[w].it)}function p(S){var w,M=S.i.length;for(w=0;w<M;w+=1)S.i[w][0]+=S.v[w][0],S.i[w][1]+=S.v[w][1],S.o[w][0]+=S.v[w][0],S.o[w][1]+=S.v[w][1]}function m(S,w){var M=w?w.split("."):[100,100,100];return S[0]>M[0]||!(M[0]>S[0])&&(S[1]>M[1]||!(M[1]>S[1])&&(S[2]>M[2]||!(M[2]>S[2])&&null))}var g,d=function(){var S=[4,4,14];function w(M){var k,I,P,A=M.length;for(k=0;k<A;k+=1)M[k].ty===5&&(I=M[k],P=void 0,P=I.t.d,I.t.d={k:[{s:P,t:0}]})}return function(M){if(m(S,M.v)&&(w(M.layers),M.assets)){var k,I=M.assets.length;for(k=0;k<I;k+=1)M.assets[k].layers&&w(M.assets[k].layers)}}}(),y=(g=[4,7,99],function(S){if(S.chars&&!m(g,S.v)){var w,M=S.chars.length;for(w=0;w<M;w+=1){var k=S.chars[w];k.data&&k.data.shapes&&(f(k.data.shapes),k.data.ip=0,k.data.op=99999,k.data.st=0,k.data.sr=1,k.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},S.chars[w].t||(k.data.shapes.push({ty:"no"}),k.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),v=function(){var S=[5,7,15];function w(M){var k,I,P,A=M.length;for(k=0;k<A;k+=1)M[k].ty===5&&(I=M[k],P=void 0,typeof(P=I.t.p).a=="number"&&(P.a={a:0,k:P.a}),typeof P.p=="number"&&(P.p={a:0,k:P.p}),typeof P.r=="number"&&(P.r={a:0,k:P.r}))}return function(M){if(m(S,M.v)&&(w(M.layers),M.assets)){var k,I=M.assets.length;for(k=0;k<I;k+=1)M.assets[k].layers&&w(M.assets[k].layers)}}}(),b=function(){var S=[4,1,9];function w(k){var I,P,A,E=k.length;for(I=0;I<E;I+=1)if(k[I].ty==="gr")w(k[I].it);else if(k[I].ty==="fl"||k[I].ty==="st")if(k[I].c.k&&k[I].c.k[0].i)for(A=k[I].c.k.length,P=0;P<A;P+=1)k[I].c.k[P].s&&(k[I].c.k[P].s[0]/=255,k[I].c.k[P].s[1]/=255,k[I].c.k[P].s[2]/=255,k[I].c.k[P].s[3]/=255),k[I].c.k[P].e&&(k[I].c.k[P].e[0]/=255,k[I].c.k[P].e[1]/=255,k[I].c.k[P].e[2]/=255,k[I].c.k[P].e[3]/=255);else k[I].c.k[0]/=255,k[I].c.k[1]/=255,k[I].c.k[2]/=255,k[I].c.k[3]/=255}function M(k){var I,P=k.length;for(I=0;I<P;I+=1)k[I].ty===4&&w(k[I].shapes)}return function(k){if(m(S,k.v)&&(M(k.layers),k.assets)){var I,P=k.assets.length;for(I=0;I<P;I+=1)k.assets[I].layers&&M(k.assets[I].layers)}}}(),_=function(){var S=[4,4,18];function w(k){var I,P,A;for(I=k.length-1;I>=0;I-=1)if(k[I].ty==="sh")if(k[I].ks.k.i)k[I].ks.k.c=k[I].closed;else for(A=k[I].ks.k.length,P=0;P<A;P+=1)k[I].ks.k[P].s&&(k[I].ks.k[P].s[0].c=k[I].closed),k[I].ks.k[P].e&&(k[I].ks.k[P].e[0].c=k[I].closed);else k[I].ty==="gr"&&w(k[I].it)}function M(k){var I,P,A,E,F,O,D=k.length;for(P=0;P<D;P+=1){if((I=k[P]).hasMask){var C=I.masksProperties;for(E=C.length,A=0;A<E;A+=1)if(C[A].pt.k.i)C[A].pt.k.c=C[A].cl;else for(O=C[A].pt.k.length,F=0;F<O;F+=1)C[A].pt.k[F].s&&(C[A].pt.k[F].s[0].c=C[A].cl),C[A].pt.k[F].e&&(C[A].pt.k[F].e[0].c=C[A].cl)}I.ty===4&&w(I.shapes)}}return function(k){if(m(S,k.v)&&(M(k.layers),k.assets)){var I,P=k.assets.length;for(I=0;I<P;I+=1)k.assets[I].layers&&M(k.assets[I].layers)}}}();function x(S){S.t.a.length===0&&S.t.p}var T={completeData:function(S){S.__complete||(b(S),d(S),y(S),v(S),_(S),c(S.layers,S.assets),function(w,M){if(w){var k=0,I=w.length;for(k=0;k<I;k+=1)w[k].t===1&&(w[k].data.layers=u(w[k].data.refId,M),c(w[k].data.layers,M))}}(S.chars,S.assets),S.__complete=!0)}};return T.checkColors=b,T.checkChars=y,T.checkPathProperties=v,T.checkShapes=_,T.completeLayers=c,T}()),s.assetLoader||(s.assetLoader=function(){function c(u){var f=u.getResponseHeader("content-type");return f&&u.responseType==="json"&&f.indexOf("json")!==-1||u.response&&_typeof$5(u.response)==="object"?u.response:u.response&&typeof u.response=="string"?JSON.parse(u.response):u.responseText?JSON.parse(u.responseText):null}return{load:function(u,f,p,m){var g,d=new XMLHttpRequest;try{d.responseType="json"}catch{}d.onreadystatechange=function(){if(d.readyState===4)if(d.status===200)g=c(d),p(g);else try{g=c(d),p(g)}catch(y){m&&m(y)}};try{d.open(["G","E","T"].join(""),u,!0)}catch{d.open(["G","E","T"].join(""),f+"/"+u,!0)}d.send()}}}()),l.data.type==="loadAnimation")s.assetLoader.load(l.data.path,l.data.fullPath,function(c){s.dataManager.completeData(c),s.postMessage({id:l.data.id,payload:c,status:"success"})},function(){s.postMessage({id:l.data.id,status:"error"})});else if(l.data.type==="complete"){var h=l.data.animation;s.dataManager.completeData(h),s.postMessage({id:l.data.id,payload:h,status:"success"})}else l.data.type==="loadData"&&s.assetLoader.load(l.data.path,l.data.fullPath,function(c){s.postMessage({id:l.data.id,payload:c,status:"success"})},function(){s.postMessage({id:l.data.id,status:"error"})})})).onmessage=function(l){var h=l.data,c=h.id,u=i[c];i[c]=null,h.status==="success"?u.onComplete(h.payload):u.onError&&u.onError()})}function o(l,h){var c="processId_"+(r+=1);return i[c]={onComplete:l,onError:h},c}return{loadAnimation:function(l,h,c){a();var u=o(h,c);e.postMessage({type:"loadAnimation",path:l,fullPath:window.location.origin+window.location.pathname,id:u})},loadData:function(l,h,c){a();var u=o(h,c);e.postMessage({type:"loadData",path:l,fullPath:window.location.origin+window.location.pathname,id:u})},completeAnimation:function(l,h,c){a();var u=o(h,c);e.postMessage({type:"complete",animation:l,id:u})}}}(),ImagePreloader=function(){var t=function(){var o=createTag("canvas");o.width=1,o.height=1;var l=o.getContext("2d");return l.fillStyle="rgba(0,0,0,0)",l.fillRect(0,0,1,1),o}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(o,l,h){var c="";if(o.e)c=o.p;else if(l){var u=o.p;u.indexOf("images/")!==-1&&(u=u.split("/")[1]),c=l+u}else c=h,c+=o.u?o.u:"",c+=o.p;return c}function n(o){var l=0,h=setInterval(function(){(o.getBBox().width||l>500)&&(this._imageLoaded(),clearInterval(h)),l+=1}.bind(this),50)}function s(o){var l={assetData:o},h=i(o,this.assetsPath,this.path);return dataManager.loadData(h,function(c){l.img=c,this._footageLoaded()}.bind(this),function(){l.img={},this._footageLoaded()}.bind(this)),l}function a(){this._imageLoaded=e.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=n.bind(this),this.createFootageData=s.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return a.prototype={loadAssets:function(o,l){var h;this.imagesLoadedCb=l;var c=o.length;for(h=0;h<c;h+=1)o[h].layers||(o[h].t&&o[h].t!=="seq"?o[h].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(o[h]))):(this.totalImages+=1,this.images.push(this._createImageData(o[h]))))},setAssetsPath:function(o){this.assetsPath=o||""},setPath:function(o){this.path=o||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(o){for(var l=0,h=this.images.length;l<h;){if(this.images[l].assetData===o)return this.images[l].img;l+=1}return null},createImgData:function(o){var l=i(o,this.assetsPath,this.path),h=createTag("img");h.crossOrigin="anonymous",h.addEventListener("load",this._imageLoaded,!1),h.addEventListener("error",function(){c.img=t,this._imageLoaded()}.bind(this),!1),h.src=l;var c={img:h,assetData:o};return c},createImageData:function(o){var l=i(o,this.assetsPath,this.path),h=createNS("image");isSafari?this.testImageLoaded(h):h.addEventListener("load",this._imageLoaded,!1),h.addEventListener("error",function(){c.img=t,this._imageLoaded()}.bind(this),!1),h.setAttributeNS("http://www.w3.org/1999/xlink","href",l),this._elementHelper.append?this._elementHelper.append(h):this._elementHelper.appendChild(h);var c={img:h,assetData:o};return c},imageLoaded:e,footageLoaded:r,setCacheType:function(o,l){o==="svg"?(this._elementHelper=l,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},a}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var markerParser=function(){function t(e){for(var r,i=e.split(`\r
37
- `),n={},s=0,a=0;a<i.length;a+=1)(r=i[a].split(":")).length===2&&(n[r[0]]=r[1].trim(),s+=1);if(s===0)throw new Error;return n}return function(e){for(var r=[],i=0;i<e.length;i+=1){var n=e[i],s={time:n.tm,duration:n.dr};try{s.payload=JSON.parse(e[i].cm)}catch{try{s.payload=t(e[i].cm)}catch{s.payload={name:e[i].cm}}}r.push(s)}return r}}(),ProjectInterface=function(){function t(e){this.compositions.push(e)}return function(){function e(r){for(var i=0,n=this.compositions.length;i<n;){if(this.compositions[i].data&&this.compositions[i].data.nm===r)return this.compositions[i].prepareFrame&&this.compositions[i].data.xt&&this.compositions[i].prepareFrame(this.currentFrame),this.compositions[i].compInterface;i+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function _typeof$4(t){return(_typeof$4=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)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var r=getRenderer(e);this.renderer=new r(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,t.loop===""||t.loop===null||t.loop===void 0||t.loop===!0?this.loop=!0:t.loop===!1?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(t.path.lastIndexOf("\\")!==-1?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&_typeof$4(e)!=="object"&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var n=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";n==="false"?r.loop=!1:n==="true"?r.loop=!0:n!==""&&(r.loop=parseInt(n,10));var s=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay=s!=="false",r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"",(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")==="false"&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,n=i.length,s=t.layers,a=s.length;for(r=0;r<a;r+=1)for(e=0;e<n;){if(i[e].id===s[r].id){i[e]=s[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(n=t.assets.length,e=0;e<n;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||t.length===0||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(t,e){var r=typeof t=="number"?t:void 0,i=typeof e=="number"?e:void 0;this.renderer.updateContainerSize(r,i)},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(this.isLoaded!==!1&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_pause"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_play"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var n=this.getMarkerData(t);n&&this.goToAndStop(n.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var n=this.getMarkerData(t);n&&(n.duration?this.playSegments([n.time,n.time+n.duration],!0):this.goToAndStop(n.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(this.isPaused!==!0&&this.isLoaded!==!1){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&this.loop!==!0?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,r!==-1&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),_typeof$4(t[0])==="object"){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;r.indexOf("images/")!==-1&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(t,e,r){try{this.renderer.getElementByPath(t).updateDocumentData(e,r)}catch{}},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(t,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}t==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),t==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),t==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),t==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),t==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},e=[],r=0,i=0,n=0,s=!0,a=!1;function o(g){for(var d=0,y=g.target;d<i;)e[d].animation===y&&(e.splice(d,1),d-=1,i-=1,y.isPaused||c()),d+=1}function l(g,d){if(!g)return null;for(var y=0;y<i;){if(e[y].elem===g&&e[y].elem!==null)return e[y].animation;y+=1}var v=new AnimationItem;return u(v,g),v.setData(g,d),v}function h(){n+=1,m()}function c(){n-=1}function u(g,d){g.addEventListener("destroy",o),g.addEventListener("_active",h),g.addEventListener("_idle",c),e.push({elem:d,animation:g}),i+=1}function f(g){var d,y=g-r;for(d=0;d<i;d+=1)e[d].animation.advanceTime(y);r=g,n&&!a?window.requestAnimationFrame(f):s=!0}function p(g){r=g,window.requestAnimationFrame(f)}function m(){!a&&n&&s&&(window.requestAnimationFrame(p),s=!1)}return t.registerAnimation=l,t.loadAnimation=function(g){var d=new AnimationItem;return u(d,null),d.setParams(g),d},t.setSpeed=function(g,d){var y;for(y=0;y<i;y+=1)e[y].animation.setSpeed(g,d)},t.setDirection=function(g,d){var y;for(y=0;y<i;y+=1)e[y].animation.setDirection(g,d)},t.play=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.play(g)},t.pause=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.pause(g)},t.stop=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.stop(g)},t.togglePause=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.togglePause(g)},t.searchAnimations=function(g,d,y){var v,b=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),_=b.length;for(v=0;v<_;v+=1)y&&b[v].setAttribute("data-bm-type",y),l(b[v],g);if(d&&_===0){y||(y="svg");var x=document.getElementsByTagName("body")[0];x.innerText="";var T=createTag("div");T.style.width="100%",T.style.height="100%",T.setAttribute("data-bm-type",y),x.appendChild(T),l(T,g)}},t.resize=function(){var g;for(g=0;g<i;g+=1)e[g].animation.resize()},t.goToAndStop=function(g,d,y){var v;for(v=0;v<i;v+=1)e[v].animation.goToAndStop(g,d,y)},t.destroy=function(g){var d;for(d=i-1;d>=0;d-=1)e[d].animation.destroy(g)},t.freeze=function(){a=!0},t.unfreeze=function(){a=!1,m()},t.setVolume=function(g,d){var y;for(y=0;y<i;y+=1)e[y].animation.setVolume(g,d)},t.mute=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.mute(g)},t.unmute=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.unmute(g)},t.getRegisteredAnimations=function(){var g,d=e.length,y=[];for(g=0;g<d;g+=1)y.push(e[g].animation);return y},t}(),BezierFactory=function(){var t={getBezierEasing:function(h,c,u,f,p){var m=p||("bez_"+h+"_"+c+"_"+u+"_"+f).replace(/\./g,"p");if(e[m])return e[m];var g=new l([h,c,u,f]);return e[m]=g,g}},e={},r=typeof Float32Array=="function";function i(h,c){return 1-3*c+3*h}function n(h,c){return 3*c-6*h}function s(h){return 3*h}function a(h,c,u){return((i(c,u)*h+n(c,u))*h+s(c))*h}function o(h,c,u){return 3*i(c,u)*h*h+2*n(c,u)*h+s(c)}function l(h){this._p=h,this._mSampleValues=r?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(h){var c=this._p[0],u=this._p[1],f=this._p[2],p=this._p[3];return this._precomputed||this._precompute(),c===u&&f===p?h:h===0?0:h===1?1:a(this._getTForX(h),u,p)},_precompute:function(){var h=this._p[0],c=this._p[1],u=this._p[2],f=this._p[3];this._precomputed=!0,h===c&&u===f||this._calcSampleValues()},_calcSampleValues:function(){for(var h=this._p[0],c=this._p[2],u=0;u<11;++u)this._mSampleValues[u]=a(.1*u,h,c)},_getTForX:function(h){for(var c=this._p[0],u=this._p[2],f=this._mSampleValues,p=0,m=1;m!==10&&f[m]<=h;++m)p+=.1;var g=p+.1*((h-f[--m])/(f[m+1]-f[m])),d=o(g,c,u);return d>=.001?function(y,v,b,_){for(var x=0;x<4;++x){var T=o(v,b,_);if(T===0)return v;v-=(a(v,b,_)-y)/T}return v}(h,g,c,u):d===0?g:function(y,v,b,_,x){var T,S,w=0;do(T=a(S=v+(b-v)/2,_,x)-y)>0?b=S:v=S;while(Math.abs(T)>1e-7&&++w<10);return S}(h,p,p+.1,c,u)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,r){var i=0,n=t,s=createSizedArray(n);return{newElement:function(){return i?s[i-=1]:e()},release:function(a){i===n&&(s=pooling.double(s),n*=2),r&&r(a),s[i]=a,i+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0});function bezFunction(){var t=Math;function e(h,c,u,f,p,m){var g=h*f+c*p+u*m-p*f-m*h-u*c;return g>-.001&&g<.001}var r=function(h,c,u,f){var p,m,g,d,y,v,b=getDefaultCurveSegments(),_=0,x=[],T=[],S=bezierLengthPool.newElement();for(g=u.length,p=0;p<b;p+=1){for(y=p/(b-1),v=0,m=0;m<g;m+=1)d=bmPow(1-y,3)*h[m]+3*bmPow(1-y,2)*y*u[m]+3*(1-y)*bmPow(y,2)*f[m]+bmPow(y,3)*c[m],x[m]=d,T[m]!==null&&(v+=bmPow(x[m]-T[m],2)),T[m]=x[m];v&&(_+=v=bmSqrt(v)),S.percents[p]=y,S.lengths[p]=_}return S.addedLength=_,S};function i(h){this.segmentLength=0,this.points=new Array(h)}function n(h,c){this.partialLength=h,this.point=c}var s,a=(s={},function(h,c,u,f){var p=(h[0]+"_"+h[1]+"_"+c[0]+"_"+c[1]+"_"+u[0]+"_"+u[1]+"_"+f[0]+"_"+f[1]).replace(/\./g,"p");if(!s[p]){var m,g,d,y,v,b,_,x=getDefaultCurveSegments(),T=0,S=null;h.length===2&&(h[0]!==c[0]||h[1]!==c[1])&&e(h[0],h[1],c[0],c[1],h[0]+u[0],h[1]+u[1])&&e(h[0],h[1],c[0],c[1],c[0]+f[0],c[1]+f[1])&&(x=2);var w=new i(x);for(d=u.length,m=0;m<x;m+=1){for(_=createSizedArray(d),v=m/(x-1),b=0,g=0;g<d;g+=1)y=bmPow(1-v,3)*h[g]+3*bmPow(1-v,2)*v*(h[g]+u[g])+3*(1-v)*bmPow(v,2)*(c[g]+f[g])+bmPow(v,3)*c[g],_[g]=y,S!==null&&(b+=bmPow(_[g]-S[g],2));T+=b=bmSqrt(b),w.points[m]=new n(b,_),S=_}w.segmentLength=T,s[p]=w}return s[p]});function o(h,c){var u=c.percents,f=c.lengths,p=u.length,m=bmFloor((p-1)*h),g=h*c.addedLength,d=0;if(m===p-1||m===0||g===f[m])return u[m];for(var y=f[m]>g?-1:1,v=!0;v;)if(f[m]<=g&&f[m+1]>g?(d=(g-f[m])/(f[m+1]-f[m]),v=!1):m+=y,m<0||m>=p-1){if(m===p-1)return u[m];v=!1}return u[m]+(u[m+1]-u[m])*d}var l=createTypedArray("float32",8);return{getSegmentsLength:function(h){var c,u=segmentsLengthPool.newElement(),f=h.c,p=h.v,m=h.o,g=h.i,d=h._length,y=u.lengths,v=0;for(c=0;c<d-1;c+=1)y[c]=r(p[c],p[c+1],m[c],g[c+1]),v+=y[c].addedLength;return f&&d&&(y[c]=r(p[c],p[0],m[c],g[0]),v+=y[c].addedLength),u.totalLength=v,u},getNewSegment:function(h,c,u,f,p,m,g){p<0?p=0:p>1&&(p=1);var d,y=o(p,g),v=o(m=m>1?1:m,g),b=h.length,_=1-y,x=1-v,T=_*_*_,S=y*_*_*3,w=y*y*_*3,M=y*y*y,k=_*_*x,I=y*_*x+_*y*x+_*_*v,P=y*y*x+_*y*v+y*_*v,A=y*y*v,E=_*x*x,F=y*x*x+_*v*x+_*x*v,O=y*v*x+_*v*v+y*x*v,D=y*v*v,C=x*x*x,$=v*x*x+x*v*x+x*x*v,R=v*v*x+x*v*v+v*x*v,q=v*v*v;for(d=0;d<b;d+=1)l[4*d]=t.round(1e3*(T*h[d]+S*u[d]+w*f[d]+M*c[d]))/1e3,l[4*d+1]=t.round(1e3*(k*h[d]+I*u[d]+P*f[d]+A*c[d]))/1e3,l[4*d+2]=t.round(1e3*(E*h[d]+F*u[d]+O*f[d]+D*c[d]))/1e3,l[4*d+3]=t.round(1e3*(C*h[d]+$*u[d]+R*f[d]+q*c[d]))/1e3;return l},getPointInSegment:function(h,c,u,f,p,m){var g=o(p,m),d=1-g;return[t.round(1e3*(d*d*d*h[0]+(g*d*d+d*g*d+d*d*g)*u[0]+(g*g*d+d*g*g+g*d*g)*f[0]+g*g*g*c[0]))/1e3,t.round(1e3*(d*d*d*h[1]+(g*d*d+d*g*d+d*d*g)*u[1]+(g*g*d+d*g*g+g*d*g)*f[1]+g*g*g*c[1]))/1e3]},buildBezierData:a,pointOnLine2D:e,pointOnLine3D:function(h,c,u,f,p,m,g,d,y){if(u===0&&m===0&&y===0)return e(h,c,f,p,g,d);var v,b=t.sqrt(t.pow(f-h,2)+t.pow(p-c,2)+t.pow(m-u,2)),_=t.sqrt(t.pow(g-h,2)+t.pow(d-c,2)+t.pow(y-u,2)),x=t.sqrt(t.pow(g-f,2)+t.pow(d-p,2)+t.pow(y-m,2));return(v=b>_?b>x?b-_-x:x-_-b:x>_?x-_-b:_-b-x)>-1e-4&&v<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var t=initialDefaultFrame,e=Math.abs;function r(f,p){var m,g=this.offsetTime;this.propType==="multidimensional"&&(m=createTypedArray("float32",this.pv.length));for(var d,y,v,b,_,x,T,S,w,M=p.lastIndex,k=M,I=this.keyframes.length-1,P=!0;P;){if(d=this.keyframes[k],y=this.keyframes[k+1],k===I-1&&f>=y.t-g){d.h&&(d=y),M=0;break}if(y.t-g>f){M=k;break}k<I-1?k+=1:(M=0,P=!1)}v=this.keyframesMetadata[k]||{};var A,E=y.t-g,F=d.t-g;if(d.to){v.bezierData||(v.bezierData=bez.buildBezierData(d.s,y.s||d.e,d.to,d.ti));var O=v.bezierData;if(f>=E||f<F){var D=f>=E?O.points.length-1:0;for(_=O.points[D].point.length,b=0;b<_;b+=1)m[b]=O.points[D].point[b]}else{v.__fnct?w=v.__fnct:(w=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y,d.n).get,v.__fnct=w),x=w((f-F)/(E-F));var C,$=O.segmentLength*x,R=p.lastFrame<f&&p._lastKeyframeIndex===k?p._lastAddedLength:0;for(S=p.lastFrame<f&&p._lastKeyframeIndex===k?p._lastPoint:0,P=!0,T=O.points.length;P;){if(R+=O.points[S].partialLength,$===0||x===0||S===O.points.length-1){for(_=O.points[S].point.length,b=0;b<_;b+=1)m[b]=O.points[S].point[b];break}if($>=R&&$<R+O.points[S+1].partialLength){for(C=($-R)/O.points[S+1].partialLength,_=O.points[S].point.length,b=0;b<_;b+=1)m[b]=O.points[S].point[b]+(O.points[S+1].point[b]-O.points[S].point[b])*C;break}S<T-1?S+=1:P=!1}p._lastPoint=S,p._lastAddedLength=R-O.points[S].partialLength,p._lastKeyframeIndex=k}}else{var q,U,Y,G,te;if(I=d.s.length,A=y.s||d.e,this.sh&&d.h!==1)f>=E?(m[0]=A[0],m[1]=A[1],m[2]=A[2]):f<=F?(m[0]=d.s[0],m[1]=d.s[1],m[2]=d.s[2]):function(ne,re){var Q=re[0],we=re[1],ce=re[2],Ce=re[3],xe=Math.atan2(2*we*Ce-2*Q*ce,1-2*we*we-2*ce*ce),W=Math.asin(2*Q*we+2*ce*Ce),He=Math.atan2(2*Q*Ce-2*we*ce,1-2*Q*Q-2*ce*ce);ne[0]=xe/degToRads,ne[1]=W/degToRads,ne[2]=He/degToRads}(m,function(ne,re,Q){var we,ce,Ce,xe,W,He=[],kt=ne[0],Et=ne[1],st=ne[2],pt=ne[3],at=re[0],Re=re[1],dt=re[2],ft=re[3];return(ce=kt*at+Et*Re+st*dt+pt*ft)<0&&(ce=-ce,at=-at,Re=-Re,dt=-dt,ft=-ft),1-ce>1e-6?(we=Math.acos(ce),Ce=Math.sin(we),xe=Math.sin((1-Q)*we)/Ce,W=Math.sin(Q*we)/Ce):(xe=1-Q,W=Q),He[0]=xe*kt+W*at,He[1]=xe*Et+W*Re,He[2]=xe*st+W*dt,He[3]=xe*pt+W*ft,He}(i(d.s),i(A),(f-F)/(E-F)));else for(k=0;k<I;k+=1)d.h!==1&&(f>=E?x=1:f<F?x=0:(d.o.x.constructor===Array?(v.__fnct||(v.__fnct=[]),v.__fnct[k]?w=v.__fnct[k]:(q=d.o.x[k]===void 0?d.o.x[0]:d.o.x[k],U=d.o.y[k]===void 0?d.o.y[0]:d.o.y[k],Y=d.i.x[k]===void 0?d.i.x[0]:d.i.x[k],G=d.i.y[k]===void 0?d.i.y[0]:d.i.y[k],w=BezierFactory.getBezierEasing(q,U,Y,G).get,v.__fnct[k]=w)):v.__fnct?w=v.__fnct:(q=d.o.x,U=d.o.y,Y=d.i.x,G=d.i.y,w=BezierFactory.getBezierEasing(q,U,Y,G).get,d.keyframeMetadata=w),x=w((f-F)/(E-F)))),A=y.s||d.e,te=d.h===1?d.s[k]:d.s[k]+(A[k]-d.s[k])*x,this.propType==="multidimensional"?m[k]=te:m=te}return p.lastIndex=M,m}function i(f){var p=f[0]*degToRads,m=f[1]*degToRads,g=f[2]*degToRads,d=Math.cos(p/2),y=Math.cos(m/2),v=Math.cos(g/2),b=Math.sin(p/2),_=Math.sin(m/2),x=Math.sin(g/2);return[b*_*v+d*y*x,b*y*v+d*_*x,d*_*v-b*y*x,d*y*v-b*_*x]}function n(){var f=this.comp.renderedFrame-this.offsetTime,p=this.keyframes[0].t-this.offsetTime,m=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(f===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=m&&f>=m||this._caching.lastFrame<p&&f<p))){this._caching.lastFrame>=f&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var g=this.interpolateValue(f,this._caching);this.pv=g}return this._caching.lastFrame=f,this.pv}function s(f){var p;if(this.propType==="unidimensional")p=f*this.mult,e(this.v-p)>1e-5&&(this.v=p,this._mdf=!0);else for(var m=0,g=this.v.length;m<g;)p=f[m]*this.mult,e(this.v[m]-p)>1e-5&&(this.v[m]=p,this._mdf=!0),m+=1}function a(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var f;this.lock=!0,this._mdf=this._isFirstFrame;var p=this.effectsSequence.length,m=this.kf?this.pv:this.data.k;for(f=0;f<p;f+=1)m=this.effectsSequence[f](m);this.setVValue(m),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function o(f){this.effectsSequence.push(f),this.container.addDynamicProperty(this)}function l(f,p,m,g){this.propType="unidimensional",this.mult=m||1,this.data=p,this.v=m?p.k*m:p.k,this.pv=p.k,this._mdf=!1,this.elem=f,this.container=g,this.comp=f.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=a,this.setVValue=s,this.addEffect=o}function h(f,p,m,g){var d;this.propType="multidimensional",this.mult=m||1,this.data=p,this._mdf=!1,this.elem=f,this.container=g,this.comp=f.comp,this.k=!1,this.kf=!1,this.frameId=-1;var y=p.k.length;for(this.v=createTypedArray("float32",y),this.pv=createTypedArray("float32",y),this.vel=createTypedArray("float32",y),d=0;d<y;d+=1)this.v[d]=p.k[d]*this.mult,this.pv[d]=p.k[d];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=a,this.setVValue=s,this.addEffect=o}function c(f,p,m,g){this.propType="unidimensional",this.keyframes=p.k,this.keyframesMetadata=[],this.offsetTime=f.data.st,this.frameId=-1,this._caching={lastFrame:t,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=p,this.mult=m||1,this.elem=f,this.container=g,this.comp=f.comp,this.v=t,this.pv=t,this._isFirstFrame=!0,this.getValue=a,this.setVValue=s,this.interpolateValue=r,this.effectsSequence=[n.bind(this)],this.addEffect=o}function u(f,p,m,g){var d;this.propType="multidimensional";var y,v,b,_,x=p.k.length;for(d=0;d<x-1;d+=1)p.k[d].to&&p.k[d].s&&p.k[d+1]&&p.k[d+1].s&&(y=p.k[d].s,v=p.k[d+1].s,b=p.k[d].to,_=p.k[d].ti,(y.length===2&&(y[0]!==v[0]||y[1]!==v[1])&&bez.pointOnLine2D(y[0],y[1],v[0],v[1],y[0]+b[0],y[1]+b[1])&&bez.pointOnLine2D(y[0],y[1],v[0],v[1],v[0]+_[0],v[1]+_[1])||y.length===3&&(y[0]!==v[0]||y[1]!==v[1]||y[2]!==v[2])&&bez.pointOnLine3D(y[0],y[1],y[2],v[0],v[1],v[2],y[0]+b[0],y[1]+b[1],y[2]+b[2])&&bez.pointOnLine3D(y[0],y[1],y[2],v[0],v[1],v[2],v[0]+_[0],v[1]+_[1],v[2]+_[2]))&&(p.k[d].to=null,p.k[d].ti=null),y[0]===v[0]&&y[1]===v[1]&&b[0]===0&&b[1]===0&&_[0]===0&&_[1]===0&&(y.length===2||y[2]===v[2]&&b[2]===0&&_[2]===0)&&(p.k[d].to=null,p.k[d].ti=null));this.effectsSequence=[n.bind(this)],this.data=p,this.keyframes=p.k,this.keyframesMetadata=[],this.offsetTime=f.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=m||1,this.elem=f,this.container=g,this.comp=f.comp,this.getValue=a,this.setVValue=s,this.interpolateValue=r,this.frameId=-1;var T=p.k[0].s.length;for(this.v=createTypedArray("float32",T),this.pv=createTypedArray("float32",T),d=0;d<T;d+=1)this.v[d]=t,this.pv[d]=t;this._caching={lastFrame:t,lastIndex:0,value:createTypedArray("float32",T)},this.addEffect=o}return{getProp:function(f,p,m,g,d){var y;if(p.k.length)if(typeof p.k[0]=="number")y=new h(f,p,g,d);else switch(m){case 0:y=new c(f,p,g,d);break;case 1:y=new u(f,p,g,d)}else y=new l(f,p,g,d);return y.effectsSequence.length&&d.addDynamicProperty(y),y}}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,n){var s;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":s=this.v;break;case"i":s=this.i;break;case"o":s=this.o;break;default:s=[]}(!s[i]||s[i]&&!n)&&(s[i]=pointPool.newElement()),s[i][0]=t,s[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,n,s,a,o){this.setXYAt(t,e,"v",a,o),this.setXYAt(r,i,"o",a,o),this.setXYAt(n,s,"i",a,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,n=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),n=1);var s,a=this._length-1,o=this._length;for(s=n;s<o;s+=1)t.setTripleAt(e[a][0],e[a][1],i[a][0],i[a][1],r[a][0],r[a][1],s,!1),a-=1;return t},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,function(){return new ShapePath},function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),factory.clone=function(t){var e,r=factory.newElement(),i=t._length===void 0?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=t,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){function t(f,p,m){var g,d,y,v,b,_,x,T,S,w=m.lastIndex,M=this.keyframes;if(f<M[0].t-this.offsetTime)g=M[0].s[0],y=!0,w=0;else if(f>=M[M.length-1].t-this.offsetTime)g=M[M.length-1].s?M[M.length-1].s[0]:M[M.length-2].e[0],y=!0;else{for(var k,I,P,A=w,E=M.length-1,F=!0;F&&(k=M[A],!((I=M[A+1]).t-this.offsetTime>f));)A<E-1?A+=1:F=!1;if(P=this.keyframesMetadata[A]||{},w=A,!(y=k.h===1)){if(f>=I.t-this.offsetTime)T=1;else if(f<k.t-this.offsetTime)T=0;else{var O;P.__fnct?O=P.__fnct:(O=BezierFactory.getBezierEasing(k.o.x,k.o.y,k.i.x,k.i.y).get,P.__fnct=O),T=O((f-(k.t-this.offsetTime))/(I.t-this.offsetTime-(k.t-this.offsetTime)))}d=I.s?I.s[0]:k.e[0]}g=k.s[0]}for(_=p._length,x=g.i[0].length,m.lastIndex=w,v=0;v<_;v+=1)for(b=0;b<x;b+=1)S=y?g.i[v][b]:g.i[v][b]+(d.i[v][b]-g.i[v][b])*T,p.i[v][b]=S,S=y?g.o[v][b]:g.o[v][b]+(d.o[v][b]-g.o[v][b])*T,p.o[v][b]=S,S=y?g.v[v][b]:g.v[v][b]+(d.v[v][b]-g.v[v][b])*T,p.v[v][b]=S}function e(){var f=this.comp.renderedFrame-this.offsetTime,p=this.keyframes[0].t-this.offsetTime,m=this.keyframes[this.keyframes.length-1].t-this.offsetTime,g=this._caching.lastFrame;return g!==-999999&&(g<p&&f<p||g>m&&f>m)||(this._caching.lastIndex=g<f?this._caching.lastIndex:0,this.interpolateShape(f,this.pv,this._caching)),this._caching.lastFrame=f,this.pv}function r(){this.paths=this.localShapeCollection}function i(f){(function(p,m){if(p._length!==m._length||p.c!==m.c)return!1;var g,d=p._length;for(g=0;g<d;g+=1)if(p.v[g][0]!==m.v[g][0]||p.v[g][1]!==m.v[g][1]||p.o[g][0]!==m.o[g][0]||p.o[g][1]!==m.o[g][1]||p.i[g][0]!==m.i[g][0]||p.i[g][1]!==m.i[g][1])return!1;return!0})(this.v,f)||(this.v=shapePool.clone(f),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function n(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var f,p;this.lock=!0,this._mdf=!1,f=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var m=this.effectsSequence.length;for(p=0;p<m;p+=1)f=this.effectsSequence[p](f);this.setVValue(f),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function s(f,p,m){this.propType="shape",this.comp=f.comp,this.container=f,this.elem=f,this.data=p,this.k=!1,this.kf=!1,this._mdf=!1;var g=m===3?p.pt.k:p.ks.k;this.v=shapePool.clone(g),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function a(f){this.effectsSequence.push(f),this.container.addDynamicProperty(this)}function o(f,p,m){this.propType="shape",this.comp=f.comp,this.elem=f,this.container=f,this.offsetTime=f.data.st,this.keyframes=m===3?p.pt.k:p.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var g=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,g),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=-999999,this.reset=r,this._caching={lastFrame:-999999,lastIndex:0},this.effectsSequence=[e.bind(this)]}s.prototype.interpolateShape=t,s.prototype.getValue=n,s.prototype.setVValue=i,s.prototype.addEffect=a,o.prototype.getValue=n,o.prototype.interpolateShape=t,o.prototype.setVValue=i,o.prototype.addEffect=a;var l=function(){var f=roundCorner;function p(m,g){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=g.d,this.elem=m,this.comp=m.comp,this.frameId=-1,this.initDynamicPropertyContainer(m),this.p=PropertyFactory.getProp(m,g.p,1,0,this),this.s=PropertyFactory.getProp(m,g.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return p.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var m=this.p.v[0],g=this.p.v[1],d=this.s.v[0]/2,y=this.s.v[1]/2,v=this.d!==3,b=this.v;b.v[0][0]=m,b.v[0][1]=g-y,b.v[1][0]=v?m+d:m-d,b.v[1][1]=g,b.v[2][0]=m,b.v[2][1]=g+y,b.v[3][0]=v?m-d:m+d,b.v[3][1]=g,b.i[0][0]=v?m-d*f:m+d*f,b.i[0][1]=g-y,b.i[1][0]=v?m+d:m-d,b.i[1][1]=g-y*f,b.i[2][0]=v?m+d*f:m-d*f,b.i[2][1]=g+y,b.i[3][0]=v?m-d:m+d,b.i[3][1]=g+y*f,b.o[0][0]=v?m+d*f:m-d*f,b.o[0][1]=g-y,b.o[1][0]=v?m+d:m-d,b.o[1][1]=g+y*f,b.o[2][0]=v?m-d*f:m+d*f,b.o[2][1]=g+y,b.o[3][0]=v?m-d:m+d,b.o[3][1]=g-y*f}},extendPrototype([DynamicPropertyContainer],p),p}(),h=function(){function f(p,m){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=p,this.comp=p.comp,this.data=m,this.frameId=-1,this.d=m.d,this.initDynamicPropertyContainer(p),m.sy===1?(this.ir=PropertyFactory.getProp(p,m.ir,0,0,this),this.is=PropertyFactory.getProp(p,m.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(p,m.pt,0,0,this),this.p=PropertyFactory.getProp(p,m.p,1,0,this),this.r=PropertyFactory.getProp(p,m.r,0,degToRads,this),this.or=PropertyFactory.getProp(p,m.or,0,0,this),this.os=PropertyFactory.getProp(p,m.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return f.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var p,m,g,d,y=2*Math.floor(this.pt.v),v=2*Math.PI/y,b=!0,_=this.or.v,x=this.ir.v,T=this.os.v,S=this.is.v,w=2*Math.PI*_/(2*y),M=2*Math.PI*x/(2*y),k=-Math.PI/2;k+=this.r.v;var I=this.data.d===3?-1:1;for(this.v._length=0,p=0;p<y;p+=1){g=b?T:S,d=b?w:M;var P=(m=b?_:x)*Math.cos(k),A=m*Math.sin(k),E=P===0&&A===0?0:A/Math.sqrt(P*P+A*A),F=P===0&&A===0?0:-P/Math.sqrt(P*P+A*A);P+=+this.p.v[0],A+=+this.p.v[1],this.v.setTripleAt(P,A,P-E*d*g*I,A-F*d*g*I,P+E*d*g*I,A+F*d*g*I,p,!0),b=!b,k+=v*I}},convertPolygonToPath:function(){var p,m=Math.floor(this.pt.v),g=2*Math.PI/m,d=this.or.v,y=this.os.v,v=2*Math.PI*d/(4*m),b=.5*-Math.PI,_=this.data.d===3?-1:1;for(b+=this.r.v,this.v._length=0,p=0;p<m;p+=1){var x=d*Math.cos(b),T=d*Math.sin(b),S=x===0&&T===0?0:T/Math.sqrt(x*x+T*T),w=x===0&&T===0?0:-x/Math.sqrt(x*x+T*T);x+=+this.p.v[0],T+=+this.p.v[1],this.v.setTripleAt(x,T,x-S*v*y*_,T-w*v*y*_,x+S*v*y*_,T+w*v*y*_,p,!0),b+=g*_}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],f),f}(),c=function(){function f(p,m){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=p,this.comp=p.comp,this.frameId=-1,this.d=m.d,this.initDynamicPropertyContainer(p),this.p=PropertyFactory.getProp(p,m.p,1,0,this),this.s=PropertyFactory.getProp(p,m.s,1,0,this),this.r=PropertyFactory.getProp(p,m.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return f.prototype={convertRectToPath:function(){var p=this.p.v[0],m=this.p.v[1],g=this.s.v[0]/2,d=this.s.v[1]/2,y=bmMin(g,d,this.r.v),v=y*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(p+g,m-d+y,p+g,m-d+y,p+g,m-d+v,0,!0),this.v.setTripleAt(p+g,m+d-y,p+g,m+d-v,p+g,m+d-y,1,!0),y!==0?(this.v.setTripleAt(p+g-y,m+d,p+g-y,m+d,p+g-v,m+d,2,!0),this.v.setTripleAt(p-g+y,m+d,p-g+v,m+d,p-g+y,m+d,3,!0),this.v.setTripleAt(p-g,m+d-y,p-g,m+d-y,p-g,m+d-v,4,!0),this.v.setTripleAt(p-g,m-d+y,p-g,m-d+v,p-g,m-d+y,5,!0),this.v.setTripleAt(p-g+y,m-d,p-g+y,m-d,p-g+v,m-d,6,!0),this.v.setTripleAt(p+g-y,m-d,p+g-v,m-d,p+g-y,m-d,7,!0)):(this.v.setTripleAt(p-g,m+d,p-g+v,m+d,p-g,m+d,2),this.v.setTripleAt(p-g,m-d,p-g,m-d+v,p-g,m-d,3))):(this.v.setTripleAt(p+g,m-d+y,p+g,m-d+v,p+g,m-d+y,0,!0),y!==0?(this.v.setTripleAt(p+g-y,m-d,p+g-y,m-d,p+g-v,m-d,1,!0),this.v.setTripleAt(p-g+y,m-d,p-g+v,m-d,p-g+y,m-d,2,!0),this.v.setTripleAt(p-g,m-d+y,p-g,m-d+y,p-g,m-d+v,3,!0),this.v.setTripleAt(p-g,m+d-y,p-g,m+d-v,p-g,m+d-y,4,!0),this.v.setTripleAt(p-g+y,m+d,p-g+y,m+d,p-g+v,m+d,5,!0),this.v.setTripleAt(p+g-y,m+d,p+g-v,m+d,p+g-y,m+d,6,!0),this.v.setTripleAt(p+g,m+d-y,p+g,m+d-y,p+g,m+d-v,7,!0)):(this.v.setTripleAt(p-g,m-d,p-g+v,m-d,p-g,m-d,1,!0),this.v.setTripleAt(p-g,m+d,p-g,m+d-v,p-g,m+d,2,!0),this.v.setTripleAt(p+g,m+d,p+g-v,m+d,p+g,m+d,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:r},extendPrototype([DynamicPropertyContainer],f),f}(),u={getShapeProp:function(f,p,m){var g;return m===3||m===4?g=(m===3?p.pt:p.ks).k.length?new o(f,p,m):new s(f,p,m):m===5?g=new c(f,p):m===6?g=new l(f,p):m===7&&(g=new h(f,p)),g.k&&f.addDynamicProperty(g),g},getConstructorFunction:function(){return s},getKeyframedConstructorFunction:function(){return o}};return u}(),Matrix=function(){var t=Math.cos,e=Math.sin,r=Math.tan,i=Math.round;function n(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function s(D){if(D===0)return this;var C=t(D),$=e(D);return this._t(C,-$,0,0,$,C,0,0,0,0,1,0,0,0,0,1)}function a(D){if(D===0)return this;var C=t(D),$=e(D);return this._t(1,0,0,0,0,C,-$,0,0,$,C,0,0,0,0,1)}function o(D){if(D===0)return this;var C=t(D),$=e(D);return this._t(C,0,$,0,0,1,0,0,-$,0,C,0,0,0,0,1)}function l(D){if(D===0)return this;var C=t(D),$=e(D);return this._t(C,-$,0,0,$,C,0,0,0,0,1,0,0,0,0,1)}function h(D,C){return this._t(1,C,D,1,0,0)}function c(D,C){return this.shear(r(D),r(C))}function u(D,C){var $=t(C),R=e(C);return this._t($,R,0,0,-R,$,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(D),1,0,0,0,0,1,0,0,0,0,1)._t($,-R,0,0,R,$,0,0,0,0,1,0,0,0,0,1)}function f(D,C,$){return $||$===0||($=1),D===1&&C===1&&$===1?this:this._t(D,0,0,0,0,C,0,0,0,0,$,0,0,0,0,1)}function p(D,C,$,R,q,U,Y,G,te,ne,re,Q,we,ce,Ce,xe){return this.props[0]=D,this.props[1]=C,this.props[2]=$,this.props[3]=R,this.props[4]=q,this.props[5]=U,this.props[6]=Y,this.props[7]=G,this.props[8]=te,this.props[9]=ne,this.props[10]=re,this.props[11]=Q,this.props[12]=we,this.props[13]=ce,this.props[14]=Ce,this.props[15]=xe,this}function m(D,C,$){return $=$||0,D!==0||C!==0||$!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,D,C,$,1):this}function g(D,C,$,R,q,U,Y,G,te,ne,re,Q,we,ce,Ce,xe){var W=this.props;if(D===1&&C===0&&$===0&&R===0&&q===0&&U===1&&Y===0&&G===0&&te===0&&ne===0&&re===1&&Q===0)return W[12]=W[12]*D+W[15]*we,W[13]=W[13]*U+W[15]*ce,W[14]=W[14]*re+W[15]*Ce,W[15]*=xe,this._identityCalculated=!1,this;var He=W[0],kt=W[1],Et=W[2],st=W[3],pt=W[4],at=W[5],Re=W[6],dt=W[7],ft=W[8],Ft=W[9],or=W[10],Ot=W[11],xr=W[12],zn=W[13],Nn=W[14],jn=W[15];return W[0]=He*D+kt*q+Et*te+st*we,W[1]=He*C+kt*U+Et*ne+st*ce,W[2]=He*$+kt*Y+Et*re+st*Ce,W[3]=He*R+kt*G+Et*Q+st*xe,W[4]=pt*D+at*q+Re*te+dt*we,W[5]=pt*C+at*U+Re*ne+dt*ce,W[6]=pt*$+at*Y+Re*re+dt*Ce,W[7]=pt*R+at*G+Re*Q+dt*xe,W[8]=ft*D+Ft*q+or*te+Ot*we,W[9]=ft*C+Ft*U+or*ne+Ot*ce,W[10]=ft*$+Ft*Y+or*re+Ot*Ce,W[11]=ft*R+Ft*G+or*Q+Ot*xe,W[12]=xr*D+zn*q+Nn*te+jn*we,W[13]=xr*C+zn*U+Nn*ne+jn*ce,W[14]=xr*$+zn*Y+Nn*re+jn*Ce,W[15]=xr*R+zn*G+Nn*Q+jn*xe,this._identityCalculated=!1,this}function d(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function y(D){for(var C=0;C<16;){if(D.props[C]!==this.props[C])return!1;C+=1}return!0}function v(D){var C;for(C=0;C<16;C+=1)D.props[C]=this.props[C];return D}function b(D){var C;for(C=0;C<16;C+=1)this.props[C]=D[C]}function _(D,C,$){return{x:D*this.props[0]+C*this.props[4]+$*this.props[8]+this.props[12],y:D*this.props[1]+C*this.props[5]+$*this.props[9]+this.props[13],z:D*this.props[2]+C*this.props[6]+$*this.props[10]+this.props[14]}}function x(D,C,$){return D*this.props[0]+C*this.props[4]+$*this.props[8]+this.props[12]}function T(D,C,$){return D*this.props[1]+C*this.props[5]+$*this.props[9]+this.props[13]}function S(D,C,$){return D*this.props[2]+C*this.props[6]+$*this.props[10]+this.props[14]}function w(){var D=this.props[0]*this.props[5]-this.props[1]*this.props[4],C=this.props[5]/D,$=-this.props[1]/D,R=-this.props[4]/D,q=this.props[0]/D,U=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/D,Y=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/D,G=new Matrix;return G.props[0]=C,G.props[1]=$,G.props[4]=R,G.props[5]=q,G.props[12]=U,G.props[13]=Y,G}function M(D){return this.getInverseMatrix().applyToPointArray(D[0],D[1],D[2]||0)}function k(D){var C,$=D.length,R=[];for(C=0;C<$;C+=1)R[C]=M(D[C]);return R}function I(D,C,$){var R=createTypedArray("float32",6);if(this.isIdentity())R[0]=D[0],R[1]=D[1],R[2]=C[0],R[3]=C[1],R[4]=$[0],R[5]=$[1];else{var q=this.props[0],U=this.props[1],Y=this.props[4],G=this.props[5],te=this.props[12],ne=this.props[13];R[0]=D[0]*q+D[1]*Y+te,R[1]=D[0]*U+D[1]*G+ne,R[2]=C[0]*q+C[1]*Y+te,R[3]=C[0]*U+C[1]*G+ne,R[4]=$[0]*q+$[1]*Y+te,R[5]=$[0]*U+$[1]*G+ne}return R}function P(D,C,$){return this.isIdentity()?[D,C,$]:[D*this.props[0]+C*this.props[4]+$*this.props[8]+this.props[12],D*this.props[1]+C*this.props[5]+$*this.props[9]+this.props[13],D*this.props[2]+C*this.props[6]+$*this.props[10]+this.props[14]]}function A(D,C){if(this.isIdentity())return D+","+C;var $=this.props;return Math.round(100*(D*$[0]+C*$[4]+$[12]))/100+","+Math.round(100*(D*$[1]+C*$[5]+$[13]))/100}function E(){for(var D=0,C=this.props,$="matrix3d(";D<16;)$+=i(1e4*C[D])/1e4,$+=D===15?")":",",D+=1;return $}function F(D){return D<1e-6&&D>0||D>-1e-6&&D<0?i(1e4*D)/1e4:D}function O(){var D=this.props;return"matrix("+F(D[0])+","+F(D[1])+","+F(D[4])+","+F(D[5])+","+F(D[12])+","+F(D[13])+")"}return function(){this.reset=n,this.rotate=s,this.rotateX=a,this.rotateY=o,this.rotateZ=l,this.skew=c,this.skewFromAxis=u,this.shear=h,this.scale=f,this.setTransform=p,this.translate=m,this.transform=g,this.applyToPoint=_,this.applyToX=x,this.applyToY=T,this.applyToZ=S,this.applyToPointArray=P,this.applyToTriplePoints=I,this.applyToPointStringified=A,this.toCSS=E,this.to2dCSS=O,this.clone=v,this.cloneFromProps=b,this.equals=y,this.inversePoints=k,this.inversePoint=M,this.getInverseMatrix=w,this._t=this.transform,this.isIdentity=d,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return(_typeof$3=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)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(t){setLocationHref(t)}function searchAnimations(){standalone===!0?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return standalone===!0&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if(typeof t=="string")switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return typeof navigator<"u"}function installPlugin(t,e){t==="expressions"&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.10.0";var queryString="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)!=="object"&&(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=function(){var t={},e={};return t.registerModifier=function(r,i){e[r]||(e[r]=i)},t.getModifier=function(r,i,n){return new e[r](i,n)},t}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,n){var s=[];e<=1?s.push({s:t,e}):t>=1?s.push({s:t-1,e:e-1}):(s.push({s:t,e:1}),s.push({s:0,e:e-1}));var a,o,l=[],h=s.length;for(a=0;a<h;a+=1){var c,u;(o=s[a]).e*n<i||o.s*n>i+r||(c=o.s*n<=i?0:(o.s*n-i)/r,u=o.e*n>=i+r?1:(o.e*n-i)/r,l.push([c,u]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,n;if(this._mdf||t){var s=this.o.v%360/360;if(s<0&&(s+=1),(e=this.s.v>1?1+s:this.s.v<0?0+s:this.s.v+s)>(r=this.e.v>1?1+s:this.e.v<0?0+s:this.e.v+s)){var a=e;e=r,r=a}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,l,h,c,u,f=this.shapes.length,p=0;if(r===e)for(n=0;n<f;n+=1)this.shapes[n].localShapeCollection.releaseShapes(),this.shapes[n].shape._mdf=!0,this.shapes[n].shape.paths=this.shapes[n].localShapeCollection,this._mdf&&(this.shapes[n].pathsData.length=0);else if(r===1&&e===0||r===0&&e===1){if(this._mdf)for(n=0;n<f;n+=1)this.shapes[n].pathsData.length=0,this.shapes[n].shape._mdf=!0}else{var m,g,d=[];for(n=0;n<f;n+=1)if((m=this.shapes[n]).shape._mdf||this._mdf||t||this.m===2){if(l=(i=m.shape.paths)._length,u=0,!m.shape._mdf&&m.pathsData.length)u=m.totalShapeLength;else{for(h=this.releasePathsData(m.pathsData),o=0;o<l;o+=1)c=bez.getSegmentsLength(i.shapes[o]),h.push(c),u+=c.totalLength;m.totalShapeLength=u,m.pathsData=h}p+=u,m.shape._mdf=!0}else m.shape.paths=m.localShapeCollection;var y,v=e,b=r,_=0;for(n=f-1;n>=0;n-=1)if((m=this.shapes[n]).shape._mdf){for((g=m.localShapeCollection).releaseShapes(),this.m===2&&f>1?(y=this.calculateShapeEdges(e,r,m.totalShapeLength,_,p),_+=m.totalShapeLength):y=[[v,b]],l=y.length,o=0;o<l;o+=1){v=y[o][0],b=y[o][1],d.length=0,b<=1?d.push({s:m.totalShapeLength*v,e:m.totalShapeLength*b}):v>=1?d.push({s:m.totalShapeLength*(v-1),e:m.totalShapeLength*(b-1)}):(d.push({s:m.totalShapeLength*v,e:m.totalShapeLength}),d.push({s:0,e:m.totalShapeLength*(b-1)}));var x=this.addShapes(m,d[0]);if(d[0].s!==d[0].e){if(d.length>1)if(m.shape.paths.shapes[m.shape.paths._length-1].c){var T=x.pop();this.addPaths(x,g),x=this.addShapes(m,d[1],T)}else this.addPaths(x,g),x=this.addShapes(m,d[1]);this.addPaths(x,g)}}m.shape.paths=g}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,n,s,a){n.setXYAt(e[0],e[1],"o",s),n.setXYAt(r[0],r[1],"i",s+1),a&&n.setXYAt(t[0],t[1],"v",s),n.setXYAt(i[0],i[1],"v",s+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,n,s,a,o,l,h,c,u=t.pathsData,f=t.shape.paths.shapes,p=t.shape.paths._length,m=0,g=[],d=!0;for(r?(o=r._length,c=r._length):(r=shapePool.newElement(),o=0,c=0),g.push(r),i=0;i<p;i+=1){for(l=u[i].lengths,r.c=f[i].c,s=f[i].c?l.length:l.length+1,n=1;n<s;n+=1)if(m+(a=l[n-1]).addedLength<e.s)m+=a.addedLength,r.c=!1;else{if(m>e.e){r.c=!1;break}e.s<=m&&e.e>=m+a.addedLength?(this.addSegment(f[i].v[n-1],f[i].o[n-1],f[i].i[n],f[i].v[n],r,o,d),d=!1):(h=bez.getNewSegment(f[i].v[n-1],f[i].v[n],f[i].o[n-1],f[i].i[n],(e.s-m)/a.addedLength,(e.e-m)/a.addedLength,l[n-1]),this.addSegmentFromArray(h,r,o,d),d=!1,r.c=!1),m+=a.addedLength,o+=1}if(f[i].c&&l.length){if(a=l[n-1],m<=e.e){var y=l[n-1].addedLength;e.s<=m&&e.e>=m+y?(this.addSegment(f[i].v[n-1],f[i].o[n-1],f[i].i[0],f[i].v[0],r,o,d),d=!1):(h=bez.getNewSegment(f[i].v[n-1],f[i].v[0],f[i].o[n-1],f[i].i[0],(e.s-m)/y,(e.e-m)/y,l[n-1]),this.addSegmentFromArray(h,r,o,d),d=!1,r.c=!1)}else r.c=!1;m+=a.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[c][0],r.v[c][1],"i",c),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),m>e.e)break;i<p-1&&(r=shapePool.newElement(),d=!0,g.push(r),o=0)}return g},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],n=t._length,s=0;for(s=0;s<n;s+=1)i[0]+=t.v[s][0],i[1]+=t.v[s][1];i[0]/=n,i[1]/=n;var a,o,l,h,c,u,f=shapePool.newElement();for(f.c=t.c,s=0;s<n;s+=1)a=t.v[s][0]+(i[0]-t.v[s][0])*r,o=t.v[s][1]+(i[1]-t.v[s][1])*r,l=t.o[s][0]+(i[0]-t.o[s][0])*-r,h=t.o[s][1]+(i[1]-t.o[s][1])*-r,c=t.i[s][0]+(i[0]-t.i[s][0])*-r,u=t.i[s][1]+(i[1]-t.i[s][1])*-r,f.setTripleAt(a,o,l,h,c,u,s);return f},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,n,s,a,o=this.shapes.length,l=this.amount.v;if(l!==0)for(r=0;r<o;r+=1){if(a=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,n=s.shape.paths._length,i=0;i<n;i+=1)a.addShape(this.processPath(e[i],l));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var t=[0,0];function e(r,i,n){if(this.elem=r,this.frameId=-1,this.propType="transform",this.data=i,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(n||r),i.p&&i.p.s?(this.px=PropertyFactory.getProp(r,i.p.x,0,0,this),this.py=PropertyFactory.getProp(r,i.p.y,0,0,this),i.p.z&&(this.pz=PropertyFactory.getProp(r,i.p.z,0,0,this))):this.p=PropertyFactory.getProp(r,i.p||{k:[0,0,0]},1,0,this),i.rx){if(this.rx=PropertyFactory.getProp(r,i.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(r,i.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(r,i.rz,0,degToRads,this),i.or.k[0].ti){var s,a=i.or.k.length;for(s=0;s<a;s+=1)i.or.k[s].to=null,i.or.k[s].ti=null}this.or=PropertyFactory.getProp(r,i.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(r,i.r||{k:0},0,degToRads,this);i.sk&&(this.sk=PropertyFactory.getProp(r,i.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(r,i.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(r,i.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(r,i.s||{k:[100,100,100]},1,.01,this),i.o?this.o=PropertyFactory.getProp(r,i.o,0,.01,r):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(r){var i=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||i,this.a&&r.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&r.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&r.skewFromAxis(-this.sk.v,this.sa.v),this.r?r.rotate(-this.r.v):r.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?r.translate(this.px.v,this.py.v,-this.pz.v):r.translate(this.px.v,this.py.v,0):r.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(r){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||r){var i;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var n,s;if(i=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(n=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/i,0),s=this.p.getValueAtTime(this.p.keyframes[0].t/i,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(n=this.p.pv,s=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){n=[],s=[];var a=this.px,o=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(n[0]=a.getValueAtTime((a.keyframes[0].t+.01)/i,0),n[1]=o.getValueAtTime((o.keyframes[0].t+.01)/i,0),s[0]=a.getValueAtTime(a.keyframes[0].t/i,0),s[1]=o.getValueAtTime(o.keyframes[0].t/i,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(n[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/i,0),n[1]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/i,0),s[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/i,0),s[1]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/i,0)):(n=[a.pv,o.pv],s[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/i,a.offsetTime),s[1]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/i,o.offsetTime))}else n=s=t;this.v.rotate(-Math.atan2(n[1]-s[1],n[0]-s[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(r){this._addDynamicProperty(r),this.elem.addDynamicProperty(r),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(r,i,n){return new e(r,i,n)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(t,e){return 1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e))}function floatZero(t){return Math.abs(t)<=1e-5}function lerp(t,e,r){return t*(1-r)+e*r}function lerpPoint(t,e,r){return[lerp(t[0],e[0],r),lerp(t[1],e[1],r)]}function quadRoots(t,e,r){if(t===0)return[];var i=e*e-4*t*r;if(i<0)return[];var n=-e/(2*t);if(i===0)return[n];var s=Math.sqrt(i)/(2*t);return[n-s,n+s]}function polynomialCoefficients(t,e,r,i){return[3*e-t-3*r+i,3*t-6*e+3*r,-3*t+3*e,t]}function singlePoint(t){return new PolynomialBezier(t,t,t,t,!1)}function PolynomialBezier(t,e,r,i,n){n&&pointEqual(t,e)&&(e=lerpPoint(t,i,1/3)),n&&pointEqual(r,i)&&(r=lerpPoint(t,i,2/3));var s=polynomialCoefficients(t[0],e[0],r[0],i[0]),a=polynomialCoefficients(t[1],e[1],r[1],i[1]);this.a=[s[0],a[0]],this.b=[s[1],a[1]],this.c=[s[2],a[2]],this.d=[s[3],a[3]],this.points=[t,e,r,i]}function extrema(t,e){var r=t.points[0][e],i=t.points[t.points.length-1][e];if(r>i){var n=i;i=r,r=n}for(var s=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),a=0;a<s.length;a+=1)if(s[a]>0&&s[a]<1){var o=t.point(s[a])[e];o<r?r=o:o>i&&(i=o)}return{min:r,max:i}}function intersectData(t,e,r){var i=t.boundingBox();return{cx:i.cx,cy:i.cy,width:i.width,height:i.height,bez:t,t:(e+r)/2,t1:e,t2:r}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return 2*Math.abs(t.cx-e.cx)<t.width+e.width&&2*Math.abs(t.cy-e.cy)<t.height+e.height}function intersectsImpl(t,e,r,i,n,s){if(boxIntersect(t,e))if(r>=s||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i)n.push([t.t,e.t]);else{var a=splitData(t),o=splitData(e);intersectsImpl(a[0],o[0],r+1,i,n,s),intersectsImpl(a[0],o[1],r+1,i,n,s),intersectsImpl(a[1],o[0],r+1,i,n,s),intersectsImpl(a[1],o[1],r+1,i,n,s)}}function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,r,i){var n=[t[0],t[1],1],s=[e[0],e[1],1],a=[r[0],r[1],1],o=[i[0],i[1],1],l=crossProduct(crossProduct(n,s),crossProduct(a,o));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(t,e,r){return[t[0]+Math.cos(e)*r,t[1]-Math.sin(e)*r]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}function setPoint(t,e,r,i,n,s,a){var o=r-Math.PI/2,l=r+Math.PI/2,h=e[0]+Math.cos(r)*i*n,c=e[1]-Math.sin(r)*i*n;t.setTripleAt(h,c,h+Math.cos(o)*s,c-Math.sin(o)*s,h+Math.cos(l)*a,c-Math.sin(l)*a,t.length())}function getPerpendicularVector(t,e){var r=[e[0]-t[0],e[1]-t[1]],i=.5*-Math.PI;return[Math.cos(i)*r[0]-Math.sin(i)*r[1],Math.sin(i)*r[0]+Math.cos(i)*r[1]]}function getProjectingAngle(t,e){var r=e===0?t.length()-1:e-1,i=(e+1)%t.length(),n=getPerpendicularVector(t.v[r],t.v[i]);return Math.atan2(0,1)-Math.atan2(n[1],n[0])}function zigZagCorner(t,e,r,i,n,s,a){var o=getProjectingAngle(e,r),l=e.v[r%e._length],h=e.v[r===0?e._length-1:r-1],c=e.v[(r+1)%e._length],u=s===2?Math.sqrt(Math.pow(l[0]-h[0],2)+Math.pow(l[1]-h[1],2)):0,f=s===2?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0;setPoint(t,e.v[r%e._length],o,a,i,f/(2*(n+1)),u/(2*(n+1)),s)}function zigZagSegment(t,e,r,i,n,s){for(var a=0;a<i;a+=1){var o=(a+1)/(i+1),l=n===2?Math.sqrt(Math.pow(e.points[3][0]-e.points[0][0],2)+Math.pow(e.points[3][1]-e.points[0][1],2)):0,h=e.normalAngle(o);setPoint(t,e.point(o),h,s,r,l/(2*(i+1)),l/(2*(i+1)),n),s=-s}return s}function linearOffset(t,e,r){var i=Math.atan2(e[0]-t[0],e[1]-t[1]);return[polarOffset(t,i,r),polarOffset(e,i,r)]}function offsetSegment(t,e){var r,i,n,s,a,o,l;r=(l=linearOffset(t.points[0],t.points[1],e))[0],i=l[1],n=(l=linearOffset(t.points[1],t.points[2],e))[0],s=l[1],a=(l=linearOffset(t.points[2],t.points[3],e))[0],o=l[1];var h=lineIntersection(r,i,n,s);h===null&&(h=i);var c=lineIntersection(a,o,n,s);return c===null&&(c=a),new PolynomialBezier(r,h,c,o)}function joinLines(t,e,r,i,n){var s=e.points[3],a=r.points[0];if(i===3||pointEqual(s,a))return s;if(i===2){var o=-e.tangentAngle(1),l=-r.tangentAngle(0)+Math.PI,h=lineIntersection(s,polarOffset(s,o+Math.PI/2,100),a,polarOffset(a,o+Math.PI/2,100)),c=h?pointDistance(h,s):pointDistance(s,a)/2,u=polarOffset(s,o,2*c*roundCorner);return t.setXYAt(u[0],u[1],"o",t.length()-1),u=polarOffset(a,l,2*c*roundCorner),t.setTripleAt(a[0],a[1],a[0],a[1],u[0],u[1],t.length()),a}var f=lineIntersection(pointEqual(s,e.points[2])?e.points[0]:e.points[2],s,a,pointEqual(a,r.points[1])?r.points[3]:r.points[1]);return f&&pointDistance(f,s)<n?(t.setTripleAt(f[0],f[1],f[0],f[1],f[0],f[1],t.length()),f):s}function getIntersection(t,e){var r=t.intersections(e);return r.length&&floatEqual(r[0][0],1)&&r.shift(),r.length?r[0]:null}function pruneSegmentIntersection(t,e){var r=t.slice(),i=e.slice(),n=getIntersection(t[t.length-1],e[0]);return n&&(r[t.length-1]=t[t.length-1].split(n[0])[0],i[0]=e[0].split(n[1])[1]),t.length>1&&e.length>1&&(n=getIntersection(t[0],e[e.length-1]))?[[t[0].split(n[0])[0]],[e[e.length-1].split(n[1])[1]]]:[r,i]}function pruneIntersections(t){for(var e,r=1;r<t.length;r+=1)e=pruneSegmentIntersection(t[r-1],t[r]),t[r-1]=e[0],t[r]=e[1];return t.length>1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var r,i,n,s,a=t.inflectionPoints();if(a.length===0)return[offsetSegment(t,e)];if(a.length===1||floatEqual(a[1],1))return r=(n=t.split(a[0]))[0],i=n[1],[offsetSegment(r,e),offsetSegment(i,e)];r=(n=t.split(a[0]))[0];var o=(a[1]-a[0])/(1-a[0]);return s=(n=n[1].split(o))[0],i=n[1],[offsetSegment(r,e),offsetSegment(s,e),offsetSegment(i,e)]}function OffsetPathModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",n=e.length,s=0;s<n;s+=1)switch(e[s].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,n,s){var a=s?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-n),l=i.s.v[1]+(1-i.s.v[1])*(1-n);t.translate(i.p.v[0]*a*n,i.p.v[1]*a*n,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*a*n),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(s?1/o:o,s?1/l:l),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,t[e].ty==="gr"&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,t[r].ty==="gr"&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,n,s,a=!1;if(this._mdf||t){var o,l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var h={it:this.cloneElements(this._elements),ty:"gr"};h.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,h),this._groups.splice(0,0,h),this._currentCopies+=1}this.elem.reloadShapes(),a=!0}for(s=0,i=0;i<=this._groups.length-1;i+=1){if(o=s<l,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var c=this.elemsData[i].it,u=c[c.length-1];u.transform.op.v!==0?(u.transform.op._mdf=!0,u.transform.op.v=0):u.transform.op._mdf=!1}s+=1}this._currentCopies=l;var f=this.o.v,p=f%1,m=f>0?Math.floor(f):Math.ceil(f),g=this.pMatrix.props,d=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(f>0){for(;_<m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),_+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),_+=p)}else if(f<0){for(;_>m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),_-=p)}for(i=this.data.m===1?0:this._currentCopies-1,n=this.data.m===1?1:-1,s=this._currentCopies;s;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),_!==0){for((i!==0&&n===1||i!==this._currentCopies-1&&n===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];_+=1,s-=1,i+=n}}else for(s=this._currentCopies,i=0,n=1;s;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,s-=1,i+=n;return a},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var n,s,a,o,l,h,c,u,f,p,m,g,d=t._length,y=0;for(r=0;r<d;r+=1)n=t.v[r],a=t.o[r],s=t.i[r],n[0]===a[0]&&n[1]===a[1]&&n[0]===s[0]&&n[1]===s[1]?r!==0&&r!==d-1||t.c?(o=r===0?t.v[d-1]:t.v[r-1],h=(l=Math.sqrt(Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2)))?Math.min(l/2,e)/l:0,c=m=n[0]+(o[0]-n[0])*h,u=g=n[1]-(n[1]-o[1])*h,f=c-(c-n[0])*roundCorner,p=u-(u-n[1])*roundCorner,i.setTripleAt(c,u,f,p,m,g,y),y+=1,o=r===d-1?t.v[0]:t.v[r+1],h=(l=Math.sqrt(Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2)))?Math.min(l/2,e)/l:0,c=f=n[0]+(o[0]-n[0])*h,u=p=n[1]+(o[1]-n[1])*h,m=c-(c-n[0])*roundCorner,g=u-(u-n[1])*roundCorner,i.setTripleAt(c,u,f,p,m,g,y),y+=1):(i.setTripleAt(n[0],n[1],a[0],a[1],s[0],s[1],y),y+=1):(i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],y),y+=1);return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,n,s,a,o=this.shapes.length,l=this.rd.v;if(l!==0)for(r=0;r<o;r+=1){if(a=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,n=s.shape.paths._length,i=0;i<n;i+=1)a.addShape(this.processPath(e[i],l));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(t){return[((this.a[0]*t+this.b[0])*t+this.c[0])*t+this.d[0],((this.a[1]*t+this.b[1])*t+this.c[1])*t+this.d[1]]},PolynomialBezier.prototype.derivative=function(t){return[(3*t*this.a[0]+2*this.b[0])*t+this.c[0],(3*t*this.a[1]+2*this.b[1])*t+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(t){var e=this.derivative(t);return Math.atan2(e[1],e[0])},PolynomialBezier.prototype.normalAngle=function(t){var e=this.derivative(t);return Math.atan2(e[0],e[1])},PolynomialBezier.prototype.inflectionPoints=function(){var t=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(t))return[];var e=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/t,r=e*e-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/t;if(r<0)return[];var i=Math.sqrt(r);return floatZero(i)?i>0&&i<1?[e]:[]:[e-i,e+i].filter(function(n){return n>0&&n<1})},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),r=lerpPoint(this.points[1],this.points[2],t),i=lerpPoint(this.points[2],this.points[3],t),n=lerpPoint(e,r,t),s=lerpPoint(r,i,t),a=lerpPoint(n,s,t);return[new PolynomialBezier(this.points[0],e,n,a,!0),new PolynomialBezier(a,s,i,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}},PolynomialBezier.prototype.intersections=function(t,e,r){e===void 0&&(e=2),r===void 0&&(r=7);var i=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,i,r),i},PolynomialBezier.shapeSegment=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[r],t.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[r],t.i[r],t.o[e],t.v[e],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0},ZigZagModifier.prototype.processPath=function(t,e,r,i){var n=t._length,s=shapePool.newElement();if(s.c=t.c,t.c||(n-=1),n===0)return s;var a=-1,o=PolynomialBezier.shapeSegment(t,0);zigZagCorner(s,t,0,e,r,i,a);for(var l=0;l<n;l+=1)a=zigZagSegment(s,o,e,r,i,-a),o=l!==n-1||t.c?PolynomialBezier.shapeSegment(t,(l+1)%n):null,zigZagCorner(s,t,l+1,e,r,i,a);return s},ZigZagModifier.prototype.processShapes=function(t){var e,r,i,n,s,a,o=this.shapes.length,l=this.amplitude.v,h=Math.max(0,Math.round(this.frequency.v)),c=this.pointsType.v;if(l!==0)for(r=0;r<o;r+=1){if(a=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,n=s.shape.paths._length,i=0;i<n;i+=1)a.addShape(this.processPath(e[i],l,h,c));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this.miterLimit=PropertyFactory.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(t,e,r,i){var n=shapePool.newElement();n.c=t.c;var s,a,o,l=t.length();t.c||(l-=1);var h=[];for(s=0;s<l;s+=1)o=PolynomialBezier.shapeSegment(t,s),h.push(offsetSegmentSplit(o,e));if(!t.c)for(s=l-1;s>=0;s-=1)o=PolynomialBezier.shapeSegmentInverted(t,s),h.push(offsetSegmentSplit(o,e));h=pruneIntersections(h);var c=null,u=null;for(s=0;s<h.length;s+=1){var f=h[s];for(u&&(c=joinLines(n,u,f[0],r,i)),u=f[f.length-1],a=0;a<f.length;a+=1)o=f[a],c&&pointEqual(o.points[0],c)?n.setXYAt(o.points[1][0],o.points[1][1],"o",n.length()-1):n.setTripleAt(o.points[0][0],o.points[0][1],o.points[1][0],o.points[1][1],o.points[0][0],o.points[0][1],n.length()),n.setTripleAt(o.points[3][0],o.points[3][1],o.points[3][0],o.points[3][1],o.points[2][0],o.points[2][1],n.length()),c=o.points[3]}return h.length&&joinLines(n,u,h[0][0],r,i),n},OffsetPathModifier.prototype.processShapes=function(t){var e,r,i,n,s,a,o=this.shapes.length,l=this.amount.v,h=this.miterLimit.v,c=this.lineJoin;if(l!==0)for(r=0;r<o;r+=1){if(a=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,n=s.shape.paths._length,i=0;i<n;i+=1)a.addShape(this.processPath(e[i],l,c,h));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],i=[65039,8205];function n(o,l){var h=createTag("span");h.setAttribute("aria-hidden",!0),h.style.fontFamily=l;var c=createTag("span");c.innerText="giItT1WQy@!-/#",h.style.position="absolute",h.style.left="-10000px",h.style.top="-10000px",h.style.fontSize="300px",h.style.fontVariant="normal",h.style.fontStyle="normal",h.style.fontWeight="normal",h.style.letterSpacing="0",h.appendChild(c),document.body.appendChild(h);var u=c.offsetWidth;return c.style.fontFamily=function(f){var p,m=f.split(","),g=m.length,d=[];for(p=0;p<g;p+=1)m[p]!=="sans-serif"&&m[p]!=="monospace"&&d.push(m[p]);return d.join(",")}(o)+", "+l,{node:c,w:u,parent:h}}function s(o,l){var h,c=document.body&&l?"svg":"canvas",u=getFontProperties(o);if(c==="svg"){var f=createNS("text");f.style.fontSize="100px",f.setAttribute("font-family",o.fFamily),f.setAttribute("font-style",u.style),f.setAttribute("font-weight",u.weight),f.textContent="1",o.fClass?(f.style.fontFamily="inherit",f.setAttribute("class",o.fClass)):f.style.fontFamily=o.fFamily,l.appendChild(f),h=f}else{var p=new OffscreenCanvas(500,500).getContext("2d");p.font=u.style+" "+u.weight+" 100px "+o.fFamily,h=p}return{measureText:function(m){return c==="svg"?(h.textContent=m,h.getComputedTextLength()):h.measureText(m).width}}}var a=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return a.isModifier=function(o,l){var h=o.toString(16)+l.toString(16);return r.indexOf(h)!==-1},a.isZeroWidthJoiner=function(o,l){return l?o===i[0]&&l===i[1]:o===i[1]},a.isCombinedCharacter=function(o){return e.indexOf(o)!==-1},a.prototype={addChars:function(o){if(o){var l;this.chars||(this.chars=[]);var h,c,u=o.length,f=this.chars.length;for(l=0;l<u;l+=1){for(h=0,c=!1;h<f;)this.chars[h].style===o[l].style&&this.chars[h].fFamily===o[l].fFamily&&this.chars[h].ch===o[l].ch&&(c=!0),h+=1;c||(this.chars.push(o[l]),f+=1)}}},addFonts:function(o,l){if(o){if(this.chars)return this.isLoaded=!0,void(this.fonts=o.list);if(!document.body)return this.isLoaded=!0,o.list.forEach(function(b){b.helper=s(b),b.cache={}}),void(this.fonts=o.list);var h,c=o.list,u=c.length,f=u;for(h=0;h<u;h+=1){var p,m,g=!0;if(c[h].loaded=!1,c[h].monoCase=n(c[h].fFamily,"monospace"),c[h].sansCase=n(c[h].fFamily,"sans-serif"),c[h].fPath){if(c[h].fOrigin==="p"||c[h].origin===3){if((p=document.querySelectorAll('style[f-forigin="p"][f-family="'+c[h].fFamily+'"], style[f-origin="3"][f-family="'+c[h].fFamily+'"]')).length>0&&(g=!1),g){var d=createTag("style");d.setAttribute("f-forigin",c[h].fOrigin),d.setAttribute("f-origin",c[h].origin),d.setAttribute("f-family",c[h].fFamily),d.type="text/css",d.innerText="@font-face {font-family: "+c[h].fFamily+"; font-style: normal; src: url('"+c[h].fPath+"');}",l.appendChild(d)}}else if(c[h].fOrigin==="g"||c[h].origin===1){for(p=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),m=0;m<p.length;m+=1)p[m].href.indexOf(c[h].fPath)!==-1&&(g=!1);if(g){var y=createTag("link");y.setAttribute("f-forigin",c[h].fOrigin),y.setAttribute("f-origin",c[h].origin),y.type="text/css",y.rel="stylesheet",y.href=c[h].fPath,document.body.appendChild(y)}}else if(c[h].fOrigin==="t"||c[h].origin===2){for(p=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),m=0;m<p.length;m+=1)c[h].fPath===p[m].src&&(g=!1);if(g){var v=createTag("link");v.setAttribute("f-forigin",c[h].fOrigin),v.setAttribute("f-origin",c[h].origin),v.setAttribute("rel","stylesheet"),v.setAttribute("href",c[h].fPath),l.appendChild(v)}}}else c[h].loaded=!0,f-=1;c[h].helper=s(c[h],l),c[h].cache={},this.fonts.push(c[h])}f===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(o,l,h){for(var c=0,u=this.chars.length;c<u;){if(this.chars[c].ch===o&&this.chars[c].style===l&&this.chars[c].fFamily===h)return this.chars[c];c+=1}return(typeof o=="string"&&o.charCodeAt(0)!==13||!o)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",o,l,h)),t},getFontByName:function(o){for(var l=0,h=this.fonts.length;l<h;){if(this.fonts[l].fName===o)return this.fonts[l];l+=1}return this.fonts[0]},measureText:function(o,l,h){var c=this.getFontByName(l),u=o.charCodeAt(0);if(!c.cache[u+1]){var f=c.helper;if(o===" "){var p=f.measureText("|"+o+"|"),m=f.measureText("||");c.cache[u+1]=(p-m)/100}else c.cache[u+1]=f.measureText(o)/100}return c.cache[u+1]*h},checkLoadedFonts:function(){var o,l,h,c=this.fonts.length,u=c;for(o=0;o<c;o+=1)this.fonts[o].loaded?u-=1:this.fonts[o].fOrigin==="n"||this.fonts[o].origin===0?this.fonts[o].loaded=!0:(l=this.fonts[o].monoCase.node,h=this.fonts[o].monoCase.w,l.offsetWidth!==h?(u-=1,this.fonts[o].loaded=!0):(l=this.fonts[o].sansCase.node,h=this.fonts[o].sansCase.w,l.offsetWidth!==h&&(u-=1,this.fonts[o].loaded=!0)),this.fonts[o].loaded&&(this.fonts[o].sansCase.parent.parentNode.removeChild(this.fonts[o].sansCase.parent),this.fonts[o].monoCase.parent.parentNode.removeChild(this.fonts[o].monoCase.parent)));u!==0&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},a}();function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){this.renderableComponents.indexOf(t)===-1&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){this.renderableComponents.indexOf(t)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return blendModeEnums[t]||""}),blendModeEnums;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var n,s=i.length;for(r=0;r<s;r+=1)n=new GroupEffect(i[r],e),this.effectElements.push(n)}function GroupEffect(t,e){this.init(t,e)}function BaseElement(){}function FrameElement(){}function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,t.au&&t.au.lv?t.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}function TransformElement(){}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,n,s=this.globalData.defs,a=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(a),this.solidPath="";var o,l,h,c,u,f,p=this.masksProperties,m=0,g=[],d=createElementID(),y="clipPath",v="clip-path";for(i=0;i<a;i+=1)if((p[i].mode!=="a"&&p[i].mode!=="n"||p[i].inv||p[i].o.k!==100||p[i].o.x)&&(y="mask",v="mask"),p[i].mode!=="s"&&p[i].mode!=="i"||m!==0?h=null:((h=createNS("rect")).setAttribute("fill","#ffffff"),h.setAttribute("width",this.element.comp.data.w||0),h.setAttribute("height",this.element.comp.data.h||0),g.push(h)),n=createNS("path"),p[i].mode==="n")this.viewData[i]={op:PropertyFactory.getProp(this.element,p[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,p[i],3),elem:n,lastPath:""},s.appendChild(n);else{var b;if(m+=1,n.setAttribute("fill",p[i].mode==="s"?"#000000":"#ffffff"),n.setAttribute("clip-rule","nonzero"),p[i].x.k!==0?(y="mask",v="mask",f=PropertyFactory.getProp(this.element,p[i].x,0,null,this.element),b=createElementID(),(c=createNS("filter")).setAttribute("id",b),(u=createNS("feMorphology")).setAttribute("operator","erode"),u.setAttribute("in","SourceGraphic"),u.setAttribute("radius","0"),c.appendChild(u),s.appendChild(c),n.setAttribute("stroke",p[i].mode==="s"?"#000000":"#ffffff")):(u=null,f=null),this.storedData[i]={elem:n,x:f,expan:u,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},p[i].mode==="i"){l=g.length;var _=createNS("g");for(o=0;o<l;o+=1)_.appendChild(g[o]);var x=createNS("mask");x.setAttribute("mask-type","alpha"),x.setAttribute("id",d+"_"+m),x.appendChild(n),s.appendChild(x),_.setAttribute("mask","url("+getLocationHref()+"#"+d+"_"+m+")"),g.length=0,g.push(_)}else g.push(n);p[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:n,lastPath:"",op:PropertyFactory.getProp(this.element,p[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,p[i],3),invRect:h},this.viewData[i].prop.k||this.drawPath(p[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(y),a=g.length,i=0;i<a;i+=1)this.maskElement.appendChild(g[i]);m>0&&(this.maskElement.setAttribute("id",d),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+d+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,n=this.data.ef.length,s=this.data.ef;for(r=0;r<n;r+=1){switch(i=null,s[r].ty){case 0:i=new SliderEffect(s[r],e,this);break;case 1:i=new AngleEffect(s[r],e,this);break;case 2:i=new ColorEffect(s[r],e,this);break;case 3:i=new PointEffect(s[r],e,this);break;case 4:case 7:i=new CheckboxEffect(s[r],e,this);break;case 10:i=new LayerIndexEffect(s[r],e,this);break;case 11:i=new MaskIndexEffect(s[r],e,this);break;case 5:i=new EffectsManager(s[r],e,this);break;default:i=new NoValueEffect(s[r],e,this)}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if(this.data.masksProperties[t].mode!=="n"&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},initExpressions:function(){var t=getExpressionInterfaces();if(t){var e=t("layer"),r=t("effects"),i=t("shape"),n=t("text"),s=t("comp");this.layerInterface=e(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var a=r.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(a),this.data.ty===0||this.data.xt?this.compInterface=s(this):this.data.ty===4?(this.layerInterface.shapeInterface=i(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=n(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&this.dynamicProperties[r].propType==="transform")&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&this.dynamicProperties.push(t)}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var t=getExpressionInterfaces();if(t){var e=t("footage");this.layerInterface=e(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}this._volume=this.lv.v[0];var r=this._volume*this._volumeMultiplier;this._previousVolume!==r&&(this._previousVolume=r,this.audio.volume(r))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,n=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<n;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,n=this.layers,s=0,a=n.length;s<a;)n[s].ind==e&&(i[s]&&i[s]!==!0?(r.push(i[s]),i[s].setAsParent(),n[s].parent!==void 0?this.buildElementParenting(t,n[s].parent,r):t.setHierarchy(r)):(this.buildItem(s),this.addPendingElement(t))),s+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.getElementByPath=function(t){var e,r=t.shift();if(typeof r=="number")e=this.elements[r];else{var i,n=this.elements.length;for(i=0;i<n;i+=1)if(this.elements[i].data.nm===r){e=this.elements[i];break}}return t.length===0?e:e.getElementByPath(t)},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,n=this.comp;i;)n.finalTransform?(n.data.hasMask&&e.splice(0,0,n.finalTransform),n=n.comp):i=!1;var s,a=e.length;for(r=0;r<a;r+=1)s=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-s[0],t[1]-s[1],0];return t},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),this.masksProperties[e].mode!=="n"&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var n=this.storedData[e].expan;this.storedData[e].x.v<0?(this.storedData[e].lastOperator!=="erode"&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[e].filterId+")")),n.setAttribute("radius",-this.storedData[e].x.v)):(this.storedData[e].lastOperator!=="dilate"&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,n,s=" M"+e.v[0][0]+","+e.v[0][1];for(n=e._length,i=1;i<n;i+=1)s+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&n>1&&(s+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==s){var a="";r.elem&&(e.c&&(a=t.inv?this.solidPath+s:s),r.elem.setAttribute("d",a)),r.lastPath=s}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};return t.createFilter=function(e,r){var i=createNS("filter");return i.setAttribute("id",e),r!==!0&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%")),i},t.createAlphaToLuminanceFilter=function(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),e},t}(),featureSupport=function(){var t={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),t}(),registeredEffects={},idPrefix="filter_result_";function SVGEffects(t){var e,r,i="SourceGraphic",n=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),o=0;for(this.filters=[],e=0;e<n;e+=1){r=null;var l=t.data.ef[e].ty;registeredEffects[l]&&(r=new registeredEffects[l].effect(a,t.effectsManager.effectElements[e],t,idPrefix+o,i),i=idPrefix+o,registeredEffects[l].countsAsEffect&&(o+=1)),r&&this.filters.push(r)}o&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function registerEffect(t,e,r){registeredEffects[t]={effect:e,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t=null;if(this.data.td){this.matteMasks={};var e=createNS("symbol");e.setAttribute("id",this.layerId);var r=createNS("g");r.appendChild(this.layerElement),e.appendChild(r),t=r,this.globalData.defs.appendChild(e)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var i=createNS("clipPath"),n=createNS("path");n.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var s=createElementID();if(i.setAttribute("id",s),i.appendChild(n),this.globalData.defs.appendChild(i),this.checkMasks()){var a=createNS("g");a.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),a.appendChild(this.layerElement),this.transformedElement=a,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},getMatte:function(t){if(!this.matteMasks[t]){var e,r,i,n,s=this.layerId+"_"+t;if(t===1||t===3){var a=createNS("mask");a.setAttribute("id",s),a.setAttribute("mask-type",t===3?"luminance":"alpha"),(i=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),a.appendChild(i),this.globalData.defs.appendChild(a),featureSupport.maskType||t!==1||(a.setAttribute("mask-type","luminance"),e=createElementID(),r=filtersFactory.createFilter(e),this.globalData.defs.appendChild(r),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(n=createNS("g")).appendChild(i),a.appendChild(n),n.setAttribute("filter","url("+getLocationHref()+"#"+e+")"))}else if(t===2){var o=createNS("mask");o.setAttribute("id",s),o.setAttribute("mask-type","alpha");var l=createNS("g");o.appendChild(l),e=createElementID(),r=filtersFactory.createFilter(e);var h=createNS("feComponentTransfer");h.setAttribute("in","SourceGraphic"),r.appendChild(h);var c=createNS("feFuncA");c.setAttribute("type","table"),c.setAttribute("tableValues","1.0 0.0"),h.appendChild(c),this.globalData.defs.appendChild(r);var u=createNS("rect");u.setAttribute("width",this.comp.data.w),u.setAttribute("height",this.comp.data.h),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("fill","#ffffff"),u.setAttribute("opacity","0"),l.setAttribute("filter","url("+getLocationHref()+"#"+e+")"),l.appendChild(u),(i=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(i),featureSupport.maskType||(o.setAttribute("mask-type","luminance"),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),n=createNS("g"),l.appendChild(u),n.appendChild(this.layerElement),l.appendChild(n)),this.globalData.defs.appendChild(o)}this.matteMasks[t]=s}return this.matteMasks[t]},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,n=t.length;i<n;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=t.hd===!0,this.pElem=createNS("path"),this.msElem=null}function DashProperty(t,e,r,i){var n;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var s,a=e.length||0;for(n=0;n<a;n+=1)s=PropertyFactory.getProp(t,e[n].v,0,0,this),this.k=s.k||this.k,this.dataProps[n]={n:e[n].n,p:s};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGNoStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),e=0;e<r;e+=1)this.dataProps[e].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(Math.abs(t[4*r]-t[4*e+2*r])>.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,n=4*this.data.p;for(e=0;e<n;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(n=this.prop.v.length,e=4*this.data.p;e<n;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(e.t===1?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var n,s,a,o=[];for(a=4*e.g.p,s=0;s<a;s+=4)n=createNS("stop"),i.appendChild(n),o.push(n);t.setAttribute(e.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,n,s=createNS("mask"),a=createNS("path");s.appendChild(a);var o=createElementID(),l=createElementID();s.setAttribute("id",l);var h=createNS(t.t===1?"linearGradient":"radialGradient");h.setAttribute("id",o),h.setAttribute("spreadMethod","pad"),h.setAttribute("gradientUnits","userSpaceOnUse"),n=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var c=this.stops;for(i=4*t.g.p;i<n;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),h.appendChild(r),c.push(r);a.setAttribute(t.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),t.ty==="gs"&&(a.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),a.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),t.lj===1&&a.setAttribute("stroke-miterlimit",t.ml)),this.of=h,this.ms=s,this.ost=c,this.maskId=l,e.msElem=a}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(t,e,r,i){if(e===0)return"";var n,s=t.o,a=t.i,o=t.v,l=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(n=1;n<e;n+=1)l+=" C"+i.applyToPointStringified(s[n-1][0],s[n-1][1])+" "+i.applyToPointStringified(a[n][0],a[n][1])+" "+i.applyToPointStringified(o[n][0],o[n][1]);return r&&e&&(l+=" C"+i.applyToPointStringified(s[n-1][0],s[n-1][1])+" "+i.applyToPointStringified(a[0][0],a[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),l+="z"),l},SVGElementsRenderer=function(){var t=new Matrix,e=new Matrix;function r(h,c,u){(u||c.transform.op._mdf)&&c.transform.container.setAttribute("opacity",c.transform.op.v),(u||c.transform.mProps._mdf)&&c.transform.container.setAttribute("transform",c.transform.mProps.v.to2dCSS())}function i(){}function n(h,c,u){var f,p,m,g,d,y,v,b,_,x,T,S=c.styles.length,w=c.lvl;for(y=0;y<S;y+=1){if(g=c.sh._mdf||u,c.styles[y].lvl<w){for(b=e.reset(),x=w-c.styles[y].lvl,T=c.transformers.length-1;!g&&x>0;)g=c.transformers[T].mProps._mdf||g,x-=1,T-=1;if(g)for(x=w-c.styles[y].lvl,T=c.transformers.length-1;x>0;)_=c.transformers[T].mProps.v.props,b.transform(_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[14],_[15]),x-=1,T-=1}else b=t;if(p=(v=c.sh.paths)._length,g){for(m="",f=0;f<p;f+=1)(d=v.shapes[f])&&d._length&&(m+=buildShapeString(d,d._length,d.c,b));c.caches[y]=m}else m=c.caches[y];c.styles[y].d+=h.hd===!0?"":m,c.styles[y]._mdf=g||c.styles[y]._mdf}}function s(h,c,u){var f=c.style;(c.c._mdf||u)&&f.pElem.setAttribute("fill","rgb("+bmFloor(c.c.v[0])+","+bmFloor(c.c.v[1])+","+bmFloor(c.c.v[2])+")"),(c.o._mdf||u)&&f.pElem.setAttribute("fill-opacity",c.o.v)}function a(h,c,u){o(h,c,u),l(h,c,u)}function o(h,c,u){var f,p,m,g,d,y=c.gf,v=c.g._hasOpacity,b=c.s.v,_=c.e.v;if(c.o._mdf||u){var x=h.ty==="gf"?"fill-opacity":"stroke-opacity";c.style.pElem.setAttribute(x,c.o.v)}if(c.s._mdf||u){var T=h.t===1?"x1":"cx",S=T==="x1"?"y1":"cy";y.setAttribute(T,b[0]),y.setAttribute(S,b[1]),v&&!c.g._collapsable&&(c.of.setAttribute(T,b[0]),c.of.setAttribute(S,b[1]))}if(c.g._cmdf||u){f=c.cst;var w=c.g.c;for(m=f.length,p=0;p<m;p+=1)(g=f[p]).setAttribute("offset",w[4*p]+"%"),g.setAttribute("stop-color","rgb("+w[4*p+1]+","+w[4*p+2]+","+w[4*p+3]+")")}if(v&&(c.g._omdf||u)){var M=c.g.o;for(m=(f=c.g._collapsable?c.cst:c.ost).length,p=0;p<m;p+=1)g=f[p],c.g._collapsable||g.setAttribute("offset",M[2*p]+"%"),g.setAttribute("stop-opacity",M[2*p+1])}if(h.t===1)(c.e._mdf||u)&&(y.setAttribute("x2",_[0]),y.setAttribute("y2",_[1]),v&&!c.g._collapsable&&(c.of.setAttribute("x2",_[0]),c.of.setAttribute("y2",_[1])));else if((c.s._mdf||c.e._mdf||u)&&(d=Math.sqrt(Math.pow(b[0]-_[0],2)+Math.pow(b[1]-_[1],2)),y.setAttribute("r",d),v&&!c.g._collapsable&&c.of.setAttribute("r",d)),c.e._mdf||c.h._mdf||c.a._mdf||u){d||(d=Math.sqrt(Math.pow(b[0]-_[0],2)+Math.pow(b[1]-_[1],2)));var k=Math.atan2(_[1]-b[1],_[0]-b[0]),I=c.h.v;I>=1?I=.99:I<=-1&&(I=-.99);var P=d*I,A=Math.cos(k+c.a.v)*P+b[0],E=Math.sin(k+c.a.v)*P+b[1];y.setAttribute("fx",A),y.setAttribute("fy",E),v&&!c.g._collapsable&&(c.of.setAttribute("fx",A),c.of.setAttribute("fy",E))}}function l(h,c,u){var f=c.style,p=c.d;p&&(p._mdf||u)&&p.dashStr&&(f.pElem.setAttribute("stroke-dasharray",p.dashStr),f.pElem.setAttribute("stroke-dashoffset",p.dashoffset[0])),c.c&&(c.c._mdf||u)&&f.pElem.setAttribute("stroke","rgb("+bmFloor(c.c.v[0])+","+bmFloor(c.c.v[1])+","+bmFloor(c.c.v[2])+")"),(c.o._mdf||u)&&f.pElem.setAttribute("stroke-opacity",c.o.v),(c.w._mdf||u)&&(f.pElem.setAttribute("stroke-width",c.w.v),f.msElem&&f.msElem.setAttribute("stroke-width",c.w.v))}return{createRenderFunction:function(h){switch(h.ty){case"fl":return s;case"gf":return o;case"gs":return a;case"st":return l;case"sh":case"el":case"rc":case"sr":return n;case"tr":return r;case"no":return i;default:return null}}}}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function LetterProps(t,e,r,i,n,s){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=n,this.p=s,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,n=this.shapes.length,s=this.stylesList.length,a=[],o=!1;for(r=0;r<s;r+=1){for(i=this.stylesList[r],o=!1,a.length=0,t=0;t<n;t+=1)(e=this.shapes[t]).styles.indexOf(i)!==-1&&(a.push(e),o=e._isAnimated||o);a.length>1&&o&&this.setShapesAsAnimated(a)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),n=i.pElem;return t.ty==="st"?r=new SVGStrokeStyleData(this,t,i):t.ty==="fl"?r=new SVGFillStyleData(this,t,i):t.ty==="gf"||t.ty==="gs"?(r=new(t.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),n.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))):t.ty==="no"&&(r=new SVGNoStyleData(this,t,i)),t.ty!=="st"&&t.ty!=="gs"||(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),n.setAttribute("fill-opacity","0"),t.lj===1&&n.setAttribute("stroke-miterlimit",t.ml)),t.r===2&&n.setAttribute("fill-rule","evenodd"),t.ln&&n.setAttribute("id",t.ln),t.cl&&n.setAttribute("class",t.cl),t.bm&&(n.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;t.ty==="rc"?i=5:t.ty==="el"?i=6:t.ty==="sr"&&(i=7);var n=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(n),this.addShapeToModifiers(n),this.addToAnimatedContents(t,n),n},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,n,s,a){var o,l,h,c,u,f,p=[].concat(s),m=t.length-1,g=[],d=[];for(o=m;o>=0;o-=1){if((f=this.searchProcessedElement(t[o]))?e[o]=r[f-1]:t[o]._render=a,t[o].ty==="fl"||t[o].ty==="st"||t[o].ty==="gf"||t[o].ty==="gs"||t[o].ty==="no")f?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],n),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),g.push(e[o].style);else if(t[o].ty==="gr"){if(f)for(h=e[o].it.length,l=0;l<h;l+=1)e[o].prevViewData[l]=e[o].it[l];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,n+1,p,a),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else t[o].ty==="tr"?(f||(e[o]=this.createTransformElement(t[o],i)),c=e[o].transform,p.push(c)):t[o].ty==="sh"||t[o].ty==="rc"||t[o].ty==="el"||t[o].ty==="sr"?(f||(e[o]=this.createShapeElement(t[o],p,n)),this.setElementStyles(e[o])):t[o].ty==="tm"||t[o].ty==="rd"||t[o].ty==="ms"||t[o].ty==="pb"||t[o].ty==="zz"||t[o].ty==="op"?(f?(u=e[o]).closed=!1:((u=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=u,this.shapeModifiers.push(u)),d.push(u)):t[o].ty==="rp"&&(f?(u=e[o]).closed=!0:(u=ShapeModifiers.getModifier(t[o].ty),e[o]=u,u.init(this,t,o,e),this.shapeModifiers.push(u),a=!1),d.push(u));this.addProcessedElement(t[o],o+1)}for(m=g.length,o=0;o<m;o+=1)g[o].closed=!0;for(m=d.length,o=0;o<m;o+=1)d[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&e.data!==!0&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(t,e,r,i,n,s){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var a=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,a=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,a=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,a=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,a=!0),this.m!==n&&(this.m=n,this._mdf.m=!0,a=!0),!s.length||this.p[0]===s[0]&&this.p[1]===s[1]&&this.p[4]===s[4]&&this.p[5]===s[5]&&this.p[12]===s[12]&&this.p[13]===s[13]||(this.p=s,this._mdf.p=!0,a=!0),a},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var n=this.effectsSequence.length,s=t||this.data.d.k[this.keysIndex].s;for(i=0;i<n;i+=1)s=r!==this.keysIndex?this.effectsSequence[i](s,s.t):this.effectsSequence[i](this.currentData,s.t);e!==s&&this.setCurrentData(s),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],n=0,s=t.length,a=!1;n<s;)e=t.charCodeAt(n),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(n):e>=55296&&e<=56319?(r=t.charCodeAt(n+1))>=56320&&r<=57343?(a||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(n,2),a=!1):i.push(t.substr(n,2)),n+=1):i.push(t.charAt(n)):e>56319?(r=t.charCodeAt(n+1),FontManager.isZeroWidthJoiner(e,r)?(a=!0,i[i.length-1]+=t.substr(n,2),n+=1):i.push(t.charAt(n))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(n),a=!0):i.push(t.charAt(n)),n+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,n,s,a,o,l=this.elem.globalData.fontManager,h=this.data,c=[],u=0,f=h.m.g,p=0,m=0,g=0,d=[],y=0,v=0,b=l.getFontByName(t.f),_=0,x=getFontProperties(b);t.fWeight=x.weight,t.fStyle=x.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var T,S=t.tr/1e3*t.finalSize;if(t.sz)for(var w,M,k=!0,I=t.sz[0],P=t.sz[1];k;){w=0,y=0,r=(M=this.buildFinalText(t.t)).length,S=t.tr/1e3*t.finalSize;var A=-1;for(e=0;e<r;e+=1)T=M[e].charCodeAt(0),i=!1,M[e]===" "?A=e:T!==13&&T!==3||(y=0,i=!0,w+=t.finalLineHeight||1.2*t.finalSize),l.chars?(o=l.getCharData(M[e],b.fStyle,b.fFamily),_=i?0:o.w*t.finalSize/100):_=l.measureText(M[e],t.f,t.finalSize),y+_>I&&M[e]!==" "?(A===-1?r+=1:e=A,w+=t.finalLineHeight||1.2*t.finalSize,M.splice(e,A===e?1:0,"\r"),A=-1,y=0):(y+=_,y+=S);w+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&P<w?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=M,r=t.finalText.length,k=!1)}y=-S,_=0;var E,F=0;for(e=0;e<r;e+=1)if(i=!1,(T=(E=t.finalText[e]).charCodeAt(0))===13||T===3?(F=0,d.push(y),v=y>v?y:v,y=-2*S,n="",i=!0,g+=1):n=E,l.chars?(o=l.getCharData(E,b.fStyle,l.getFontByName(t.f).fFamily),_=i?0:o.w*t.finalSize/100):_=l.measureText(n,t.f,t.finalSize),E===" "?F+=_+S:(y+=_+S+F,F=0),c.push({l:_,an:_,add:p,n:i,anIndexes:[],val:n,line:g,animatorJustifyOffset:0}),f==2){if(p+=_,n===""||n===" "||e===r-1){for(n!==""&&n!==" "||(p-=_);m<=e;)c[m].an=p,c[m].ind=u,c[m].extra=_,m+=1;u+=1,p=0}}else if(f==3){if(p+=_,n===""||e===r-1){for(n===""&&(p-=_);m<=e;)c[m].an=p,c[m].ind=u,c[m].extra=_,m+=1;p=0,u+=1}}else c[u].ind=u,c[u].extra=0,u+=1;if(t.l=c,v=y>v?y:v,d.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=d;var O,D,C,$,R=h.a;a=R.length;var q=[];for(s=0;s<a;s+=1){for((O=R[s]).a.sc&&(t.strokeColorAnim=!0),O.a.sw&&(t.strokeWidthAnim=!0),(O.a.fc||O.a.fh||O.a.fs||O.a.fb)&&(t.fillColorAnim=!0),$=0,C=O.s.b,e=0;e<r;e+=1)(D=c[e]).anIndexes[s]=$,(C==1&&D.val!==""||C==2&&D.val!==""&&D.val!==" "||C==3&&(D.n||D.val==" "||e==r-1)||C==4&&(D.n||e==r-1))&&(O.s.rn===1&&q.push($),$+=1);h.a[s].s.totalChars=$;var U,Y=-1;if(O.s.rn===1)for(e=0;e<r;e+=1)Y!=(D=c[e]).anIndexes[s]&&(Y=D.anIndexes[s],U=q.splice(Math.floor(Math.random()*q.length),1)[0]),D.anIndexes[s]=U}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=e===void 0?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var t=Math.max,e=Math.min,r=Math.floor;function i(n,s){this._currentTextLength=-1,this.k=!1,this.data=s,this.elem=n,this.comp=n.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(n),this.s=PropertyFactory.getProp(n,s.s||{k:0},0,0,this),this.e="e"in s?PropertyFactory.getProp(n,s.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(n,s.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(n,s.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(n,s.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(n,s.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(n,s.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(n){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var s=0,a=0,o=1,l=1;this.ne.v>0?s=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?o=1-this.xe.v/100:l=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(s,a,o,l).get,c=0,u=this.finalS,f=this.finalE,p=this.data.sh;if(p===2)c=h(c=f===u?n>=f?1:0:t(0,e(.5/(f-u)+(n-u)/(f-u),1)));else if(p===3)c=h(c=f===u?n>=f?0:1:1-t(0,e(.5/(f-u)+(n-u)/(f-u),1)));else if(p===4)f===u?c=0:(c=t(0,e(.5/(f-u)+(n-u)/(f-u),1)))<.5?c*=2:c=1-2*(c-.5),c=h(c);else if(p===5){if(f===u)c=0;else{var m=f-u,g=-m/2+(n=e(t(0,n+.5-u),f-u)),d=m/2;c=Math.sqrt(1-g*g/(d*d))}c=h(c)}else p===6?(f===u?c=0:(n=e(t(0,n+.5-u),f-u),c=(1+Math.cos(Math.PI+2*Math.PI*n/(f-u)))/2),c=h(c)):(n>=r(u)&&(c=t(0,e(n-u<0?e(f,1)-(u-n):f-n,1))),c=h(c));if(this.sm.v!==100){var y=.01*this.sm.v;y===0&&(y=1e-8);var v=.5-.5*y;c<v?c=0:(c=(c-v)/y)>1&&(c=1)}return c*this.a.v},getValue:function(n){this.iterateDynamicProperties(),this._mdf=n||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,n&&this.data.r===2&&(this.e.v=this._currentTextLength);var s=this.data.r===2?1:100/this.data.totalChars,a=this.o.v/s,o=this.s.v/s+a,l=this.e.v/s+a;if(o>l){var h=o;o=l,l=h}this.finalS=o,this.finalE=l}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(n,s,a){return new i(n,s,a)}}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},n=PropertyFactory.getProp,s=e.a;this.a={r:s.r?n(t,s.r,0,degToRads,r):i,rx:s.rx?n(t,s.rx,0,degToRads,r):i,ry:s.ry?n(t,s.ry,0,degToRads,r):i,sk:s.sk?n(t,s.sk,0,degToRads,r):i,sa:s.sa?n(t,s.sa,0,degToRads,r):i,s:s.s?n(t,s.s,1,.01,r):i,a:s.a?n(t,s.a,1,0,r):i,o:s.o?n(t,s.o,0,.01,r):i,p:s.p?n(t,s.p,1,0,r):i,sw:s.sw?n(t,s.sw,0,0,r):i,sc:s.sc?n(t,s.sc,1,0,r):i,fc:s.fc?n(t,s.fc,1,0,r):i,fh:s.fh?n(t,s.fh,0,0,r):i,fs:s.fs?n(t,s.fs,0,.01,r):i,fb:s.fb?n(t,s.fb,0,.01,r):i,t:s.t?n(t,s.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,n,s,a,o,l,h,c,u,f,p,m,g,d,y,v,b,_,x=this._moreOptions.alignment.v,T=this._animatorsData,S=this._textData,w=this.mHelper,M=this._renderType,k=this.renderedLetters.length,I=t.l;if(this._hasMaskedPath){if(_=this._pathData.m,!this._pathData.n||this._pathData._mdf){var P,A=_.v;for(this._pathData.r.v&&(A=A.reverse()),a={tLength:0,segments:[]},s=A._length-1,y=0,n=0;n<s;n+=1)P=bez.buildBezierData(A.v[n],A.v[n+1],[A.o[n][0]-A.v[n][0],A.o[n][1]-A.v[n][1]],[A.i[n+1][0]-A.v[n+1][0],A.i[n+1][1]-A.v[n+1][1]]),a.tLength+=P.segmentLength,a.segments.push(P),y+=P.segmentLength;n=s,_.v.c&&(P=bez.buildBezierData(A.v[n],A.v[0],[A.o[n][0]-A.v[n][0],A.o[n][1]-A.v[n][1]],[A.i[0][0]-A.v[0][0],A.i[0][1]-A.v[0][1]]),a.tLength+=P.segmentLength,a.segments.push(P),y+=P.segmentLength),this._pathData.pi=a}if(a=this._pathData.pi,o=this._pathData.f.v,f=0,u=1,h=0,c=!0,g=a.segments,o<0&&_.v.c)for(a.tLength<Math.abs(o)&&(o=-Math.abs(o)%a.tLength),u=(m=g[f=g.length-1].points).length-1;o<0;)o+=m[u].partialLength,(u-=1)<0&&(u=(m=g[f-=1].points).length-1);p=(m=g[f].points)[u-1],d=(l=m[u]).partialLength}s=I.length,r=0,i=0;var E,F,O,D,C,$=1.2*t.finalSize*.714,R=!0;O=T.length;var q,U,Y,G,te,ne,re,Q,we,ce,Ce,xe,W=-1,He=o,kt=f,Et=u,st=-1,pt="",at=this.defaultPropsArray;if(t.j===2||t.j===1){var Re=0,dt=0,ft=t.j===2?-.5:-1,Ft=0,or=!0;for(n=0;n<s;n+=1)if(I[n].n){for(Re&&(Re+=dt);Ft<n;)I[Ft].animatorJustifyOffset=Re,Ft+=1;Re=0,or=!0}else{for(F=0;F<O;F+=1)(E=T[F].a).t.propType&&(or&&t.j===2&&(dt+=E.t.v*ft),(C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars)).length?Re+=E.t.v*C[0]*ft:Re+=E.t.v*C*ft);or=!1}for(Re&&(Re+=dt);Ft<n;)I[Ft].animatorJustifyOffset=Re,Ft+=1}for(n=0;n<s;n+=1){if(w.reset(),G=1,I[n].n)r=0,i+=t.yOffset,i+=R?1:0,o=He,R=!1,this._hasMaskedPath&&(u=Et,p=(m=g[f=kt].points)[u-1],d=(l=m[u]).partialLength,h=0),pt="",Ce="",we="",xe="",at=this.defaultPropsArray;else{if(this._hasMaskedPath){if(st!==I[n].line){switch(t.j){case 1:o+=y-t.lineWidths[I[n].line];break;case 2:o+=(y-t.lineWidths[I[n].line])/2}st=I[n].line}W!==I[n].ind&&(I[W]&&(o+=I[W].extra),o+=I[n].an/2,W=I[n].ind),o+=x[0]*I[n].an*.005;var Ot=0;for(F=0;F<O;F+=1)(E=T[F].a).p.propType&&((C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars)).length?Ot+=E.p.v[0]*C[0]:Ot+=E.p.v[0]*C),E.a.propType&&((C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars)).length?Ot+=E.a.v[0]*C[0]:Ot+=E.a.v[0]*C);for(c=!0,this._pathData.a.v&&(o=.5*I[0].an+(y-this._pathData.f.v-.5*I[0].an-.5*I[I.length-1].an)*W/(s-1),o+=this._pathData.f.v);c;)h+d>=o+Ot||!m?(v=(o+Ot-h)/l.partialLength,U=p.point[0]+(l.point[0]-p.point[0])*v,Y=p.point[1]+(l.point[1]-p.point[1])*v,w.translate(-x[0]*I[n].an*.005,-x[1]*$*.01),c=!1):m&&(h+=l.partialLength,(u+=1)>=m.length&&(u=0,g[f+=1]?m=g[f].points:_.v.c?(u=0,m=g[f=0].points):(h-=l.partialLength,m=null)),m&&(p=l,d=(l=m[u]).partialLength));q=I[n].an/2-I[n].add,w.translate(-q,0,0)}else q=I[n].an/2-I[n].add,w.translate(-q,0,0),w.translate(-x[0]*I[n].an*.005,-x[1]*$*.01,0);for(F=0;F<O;F+=1)(E=T[F].a).t.propType&&(C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars),r===0&&t.j===0||(this._hasMaskedPath?C.length?o+=E.t.v*C[0]:o+=E.t.v*C:C.length?r+=E.t.v*C[0]:r+=E.t.v*C));for(t.strokeWidthAnim&&(ne=t.sw||0),t.strokeColorAnim&&(te=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(re=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<O;F+=1)(E=T[F].a).a.propType&&((C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars)).length?w.translate(-E.a.v[0]*C[0],-E.a.v[1]*C[1],E.a.v[2]*C[2]):w.translate(-E.a.v[0]*C,-E.a.v[1]*C,E.a.v[2]*C));for(F=0;F<O;F+=1)(E=T[F].a).s.propType&&((C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars)).length?w.scale(1+(E.s.v[0]-1)*C[0],1+(E.s.v[1]-1)*C[1],1):w.scale(1+(E.s.v[0]-1)*C,1+(E.s.v[1]-1)*C,1));for(F=0;F<O;F+=1){if(E=T[F].a,C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars),E.sk.propType&&(C.length?w.skewFromAxis(-E.sk.v*C[0],E.sa.v*C[1]):w.skewFromAxis(-E.sk.v*C,E.sa.v*C)),E.r.propType&&(C.length?w.rotateZ(-E.r.v*C[2]):w.rotateZ(-E.r.v*C)),E.ry.propType&&(C.length?w.rotateY(E.ry.v*C[1]):w.rotateY(E.ry.v*C)),E.rx.propType&&(C.length?w.rotateX(E.rx.v*C[0]):w.rotateX(E.rx.v*C)),E.o.propType&&(C.length?G+=(E.o.v*C[0]-G)*C[0]:G+=(E.o.v*C-G)*C),t.strokeWidthAnim&&E.sw.propType&&(C.length?ne+=E.sw.v*C[0]:ne+=E.sw.v*C),t.strokeColorAnim&&E.sc.propType)for(Q=0;Q<3;Q+=1)C.length?te[Q]+=(E.sc.v[Q]-te[Q])*C[0]:te[Q]+=(E.sc.v[Q]-te[Q])*C;if(t.fillColorAnim&&t.fc){if(E.fc.propType)for(Q=0;Q<3;Q+=1)C.length?re[Q]+=(E.fc.v[Q]-re[Q])*C[0]:re[Q]+=(E.fc.v[Q]-re[Q])*C;E.fh.propType&&(re=C.length?addHueToRGB(re,E.fh.v*C[0]):addHueToRGB(re,E.fh.v*C)),E.fs.propType&&(re=C.length?addSaturationToRGB(re,E.fs.v*C[0]):addSaturationToRGB(re,E.fs.v*C)),E.fb.propType&&(re=C.length?addBrightnessToRGB(re,E.fb.v*C[0]):addBrightnessToRGB(re,E.fb.v*C))}}for(F=0;F<O;F+=1)(E=T[F].a).p.propType&&(C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars),this._hasMaskedPath?C.length?w.translate(0,E.p.v[1]*C[0],-E.p.v[2]*C[1]):w.translate(0,E.p.v[1]*C,-E.p.v[2]*C):C.length?w.translate(E.p.v[0]*C[0],E.p.v[1]*C[1],-E.p.v[2]*C[2]):w.translate(E.p.v[0]*C,E.p.v[1]*C,-E.p.v[2]*C));if(t.strokeWidthAnim&&(we=ne<0?0:ne),t.strokeColorAnim&&(ce="rgb("+Math.round(255*te[0])+","+Math.round(255*te[1])+","+Math.round(255*te[2])+")"),t.fillColorAnim&&t.fc&&(Ce="rgb("+Math.round(255*re[0])+","+Math.round(255*re[1])+","+Math.round(255*re[2])+")"),this._hasMaskedPath){if(w.translate(0,-t.ls),w.translate(0,x[1]*$*.01+i,0),this._pathData.p.v){b=(l.point[1]-p.point[1])/(l.point[0]-p.point[0]);var xr=180*Math.atan(b)/Math.PI;l.point[0]<p.point[0]&&(xr+=180),w.rotate(-xr*Math.PI/180)}w.translate(U,Y,0),o-=x[0]*I[n].an*.005,I[n+1]&&W!==I[n+1].ind&&(o+=I[n].an/2,o+=.001*t.tr*t.finalSize)}else{switch(w.translate(r,i,0),t.ps&&w.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:w.translate(I[n].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[I[n].line]),0,0);break;case 2:w.translate(I[n].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[I[n].line])/2,0,0)}w.translate(0,-t.ls),w.translate(q,0,0),w.translate(x[0]*I[n].an*.005,x[1]*$*.01,0),r+=I[n].l+.001*t.tr*t.finalSize}M==="html"?pt=w.toCSS():M==="svg"?pt=w.to2dCSS():at=[w.props[0],w.props[1],w.props[2],w.props[3],w.props[4],w.props[5],w.props[6],w.props[7],w.props[8],w.props[9],w.props[10],w.props[11],w.props[12],w.props[13],w.props[14],w.props[15]],xe=G}k<=n?(D=new LetterProps(xe,we,ce,Ce,pt,at),this.renderedLetters.push(D),k+=1,this.lettersChangedFlag=!0):(D=this.renderedLetters[n],this.lettersChangedFlag=D.update(xe,we,ce,Ce,pt,at)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,n=e.length,s="";for(r=0;r<n;r+=1)e[r].ty==="sh"&&(i=e[r].ks.k,s+=buildShapeString(i,i.i.length,!0,t));return s},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,n){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,n,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function ISolidElement(t,e,r){this.initElement(t,e,r)}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),n=createElementID();i.setAttribute("id",n),i.textContent=e.title,this.svgElement.appendChild(i),r+=n}if(e&&e.description){var s=createNS("desc"),a=createElementID();s.setAttribute("id",a),s.textContent=e.description,this.svgElement.appendChild(s),r+=" "+a}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&e.hideOnTransparent===!1),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"},width:e&&e.width,height:e&&e.height,runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CVContextData(){var t;for(this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1,this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVEffects(){}function CVMaskElement(t,e){var r;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,n=!1;for(r=0;r<i;r+=1)this.masksProperties[r].mode!=="n"&&(n=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);this.hasMasks=n,n&&this.element.addRenderableComponent(this)}function CVBaseElement(){}function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var n,s=4;e.ty==="rc"?s=5:e.ty==="el"?s=6:e.ty==="sr"&&(s=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,s,t);var a,o=r.length;for(n=0;n<o;n+=1)r[n].closed||(a={transforms:i.addTransformSequence(r[n].transforms),trNodes:[]},this.styledShapes.push(a),r[n].elements.push(a))}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,r)}function CVImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,r)}function CVSolidElement(t,e,r){this.initElement(t,e,r)}function CanvasRendererBase(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||e.clearCanvas===void 0||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||e.clearCanvas===void 0||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||"",runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function HBaseElement(){}function HSolidElement(t,e,r){this.initElement(t,e,r)}function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,r)}function HCameraElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initHierarchy();var i=PropertyFactory.getProp;if(this.pe=i(this,t.pe,0,0,this),t.ks.p.s?(this.px=i(this,t.ks.p.x,1,0,this),this.py=i(this,t.ks.p.y,1,0,this),this.pz=i(this,t.ks.p.z,1,0,this)):this.p=i(this,t.ks.p,1,0,this),t.ks.a&&(this.a=i(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var n,s=t.ks.or.k.length;for(n=0;n<s;n+=1)t.ks.or.k[n].to=null,t.ks.or.k[n].ti=null}this.or=i(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=i(this,t.ks.rx,0,degToRads,this),this.ry=i(this,t.ks.ry,0,degToRads,this),this.rz=i(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r)}function HybridRendererBase(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&e.hideOnTransparent===!1),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(t,e,r){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&e.hideOnTransparent===!1),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"},runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],n="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(n),n=""):n+=t[e],e+=1;return i.push(n),i},SVGTextLottieElement.prototype.buildShapeData=function(t,e){if(t.shapes&&t.shapes.length){var r=t.shapes[0];if(r.it){var i=r.it[r.it.length-1];i.s&&(i.s.k[0]=e,i.s.k[1]=e)}}return t},SVGTextLottieElement.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var n=r.fWeight,s=r.fStyle;this.layerElement.setAttribute("font-style",s),this.layerElement.setAttribute("font-weight",n)}this.layerElement.setAttribute("aria-label",r.t);var a,o=r.l||[],l=!!this.globalData.fontManager.chars;e=o.length;var h=this.mHelper,c=this.data.singleShape,u=0,f=0,p=!0,m=.001*r.tr*r.finalSize;if(!c||l||r.sz){var g,d=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!l||!c||t===0){if(a=d>t?this.textSpans[t].span:createNS(l?"g":"text"),d<=t){if(a.setAttribute("stroke-linecap","butt"),a.setAttribute("stroke-linejoin","round"),a.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=a,l){var y=createNS("g");a.appendChild(y),this.textSpans[t].childSpan=y}this.textSpans[t].span=a,this.layerElement.appendChild(a)}a.style.display="inherit"}if(h.reset(),c&&(o[t].n&&(u=-m,f+=r.yOffset,f+=p?1:0,p=!1),this.applyTextPropertiesToMatrix(r,h,o[t].line,u,f),u+=o[t].l||0,u+=m),l){var v;if((g=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t===1)v=new SVGCompElement(g.data,this.globalData,this);else{var b=emptyShapeData;g.data&&g.data.shapes&&(b=this.buildShapeData(g.data,r.finalSize)),v=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[t].glyph){var _=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(_.layerElement),_.destroy()}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),g.t===1&&this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else c&&a.setAttribute("transform","translate("+h.props[12]+","+h.props[13]+")"),a.textContent=o[t].val,a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}c&&a&&a.setAttribute("d","")}else{var x=this.textContainer,T="start";switch(r.j){case 1:T="end";break;case 2:T="middle";break;default:T="start"}x.setAttribute("text-anchor",T),x.setAttribute("letter-spacing",m);var S=this.buildTextContents(r.finalText);for(e=S.length,f=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(a=this.textSpans[t].span||createNS("tspan")).textContent=S[t],a.setAttribute("x",0),a.setAttribute("y",f),a.style.display="inherit",x.appendChild(a),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=a,f+=r.finalLineHeight;this.layerElement.appendChild(x)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e,r=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<r;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,n,s=this.textAnimator.renderedLetters,a=this.textProperty.currentData.l;for(e=a.length,t=0;t<e;t+=1)a[t].n||(r=s[t],i=this.textSpans[t].span,(n=this.textSpans[t].glyph)&&n.renderFrame(),r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var n=createElementID();r.setAttribute("id",n),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+n+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(t){var e=0,r=this.layers.length;for(e=0;e<r;e+=1)if(this.layers[e].ind===t)return e;return-1},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&this.layers[t].ty!==99){e[t]=!0;var r=this.createItem(this.layers[t]);if(e[t]=r,getExpressionsPlugin()&&(this.layers[t].ty===0&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt){var i="tp"in this.layers[t]?this.findIndexByInd(this.layers[t].tp):t-1;if(i===-1)return;if(this.elements[i]&&this.elements[i]!==!0){var n=e[i].getMatte(this.layers[t].tt);r.setMatte(n)}else this.buildItem(i),this.addPendingElement(r)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){var i="tp"in t.data?this.findIndexByInd(t.data.tp):e-1,n=this.elements[i].getMatte(this.layers[e].tt);t.setMatte(n);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;t===null?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,n=0;n<e;)this.elements[n]&&this.elements[n]!==!0&&this.elements[n].getBaseElement()&&(i=this.elements[n].getBaseElement()),n+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var n=this.sequences[i];return n||(n={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=n,this.sequenceList.push(n)),n},processSequence:function(t,e){for(var r,i=0,n=t.transforms.length,s=e;i<n&&!e;){if(t.transforms[i].transform.mProps._mdf){s=!0;break}i+=1}if(s)for(t.finalTransform.reset(),i=n-1;i>=0;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=s},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVEffects.prototype.renderFrame=function(){},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,r,i,n=this.element.finalTransform.mat,s=this.element.canvasContext,a=this.masksProperties.length;for(s.beginPath(),t=0;t<a;t+=1)if(this.masksProperties[t].mode!=="n"){var o;this.masksProperties[t].inv&&(s.moveTo(0,0),s.lineTo(this.element.globalData.compSize.w,0),s.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),s.lineTo(0,this.element.globalData.compSize.h),s.lineTo(0,0)),i=this.viewData[t].v,e=n.applyToPointArray(i.v[0][0],i.v[0][1],0),s.moveTo(e[0],e[1]);var l=i._length;for(o=1;o<l;o+=1)r=n.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),s.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=n.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),s.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),s.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=this.data.ty===0;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:t.hd===!0},i={};if(t.ty==="fl"||t.ty==="st"?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):t.ty!=="gf"&&t.ty!=="gs"||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),t.ty==="st"||t.ty==="gs"){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],t.lj==1&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var n=new DashProperty(this,t.d,"canvas",this);i.d=n,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=t.r===2?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,i,n){var s,a,o,l,h,c,u=t.length-1,f=[],p=[],m=[].concat(n);for(s=u;s>=0;s-=1){if((l=this.searchProcessedElement(t[s]))?e[s]=r[l-1]:t[s]._shouldRender=i,t[s].ty==="fl"||t[s].ty==="st"||t[s].ty==="gf"||t[s].ty==="gs")l?e[s].style.closed=!1:e[s]=this.createStyleElement(t[s],m),f.push(e[s].style);else if(t[s].ty==="gr"){if(l)for(o=e[s].it.length,a=0;a<o;a+=1)e[s].prevViewData[a]=e[s].it[a];else e[s]=this.createGroupElement(t[s]);this.searchShapes(t[s].it,e[s].it,e[s].prevViewData,i,m)}else t[s].ty==="tr"?(l||(c=this.createTransformElement(t[s]),e[s]=c),m.push(e[s]),this.addTransformToStyleList(e[s])):t[s].ty==="sh"||t[s].ty==="rc"||t[s].ty==="el"||t[s].ty==="sr"?l||(e[s]=this.createShapeElement(t[s])):t[s].ty==="tm"||t[s].ty==="rd"||t[s].ty==="pb"||t[s].ty==="zz"||t[s].ty==="op"?(l?(h=e[s]).closed=!1:((h=ShapeModifiers.getModifier(t[s].ty)).init(this,t[s]),e[s]=h,this.shapeModifiers.push(h)),p.push(h)):t[s].ty==="rp"&&(l?(h=e[s]).closed=!0:(h=ShapeModifiers.getModifier(t[s].ty),e[s]=h,h.init(this,t,s,e),this.shapeModifiers.push(h),i=!1),p.push(h));this.addProcessedElement(t[s],s+1)}for(this.removeTransformFromStyleList(),this.closeStyles(f),u=p.length,s=0;s<u;s+=1)p[s].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,r,i,n,s,a,o,l,h=this.stylesList.length,c=this.globalData.renderer,u=this.globalData.canvasContext;for(t=0;t<h;t+=1)if(((o=(l=this.stylesList[t]).type)!=="st"&&o!=="gs"||l.wi!==0)&&l.data._shouldRender&&l.coOp!==0&&this.globalData.currentGlobalAlpha!==0){for(c.save(),s=l.elements,o==="st"||o==="gs"?(u.strokeStyle=o==="st"?l.co:l.grd,u.lineWidth=l.wi,u.lineCap=l.lc,u.lineJoin=l.lj,u.miterLimit=l.ml||0):u.fillStyle=o==="fl"?l.co:l.grd,c.ctxOpacity(l.coOp),o!=="st"&&o!=="gs"&&u.beginPath(),c.ctxTransform(l.preTransforms.finalTransform.props),r=s.length,e=0;e<r;e+=1){for(o!=="st"&&o!=="gs"||(u.beginPath(),l.da&&(u.setLineDash(l.da),u.lineDashOffset=l.do)),n=(a=s[e].trNodes).length,i=0;i<n;i+=1)a[i].t==="m"?u.moveTo(a[i].p[0],a[i].p[1]):a[i].t==="c"?u.bezierCurveTo(a[i].pts[0],a[i].pts[1],a[i].pts[2],a[i].pts[3],a[i].pts[4],a[i].pts[5]):u.closePath();o!=="st"&&o!=="gs"||(u.stroke(),l.da&&u.setLineDash(this.dashResetter))}o!=="st"&&o!=="gs"&&u.fill(l.r),c.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,i){var n,s;for(s=t,n=e.length-1;n>=0;n-=1)e[n].ty==="tr"?(s=r[n].transform,this.renderShapeTransform(t,s)):e[n].ty==="sh"||e[n].ty==="el"||e[n].ty==="rc"||e[n].ty==="sr"?this.renderPath(e[n],r[n]):e[n].ty==="fl"?this.renderFill(e[n],r[n],s):e[n].ty==="st"?this.renderStroke(e[n],r[n],s):e[n].ty==="gf"||e[n].ty==="gs"?this.renderGradientFill(e[n],r[n],s):e[n].ty==="gr"?this.renderShape(s,e[n].it,r[n].it):e[n].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,n,s=t.trNodes,a=e.paths,o=a._length;s.length=0;var l=t.transforms.finalTransform;for(n=0;n<o;n+=1){var h=a.shapes[n];if(h&&h.v){for(i=h._length,r=1;r<i;r+=1)r===1&&s.push({t:"m",p:l.applyToPointArray(h.v[0][0],h.v[0][1],0)}),s.push({t:"c",pts:l.applyToTriplePoints(h.o[r-1],h.i[r],h.v[r])});i===1&&s.push({t:"m",p:l.applyToPointArray(h.v[0][0],h.v[0][1],0)}),h.c&&i&&(s.push({t:"c",pts:l.applyToTriplePoints(h.o[r-1],h.i[0],h.v[0])}),s.push({t:"z"}))}}t.trNodes=s}},CVShapeElement.prototype.renderPath=function(t,e){if(t.hd!==!0&&t._shouldRender){var r,i=e.styledShapes.length;for(r=0;r<i;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var i,n=e.style;if(!n.grd||e.g._mdf||e.s._mdf||e.e._mdf||t.t!==1&&(e.h._mdf||e.a._mdf)){var s,a=this.globalData.canvasContext,o=e.s.v,l=e.e.v;if(t.t===1)i=a.createLinearGradient(o[0],o[1],l[0],l[1]);else{var h=Math.sqrt(Math.pow(o[0]-l[0],2)+Math.pow(o[1]-l[1],2)),c=Math.atan2(l[1]-o[1],l[0]-o[0]),u=e.h.v;u>=1?u=.99:u<=-1&&(u=-.99);var f=h*u,p=Math.cos(c+e.a.v)*f+o[0],m=Math.sin(c+e.a.v)*f+o[1];i=a.createRadialGradient(p,m,0,o[0],o[1],h)}var g=t.g.p,d=e.g.c,y=1;for(s=0;s<g;s+=1)e.g._hasOpacity&&e.g._collapsable&&(y=e.g.o[2*s+1]),i.addColorStop(d[4*s]/100,"rgba("+d[4*s+1]+","+d[4*s+2]+","+d[4*s+3]+","+y+")");n.grd=i}n.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var i=e.style,n=e.d;n&&(n._mdf||this._isFirstFrame)&&(i.da=n.dashArray,i.do=n.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,n,s,a,o,l,h,c,u,f,p,m,g=this.globalData.fontManager.getFontByName(t.f),d=t.l,y=this.mHelper;this.stroke=r,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,n=t.finalText.length;var v=this.data.singleShape,b=.001*t.tr*t.finalSize,_=0,x=0,T=!0,S=0;for(i=0;i<n;i+=1){a=(s=this.globalData.fontManager.getCharData(t.finalText[i],g.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&s.data||{},y.reset(),v&&d[i].n&&(_=-b,x+=t.yOffset,x+=T?1:0,T=!1),u=(h=a.shapes?a.shapes[0].it:[]).length,y.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,y,d[i].line,_,x),p=createSizedArray(u-1);var w=0;for(c=0;c<u;c+=1)if(h[c].ty==="sh"){for(l=h[c].ks.k.i.length,f=h[c].ks.k,m=[],o=1;o<l;o+=1)o===1&&m.push(y.applyToX(f.v[0][0],f.v[0][1],0),y.applyToY(f.v[0][0],f.v[0][1],0)),m.push(y.applyToX(f.o[o-1][0],f.o[o-1][1],0),y.applyToY(f.o[o-1][0],f.o[o-1][1],0),y.applyToX(f.i[o][0],f.i[o][1],0),y.applyToY(f.i[o][0],f.i[o][1],0),y.applyToX(f.v[o][0],f.v[o][1],0),y.applyToY(f.v[o][0],f.v[o][1],0));m.push(y.applyToX(f.o[o-1][0],f.o[o-1][1],0),y.applyToY(f.o[o-1][0],f.o[o-1][1],0),y.applyToX(f.i[0][0],f.i[0][1],0),y.applyToY(f.i[0][0],f.i[0][1],0),y.applyToX(f.v[0][0],f.v[0][1],0),y.applyToY(f.v[0][0],f.v[0][1],0)),p[w]=m,w+=1}v&&(_+=d[i].l,_+=b),this.textSpans[S]?this.textSpans[S].elem=p:this.textSpans[S]={elem:p},S+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,r,i,n,s,a=this.canvasContext;a.font=this.values.fValue,a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,l=this.textAnimator.renderedLetters,h=this.textProperty.currentData.l;e=h.length;var c,u,f=null,p=null,m=null;for(t=0;t<e;t+=1)if(!h[t].n){if((o=l[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?f!==o.fc&&(f=o.fc,a.fillStyle=o.fc):f!==this.values.fill&&(f=this.values.fill,a.fillStyle=this.values.fill),i=(c=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(s=(u=c[r]).length,this.globalData.canvasContext.moveTo(u[0],u[1]),n=2;n<s;n+=6)this.globalData.canvasContext.bezierCurveTo(u[n],u[n+1],u[n+2],u[n+3],u[n+4],u[n+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?m!==o.sw&&(m=o.sw,a.lineWidth=o.sw):m!==this.values.sWidth&&(m=this.values.sWidth,a.lineWidth=this.values.sWidth),o&&o.sc?p!==o.sc&&(p=o.sc,a.strokeStyle=o.sc):p!==this.values.stroke&&(p=this.values.stroke,a.strokeStyle=this.values.stroke),i=(c=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(s=(u=c[r]).length,this.globalData.canvasContext.moveTo(u[0],u[1]),n=2;n<s;n+=6)this.globalData.canvasContext.bezierCurveTo(u[n],u[n+1],u[n+2],u[n+3],u[n+4],u[n+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,r,i=t.getContext("2d"),n=this.img.width,s=this.img.height,a=n/s,o=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;a>o&&l==="xMidYMid slice"||a<o&&l!=="xMidYMid slice"?e=(r=s)*o:r=(e=n)/o,i.drawImage(this.img,(n-e)/2,(s-r)/2,e,r,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRendererBase.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(t){if(t[0]!==1||t[1]!==0||t[4]!==0||t[5]!==1||t[12]!==0||t[13]!==0)if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRendererBase.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,r=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=r[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.globalData.currentGlobalAlpha!==r&&(this.canvasContext.globalAlpha=r,this.globalData.currentGlobalAlpha=r)}else this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(t,e){var r,i,n,s;if(this.reset(),t?(r=t,i=e,this.canvasContext.canvas.width=r,this.canvasContext.canvas.height=i):(this.animationItem.wrapper&&this.animationItem.container?(r=this.animationItem.wrapper.offsetWidth,i=this.animationItem.wrapper.offsetHeight):(r=this.canvasContext.canvas.width,i=this.canvasContext.canvas.height),this.canvasContext.canvas.width=r*this.renderConfig.dpr,this.canvasContext.canvas.height=i*this.renderConfig.dpr),this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var a=this.renderConfig.preserveAspectRatio.split(" "),o=a[1]||"meet",l=a[0]||"xMidYMid",h=l.substr(0,4),c=l.substr(4);n=r/i,(s=this.transformCanvas.w/this.transformCanvas.h)>n&&o==="meet"||s<n&&o==="slice"?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx=h==="xMid"&&(s<n&&o==="meet"||s>n&&o==="slice")?(r-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:h==="xMax"&&(s<n&&o==="meet"||s>n&&o==="slice")?(r-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty=c==="YMid"&&(s>n&&o==="meet"||s<n&&o==="slice")?(i-this.transformCanvas.h*(r/this.transformCanvas.w))/2*this.renderConfig.dpr:c==="YMax"&&(s>n&&o==="meet"||s<n&&o==="slice")?(i-this.transformCanvas.h*(r/this.transformCanvas.w))*this.renderConfig.dpr:0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||this.renderConfig.clearCanvas!==!0||e)&&!this.destroyed&&t!==-1){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&this.layers[t].ty!==99){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e=t[r].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var r,i,n,s,a,o=t.sh.v,l=t.transformers,h=o._length;if(!(h<=1)){for(r=0;r<h-1;r+=1)i=this.getTransformedPoint(l,o.v[r]),n=this.getTransformedPoint(l,o.o[r]),s=this.getTransformedPoint(l,o.i[r+1]),a=this.getTransformedPoint(l,o.v[r+1]),this.checkBounds(i,n,s,a,e);o.c&&(i=this.getTransformedPoint(l,o.v[r]),n=this.getTransformedPoint(l,o.o[r]),s=this.getTransformedPoint(l,o.i[0]),a=this.getTransformedPoint(l,o.v[0]),this.checkBounds(i,n,s,a,e))}},HShapeElement.prototype.checkBounds=function(t,e,r,i,n){this.getBoundsOfCurve(t,e,r,i);var s=this.shapeBoundingBox;n.x=bmMin(s.left,n.x),n.xMax=bmMax(s.right,n.xMax),n.y=bmMin(s.top,n.y),n.yMax=bmMax(s.bottom,n.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,r,i){for(var n,s,a,o,l,h,c,u=[[t[0],i[0]],[t[1],i[1]]],f=0;f<2;++f)s=6*t[f]-12*e[f]+6*r[f],n=-3*t[f]+9*e[f]-9*r[f]+3*i[f],a=3*e[f]-3*t[f],s|=0,a|=0,(n|=0)===0&&s===0||(n===0?(o=-a/s)>0&&o<1&&u[f].push(this.calculateF(o,t,e,r,i,f)):(l=s*s-4*a*n)>=0&&((h=(-s+bmSqrt(l))/(2*n))>0&&h<1&&u[f].push(this.calculateF(h,t,e,r,i,f)),(c=(-s-bmSqrt(l))/(2*n))>0&&c<1&&u[f].push(this.calculateF(c,t,e,r,i,f))));this.shapeBoundingBox.left=bmMin.apply(null,u[0]),this.shapeBoundingBox.top=bmMin.apply(null,u[1]),this.shapeBoundingBox.right=bmMax.apply(null,u[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,u[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,n,s){return bmPow(1-t,3)*e[s]+3*bmPow(1-t,2)*t*r[s]+3*(1-t)*bmPow(t,2)*i[s]+bmPow(t,3)*n[s]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]&&t[r].sh?this.calculateShapeBoundingBox(t[r],e):t[r]&&t[r].it?this.calculateBoundingBox(t[r].it,e):t[r]&&t[r].style&&t[r].w&&this.expandStrokeBoundingBox(t[r].w,e)},HShapeElement.prototype.expandStrokeBoundingBox=function(t,e){var r=0;if(t.keyframes){for(var i=0;i<t.keyframes.length;i+=1){var n=t.keyframes[i].s;n>r&&(r=n)}r*=t.mult}else r=t.v*t.mult;e.x-=r,e.xMax+=r,e.y-=r,e.yMax+=r},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var r=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),r=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),r=!0),r||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,n="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=n,i.webkitTransform=n}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,r=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=r,e.color=r,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i,n,s=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",s.fClass)this.innerElem.className=s.fClass;else{e.fontFamily=s.fFamily;var a=t.fWeight,o=t.fStyle;e.fontStyle=o,e.fontWeight=a}var l,h,c,u=t.l;n=u.length;var f,p=this.mHelper,m="",g=0;for(i=0;i<n;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[g]?l=this.textPaths[g]:((l=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),l.setAttribute("stroke-linejoin",lineJoinEnum[2]),l.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[g]?c=(h=this.textSpans[g]).children[0]:((h=createTag("div")).style.lineHeight=0,(c=createNS("svg")).appendChild(l),styleDiv(h)))):this.isMasked?l=this.textPaths[g]?this.textPaths[g]:createNS("text"):this.textSpans[g]?(h=this.textSpans[g],l=this.textPaths[g]):(styleDiv(h=createTag("span")),styleDiv(l=createTag("span")),h.appendChild(l)),this.globalData.fontManager.chars){var d,y=this.globalData.fontManager.getCharData(t.finalText[i],s.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(d=y?y.data:null,p.reset(),d&&d.shapes&&d.shapes.length&&(f=d.shapes[0].it,p.scale(t.finalSize/100,t.finalSize/100),m=this.createPathShape(p,f),l.setAttribute("d",m)),this.isMasked)this.innerElem.appendChild(l);else{if(this.innerElem.appendChild(h),d&&d.shapes){document.body.appendChild(c);var v=c.getBBox();c.setAttribute("width",v.width+2),c.setAttribute("height",v.height+2),c.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=c.style,_="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=_,b.webkitTransform=_,u[i].yOffset=v.y-1}else c.setAttribute("width",1),c.setAttribute("height",1);h.appendChild(c)}}else if(l.textContent=u[i].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(l);else{this.innerElem.appendChild(h);var x=l.style,T="translate3d(0,"+-t.finalSize/1.2+"px,0)";x.transform=T,x.webkitTransform=T}this.isMasked?this.textSpans[g]=l:this.textSpans[g]=h,this.textSpans[g].style.display="block",this.textPaths[g]=l,g+=1}for(;g<this.textSpans.length;)this.textSpans[g].style.display="none",g+=1},HTextElement.prototype.renderInnerContent=function(){var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var r,i,n,s,a,o=0,l=this.textAnimator.renderedLetters,h=this.textProperty.currentData.l;for(i=h.length,r=0;r<i;r+=1)h[r].n?o+=1:(s=this.textSpans[r],a=this.textPaths[r],n=l[o],o+=1,n._mdf.m&&(this.isMasked?s.setAttribute("transform",n.m):(s.style.webkitTransform=n.m,s.style.transform=n.m)),s.style.opacity=n.o,n.sw&&n._mdf.sw&&a.setAttribute("stroke-width",n.sw),n.sc&&n._mdf.sc&&a.setAttribute("stroke",n.sc),n.fc&&n._mdf.fc&&(a.setAttribute("fill",n.fc),a.style.color=n.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var c=this.innerElem.getBBox();if(this.currentBBox.w!==c.width&&(this.currentBBox.w=c.width,this.svgElement.setAttribute("width",c.width)),this.currentBBox.h!==c.height&&(this.currentBBox.h=c.height,this.svgElement.setAttribute("height",c.height)),this.currentBBox.w!==c.width+2||this.currentBBox.h!==c.height+2||this.currentBBox.x!==c.x-1||this.currentBBox.y!==c.y-1){this.currentBBox.w=c.width+2,this.currentBBox.h=c.height+2,this.currentBBox.x=c.x-1,this.currentBBox.y=c.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var u="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=u,t.webkitTransform=u}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,r,i,n=this.comp.threeDElements.length;for(t=0;t<n;t+=1)if((e=this.comp.threeDElements[t]).type==="3d"){r=e.perspectiveElem.style,i=e.container.style;var s=this.pe.v+"px",a="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=s,r.webkitPerspective=s,i.transformOrigin="0px 0px 0px",i.mozTransformOrigin="0px 0px 0px",i.webkitTransformOrigin="0px 0px 0px",r.transform=a,r.webkitTransform=a}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,r=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)r=this.hierarchy[t].finalTransform.mProp._mdf||r;if(r||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;t>=0;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var n;n=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var s=Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2)+Math.pow(n[2],2)),a=[n[0]/s,n[1]/s,n[2]/s],o=Math.sqrt(a[2]*a[2]+a[0]*a[0]),l=Math.atan2(a[1],o),h=Math.atan2(a[0],-a[2]);this.mat.rotateY(h).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var c=!this._prevMat.equals(this.mat);if((c||this.pe._mdf)&&this.comp.threeDElements){var u,f,p;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if((u=this.comp.threeDElements[t]).type==="3d"){if(c){var m=this.mat.toCSS();(p=u.container.style).transform=m,p.webkitTransform=m}this.pe._mdf&&((f=u.perspectiveElem.style).perspective=this.pe.v+"px",f.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){var i=this.layers[e];if(i.ddd&&this.supports3d)this.addTo3dContainer(r,e);else if(this.threeDElements)this.addTo3dContainer(r,e);else{for(var n,s,a=0;a<e;)this.elements[a]&&this.elements[a]!==!0&&this.elements[a].getBaseElement&&(s=this.elements[a],n=(this.layers[a].ddd?this.getThreeDContainerByPos(a):s.getBaseElement())||n),a+=1;n?i.ddd&&this.supports3d||this.layerElement.insertBefore(r,n):i.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRendererBase.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRendererBase.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;e<r;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r,i,n=createTag("div");styleDiv(n);var s=createTag("div");if(styleDiv(s),e==="3d"){(r=n.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px",r.webkitTransformOrigin="50% 50%",r.mozTransformOrigin="50% 50%",r.transformOrigin="50% 50%";var a="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=s.style).transform=a,i.webkitTransform=a}n.appendChild(s);var o={container:s,perspectiveElem:n,startPos:t,endPos:t,type:e};return this.threeDElements.push(o),o},HybridRendererBase.prototype.build3dContainers=function(){var t,e,r=this.layers.length,i="";for(t=0;t<r;t+=1)this.layers[t].ddd&&this.layers[t].ty!==3?(i!=="3d"&&(i="3d",e=this.createThreeDContainer(t,"3d")),e.endPos=Math.max(e.endPos,t)):(i!=="2d"&&(i="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t));for(t=(r=this.threeDElements.length)-1;t>=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;r<i;){if(e<=this.threeDElements[r].endPos){for(var n,s=this.threeDElements[r].startPos;s<e;)this.elements[s]&&this.elements[s].getBaseElement&&(n=this.elements[s].getBaseElement()),s+=1;n?this.threeDElements[r].container.insertBefore(t,n):this.threeDElements[r].container.appendChild(t);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(t){var e=createTag("div"),r=this.animationItem.wrapper,i=e.style;i.width=t.w+"px",i.height=t.h+"px",this.resizerElem=e,styleDiv(e),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),r.appendChild(e),i.overflow="hidden";var n=createNS("svg");n.setAttribute("width","1"),n.setAttribute("height","1"),styleDiv(n),this.resizerElem.appendChild(n);var s=createNS("defs");n.appendChild(s),this.data=t,this.setupGlobalData(t,n),this.globalData.defs=s,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var t,e,r,i,n=this.animationItem.wrapper.offsetWidth,s=this.animationItem.wrapper.offsetHeight,a=n/s;this.globalData.compSize.w/this.globalData.compSize.h>a?(t=n/this.globalData.compSize.w,e=n/this.globalData.compSize.w,r=0,i=(s-this.globalData.compSize.h*(n/this.globalData.compSize.w))/2):(t=s/this.globalData.compSize.h,e=s/this.globalData.compSize.h,r=(n-this.globalData.compSize.w*(s/this.globalData.compSize.h))/2,i=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+i+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,r=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t<i;t+=1){var n=this.threeDElements[t].perspectiveElem.style;n.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(r,2))+"px",n.perspective=n.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(t){var e,r=t.length,i=createTag("div");for(e=0;e<r;e+=1)if(t[e].xt){var n=this.createComp(t[e],i,this.globalData.comp,null);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var r,i=0;i<e;)this.elements[i]&&this.elements[i].getBaseElement&&(r=this.elements[i].getBaseElement()),i+=1;r?this.layerElement.insertBefore(t,r):this.layerElement.appendChild(t)},HCompElement.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};var CompExpressionInterface=function(t){function e(r){for(var i=0,n=t.layers.length;i<n;){if(t.layers[i].nm===r||t.layers[i].ind===r)return t.elements[i].layerInterface;i+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e},Expressions=function(){var t={};return t.initExpressions=function(e){var r=0,i=[];e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=function(){r+=1},e.renderer.globalData.popExpression=function(){(r-=1)===0&&function(){var n,s=i.length;for(n=0;n<s;n+=1)i[n].release();i.length=0}()},e.renderer.globalData.registerExpressionProperty=function(n){i.indexOf(n)===-1&&i.push(n)}},t}(),MaskManagerInterface=function(){function t(e,r){this._mask=e,this._data=r}return Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(e){var r,i=createSizedArray(e.viewData.length),n=e.viewData.length;for(r=0;r<n;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(s){for(r=0;r<n;){if(e.masksProperties[r].nm===s)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function r(n,s,a){Object.defineProperty(n,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),n.numKeys=s.keyframes?s.keyframes.length:0,n.key=function(o){if(!n.numKeys)return 0;var l="";l="s"in s.keyframes[o-1]?s.keyframes[o-1].s:"e"in s.keyframes[o-2]?s.keyframes[o-2].e:s.keyframes[o-2].s;var h=a==="unidimensional"?new Number(l):Object.assign({},l);return h.time=s.keyframes[o-1].t/s.elem.comp.globalData.frameRate,h.value=a==="unidimensional"?l[0]:l,h},n.valueAtTime=s.getValueAtTime,n.speedAtTime=s.getSpeedAtTime,n.velocityAtTime=s.getVelocityAtTime,n.propertyGroup=s.propertyGroup}function i(){return t}return function(n){return n?n.propType==="unidimensional"?function(s){s&&"pv"in s||(s=t);var a=1/s.mult,o=s.pv*a,l=new Number(o);return l.value=o,r(l,s,"unidimensional"),function(){return s.k&&s.getValue(),o=s.v*a,l.value!==o&&((l=new Number(o)).value=o,r(l,s,"unidimensional")),l}}(n):function(s){s&&"pv"in s||(s=e);var a=1/s.mult,o=s.data&&s.data.l||s.pv.length,l=createTypedArray("float32",o),h=createTypedArray("float32",o);return l.value=h,r(l,s,"multidimensional"),function(){s.k&&s.getValue();for(var c=0;c<o;c+=1)h[c]=s.v[c]*a,l[c]=h[c];return l}}(n):i}}(),TransformExpressionInterface=function(t){function e(a){switch(a){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,n,s;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?s=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(n=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?s():[r(),i(),n?n():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},LayerExpressionInterface=function(){function t(h){var c=new Matrix;return h!==void 0?this._elem.finalTransform.mProp.getValueAtTime(h).clone(c):this._elem.finalTransform.mProp.applyToMatrix(c),c}function e(h,c){var u=this.getMatrix(c);return u.props[12]=0,u.props[13]=0,u.props[14]=0,this.applyPoint(u,h)}function r(h,c){var u=this.getMatrix(c);return this.applyPoint(u,h)}function i(h,c){var u=this.getMatrix(c);return u.props[12]=0,u.props[13]=0,u.props[14]=0,this.invertPoint(u,h)}function n(h,c){var u=this.getMatrix(c);return this.invertPoint(u,h)}function s(h,c){if(this._elem.hierarchy&&this._elem.hierarchy.length){var u,f=this._elem.hierarchy.length;for(u=0;u<f;u+=1)this._elem.hierarchy[u].finalTransform.mProp.applyToMatrix(h)}return h.applyToPointArray(c[0],c[1],c[2]||0)}function a(h,c){if(this._elem.hierarchy&&this._elem.hierarchy.length){var u,f=this._elem.hierarchy.length;for(u=0;u<f;u+=1)this._elem.hierarchy[u].finalTransform.mProp.applyToMatrix(h)}return h.inversePoint(c)}function o(h){var c=new Matrix;if(c.reset(),this._elem.finalTransform.mProp.applyToMatrix(c),this._elem.hierarchy&&this._elem.hierarchy.length){var u,f=this._elem.hierarchy.length;for(u=0;u<f;u+=1)this._elem.hierarchy[u].finalTransform.mProp.applyToMatrix(c);return c.inversePoint(h)}return c.inversePoint(h)}function l(){return[1,1,1,1]}return function(h){var c;function u(p){switch(p){case"ADBE Root Vectors Group":case"Contents":case 2:return u.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return c;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return u.effect;case"ADBE Text Properties":return u.textInterface;default:return null}}u.getMatrix=t,u.invertPoint=a,u.applyPoint=s,u.toWorld=r,u.toWorldVec=e,u.fromWorld=n,u.fromWorldVec=i,u.toComp=r,u.fromComp=o,u.sampleImage=l,u.sourceRectAtTime=h.sourceRectAtTime.bind(h),u._elem=h;var f=getDescriptor(c=TransformExpressionInterface(h.finalTransform.mProp),"anchorPoint");return Object.defineProperties(u,{hasParent:{get:function(){return h.hierarchy.length}},parent:{get:function(){return h.hierarchy[0].layerInterface}},rotation:getDescriptor(c,"rotation"),scale:getDescriptor(c,"scale"),position:getDescriptor(c,"position"),opacity:getDescriptor(c,"opacity"),anchorPoint:f,anchor_point:f,transform:{get:function(){return c}},active:{get:function(){return h.isInRange}}}),u.startTime=h.data.st,u.index=h.data.ind,u.source=h.data.refId,u.height=h.data.ty===0?h.data.h:100,u.width=h.data.ty===0?h.data.w:100,u.inPoint=h.data.ip/h.comp.globalData.frameRate,u.outPoint=h.data.op/h.comp.globalData.frameRate,u._name=h.data.nm,u.registerMaskInterface=function(p){u.mask=new MaskManagerInterface(p,h)},u.registerEffectsInterface=function(p){u.effect=p},u}}(),propertyGroupFactory=function(t,e){return function(r){return(r=r===void 0?1:r)<=0?t:e(r-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(i){return(i=i===void 0?1:i)<=0?r:e(i-1)}},EffectsExpressionInterface=function(){function t(r,i,n,s){function a(u){for(var f=r.ef,p=0,m=f.length;p<m;){if(u===f[p].nm||u===f[p].mn||u===f[p].ix)return f[p].ty===5?h[p]:h[p]();p+=1}throw new Error}var o,l=propertyGroupFactory(a,n),h=[],c=r.ef.length;for(o=0;o<c;o+=1)r.ef[o].ty===5?h.push(t(r.ef[o],i.effectElements[o],i.effectElements[o].propertyGroup,s)):h.push(e(i.effectElements[o],r.ef[o].ty,s,l));return r.mn==="ADBE Color Control"&&Object.defineProperty(a,"color",{get:function(){return h[0]()}}),Object.defineProperties(a,{numProperties:{get:function(){return r.np}},_name:{value:r.nm},propertyGroup:{value:l}}),a.enabled=r.en!==0,a.active=a.enabled,a}function e(r,i,n,s){var a=ExpressionPropertyInterface(r.p);return r.p.setGroupProperty&&r.p.setGroupProperty(PropertyInterface("",s)),function(){return i===10?n.comp.compInterface(r.p.v):a()}}return{createEffectsInterface:function(r,i){if(r.effectsManager){var n,s=[],a=r.data.ef,o=r.effectsManager.effectElements.length;for(n=0;n<o;n+=1)s.push(t(a[n],r.effectsManager.effectElements[n],i,r));var l=r.data.ef||[],h=function(c){for(n=0,o=l.length;n<o;){if(c===l[n].nm||c===l[n].mn||c===l[n].ix)return s[n];n+=1}return null};return Object.defineProperty(h,"numProperties",{get:function(){return l.length}}),h}return null}}}(),ShapePathInterface=function(t,e,r){var i=e.sh;function n(a){return a==="Shape"||a==="shape"||a==="Path"||a==="path"||a==="ADBE Vector Shape"||a===2?n.path:null}var s=propertyGroupFactory(n,r);return i.setGroupProperty(PropertyInterface("Path",s)),Object.defineProperties(n,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),n},ShapeExpressionInterface=function(){function t(p,m,g){var d,y=[],v=p?p.length:0;for(d=0;d<v;d+=1)p[d].ty==="gr"?y.push(e(p[d],m[d],g)):p[d].ty==="fl"?y.push(r(p[d],m[d],g)):p[d].ty==="st"?y.push(s(p[d],m[d],g)):p[d].ty==="tm"?y.push(a(p[d],m[d],g)):p[d].ty==="tr"||(p[d].ty==="el"?y.push(l(p[d],m[d],g)):p[d].ty==="sr"?y.push(h(p[d],m[d],g)):p[d].ty==="sh"?y.push(ShapePathInterface(p[d],m[d],g)):p[d].ty==="rc"?y.push(c(p[d],m[d],g)):p[d].ty==="rd"?y.push(u(p[d],m[d],g)):p[d].ty==="rp"?y.push(f(p[d],m[d],g)):p[d].ty==="gf"?y.push(i(p[d],m[d],g)):y.push(n(p[d],m[d])));return y}function e(p,m,g){var d=function(b){switch(b){case"ADBE Vectors Group":case"Contents":case 2:return d.content;default:return d.transform}};d.propertyGroup=propertyGroupFactory(d,g);var y=function(b,_,x){var T,S=function(M){for(var k=0,I=T.length;k<I;){if(T[k]._name===M||T[k].mn===M||T[k].propertyIndex===M||T[k].ix===M||T[k].ind===M)return T[k];k+=1}return typeof M=="number"?T[M-1]:null};S.propertyGroup=propertyGroupFactory(S,x),T=t(b.it,_.it,S.propertyGroup),S.numProperties=T.length;var w=o(b.it[b.it.length-1],_.it[_.it.length-1],S.propertyGroup);return S.transform=w,S.propertyIndex=b.cix,S._name=b.nm,S}(p,m,d.propertyGroup),v=o(p.it[p.it.length-1],m.it[m.it.length-1],d.propertyGroup);return d.content=y,d.transform=v,Object.defineProperty(d,"_name",{get:function(){return p.nm}}),d.numProperties=p.np,d.propertyIndex=p.ix,d.nm=p.nm,d.mn=p.mn,d}function r(p,m,g){function d(y){return y==="Color"||y==="color"?d.color:y==="Opacity"||y==="opacity"?d.opacity:null}return Object.defineProperties(d,{color:{get:ExpressionPropertyInterface(m.c)},opacity:{get:ExpressionPropertyInterface(m.o)},_name:{value:p.nm},mn:{value:p.mn}}),m.c.setGroupProperty(PropertyInterface("Color",g)),m.o.setGroupProperty(PropertyInterface("Opacity",g)),d}function i(p,m,g){function d(y){return y==="Start Point"||y==="start point"?d.startPoint:y==="End Point"||y==="end point"?d.endPoint:y==="Opacity"||y==="opacity"?d.opacity:null}return Object.defineProperties(d,{startPoint:{get:ExpressionPropertyInterface(m.s)},endPoint:{get:ExpressionPropertyInterface(m.e)},opacity:{get:ExpressionPropertyInterface(m.o)},type:{get:function(){return"a"}},_name:{value:p.nm},mn:{value:p.mn}}),m.s.setGroupProperty(PropertyInterface("Start Point",g)),m.e.setGroupProperty(PropertyInterface("End Point",g)),m.o.setGroupProperty(PropertyInterface("Opacity",g)),d}function n(){return function(){return null}}function s(p,m,g){var d,y=propertyGroupFactory(T,g),v=propertyGroupFactory(x,y);function b(S){Object.defineProperty(x,p.d[S].nm,{get:ExpressionPropertyInterface(m.d.dataProps[S].p)})}var _=p.d?p.d.length:0,x={};for(d=0;d<_;d+=1)b(d),m.d.dataProps[d].p.setGroupProperty(v);function T(S){return S==="Color"||S==="color"?T.color:S==="Opacity"||S==="opacity"?T.opacity:S==="Stroke Width"||S==="stroke width"?T.strokeWidth:null}return Object.defineProperties(T,{color:{get:ExpressionPropertyInterface(m.c)},opacity:{get:ExpressionPropertyInterface(m.o)},strokeWidth:{get:ExpressionPropertyInterface(m.w)},dash:{get:function(){return x}},_name:{value:p.nm},mn:{value:p.mn}}),m.c.setGroupProperty(PropertyInterface("Color",y)),m.o.setGroupProperty(PropertyInterface("Opacity",y)),m.w.setGroupProperty(PropertyInterface("Stroke Width",y)),T}function a(p,m,g){function d(v){return v===p.e.ix||v==="End"||v==="end"?d.end:v===p.s.ix?d.start:v===p.o.ix?d.offset:null}var y=propertyGroupFactory(d,g);return d.propertyIndex=p.ix,m.s.setGroupProperty(PropertyInterface("Start",y)),m.e.setGroupProperty(PropertyInterface("End",y)),m.o.setGroupProperty(PropertyInterface("Offset",y)),d.propertyIndex=p.ix,d.propertyGroup=g,Object.defineProperties(d,{start:{get:ExpressionPropertyInterface(m.s)},end:{get:ExpressionPropertyInterface(m.e)},offset:{get:ExpressionPropertyInterface(m.o)},_name:{value:p.nm}}),d.mn=p.mn,d}function o(p,m,g){function d(v){return p.a.ix===v||v==="Anchor Point"?d.anchorPoint:p.o.ix===v||v==="Opacity"?d.opacity:p.p.ix===v||v==="Position"?d.position:p.r.ix===v||v==="Rotation"||v==="ADBE Vector Rotation"?d.rotation:p.s.ix===v||v==="Scale"?d.scale:p.sk&&p.sk.ix===v||v==="Skew"?d.skew:p.sa&&p.sa.ix===v||v==="Skew Axis"?d.skewAxis:null}var y=propertyGroupFactory(d,g);return m.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",y)),m.transform.mProps.p.setGroupProperty(PropertyInterface("Position",y)),m.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",y)),m.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",y)),m.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",y)),m.transform.mProps.sk&&(m.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",y)),m.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",y))),m.transform.op.setGroupProperty(PropertyInterface("Opacity",y)),Object.defineProperties(d,{opacity:{get:ExpressionPropertyInterface(m.transform.mProps.o)},position:{get:ExpressionPropertyInterface(m.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(m.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(m.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(m.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(m.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(m.transform.mProps.sa)},_name:{value:p.nm}}),d.ty="tr",d.mn=p.mn,d.propertyGroup=g,d}function l(p,m,g){function d(b){return p.p.ix===b?d.position:p.s.ix===b?d.size:null}var y=propertyGroupFactory(d,g);d.propertyIndex=p.ix;var v=m.sh.ty==="tm"?m.sh.prop:m.sh;return v.s.setGroupProperty(PropertyInterface("Size",y)),v.p.setGroupProperty(PropertyInterface("Position",y)),Object.defineProperties(d,{size:{get:ExpressionPropertyInterface(v.s)},position:{get:ExpressionPropertyInterface(v.p)},_name:{value:p.nm}}),d.mn=p.mn,d}function h(p,m,g){function d(b){return p.p.ix===b?d.position:p.r.ix===b?d.rotation:p.pt.ix===b?d.points:p.or.ix===b||b==="ADBE Vector Star Outer Radius"?d.outerRadius:p.os.ix===b?d.outerRoundness:!p.ir||p.ir.ix!==b&&b!=="ADBE Vector Star Inner Radius"?p.is&&p.is.ix===b?d.innerRoundness:null:d.innerRadius}var y=propertyGroupFactory(d,g),v=m.sh.ty==="tm"?m.sh.prop:m.sh;return d.propertyIndex=p.ix,v.or.setGroupProperty(PropertyInterface("Outer Radius",y)),v.os.setGroupProperty(PropertyInterface("Outer Roundness",y)),v.pt.setGroupProperty(PropertyInterface("Points",y)),v.p.setGroupProperty(PropertyInterface("Position",y)),v.r.setGroupProperty(PropertyInterface("Rotation",y)),p.ir&&(v.ir.setGroupProperty(PropertyInterface("Inner Radius",y)),v.is.setGroupProperty(PropertyInterface("Inner Roundness",y))),Object.defineProperties(d,{position:{get:ExpressionPropertyInterface(v.p)},rotation:{get:ExpressionPropertyInterface(v.r)},points:{get:ExpressionPropertyInterface(v.pt)},outerRadius:{get:ExpressionPropertyInterface(v.or)},outerRoundness:{get:ExpressionPropertyInterface(v.os)},innerRadius:{get:ExpressionPropertyInterface(v.ir)},innerRoundness:{get:ExpressionPropertyInterface(v.is)},_name:{value:p.nm}}),d.mn=p.mn,d}function c(p,m,g){function d(b){return p.p.ix===b?d.position:p.r.ix===b?d.roundness:p.s.ix===b||b==="Size"||b==="ADBE Vector Rect Size"?d.size:null}var y=propertyGroupFactory(d,g),v=m.sh.ty==="tm"?m.sh.prop:m.sh;return d.propertyIndex=p.ix,v.p.setGroupProperty(PropertyInterface("Position",y)),v.s.setGroupProperty(PropertyInterface("Size",y)),v.r.setGroupProperty(PropertyInterface("Rotation",y)),Object.defineProperties(d,{position:{get:ExpressionPropertyInterface(v.p)},roundness:{get:ExpressionPropertyInterface(v.r)},size:{get:ExpressionPropertyInterface(v.s)},_name:{value:p.nm}}),d.mn=p.mn,d}function u(p,m,g){function d(b){return p.r.ix===b||b==="Round Corners 1"?d.radius:null}var y=propertyGroupFactory(d,g),v=m;return d.propertyIndex=p.ix,v.rd.setGroupProperty(PropertyInterface("Radius",y)),Object.defineProperties(d,{radius:{get:ExpressionPropertyInterface(v.rd)},_name:{value:p.nm}}),d.mn=p.mn,d}function f(p,m,g){function d(b){return p.c.ix===b||b==="Copies"?d.copies:p.o.ix===b||b==="Offset"?d.offset:null}var y=propertyGroupFactory(d,g),v=m;return d.propertyIndex=p.ix,v.c.setGroupProperty(PropertyInterface("Copies",y)),v.o.setGroupProperty(PropertyInterface("Offset",y)),Object.defineProperties(d,{copies:{get:ExpressionPropertyInterface(v.c)},offset:{get:ExpressionPropertyInterface(v.o)},_name:{value:p.nm}}),d.mn=p.mn,d}return function(p,m,g){var d;function y(v){if(typeof v=="number")return(v=v===void 0?1:v)===0?g:d[v-1];for(var b=0,_=d.length;b<_;){if(d[b]._name===v)return d[b];b+=1}return null}return y.propertyGroup=propertyGroupFactory(y,function(){return g}),d=t(p,m,y.propertyGroup),y.numProperties=d.length,y._name="Contents",y}}(),TextExpressionInterface=function(t){var e;function r(i){switch(i){case"ADBE Text Document":return r.sourceText;default:return null}}return Object.defineProperty(r,"sourceText",{get:function(){t.textProperty.getValue();var i=t.textProperty.currentData.t;return i!==void 0&&(t.textProperty.currentData.t=void 0,(e=new String(i)).value=i||new String(i)),e}}),r};function _typeof$2(t){return(_typeof$2=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)}var FootageInterface=(dataInterfaceFactory=function(t){function e(r){return r==="Outline"?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(r){var i="",n=r.getFootageData();function s(a){if(n[a])return i=a,_typeof$2(n=n[a])==="object"?s:n;var o=a.indexOf(i);if(o!==-1){var l=parseInt(a.substr(o+i.length),10);return _typeof$2(n=n[l])==="object"?s:n}return""}return function(){return i="",n=r.getFootageData(),s}}(t),e},function(t){function e(r){return r==="Data"?e.dataInterface:null}return e._name="Data",e.dataInterface=dataInterfaceFactory(t),e}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(t){return interfaces[t]||null}function _typeof$1(t){return(_typeof$1=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 seedRandom(t,e){var r=this,i=e.pow(256,6),n=e.pow(2,52),s=2*n;function a(c){var u,f=c.length,p=this,m=0,g=p.i=p.j=0,d=p.S=[];for(f||(c=[f++]);m<256;)d[m]=m++;for(m=0;m<256;m++)d[m]=d[g=255&g+c[m%f]+(u=d[m])],d[g]=u;p.g=function(y){for(var v,b=0,_=p.i,x=p.j,T=p.S;y--;)v=T[_=255&_+1],b=256*b+T[255&(T[_]=T[x=255&x+v])+(T[x]=v)];return p.i=_,p.j=x,b}}function o(c,u){return u.i=c.i,u.j=c.j,u.S=c.S.slice(),u}function l(c,u){for(var f,p=c+"",m=0;m<p.length;)u[255&m]=255&(f^=19*u[255&m])+p.charCodeAt(m++);return h(u)}function h(c){return String.fromCharCode.apply(0,c)}e.seedrandom=function(c,u,f){var p=[],m=l(function y(v,b){var _,x=[],T=_typeof$1(v);if(b&&T=="object")for(_ in v)try{x.push(y(v[_],b-1))}catch{}return x.length?x:T=="string"?v:v+"\0"}((u=u===!0?{entropy:!0}:u||{}).entropy?[c,h(t)]:c===null?function(){try{var y=new Uint8Array(256);return(r.crypto||r.msCrypto).getRandomValues(y),h(y)}catch{var v=r.navigator,b=v&&v.plugins;return[+new Date,r,b,r.screen,h(t)]}}():c,3),p),g=new a(p),d=function(){for(var y=g.g(6),v=i,b=0;y<n;)y=256*(y+b),v*=256,b=g.g(1);for(;y>=s;)y/=2,v/=2,b>>>=1;return(y+b)/v};return d.int32=function(){return 0|g.g(4)},d.quick=function(){return g.g(4)/4294967296},d.double=d,l(h(g.S),t),(u.pass||f||function(y,v,b,_){return _&&(_.S&&o(_,g),y.state=function(){return o(g,{})}),b?(e.random=y,v):y})(d,m,"global"in u?u.global:this==e,u.state)},l(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof(t){return(_typeof=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)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return t==="number"||t==="boolean"||t==="string"||e instanceof Number}function $bm_neg(t){var e=_typeof(t);if(e==="number"||e==="boolean"||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,n=[];for(r=0;r<i;r+=1)n[r]=-t[r];return n}return t.propType?t.v:-t}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=_typeof(t),i=_typeof(e);if(r==="string"||i==="string"||isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var n=0,s=t.length,a=e.length,o=[];n<s||n<a;)(typeof t[n]=="number"||t[n]instanceof Number)&&(typeof e[n]=="number"||e[n]instanceof Number)?o[n]=t[n]+e[n]:o[n]=e[n]===void 0?t[n]:t[n]||e[n],n+=1;return o}return 0}var add=sum;function sub(t,e){var r=_typeof(t),i=_typeof(e);if(isNumerable(r,t)&&isNumerable(i,e))return r==="string"&&(t=parseInt(t,10)),i==="string"&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var n=0,s=t.length,a=e.length,o=[];n<s||n<a;)(typeof t[n]=="number"||t[n]instanceof Number)&&(typeof e[n]=="number"||e[n]instanceof Number)?o[n]=t[n]-e[n]:o[n]=e[n]===void 0?t[n]:t[n]||e[n],n+=1;return o}return 0}function mul(t,e){var r,i,n,s=_typeof(t),a=_typeof(e);if(isNumerable(s,t)&&isNumerable(a,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(a,e)){for(n=t.length,r=createTypedArray("float32",n),i=0;i<n;i+=1)r[i]=t[i]*e;return r}if(isNumerable(s,t)&&$bm_isInstanceOfArray(e)){for(n=e.length,r=createTypedArray("float32",n),i=0;i<n;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,n,s=_typeof(t),a=_typeof(e);if(isNumerable(s,t)&&isNumerable(a,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(a,e)){for(n=t.length,r=createTypedArray("float32",n),i=0;i<n;i+=1)r[i]=t[i]/e;return r}if(isNumerable(s,t)&&$bm_isInstanceOfArray(e)){for(n=e.length,r=createTypedArray("float32",n),i=0;i<n;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return typeof t=="string"&&(t=parseInt(t,10)),typeof e=="string"&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(e>r){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if(typeof t=="number"||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),n=0;for(r=0;r<i;r+=1)n+=Math.pow(e[r]-t[r],2);return Math.sqrt(n)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],n=t[1],s=t[2],a=Math.max(i,n,s),o=Math.min(i,n,s),l=(a+o)/2;if(a===o)e=0,r=0;else{var h=a-o;switch(r=l>.5?h/(2-a-o):h/(a+o),a){case i:e=(n-s)/h+(n<s?6:0);break;case n:e=(s-i)/h+2;break;case s:e=(i-n)/h+4}e/=6}return[e,r,l,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,n=t[0],s=t[1],a=t[2];if(s===0)e=a,i=a,r=a;else{var o=a<.5?a*(1+s):a+s-a*s,l=2*a-o;e=hue2rgb(l,o,n+1/3),r=hue2rgb(l,o,n),i=hue2rgb(l,o,n-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,n){if(i!==void 0&&n!==void 0||(i=e,n=r,e=0,r=1),r<e){var s=r;r=e,e=s}if(t<=e)return i;if(t>=r)return n;var a,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(n-i)*o;var l=i.length,h=createTypedArray("float32",l);for(a=0;a<l;a+=1)h[a]=i[a]+(n[a]-i[a])*o;return h}function random(t,e){if(e===void 0&&(t===void 0?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var n=createTypedArray("float32",i),s=BMMath.random();for(r=0;r<i;r+=1)n[r]=t[r]+s*(e[r]-t[r]);return n}return t===void 0&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var n,s=t.length,a=shapePool.newElement();a.setPathData(!!i,s);var o,l,h=[0,0];for(n=0;n<s;n+=1)o=e&&e[n]?e[n]:h,l=r&&r[n]?r[n]:h,a.setTripleAt(t[n][0],t[n][1],l[0]+t[n][0],l[1]+t[n][1],o[0]+t[n][0],o[1]+t[n][1],n,!0);return a}function initiateExpression(elem,data,property){function noOp(t){return t}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=function(t,e){var r,i,n=this.pv.length?this.pv.length:1,s=createTypedArray("float32",n),a=Math.floor(5*time);for(r=0,i=0;r<a;){for(i=0;i<n;i+=1)s[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,l=o-Math.floor(o),h=createTypedArray("float32",n);if(n>1){for(i=0;i<n;i+=1)h[i]=this.pv[i]+s[i]+(-e+2*e*BMMath.random())*l;return h}return this.pv+s[0]+(-e+2*e*BMMath.random())*l}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,n){return applyEase(easeOutBez,t,e,r,i,n)}function easeIn(t,e,r,i,n){return applyEase(easeInBez,t,e,r,i,n)}function ease(t,e,r,i,n){return applyEase(easeInOutBez,t,e,r,i,n)}function applyEase(t,e,r,i,n,s){n===void 0?(n=r,s=i):e=(e-r)/(i-r),e>1?e=1:e<0&&(e=0);var a=t(e);if($bm_isInstanceOfArray(n)){var o,l=n.length,h=createTypedArray("float32",l);for(o=0;o<l;o+=1)h[o]=(s[o]-n[o])*a+n[o];return h}return(s-n)*a+n}function nearestKey(t){var e,r,i,n=data.k.length;if(data.k.length&&typeof data.k[0]!="number")if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<n-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(r=e+2,i=data.k[e+1].t):(r=e+1,i=data.k[e].t);break}}r===-1&&(r=e+1,i=data.k[e].t)}else r=0,i=0;var s={};return s.index=r,s.time=i/elem.comp.globalData.frameRate,s}function key(t){var e,r,i;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var n=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=n.length,r=0;r<i;r+=1)e[r]=n[r],e.value[r]=n[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||t===0||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return typeof value=="string"?e===void 0?value.substring(t):value.substring(t,e):""}function substr(t,e){return typeof value=="string"?e===void 0?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=t===0?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType!==4||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath],ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var n;for(n=0;n<e.length;n+=1)i+=Math.pow(r[n]-e[n],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(this.vel!==void 0)return this.vel;var e,r,i=this.getValueAtTime(t),n=this.getValueAtTime(t+-.001);if(i.length)for(e=createTypedArray("float32",i.length),r=0;r<i.length;r+=1)e[r]=(n[r]-i[r])/-.001;else e=(n-i)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};function addPropertyDecorator(){function t(u,f,p){if(!this.k||!this.keyframes)return this.pv;u=u?u.toLowerCase():"";var m,g,d,y,v,b=this.comp.renderedFrame,_=this.keyframes,x=_[_.length-1].t;if(b<=x)return this.pv;if(p?g=x-(m=f?Math.abs(x-this.elem.comp.globalData.frameRate*f):Math.max(0,x-this.elem.data.ip)):((!f||f>_.length-1)&&(f=_.length-1),m=x-(g=_[_.length-1-f].t)),u==="pingpong"){if(Math.floor((b-g)/m)%2!=0)return this.getValueAtTime((m-(b-g)%m+g)/this.comp.globalData.frameRate,0)}else{if(u==="offset"){var T=this.getValueAtTime(g/this.comp.globalData.frameRate,0),S=this.getValueAtTime(x/this.comp.globalData.frameRate,0),w=this.getValueAtTime(((b-g)%m+g)/this.comp.globalData.frameRate,0),M=Math.floor((b-g)/m);if(this.pv.length){for(y=(v=new Array(T.length)).length,d=0;d<y;d+=1)v[d]=(S[d]-T[d])*M+w[d];return v}return(S-T)*M+w}if(u==="continue"){var k=this.getValueAtTime(x/this.comp.globalData.frameRate,0),I=this.getValueAtTime((x-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(y=(v=new Array(k.length)).length,d=0;d<y;d+=1)v[d]=k[d]+(k[d]-I[d])*((b-x)/this.comp.globalData.frameRate)/5e-4;return v}return k+(b-x)/.001*(k-I)}}return this.getValueAtTime(((b-g)%m+g)/this.comp.globalData.frameRate,0)}function e(u,f,p){if(!this.k)return this.pv;u=u?u.toLowerCase():"";var m,g,d,y,v,b=this.comp.renderedFrame,_=this.keyframes,x=_[0].t;if(b>=x)return this.pv;if(p?g=x+(m=f?Math.abs(this.elem.comp.globalData.frameRate*f):Math.max(0,this.elem.data.op-x)):((!f||f>_.length-1)&&(f=_.length-1),m=(g=_[f].t)-x),u==="pingpong"){if(Math.floor((x-b)/m)%2==0)return this.getValueAtTime(((x-b)%m+x)/this.comp.globalData.frameRate,0)}else{if(u==="offset"){var T=this.getValueAtTime(x/this.comp.globalData.frameRate,0),S=this.getValueAtTime(g/this.comp.globalData.frameRate,0),w=this.getValueAtTime((m-(x-b)%m+x)/this.comp.globalData.frameRate,0),M=Math.floor((x-b)/m)+1;if(this.pv.length){for(y=(v=new Array(T.length)).length,d=0;d<y;d+=1)v[d]=w[d]-(S[d]-T[d])*M;return v}return w-(S-T)*M}if(u==="continue"){var k=this.getValueAtTime(x/this.comp.globalData.frameRate,0),I=this.getValueAtTime((x+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(y=(v=new Array(k.length)).length,d=0;d<y;d+=1)v[d]=k[d]+(k[d]-I[d])*(x-b)/.001;return v}return k+(k-I)*(x-b)/.001}}return this.getValueAtTime((m-((x-b)%m+x))/this.comp.globalData.frameRate,0)}function r(u,f){if(!this.k)return this.pv;if(u=.5*(u||.4),(f=Math.floor(f||5))<=1)return this.pv;var p,m,g=this.comp.renderedFrame/this.comp.globalData.frameRate,d=g-u,y=f>1?(g+u-d)/(f-1):1,v=0,b=0;for(p=this.pv.length?createTypedArray("float32",this.pv.length):0;v<f;){if(m=this.getValueAtTime(d+v*y),this.pv.length)for(b=0;b<this.pv.length;b+=1)p[b]+=m[b];else p+=m;v+=1}if(this.pv.length)for(b=0;b<this.pv.length;b+=1)p[b]/=f;else p/=f;return p}function i(u){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var f=this._transformCachingAtTime.v;if(f.cloneFromProps(this.pre.props),this.appliedTransformations<1){var p=this.a.getValueAtTime(u);f.translate(-p[0]*this.a.mult,-p[1]*this.a.mult,p[2]*this.a.mult)}if(this.appliedTransformations<2){var m=this.s.getValueAtTime(u);f.scale(m[0]*this.s.mult,m[1]*this.s.mult,m[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var g=this.sk.getValueAtTime(u),d=this.sa.getValueAtTime(u);f.skewFromAxis(-g*this.sk.mult,d*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var y=this.r.getValueAtTime(u);f.rotate(-y*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var v=this.rz.getValueAtTime(u),b=this.ry.getValueAtTime(u),_=this.rx.getValueAtTime(u),x=this.or.getValueAtTime(u);f.rotateZ(-v*this.rz.mult).rotateY(b*this.ry.mult).rotateX(_*this.rx.mult).rotateZ(-x[2]*this.or.mult).rotateY(x[1]*this.or.mult).rotateX(x[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var T=this.px.getValueAtTime(u),S=this.py.getValueAtTime(u);if(this.data.p.z){var w=this.pz.getValueAtTime(u);f.translate(T*this.px.mult,S*this.py.mult,-w*this.pz.mult)}else f.translate(T*this.px.mult,S*this.py.mult,0)}else{var M=this.p.getValueAtTime(u);f.translate(M[0]*this.p.mult,M[1]*this.p.mult,-M[2]*this.p.mult)}return f}function n(){return this.v.clone(new Matrix)}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(u,f,p){var m=s(u,f,p);return m.dynamicProperties.length?m.getValueAtTime=i.bind(m):m.getValueAtTime=n.bind(m),m.setGroupProperty=expressionHelpers.setGroupProperty,m};var a=PropertyFactory.getProp;PropertyFactory.getProp=function(u,f,p,m,g){var d=a(u,f,p,m,g);d.kf?d.getValueAtTime=expressionHelpers.getValueAtTime.bind(d):d.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(d),d.setGroupProperty=expressionHelpers.setGroupProperty,d.loopOut=t,d.loopIn=e,d.smooth=r,d.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(d),d.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(d),d.numKeys=f.a===1?f.k.length:0,d.propertyIndex=f.ix;var y=0;return p!==0&&(y=createTypedArray("float32",f.a===1?f.k[0].s.length:f.k.length)),d._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:y},expressionHelpers.searchExpressions(u,f,d),d.k&&g.addDynamicProperty(d),d};var o=ShapePropertyFactory.getConstructorFunction(),l=ShapePropertyFactory.getKeyframedConstructorFunction();function h(){}h.prototype={vertices:function(u,f){this.k&&this.getValue();var p,m=this.v;f!==void 0&&(m=this.getValueAtTime(f,0));var g=m._length,d=m[u],y=m.v,v=createSizedArray(g);for(p=0;p<g;p+=1)v[p]=u==="i"||u==="o"?[d[p][0]-y[p][0],d[p][1]-y[p][1]]:[d[p][0],d[p][1]];return v},points:function(u){return this.vertices("v",u)},inTangents:function(u){return this.vertices("i",u)},outTangents:function(u){return this.vertices("o",u)},isClosed:function(){return this.v.c},pointOnPath:function(u,f){var p=this.v;f!==void 0&&(p=this.getValueAtTime(f,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(p));for(var m,g=this._segmentsLength,d=g.lengths,y=g.totalLength*u,v=0,b=d.length,_=0;v<b;){if(_+d[v].addedLength>y){var x=v,T=p.c&&v===b-1?0:v+1,S=(y-_)/d[v].addedLength;m=bez.getPointInSegment(p.v[x],p.v[T],p.o[x],p.i[T],S,d[v]);break}_+=d[v].addedLength,v+=1}return m||(m=p.c?[p.v[0][0],p.v[0][1]]:[p.v[p._length-1][0],p.v[p._length-1][1]]),m},vectorOnPath:function(u,f,p){u==1?u=this.v.c:u==0&&(u=.999);var m=this.pointOnPath(u,f),g=this.pointOnPath(u+.001,f),d=g[0]-m[0],y=g[1]-m[1],v=Math.sqrt(Math.pow(d,2)+Math.pow(y,2));return v===0?[0,0]:p==="tangent"?[d/v,y/v]:[-y/v,d/v]},tangentOnPath:function(u,f){return this.vectorOnPath(u,f,"tangent")},normalOnPath:function(u,f){return this.vectorOnPath(u,f,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([h],o),extendPrototype([h],l),l.prototype.getValueAtTime=function(u){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),u*=this.elem.globalData.frameRate,(u-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<u?this._caching.lastIndex:0,this._cachingAtTime.lastTime=u,this.interpolateShape(u,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},l.prototype.initiateExpression=ExpressionManager.initiateExpression;var c=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(u,f,p,m,g){var d=c(u,f,p,m,g);return d.propertyIndex=f.ix,d.lock=!1,p===3?expressionHelpers.searchExpressions(u,f.pt,d):p===4&&expressionHelpers.searchExpressions(u,f.ks,d),d.k&&u.addDynamicProperty(d),d}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t!==r){var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}function SVGComposableEffect(){}function SVGTintFilter(t,e,r,i,n){this.filterManager=e;var s=createNS("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),s.setAttribute("result",i+"_tint_1"),t.appendChild(s),(s=createNS("feColorMatrix")).setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),s.setAttribute("result",i+"_tint_2"),t.appendChild(s),this.matrixFilter=s;var a=this.createMergeNode(i,[n,i+"_tint_1",i+"_tint_2"]);t.appendChild(a)}function SVGFillFilter(t,e,r,i){this.filterManager=e;var n=createNS("feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),n.setAttribute("result",i),t.appendChild(n),this.matrixFilter=n}function SVGStrokeEffect(t,e,r){this.initialized=!1,this.filterManager=e,this.elem=r,this.paths=[]}function SVGTritoneFilter(t,e,r,i){this.filterManager=e;var n=createNS("feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","linearRGB"),n.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),t.appendChild(n);var s=createNS("feComponentTransfer");s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("result",i),this.matrixFilter=s;var a=createNS("feFuncR");a.setAttribute("type","table"),s.appendChild(a),this.feFuncR=a;var o=createNS("feFuncG");o.setAttribute("type","table"),s.appendChild(o),this.feFuncG=o;var l=createNS("feFuncB");l.setAttribute("type","table"),s.appendChild(l),this.feFuncB=l,t.appendChild(s)}function SVGProLevelsFilter(t,e,r,i){this.filterManager=e;var n=this.filterManager.effectElements,s=createNS("feComponentTransfer");(n[10].p.k||n[10].p.v!==0||n[11].p.k||n[11].p.v!==1||n[12].p.k||n[12].p.v!==1||n[13].p.k||n[13].p.v!==0||n[14].p.k||n[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",s)),(n[17].p.k||n[17].p.v!==0||n[18].p.k||n[18].p.v!==1||n[19].p.k||n[19].p.v!==1||n[20].p.k||n[20].p.v!==0||n[21].p.k||n[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",s)),(n[24].p.k||n[24].p.v!==0||n[25].p.k||n[25].p.v!==1||n[26].p.k||n[26].p.v!==1||n[27].p.k||n[27].p.v!==0||n[28].p.k||n[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",s)),(n[31].p.k||n[31].p.v!==0||n[32].p.k||n[32].p.v!==1||n[33].p.k||n[33].p.v!==1||n[34].p.k||n[34].p.v!==0||n[35].p.k||n[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",s)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s)),(n[3].p.k||n[3].p.v!==0||n[4].p.k||n[4].p.v!==1||n[5].p.k||n[5].p.v!==1||n[6].p.k||n[6].p.v!==0||n[7].p.k||n[7].p.v!==1)&&((s=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("result",i),t.appendChild(s),this.feFuncRComposed=this.createFeFunc("feFuncR",s),this.feFuncGComposed=this.createFeFunc("feFuncG",s),this.feFuncBComposed=this.createFeFunc("feFuncB",s))}function SVGDropShadowEffect(t,e,r,i,n){var s=e.container.globalData.renderConfig.filterSize,a=e.data.fs||s;t.setAttribute("x",a.x||s.x),t.setAttribute("y",a.y||s.y),t.setAttribute("width",a.width||s.width),t.setAttribute("height",a.height||s.height),this.filterManager=e;var o=createNS("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",i+"_drop_shadow_1"),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,t.appendChild(o);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",i+"_drop_shadow_1"),l.setAttribute("result",i+"_drop_shadow_2"),this.feOffset=l,t.appendChild(l);var h=createNS("feFlood");h.setAttribute("flood-color","#00ff00"),h.setAttribute("flood-opacity","1"),h.setAttribute("result",i+"_drop_shadow_3"),this.feFlood=h,t.appendChild(h);var c=createNS("feComposite");c.setAttribute("in",i+"_drop_shadow_3"),c.setAttribute("in2",i+"_drop_shadow_2"),c.setAttribute("operator","in"),c.setAttribute("result",i+"_drop_shadow_4"),t.appendChild(c);var u=this.createMergeNode(i,[i+"_drop_shadow_4",n]);t.appendChild(u)}SVGComposableEffect.prototype={createMergeNode:function(t,e){var r,i,n=createNS("feMerge");for(n.setAttribute("result",t),i=0;i<e.length;i+=1)(r=createNS("feMergeNode")).setAttribute("in",e[i]),n.appendChild(r),n.appendChild(r);return n}},extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,n=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(this.filterManager.effectElements[1].p.v===1?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(this.filterManager.effectElements[10].p.v===3){var s=createNS("mask"),a=createElementID();s.setAttribute("id",a),s.setAttribute("mask-type","alpha"),s.appendChild(e),this.elem.globalData.defs.appendChild(s);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+a+")");n[0];)o.appendChild(n[0]);this.elem.layerElement.appendChild(o),this.masker=s,e.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(n=this.elem.layerElement.children||this.elem.layerElement.childNodes;n.length;)this.elem.layerElement.removeChild(n[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,n=this.paths.length;for(e=0;e<n;e+=1)if(this.paths[e].m!==-1&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var s;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var a=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=i.getTotalLength();s="0 0 0 "+l*a+" ";var h,c=l*(o-a),u=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,f=Math.floor(c/u);for(h=0;h<f;h+=1)s+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";s+="0 "+10*l+" 0 0"}else s="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",s)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(t||this.filterManager.effectElements[3].p._mdf)){var p=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*p[0])+","+bmFloor(255*p[1])+","+bmFloor(255*p[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,n=i[0]+" "+r[0]+" "+e[0],s=i[1]+" "+r[1]+" "+e[1],a=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",n),this.feFuncG.setAttribute("tableValues",s),this.feFuncB.setAttribute("tableValues",a)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,n){for(var s,a,o=0,l=Math.min(t,e),h=Math.max(t,e),c=Array.call(null,{length:256}),u=0,f=n-i,p=e-t;o<=256;)a=(s=o/256)<=l?p<0?n:i:s>=h?p<0?i:n:i+f*Math.pow((s-t)/p,1/r),c[u]=a,u+=1,o+=256/255;return c.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,n=r*Math.cos(i),s=r*Math.sin(i);this.feOffset.setAttribute("dx",n),this.feOffset.setAttribute("dy",s)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(t,e,r,i){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var n=createNS("feGaussianBlur");n.setAttribute("result",i),t.appendChild(n),this.feGaussianBlur=n}return SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,n=r.children,s=0,a=n.length;s<a&&n[s]!==t.layerElement;)s+=1;s<=a-2&&(i=n[s+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var n=t.globalData.defs;n.appendChild(i);var s=createNS("symbol");s.setAttribute("id",r),this.replaceInParent(e,r),s.appendChild(e.layerElement),n.appendChild(s);var a=createNS("use");a.setAttribute("href","#"+r),i.appendChild(a),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=r==3?0:e,n=r==2?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+n);var s=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",s)}},registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect(20,SVGTintFilter,!0),registerEffect(21,SVGFillFilter,!0),registerEffect(22,SVGStrokeEffect,!1),registerEffect(23,SVGTritoneFilter,!0),registerEffect(24,SVGProLevelsFilter,!0),registerEffect(25,SVGDropShadowEffect,!0),registerEffect(28,SVGMatte3Effect,!1),registerEffect(29,SVGGaussianBlurEffect,!0),lottie})}),jc,Zm=Om(jc||(jc=vi([`
36
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Wc=/'/g,Zc=/"/g,Du=/^(?:script|style|textarea|title)$/i,Fu=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),ws=Fu(1),J1=Fu(2),Ei=Symbol.for("lit-noChange"),He=Symbol.for("lit-nothing"),Yc=new WeakMap,xi=ki.createTreeWalker(ki,129,null,!1),Ou=(t,e)=>{let r=t.length-1,i=[],n,s=e===2?"<svg>":"",a=hn;for(let l=0;l<r;l++){let h=t[l],c,u,f=-1,p=0;for(;p<h.length&&(a.lastIndex=p,u=a.exec(h),u!==null);)p=a.lastIndex,a===hn?u[1]==="!--"?a=qc:u[1]!==void 0?a=Uc:u[2]!==void 0?(Du.test(u[2])&&(n=RegExp("</"+u[2],"g")),a=Gr):u[3]!==void 0&&(a=Gr):a===Gr?u[0]===">"?(a=n??hn,f=-1):u[1]===void 0?f=-2:(f=a.lastIndex-u[2].length,c=u[1],a=u[3]===void 0?Gr:u[3]==='"'?Zc:Wc):a===Zc||a===Wc?a=Gr:a===qc||a===Uc?a=hn:(a=Gr,n=void 0);let m=a===Gr&&t[l+1].startsWith("/>")?" ":"";s+=a===hn?h+Xm:f>=0?(i.push(c),h.slice(0,f)+"$lit$"+h.slice(f)+rr+m):h+rr+(f===-2?(i.push(void 0),l):m)}let o=s+(t[r]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Hc!==void 0?Hc.createHTML(o):o,i]},yn=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]=Ou(e,r);if(this.el=t.createElement(h,i),xi.currentNode=this.el.content,r===2){let u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(n=xi.nextNode())!==null&&l.length<o;){if(n.nodeType===1){if(n.hasAttributes()){let u=[];for(let f of n.getAttributeNames())if(f.endsWith("$lit$")||f.startsWith(rr)){let p=c[a++];if(u.push(f),p!==void 0){let m=n.getAttribute(p.toLowerCase()+"$lit$").split(rr),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:s,name:g[2],strings:m,ctor:g[1]==="."?Os:g[1]==="?"?$s:g[1]==="@"?Rs:Ur})}else l.push({type:6,index:s})}for(let f of u)n.removeAttribute(f)}if(Du.test(n.tagName)){let u=n.textContent.split(rr),f=u.length-1;if(f>0){n.textContent=Si?Si.emptyScript:"";for(let p=0;p<f;p++)n.append(u[p],mn()),xi.nextNode(),l.push({type:2,index:++s});n.append(u[f],mn())}}}else if(n.nodeType===8)if(n.data===nl)l.push({type:2,index:s});else{let u=-1;for(;(u=n.data.indexOf(rr,u+1))!==-1;)l.push({type:7,index:s}),u+=rr.length-1}s++}}static createElement(e,r){let i=ki.createElement("template");return i.innerHTML=e,i}};function qr(t,e,r=t,i){var n,s,a,o;if(e===Ei)return e;let l=i!==void 0?(n=r._$Co)===null||n===void 0?void 0:n[i]:r._$Cl,h=gn(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=qr(t,l._$AS(t,e.values),l,i)),e}var Fs=class{constructor(e,r){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var r;let{el:{content:i},parts:n}=this._$AD,s=((r=e?.creationScope)!==null&&r!==void 0?r:ki).importNode(i,!0);xi.currentNode=s;let a=xi.nextNode(),o=0,l=0,h=n[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new Pi(a,a.nextSibling,this,e):h.type===1?c=new h.ctor(a,h.name,h.strings,this,e):h.type===6&&(c=new Ls(a,this,e)),this.u.push(c),h=n[++l]}o!==h?.index&&(a=xi.nextNode(),o++)}return s}p(e){let r=0;for(let i of this.u)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},Pi=class t{constructor(e,r,i,n){var s;this.type=2,this._$AH=He,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=n,this._$Cm=(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._$Cm}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=qr(this,e,r),gn(e)?e===He||e==null||e===""?(this._$AH!==He&&this._$AR(),this._$AH=He):e!==this._$AH&&e!==Ei&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Mu(e)?this.k(e):this.g(e)}O(e,r=this._$AB){return this._$AA.parentNode.insertBefore(e,r)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==He&&gn(this._$AH)?this._$AA.nextSibling.data=e:this.T(ki.createTextNode(e)),this._$AH=e}$(e){var r;let{values:i,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=yn.createElement(n.h,this.options)),n);if(((r=this._$AH)===null||r===void 0?void 0:r._$AD)===s)this._$AH.p(i);else{let a=new Fs(s,this),o=a.v(this.options);a.p(i),this.T(o),this._$AH=a}}_$AC(e){let r=Yc.get(e.strings);return r===void 0&&Yc.set(e.strings,r=new yn(e)),r}k(e){Iu(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.O(mn()),this.O(mn()),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._$Cm=e,(r=this._$AP)===null||r===void 0||r.call(this,e))}},Ur=class{constructor(e,r,i,n,s){this.type=1,this._$AH=He,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=He}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=qr(this,e,r,0),a=!gn(e)||e!==this._$AH&&e!==Ei,a&&(this._$AH=e);else{let o=e,l,h;for(e=s[0],l=0;l<s.length-1;l++)h=qr(this,o[i+l],r,l),h===Ei&&(h=this._$AH[l]),a||(a=!gn(h)||h!==this._$AH[l]),h===He?e=He:e!==He&&(e+=(h??"")+s[l+1]),this._$AH[l]=h}a&&!n&&this.j(e)}j(e){e===He?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Os=class extends Ur{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===He?void 0:e}},Km=Si?Si.emptyScript:"",$s=class extends Ur{constructor(){super(...arguments),this.type=4}j(e){e&&e!==He?this.element.setAttribute(this.name,Km):this.element.removeAttribute(this.name)}},Rs=class extends Ur{constructor(e,r,i,n,s){super(e,r,i,n,s),this.type=5}_$AI(e,r=this){var i;if((e=(i=qr(this,e,r,0))!==null&&i!==void 0?i:He)===Ei)return;let n=this._$AH,s=e===He&&n!==He||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==He&&(n===He||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)}},Ls=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){qr(this,e)}},X1={P:"$lit$",A:rr,M:nl,C:1,L:Ou,R:Fs,D:Mu,V:qr,I:Pi,H:Ur,N:$s,U:Rs,B:Os,F:Ls},Jc=Ds.litHtmlPolyfillSupport;Jc?.(yn,Pi),((Mo=Ds.litHtmlVersions)!==null&&Mo!==void 0?Mo:Ds.litHtmlVersions=[]).push("2.5.0");var Qm=(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 Pi(e.insertBefore(mn(),o),o,void 0,r??{})}return a._$AI(t),a;},Do,Fo,K1=tr,Hr=class extends tr{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=Qm(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 Ei}};Hr.finalized=!0,Hr._$litElement$=!0,(Do=globalThis.litElementHydrateSupport)===null||Do===void 0||Do.call(globalThis,{LitElement:Hr});var Xc=globalThis.litElementPolyfillSupport;Xc?.({LitElement:Hr});var Q1={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};((Fo=globalThis.litElementVersions)!==null&&Fo!==void 0?Fo:globalThis.litElementVersions=[]).push("3.2.2");var eb=!1,eg=t=>e=>typeof e=="function"?((r,i)=>(customElements.define(r,i),i))(t,e):((r,i)=>{let{kind:n,elements:s}=i;return{kind:n,elements:s,finisher(a){customElements.define(r,a)}}})(t,e),tg=(t,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(r){r.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(r){r.createProperty(e.key,t)}};function rt(t){return(e,r)=>r!==void 0?((i,n,s)=>{n.constructor.createProperty(s,i)})(t,e,r):tg(t,e);}function tb(t){return rt({...t,state:!0})}var rb=(t,e,r)=>{Object.defineProperty(e,r,t)},ib=(t,e)=>({kind:"method",placement:"prototype",key:e.key,descriptor:t}),Mi=({finisher:t,descriptor:e})=>(r,i)=>{var n;if(i===void 0){let s=(n=r.originalKey)!==null&&n!==void 0?n:r.key,a=e!=null?{kind:"method",placement:"prototype",key:s,descriptor:e(r.key)}:{...r,key:s};return t!=null&&(a.finisher=function(o){t(o,s)}),a}{let s=r.constructor;e!==void 0&&Object.defineProperty(r,i,e(i)),t?.(s,i)}};function nb(t){return Mi({finisher:(e,r)=>{Object.assign(e.prototype[r],t)}})}function rg(t,e){return Mi({descriptor:r=>{let i={get(){var n,s;return(s=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(t))!==null&&s!==void 0?s:null},enumerable:!0,configurable:!0};if(e){let n=typeof r=="symbol"?Symbol():"__"+r;i.get=function(){var s,a;return this[n]===void 0&&(this[n]=(a=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(t))!==null&&a!==void 0?a:null),this[n]}}return i}})}function sb(t){return Mi({descriptor:e=>({get(){var r,i;return(i=(r=this.renderRoot)===null||r===void 0?void 0:r.querySelectorAll(t))!==null&&i!==void 0?i:[]},enumerable:!0,configurable:!0})})}function ab(t){return Mi({descriptor:e=>({async get(){var r;return await this.updateComplete,(r=this.renderRoot)===null||r===void 0?void 0:r.querySelector(t)},enumerable:!0,configurable:!0})})}var Oo,ig=((Oo=window.HTMLSlotElement)===null||Oo===void 0?void 0:Oo.prototype.assignedElements)!=null?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter(r=>r.nodeType===Node.ELEMENT_NODE);function ng(t){let{slot:e,selector:r}=t??{};return Mi({descriptor:i=>({get(){var n;let s="slot"+(e?`[name=${e}]`:":not([name])"),a=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(s),o=a!=null?ig(a,t):[];return r?o.filter(l=>l.matches(r)):o},enumerable:!0,configurable:!0})})}function lb(t,e,r){let i,n=t;return typeof t=="object"?(n=t.slot,i=t):i={flatten:e},r?ng({slot:n,flatten:e,selector:r}):Mi({descriptor:s=>({get(){var a,o;let l="slot"+(n?`[name=${n}]`:":not([name])"),h=(a=this.renderRoot)===null||a===void 0?void 0:a.querySelector(l);return(o=h?.assignedNodes(i))!==null&&o!==void 0?o:[]},enumerable:!0,configurable:!0})})}var hb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sg(t,e,r){return t(r={path:e,exports:{},require:function(i,n){return ag(i,n??r.path)}},r.exports),r.exports}function cb(t){return t&&t.default||t}function ag(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var og=sg(function(module,exports){typeof navigator<"u"&&function(t,e){module.exports=e()}(0,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i,n=t.length;for(r=0;r<n;r+=1)for(var s in i=t[r].prototype)Object.prototype.hasOwnProperty.call(i,s)&&(e.prototype[s]=i[s])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].pause()},resume:function(){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].resume()},setRate:function(e){var r,i=this.audios.length;for(r=0;r<i;r+=1)this.audios[r].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,r=this.audios.length;for(e=0;e<r;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function t(e,r){var i,n=0,s=[];switch(e){case"int16":case"uint8c":i=1;break;default:i=1.1}for(n=0;n<r;n+=1)s.push(i);return s}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?function(e,r){return e==="float32"?new Float32Array(r):e==="int16"?new Int16Array(r):e==="uint8c"?new Uint8ClampedArray(r):t(e,r)}:t}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){return(_typeof$6=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)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}(function(){var t,e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]})(),BMMath.random=Math.random,BMMath.abs=function(t){if(_typeof$6(t)==="object"&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(t[e]);return r}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){_shouldRoundValues=!!t}function bmRnd(t){return _shouldRoundValues?Math.round(t):t}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,r,i){this.type=t,this.currentTime=e,this.totalTime=r,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,r,i){this.type=t,this.currentLoop=r,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,r){this.type=t,this.firstFrame=e,this.totalFrames=r}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(t,e,r){var i,n,s,a,o,l,h,c;switch(l=r*(1-e),h=r*(1-(o=6*t-(a=Math.floor(6*t)))*e),c=r*(1-(1-o)*e),a%6){case 0:i=r,n=c,s=l;break;case 1:i=h,n=r,s=l;break;case 2:i=l,n=r,s=c;break;case 3:i=l,n=h,s=r;break;case 4:i=c,n=l,s=r;break;case 5:i=r,n=l,s=h}return[i,n,s]}function RGBtoHSV(t,e,r){var i,n=Math.max(t,e,r),s=Math.min(t,e,r),a=n-s,o=n===0?0:a/n,l=n/255;switch(n){case s:i=0;break;case t:i=e-r+a*(e<r?6:0),i/=6*a;break;case e:i=r-t+2*a,i/=6*a;break;case r:i=t-e+4*a,i/=6*a}return[i,o,l]}function addSaturationToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[1]+=e,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=e.length===1?"0"+e:e;return function(i,n,s){return i<0&&(i=0),n<0&&(n=0),s<0&&(s=0),"#"+r[i]+r[n]+r[s]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t},getIdPrefix=function(){return idPrefix$1};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return(_typeof$5=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)}var dataManager=function(){var t,e,r=1,i=[],n={onmessage:function(){},postMessage:function(l){t({data:l})}},s={postMessage:function(l){n.onmessage({data:l})}};function a(){e||((e=function(l){if(window.Worker&&window.Blob&&getWebWorker()){var h=new Blob(["var _workerSelf = self; self.onmessage = ",l.toString()],{type:"text/javascript"}),c=URL.createObjectURL(h);return new Worker(c)}return t=l,n}(function(l){if(s.dataManager||(s.dataManager=function(){function c(S,w){var M,k,I,P,A,E,F=S.length;for(k=0;k<F;k+=1)if("ks"in(M=S[k])&&!M.completed){if(M.completed=!0,M.hasMask){var O=M.masksProperties;for(P=O.length,I=0;I<P;I+=1)if(O[I].pt.k.i)p(O[I].pt.k);else for(E=O[I].pt.k.length,A=0;A<E;A+=1)O[I].pt.k[A].s&&p(O[I].pt.k[A].s[0]),O[I].pt.k[A].e&&p(O[I].pt.k[A].e[0])}M.ty===0?(M.layers=u(M.refId,w),c(M.layers,w)):M.ty===4?f(M.shapes):M.ty===5&&x(M)}}function u(S,w){var M=function(k,I){for(var P=0,A=I.length;P<A;){if(I[P].id===k)return I[P];P+=1}return null}(S,w);return M?M.layers.__used?JSON.parse(JSON.stringify(M.layers)):(M.layers.__used=!0,M.layers):null}function f(S){var w,M,k;for(w=S.length-1;w>=0;w-=1)if(S[w].ty==="sh")if(S[w].ks.k.i)p(S[w].ks.k);else for(k=S[w].ks.k.length,M=0;M<k;M+=1)S[w].ks.k[M].s&&p(S[w].ks.k[M].s[0]),S[w].ks.k[M].e&&p(S[w].ks.k[M].e[0]);else S[w].ty==="gr"&&f(S[w].it)}function p(S){var w,M=S.i.length;for(w=0;w<M;w+=1)S.i[w][0]+=S.v[w][0],S.i[w][1]+=S.v[w][1],S.o[w][0]+=S.v[w][0],S.o[w][1]+=S.v[w][1]}function m(S,w){var M=w?w.split("."):[100,100,100];return S[0]>M[0]||!(M[0]>S[0])&&(S[1]>M[1]||!(M[1]>S[1])&&(S[2]>M[2]||!(M[2]>S[2])&&null))}var g,d=function(){var S=[4,4,14];function w(M){var k,I,P,A=M.length;for(k=0;k<A;k+=1)M[k].ty===5&&(I=M[k],P=void 0,P=I.t.d,I.t.d={k:[{s:P,t:0}]})}return function(M){if(m(S,M.v)&&(w(M.layers),M.assets)){var k,I=M.assets.length;for(k=0;k<I;k+=1)M.assets[k].layers&&w(M.assets[k].layers)}}}(),y=(g=[4,7,99],function(S){if(S.chars&&!m(g,S.v)){var w,M=S.chars.length;for(w=0;w<M;w+=1){var k=S.chars[w];k.data&&k.data.shapes&&(f(k.data.shapes),k.data.ip=0,k.data.op=99999,k.data.st=0,k.data.sr=1,k.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},S.chars[w].t||(k.data.shapes.push({ty:"no"}),k.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),v=function(){var S=[5,7,15];function w(M){var k,I,P,A=M.length;for(k=0;k<A;k+=1)M[k].ty===5&&(I=M[k],P=void 0,typeof(P=I.t.p).a=="number"&&(P.a={a:0,k:P.a}),typeof P.p=="number"&&(P.p={a:0,k:P.p}),typeof P.r=="number"&&(P.r={a:0,k:P.r}))}return function(M){if(m(S,M.v)&&(w(M.layers),M.assets)){var k,I=M.assets.length;for(k=0;k<I;k+=1)M.assets[k].layers&&w(M.assets[k].layers)}}}(),b=function(){var S=[4,1,9];function w(k){var I,P,A,E=k.length;for(I=0;I<E;I+=1)if(k[I].ty==="gr")w(k[I].it);else if(k[I].ty==="fl"||k[I].ty==="st")if(k[I].c.k&&k[I].c.k[0].i)for(A=k[I].c.k.length,P=0;P<A;P+=1)k[I].c.k[P].s&&(k[I].c.k[P].s[0]/=255,k[I].c.k[P].s[1]/=255,k[I].c.k[P].s[2]/=255,k[I].c.k[P].s[3]/=255),k[I].c.k[P].e&&(k[I].c.k[P].e[0]/=255,k[I].c.k[P].e[1]/=255,k[I].c.k[P].e[2]/=255,k[I].c.k[P].e[3]/=255);else k[I].c.k[0]/=255,k[I].c.k[1]/=255,k[I].c.k[2]/=255,k[I].c.k[3]/=255}function M(k){var I,P=k.length;for(I=0;I<P;I+=1)k[I].ty===4&&w(k[I].shapes)}return function(k){if(m(S,k.v)&&(M(k.layers),k.assets)){var I,P=k.assets.length;for(I=0;I<P;I+=1)k.assets[I].layers&&M(k.assets[I].layers)}}}(),_=function(){var S=[4,4,18];function w(k){var I,P,A;for(I=k.length-1;I>=0;I-=1)if(k[I].ty==="sh")if(k[I].ks.k.i)k[I].ks.k.c=k[I].closed;else for(A=k[I].ks.k.length,P=0;P<A;P+=1)k[I].ks.k[P].s&&(k[I].ks.k[P].s[0].c=k[I].closed),k[I].ks.k[P].e&&(k[I].ks.k[P].e[0].c=k[I].closed);else k[I].ty==="gr"&&w(k[I].it)}function M(k){var I,P,A,E,F,O,D=k.length;for(P=0;P<D;P+=1){if((I=k[P]).hasMask){var C=I.masksProperties;for(E=C.length,A=0;A<E;A+=1)if(C[A].pt.k.i)C[A].pt.k.c=C[A].cl;else for(O=C[A].pt.k.length,F=0;F<O;F+=1)C[A].pt.k[F].s&&(C[A].pt.k[F].s[0].c=C[A].cl),C[A].pt.k[F].e&&(C[A].pt.k[F].e[0].c=C[A].cl)}I.ty===4&&w(I.shapes)}}return function(k){if(m(S,k.v)&&(M(k.layers),k.assets)){var I,P=k.assets.length;for(I=0;I<P;I+=1)k.assets[I].layers&&M(k.assets[I].layers)}}}();function x(S){S.t.a.length===0&&S.t.p}var T={completeData:function(S){S.__complete||(b(S),d(S),y(S),v(S),_(S),c(S.layers,S.assets),function(w,M){if(w){var k=0,I=w.length;for(k=0;k<I;k+=1)w[k].t===1&&(w[k].data.layers=u(w[k].data.refId,M),c(w[k].data.layers,M))}}(S.chars,S.assets),S.__complete=!0)}};return T.checkColors=b,T.checkChars=y,T.checkPathProperties=v,T.checkShapes=_,T.completeLayers=c,T}()),s.assetLoader||(s.assetLoader=function(){function c(u){var f=u.getResponseHeader("content-type");return f&&u.responseType==="json"&&f.indexOf("json")!==-1||u.response&&_typeof$5(u.response)==="object"?u.response:u.response&&typeof u.response=="string"?JSON.parse(u.response):u.responseText?JSON.parse(u.responseText):null}return{load:function(u,f,p,m){var g,d=new XMLHttpRequest;try{d.responseType="json"}catch{}d.onreadystatechange=function(){if(d.readyState===4)if(d.status===200)g=c(d),p(g);else try{g=c(d),p(g)}catch(y){m&&m(y)}};try{d.open(["G","E","T"].join(""),u,!0)}catch{d.open(["G","E","T"].join(""),f+"/"+u,!0)}d.send()}}}()),l.data.type==="loadAnimation")s.assetLoader.load(l.data.path,l.data.fullPath,function(c){s.dataManager.completeData(c),s.postMessage({id:l.data.id,payload:c,status:"success"})},function(){s.postMessage({id:l.data.id,status:"error"})});else if(l.data.type==="complete"){var h=l.data.animation;s.dataManager.completeData(h),s.postMessage({id:l.data.id,payload:h,status:"success"})}else l.data.type==="loadData"&&s.assetLoader.load(l.data.path,l.data.fullPath,function(c){s.postMessage({id:l.data.id,payload:c,status:"success"})},function(){s.postMessage({id:l.data.id,status:"error"})})})).onmessage=function(l){var h=l.data,c=h.id,u=i[c];i[c]=null,h.status==="success"?u.onComplete(h.payload):u.onError&&u.onError()})}function o(l,h){var c="processId_"+(r+=1);return i[c]={onComplete:l,onError:h},c}return{loadAnimation:function(l,h,c){a();var u=o(h,c);e.postMessage({type:"loadAnimation",path:l,fullPath:window.location.origin+window.location.pathname,id:u})},loadData:function(l,h,c){a();var u=o(h,c);e.postMessage({type:"loadData",path:l,fullPath:window.location.origin+window.location.pathname,id:u})},completeAnimation:function(l,h,c){a();var u=o(h,c);e.postMessage({type:"complete",animation:l,id:u})}}}(),ImagePreloader=function(){var t=function(){var o=createTag("canvas");o.width=1,o.height=1;var l=o.getContext("2d");return l.fillStyle="rgba(0,0,0,0)",l.fillRect(0,0,1,1),o}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(o,l,h){var c="";if(o.e)c=o.p;else if(l){var u=o.p;u.indexOf("images/")!==-1&&(u=u.split("/")[1]),c=l+u}else c=h,c+=o.u?o.u:"",c+=o.p;return c}function n(o){var l=0,h=setInterval(function(){(o.getBBox().width||l>500)&&(this._imageLoaded(),clearInterval(h)),l+=1}.bind(this),50)}function s(o){var l={assetData:o},h=i(o,this.assetsPath,this.path);return dataManager.loadData(h,function(c){l.img=c,this._footageLoaded()}.bind(this),function(){l.img={},this._footageLoaded()}.bind(this)),l}function a(){this._imageLoaded=e.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=n.bind(this),this.createFootageData=s.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return a.prototype={loadAssets:function(o,l){var h;this.imagesLoadedCb=l;var c=o.length;for(h=0;h<c;h+=1)o[h].layers||(o[h].t&&o[h].t!=="seq"?o[h].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(o[h]))):(this.totalImages+=1,this.images.push(this._createImageData(o[h]))))},setAssetsPath:function(o){this.assetsPath=o||""},setPath:function(o){this.path=o||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(o){for(var l=0,h=this.images.length;l<h;){if(this.images[l].assetData===o)return this.images[l].img;l+=1}return null},createImgData:function(o){var l=i(o,this.assetsPath,this.path),h=createTag("img");h.crossOrigin="anonymous",h.addEventListener("load",this._imageLoaded,!1),h.addEventListener("error",function(){c.img=t,this._imageLoaded()}.bind(this),!1),h.src=l;var c={img:h,assetData:o};return c},createImageData:function(o){var l=i(o,this.assetsPath,this.path),h=createNS("image");isSafari?this.testImageLoaded(h):h.addEventListener("load",this._imageLoaded,!1),h.addEventListener("error",function(){c.img=t,this._imageLoaded()}.bind(this),!1),h.setAttributeNS("http://www.w3.org/1999/xlink","href",l),this._elementHelper.append?this._elementHelper.append(h):this._elementHelper.appendChild(h);var c={img:h,assetData:o};return c},imageLoaded:e,footageLoaded:r,setCacheType:function(o,l){o==="svg"?(this._elementHelper=l,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},a}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var r=this._cbs[t],i=0;i<r.length;i+=1)r[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var r=0,i=this._cbs[t].length;r<i;)this._cbs[t][r]===e&&(this._cbs[t].splice(r,1),r-=1,i-=1),r+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var markerParser=function(){function t(e){for(var r,i=e.split(`\r
37
+ `),n={},s=0,a=0;a<i.length;a+=1)(r=i[a].split(":")).length===2&&(n[r[0]]=r[1].trim(),s+=1);if(s===0)throw new Error;return n}return function(e){for(var r=[],i=0;i<e.length;i+=1){var n=e[i],s={time:n.tm,duration:n.dr};try{s.payload=JSON.parse(e[i].cm)}catch{try{s.payload=t(e[i].cm)}catch{s.payload={name:e[i].cm}}}r.push(s)}return r}}(),ProjectInterface=function(){function t(e){this.compositions.push(e)}return function(){function e(r){for(var i=0,n=this.compositions.length;i<n;){if(this.compositions[i].data&&this.compositions[i].data.nm===r)return this.compositions[i].prepareFrame&&this.compositions[i].data.xt&&this.compositions[i].prepareFrame(this.currentFrame),this.compositions[i].compInterface;i+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function _typeof$4(t){return(_typeof$4=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)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var r=getRenderer(e);this.renderer=new r(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,t.loop===""||t.loop===null||t.loop===void 0||t.loop===!0?this.loop=!0:t.loop===!1?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(t.path.lastIndexOf("\\")!==-1?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&_typeof$4(e)!=="object"&&(e=JSON.parse(e));var r={wrapper:t,animationData:e},i=t.attributes;r.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",r.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var n=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";n==="false"?r.loop=!1:n==="true"?r.loop=!0:n!==""&&(r.loop=parseInt(n,10));var s=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;r.autoplay=s!=="false",r.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"",(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")==="false"&&(r.prerender=!1),this.setParams(r)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,n=i.length,s=t.layers,a=s.length;for(r=0;r<a;r+=1)for(e=0;e<n;){if(i[e].id===s[r].id){i[e]=s[r];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(n=t.assets.length,e=0;e<n;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||t.length===0||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(t,e){var r=typeof t=="number"?t:void 0,i=typeof e=="number"?e:void 0;this.renderer.updateContainerSize(r,i)},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(this.isLoaded!==!1&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_pause"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_play"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r<this.markers.length;r+=1)if((e=this.markers[r]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var n=this.getMarkerData(t);n&&this.goToAndStop(n.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,r){if(!r||this.name===r){var i=Number(t);if(isNaN(i)){var n=this.getMarkerData(t);n&&(n.duration?this.playSegments([n.time,n.time+n.duration],!0):this.goToAndStop(n.time,!0))}else this.goToAndStop(i,e,r);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(this.isPaused!==!0&&this.isLoaded!==!1){var e=this.currentRawFrame+t*this.frameModifier,r=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&this.loop!==!0?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?r=t:this.currentRawFrame+this.firstFrame>e&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,r!==-1&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),_typeof$4(t[0])==="object"){var r,i=t.length;for(r=0;r<i;r+=1)this.segments.push(t[r])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var r=t.p;r.indexOf("images/")!==-1&&(r=r.split("/")[1]),e=this.assetsPath+r}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,r=this.assets.length;e<r;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(t,e,r){try{this.renderer.getElementByPath(t).updateDocumentData(e,r)}catch{}},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(t,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}t==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),t==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),t==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),t==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),t==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},e=[],r=0,i=0,n=0,s=!0,a=!1;function o(g){for(var d=0,y=g.target;d<i;)e[d].animation===y&&(e.splice(d,1),d-=1,i-=1,y.isPaused||c()),d+=1}function l(g,d){if(!g)return null;for(var y=0;y<i;){if(e[y].elem===g&&e[y].elem!==null)return e[y].animation;y+=1}var v=new AnimationItem;return u(v,g),v.setData(g,d),v}function h(){n+=1,m()}function c(){n-=1}function u(g,d){g.addEventListener("destroy",o),g.addEventListener("_active",h),g.addEventListener("_idle",c),e.push({elem:d,animation:g}),i+=1}function f(g){var d,y=g-r;for(d=0;d<i;d+=1)e[d].animation.advanceTime(y);r=g,n&&!a?window.requestAnimationFrame(f):s=!0}function p(g){r=g,window.requestAnimationFrame(f)}function m(){!a&&n&&s&&(window.requestAnimationFrame(p),s=!1)}return t.registerAnimation=l,t.loadAnimation=function(g){var d=new AnimationItem;return u(d,null),d.setParams(g),d},t.setSpeed=function(g,d){var y;for(y=0;y<i;y+=1)e[y].animation.setSpeed(g,d)},t.setDirection=function(g,d){var y;for(y=0;y<i;y+=1)e[y].animation.setDirection(g,d)},t.play=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.play(g)},t.pause=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.pause(g)},t.stop=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.stop(g)},t.togglePause=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.togglePause(g)},t.searchAnimations=function(g,d,y){var v,b=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),_=b.length;for(v=0;v<_;v+=1)y&&b[v].setAttribute("data-bm-type",y),l(b[v],g);if(d&&_===0){y||(y="svg");var x=document.getElementsByTagName("body")[0];x.innerText="";var T=createTag("div");T.style.width="100%",T.style.height="100%",T.setAttribute("data-bm-type",y),x.appendChild(T),l(T,g)}},t.resize=function(){var g;for(g=0;g<i;g+=1)e[g].animation.resize()},t.goToAndStop=function(g,d,y){var v;for(v=0;v<i;v+=1)e[v].animation.goToAndStop(g,d,y)},t.destroy=function(g){var d;for(d=i-1;d>=0;d-=1)e[d].animation.destroy(g)},t.freeze=function(){a=!0},t.unfreeze=function(){a=!1,m()},t.setVolume=function(g,d){var y;for(y=0;y<i;y+=1)e[y].animation.setVolume(g,d)},t.mute=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.mute(g)},t.unmute=function(g){var d;for(d=0;d<i;d+=1)e[d].animation.unmute(g)},t.getRegisteredAnimations=function(){var g,d=e.length,y=[];for(g=0;g<d;g+=1)y.push(e[g].animation);return y},t}(),BezierFactory=function(){var t={getBezierEasing:function(h,c,u,f,p){var m=p||("bez_"+h+"_"+c+"_"+u+"_"+f).replace(/\./g,"p");if(e[m])return e[m];var g=new l([h,c,u,f]);return e[m]=g,g}},e={},r=typeof Float32Array=="function";function i(h,c){return 1-3*c+3*h}function n(h,c){return 3*c-6*h}function s(h){return 3*h}function a(h,c,u){return((i(c,u)*h+n(c,u))*h+s(c))*h}function o(h,c,u){return 3*i(c,u)*h*h+2*n(c,u)*h+s(c)}function l(h){this._p=h,this._mSampleValues=r?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(h){var c=this._p[0],u=this._p[1],f=this._p[2],p=this._p[3];return this._precomputed||this._precompute(),c===u&&f===p?h:h===0?0:h===1?1:a(this._getTForX(h),u,p)},_precompute:function(){var h=this._p[0],c=this._p[1],u=this._p[2],f=this._p[3];this._precomputed=!0,h===c&&u===f||this._calcSampleValues()},_calcSampleValues:function(){for(var h=this._p[0],c=this._p[2],u=0;u<11;++u)this._mSampleValues[u]=a(.1*u,h,c)},_getTForX:function(h){for(var c=this._p[0],u=this._p[2],f=this._mSampleValues,p=0,m=1;m!==10&&f[m]<=h;++m)p+=.1;var g=p+.1*((h-f[--m])/(f[m+1]-f[m])),d=o(g,c,u);return d>=.001?function(y,v,b,_){for(var x=0;x<4;++x){var T=o(v,b,_);if(T===0)return v;v-=(a(v,b,_)-y)/T}return v}(h,g,c,u):d===0?g:function(y,v,b,_,x){var T,S,w=0;do(T=a(S=v+(b-v)/2,_,x)-y)>0?b=S:v=S;while(Math.abs(T)>1e-7&&++w<10);return S}(h,p,p+.1,c,u)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,r){var i=0,n=t,s=createSizedArray(n);return{newElement:function(){return i?s[i-=1]:e()},release:function(a){i===n&&(s=pooling.double(s),n*=2),r&&r(a),s[i]=a,i+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,r=t.lengths.length;for(e=0;e<r;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0});function bezFunction(){var t=Math;function e(h,c,u,f,p,m){var g=h*f+c*p+u*m-p*f-m*h-u*c;return g>-.001&&g<.001}var r=function(h,c,u,f){var p,m,g,d,y,v,b=getDefaultCurveSegments(),_=0,x=[],T=[],S=bezierLengthPool.newElement();for(g=u.length,p=0;p<b;p+=1){for(y=p/(b-1),v=0,m=0;m<g;m+=1)d=bmPow(1-y,3)*h[m]+3*bmPow(1-y,2)*y*u[m]+3*(1-y)*bmPow(y,2)*f[m]+bmPow(y,3)*c[m],x[m]=d,T[m]!==null&&(v+=bmPow(x[m]-T[m],2)),T[m]=x[m];v&&(_+=v=bmSqrt(v)),S.percents[p]=y,S.lengths[p]=_}return S.addedLength=_,S};function i(h){this.segmentLength=0,this.points=new Array(h)}function n(h,c){this.partialLength=h,this.point=c}var s,a=(s={},function(h,c,u,f){var p=(h[0]+"_"+h[1]+"_"+c[0]+"_"+c[1]+"_"+u[0]+"_"+u[1]+"_"+f[0]+"_"+f[1]).replace(/\./g,"p");if(!s[p]){var m,g,d,y,v,b,_,x=getDefaultCurveSegments(),T=0,S=null;h.length===2&&(h[0]!==c[0]||h[1]!==c[1])&&e(h[0],h[1],c[0],c[1],h[0]+u[0],h[1]+u[1])&&e(h[0],h[1],c[0],c[1],c[0]+f[0],c[1]+f[1])&&(x=2);var w=new i(x);for(d=u.length,m=0;m<x;m+=1){for(_=createSizedArray(d),v=m/(x-1),b=0,g=0;g<d;g+=1)y=bmPow(1-v,3)*h[g]+3*bmPow(1-v,2)*v*(h[g]+u[g])+3*(1-v)*bmPow(v,2)*(c[g]+f[g])+bmPow(v,3)*c[g],_[g]=y,S!==null&&(b+=bmPow(_[g]-S[g],2));T+=b=bmSqrt(b),w.points[m]=new n(b,_),S=_}w.segmentLength=T,s[p]=w}return s[p]});function o(h,c){var u=c.percents,f=c.lengths,p=u.length,m=bmFloor((p-1)*h),g=h*c.addedLength,d=0;if(m===p-1||m===0||g===f[m])return u[m];for(var y=f[m]>g?-1:1,v=!0;v;)if(f[m]<=g&&f[m+1]>g?(d=(g-f[m])/(f[m+1]-f[m]),v=!1):m+=y,m<0||m>=p-1){if(m===p-1)return u[m];v=!1}return u[m]+(u[m+1]-u[m])*d}var l=createTypedArray("float32",8);return{getSegmentsLength:function(h){var c,u=segmentsLengthPool.newElement(),f=h.c,p=h.v,m=h.o,g=h.i,d=h._length,y=u.lengths,v=0;for(c=0;c<d-1;c+=1)y[c]=r(p[c],p[c+1],m[c],g[c+1]),v+=y[c].addedLength;return f&&d&&(y[c]=r(p[c],p[0],m[c],g[0]),v+=y[c].addedLength),u.totalLength=v,u},getNewSegment:function(h,c,u,f,p,m,g){p<0?p=0:p>1&&(p=1);var d,y=o(p,g),v=o(m=m>1?1:m,g),b=h.length,_=1-y,x=1-v,T=_*_*_,S=y*_*_*3,w=y*y*_*3,M=y*y*y,k=_*_*x,I=y*_*x+_*y*x+_*_*v,P=y*y*x+_*y*v+y*_*v,A=y*y*v,E=_*x*x,F=y*x*x+_*v*x+_*x*v,O=y*v*x+_*v*v+y*x*v,D=y*v*v,C=x*x*x,$=v*x*x+x*v*x+x*x*v,R=v*v*x+x*v*v+v*x*v,q=v*v*v;for(d=0;d<b;d+=1)l[4*d]=t.round(1e3*(T*h[d]+S*u[d]+w*f[d]+M*c[d]))/1e3,l[4*d+1]=t.round(1e3*(k*h[d]+I*u[d]+P*f[d]+A*c[d]))/1e3,l[4*d+2]=t.round(1e3*(E*h[d]+F*u[d]+O*f[d]+D*c[d]))/1e3,l[4*d+3]=t.round(1e3*(C*h[d]+$*u[d]+R*f[d]+q*c[d]))/1e3;return l},getPointInSegment:function(h,c,u,f,p,m){var g=o(p,m),d=1-g;return[t.round(1e3*(d*d*d*h[0]+(g*d*d+d*g*d+d*d*g)*u[0]+(g*g*d+d*g*g+g*d*g)*f[0]+g*g*g*c[0]))/1e3,t.round(1e3*(d*d*d*h[1]+(g*d*d+d*g*d+d*d*g)*u[1]+(g*g*d+d*g*g+g*d*g)*f[1]+g*g*g*c[1]))/1e3]},buildBezierData:a,pointOnLine2D:e,pointOnLine3D:function(h,c,u,f,p,m,g,d,y){if(u===0&&m===0&&y===0)return e(h,c,f,p,g,d);var v,b=t.sqrt(t.pow(f-h,2)+t.pow(p-c,2)+t.pow(m-u,2)),_=t.sqrt(t.pow(g-h,2)+t.pow(d-c,2)+t.pow(y-u,2)),x=t.sqrt(t.pow(g-f,2)+t.pow(d-p,2)+t.pow(y-m,2));return(v=b>_?b>x?b-_-x:x-_-b:x>_?x-_-b:_-b-x)>-1e-4&&v<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var t=initialDefaultFrame,e=Math.abs;function r(f,p){var m,g=this.offsetTime;this.propType==="multidimensional"&&(m=createTypedArray("float32",this.pv.length));for(var d,y,v,b,_,x,T,S,w,M=p.lastIndex,k=M,I=this.keyframes.length-1,P=!0;P;){if(d=this.keyframes[k],y=this.keyframes[k+1],k===I-1&&f>=y.t-g){d.h&&(d=y),M=0;break}if(y.t-g>f){M=k;break}k<I-1?k+=1:(M=0,P=!1)}v=this.keyframesMetadata[k]||{};var A,E=y.t-g,F=d.t-g;if(d.to){v.bezierData||(v.bezierData=bez.buildBezierData(d.s,y.s||d.e,d.to,d.ti));var O=v.bezierData;if(f>=E||f<F){var D=f>=E?O.points.length-1:0;for(_=O.points[D].point.length,b=0;b<_;b+=1)m[b]=O.points[D].point[b]}else{v.__fnct?w=v.__fnct:(w=BezierFactory.getBezierEasing(d.o.x,d.o.y,d.i.x,d.i.y,d.n).get,v.__fnct=w),x=w((f-F)/(E-F));var C,$=O.segmentLength*x,R=p.lastFrame<f&&p._lastKeyframeIndex===k?p._lastAddedLength:0;for(S=p.lastFrame<f&&p._lastKeyframeIndex===k?p._lastPoint:0,P=!0,T=O.points.length;P;){if(R+=O.points[S].partialLength,$===0||x===0||S===O.points.length-1){for(_=O.points[S].point.length,b=0;b<_;b+=1)m[b]=O.points[S].point[b];break}if($>=R&&$<R+O.points[S+1].partialLength){for(C=($-R)/O.points[S+1].partialLength,_=O.points[S].point.length,b=0;b<_;b+=1)m[b]=O.points[S].point[b]+(O.points[S+1].point[b]-O.points[S].point[b])*C;break}S<T-1?S+=1:P=!1}p._lastPoint=S,p._lastAddedLength=R-O.points[S].partialLength,p._lastKeyframeIndex=k}}else{var q,U,Y,G,re;if(I=d.s.length,A=y.s||d.e,this.sh&&d.h!==1)f>=E?(m[0]=A[0],m[1]=A[1],m[2]=A[2]):f<=F?(m[0]=d.s[0],m[1]=d.s[1],m[2]=d.s[2]):function(se,ie){var Q=ie[0],xe=ie[1],ue=ie[2],Ie=ie[3],Se=Math.atan2(2*xe*Ie-2*Q*ue,1-2*xe*xe-2*ue*ue),W=Math.asin(2*Q*xe+2*ue*Ie),qe=Math.atan2(2*Q*Ie-2*xe*ue,1-2*Q*Q-2*ue*ue);se[0]=Se/degToRads,se[1]=W/degToRads,se[2]=qe/degToRads}(m,function(se,ie,Q){var xe,ue,Ie,Se,W,qe=[],kt=se[0],Et=se[1],st=se[2],dt=se[3],at=ie[0],Ve=ie[1],ft=ie[2],mt=ie[3];return(ue=kt*at+Et*Ve+st*ft+dt*mt)<0&&(ue=-ue,at=-at,Ve=-Ve,ft=-ft,mt=-mt),1-ue>1e-6?(xe=Math.acos(ue),Ie=Math.sin(xe),Se=Math.sin((1-Q)*xe)/Ie,W=Math.sin(Q*xe)/Ie):(Se=1-Q,W=Q),qe[0]=Se*kt+W*at,qe[1]=Se*Et+W*Ve,qe[2]=Se*st+W*ft,qe[3]=Se*dt+W*mt,qe}(i(d.s),i(A),(f-F)/(E-F)));else for(k=0;k<I;k+=1)d.h!==1&&(f>=E?x=1:f<F?x=0:(d.o.x.constructor===Array?(v.__fnct||(v.__fnct=[]),v.__fnct[k]?w=v.__fnct[k]:(q=d.o.x[k]===void 0?d.o.x[0]:d.o.x[k],U=d.o.y[k]===void 0?d.o.y[0]:d.o.y[k],Y=d.i.x[k]===void 0?d.i.x[0]:d.i.x[k],G=d.i.y[k]===void 0?d.i.y[0]:d.i.y[k],w=BezierFactory.getBezierEasing(q,U,Y,G).get,v.__fnct[k]=w)):v.__fnct?w=v.__fnct:(q=d.o.x,U=d.o.y,Y=d.i.x,G=d.i.y,w=BezierFactory.getBezierEasing(q,U,Y,G).get,d.keyframeMetadata=w),x=w((f-F)/(E-F)))),A=y.s||d.e,re=d.h===1?d.s[k]:d.s[k]+(A[k]-d.s[k])*x,this.propType==="multidimensional"?m[k]=re:m=re}return p.lastIndex=M,m}function i(f){var p=f[0]*degToRads,m=f[1]*degToRads,g=f[2]*degToRads,d=Math.cos(p/2),y=Math.cos(m/2),v=Math.cos(g/2),b=Math.sin(p/2),_=Math.sin(m/2),x=Math.sin(g/2);return[b*_*v+d*y*x,b*y*v+d*_*x,d*_*v-b*y*x,d*y*v-b*_*x]}function n(){var f=this.comp.renderedFrame-this.offsetTime,p=this.keyframes[0].t-this.offsetTime,m=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(f===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=m&&f>=m||this._caching.lastFrame<p&&f<p))){this._caching.lastFrame>=f&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var g=this.interpolateValue(f,this._caching);this.pv=g}return this._caching.lastFrame=f,this.pv}function s(f){var p;if(this.propType==="unidimensional")p=f*this.mult,e(this.v-p)>1e-5&&(this.v=p,this._mdf=!0);else for(var m=0,g=this.v.length;m<g;)p=f[m]*this.mult,e(this.v[m]-p)>1e-5&&(this.v[m]=p,this._mdf=!0),m+=1}function a(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var f;this.lock=!0,this._mdf=this._isFirstFrame;var p=this.effectsSequence.length,m=this.kf?this.pv:this.data.k;for(f=0;f<p;f+=1)m=this.effectsSequence[f](m);this.setVValue(m),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function o(f){this.effectsSequence.push(f),this.container.addDynamicProperty(this)}function l(f,p,m,g){this.propType="unidimensional",this.mult=m||1,this.data=p,this.v=m?p.k*m:p.k,this.pv=p.k,this._mdf=!1,this.elem=f,this.container=g,this.comp=f.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=a,this.setVValue=s,this.addEffect=o}function h(f,p,m,g){var d;this.propType="multidimensional",this.mult=m||1,this.data=p,this._mdf=!1,this.elem=f,this.container=g,this.comp=f.comp,this.k=!1,this.kf=!1,this.frameId=-1;var y=p.k.length;for(this.v=createTypedArray("float32",y),this.pv=createTypedArray("float32",y),this.vel=createTypedArray("float32",y),d=0;d<y;d+=1)this.v[d]=p.k[d]*this.mult,this.pv[d]=p.k[d];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=a,this.setVValue=s,this.addEffect=o}function c(f,p,m,g){this.propType="unidimensional",this.keyframes=p.k,this.keyframesMetadata=[],this.offsetTime=f.data.st,this.frameId=-1,this._caching={lastFrame:t,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=p,this.mult=m||1,this.elem=f,this.container=g,this.comp=f.comp,this.v=t,this.pv=t,this._isFirstFrame=!0,this.getValue=a,this.setVValue=s,this.interpolateValue=r,this.effectsSequence=[n.bind(this)],this.addEffect=o}function u(f,p,m,g){var d;this.propType="multidimensional";var y,v,b,_,x=p.k.length;for(d=0;d<x-1;d+=1)p.k[d].to&&p.k[d].s&&p.k[d+1]&&p.k[d+1].s&&(y=p.k[d].s,v=p.k[d+1].s,b=p.k[d].to,_=p.k[d].ti,(y.length===2&&(y[0]!==v[0]||y[1]!==v[1])&&bez.pointOnLine2D(y[0],y[1],v[0],v[1],y[0]+b[0],y[1]+b[1])&&bez.pointOnLine2D(y[0],y[1],v[0],v[1],v[0]+_[0],v[1]+_[1])||y.length===3&&(y[0]!==v[0]||y[1]!==v[1]||y[2]!==v[2])&&bez.pointOnLine3D(y[0],y[1],y[2],v[0],v[1],v[2],y[0]+b[0],y[1]+b[1],y[2]+b[2])&&bez.pointOnLine3D(y[0],y[1],y[2],v[0],v[1],v[2],v[0]+_[0],v[1]+_[1],v[2]+_[2]))&&(p.k[d].to=null,p.k[d].ti=null),y[0]===v[0]&&y[1]===v[1]&&b[0]===0&&b[1]===0&&_[0]===0&&_[1]===0&&(y.length===2||y[2]===v[2]&&b[2]===0&&_[2]===0)&&(p.k[d].to=null,p.k[d].ti=null));this.effectsSequence=[n.bind(this)],this.data=p,this.keyframes=p.k,this.keyframesMetadata=[],this.offsetTime=f.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=m||1,this.elem=f,this.container=g,this.comp=f.comp,this.getValue=a,this.setVValue=s,this.interpolateValue=r,this.frameId=-1;var T=p.k[0].s.length;for(this.v=createTypedArray("float32",T),this.pv=createTypedArray("float32",T),d=0;d<T;d+=1)this.v[d]=t,this.pv[d]=t;this._caching={lastFrame:t,lastIndex:0,value:createTypedArray("float32",T)},this.addEffect=o}return{getProp:function(f,p,m,g,d){var y;if(p.k.length)if(typeof p.k[0]=="number")y=new h(f,p,g,d);else switch(m){case 0:y=new c(f,p,g,d);break;case 1:y=new u(f,p,g,d)}else y=new l(f,p,g,d);return y.effectsSequence.length&&d.addDynamicProperty(y),y}}}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var r=0;r<e;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,r,i,n){var s;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":s=this.v;break;case"i":s=this.i;break;case"o":s=this.o;break;default:s=[]}(!s[i]||s[i]&&!n)&&(s[i]=pointPool.newElement()),s[i][0]=t,s[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,n,s,a,o){this.setXYAt(t,e,"v",a,o),this.setXYAt(r,i,"o",a,o),this.setXYAt(n,s,"i",a,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,n=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),n=1);var s,a=this._length-1,o=this._length;for(s=n;s<o;s+=1)t.setTripleAt(e[a][0],e[a][1],i[a][0],i[a][1],r[a][0],r[a][1],s,!1),a-=1;return t},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,function(){return new ShapePath},function(t){var e,r=t._length;for(e=0;e<r;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),factory.clone=function(t){var e,r=factory.newElement(),i=t._length===void 0?t.v.length:t._length;for(r.setLength(i),r.c=t.c,e=0;e<i;e+=1)r.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return r},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(t){var e,r=t._length;for(e=0;e<r;e+=1)shapePool.release(t.shapes[e]);t._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=t,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){function t(f,p,m){var g,d,y,v,b,_,x,T,S,w=m.lastIndex,M=this.keyframes;if(f<M[0].t-this.offsetTime)g=M[0].s[0],y=!0,w=0;else if(f>=M[M.length-1].t-this.offsetTime)g=M[M.length-1].s?M[M.length-1].s[0]:M[M.length-2].e[0],y=!0;else{for(var k,I,P,A=w,E=M.length-1,F=!0;F&&(k=M[A],!((I=M[A+1]).t-this.offsetTime>f));)A<E-1?A+=1:F=!1;if(P=this.keyframesMetadata[A]||{},w=A,!(y=k.h===1)){if(f>=I.t-this.offsetTime)T=1;else if(f<k.t-this.offsetTime)T=0;else{var O;P.__fnct?O=P.__fnct:(O=BezierFactory.getBezierEasing(k.o.x,k.o.y,k.i.x,k.i.y).get,P.__fnct=O),T=O((f-(k.t-this.offsetTime))/(I.t-this.offsetTime-(k.t-this.offsetTime)))}d=I.s?I.s[0]:k.e[0]}g=k.s[0]}for(_=p._length,x=g.i[0].length,m.lastIndex=w,v=0;v<_;v+=1)for(b=0;b<x;b+=1)S=y?g.i[v][b]:g.i[v][b]+(d.i[v][b]-g.i[v][b])*T,p.i[v][b]=S,S=y?g.o[v][b]:g.o[v][b]+(d.o[v][b]-g.o[v][b])*T,p.o[v][b]=S,S=y?g.v[v][b]:g.v[v][b]+(d.v[v][b]-g.v[v][b])*T,p.v[v][b]=S}function e(){var f=this.comp.renderedFrame-this.offsetTime,p=this.keyframes[0].t-this.offsetTime,m=this.keyframes[this.keyframes.length-1].t-this.offsetTime,g=this._caching.lastFrame;return g!==-999999&&(g<p&&f<p||g>m&&f>m)||(this._caching.lastIndex=g<f?this._caching.lastIndex:0,this.interpolateShape(f,this.pv,this._caching)),this._caching.lastFrame=f,this.pv}function r(){this.paths=this.localShapeCollection}function i(f){(function(p,m){if(p._length!==m._length||p.c!==m.c)return!1;var g,d=p._length;for(g=0;g<d;g+=1)if(p.v[g][0]!==m.v[g][0]||p.v[g][1]!==m.v[g][1]||p.o[g][0]!==m.o[g][0]||p.o[g][1]!==m.o[g][1]||p.i[g][0]!==m.i[g][0]||p.i[g][1]!==m.i[g][1])return!1;return!0})(this.v,f)||(this.v=shapePool.clone(f),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function n(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var f,p;this.lock=!0,this._mdf=!1,f=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var m=this.effectsSequence.length;for(p=0;p<m;p+=1)f=this.effectsSequence[p](f);this.setVValue(f),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function s(f,p,m){this.propType="shape",this.comp=f.comp,this.container=f,this.elem=f,this.data=p,this.k=!1,this.kf=!1,this._mdf=!1;var g=m===3?p.pt.k:p.ks.k;this.v=shapePool.clone(g),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function a(f){this.effectsSequence.push(f),this.container.addDynamicProperty(this)}function o(f,p,m){this.propType="shape",this.comp=f.comp,this.elem=f,this.container=f,this.offsetTime=f.data.st,this.keyframes=m===3?p.pt.k:p.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var g=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,g),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=-999999,this.reset=r,this._caching={lastFrame:-999999,lastIndex:0},this.effectsSequence=[e.bind(this)]}s.prototype.interpolateShape=t,s.prototype.getValue=n,s.prototype.setVValue=i,s.prototype.addEffect=a,o.prototype.getValue=n,o.prototype.interpolateShape=t,o.prototype.setVValue=i,o.prototype.addEffect=a;var l=function(){var f=roundCorner;function p(m,g){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=g.d,this.elem=m,this.comp=m.comp,this.frameId=-1,this.initDynamicPropertyContainer(m),this.p=PropertyFactory.getProp(m,g.p,1,0,this),this.s=PropertyFactory.getProp(m,g.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return p.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var m=this.p.v[0],g=this.p.v[1],d=this.s.v[0]/2,y=this.s.v[1]/2,v=this.d!==3,b=this.v;b.v[0][0]=m,b.v[0][1]=g-y,b.v[1][0]=v?m+d:m-d,b.v[1][1]=g,b.v[2][0]=m,b.v[2][1]=g+y,b.v[3][0]=v?m-d:m+d,b.v[3][1]=g,b.i[0][0]=v?m-d*f:m+d*f,b.i[0][1]=g-y,b.i[1][0]=v?m+d:m-d,b.i[1][1]=g-y*f,b.i[2][0]=v?m+d*f:m-d*f,b.i[2][1]=g+y,b.i[3][0]=v?m-d:m+d,b.i[3][1]=g+y*f,b.o[0][0]=v?m+d*f:m-d*f,b.o[0][1]=g-y,b.o[1][0]=v?m+d:m-d,b.o[1][1]=g+y*f,b.o[2][0]=v?m-d*f:m+d*f,b.o[2][1]=g+y,b.o[3][0]=v?m-d:m+d,b.o[3][1]=g-y*f}},extendPrototype([DynamicPropertyContainer],p),p}(),h=function(){function f(p,m){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=p,this.comp=p.comp,this.data=m,this.frameId=-1,this.d=m.d,this.initDynamicPropertyContainer(p),m.sy===1?(this.ir=PropertyFactory.getProp(p,m.ir,0,0,this),this.is=PropertyFactory.getProp(p,m.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(p,m.pt,0,0,this),this.p=PropertyFactory.getProp(p,m.p,1,0,this),this.r=PropertyFactory.getProp(p,m.r,0,degToRads,this),this.or=PropertyFactory.getProp(p,m.or,0,0,this),this.os=PropertyFactory.getProp(p,m.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return f.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var p,m,g,d,y=2*Math.floor(this.pt.v),v=2*Math.PI/y,b=!0,_=this.or.v,x=this.ir.v,T=this.os.v,S=this.is.v,w=2*Math.PI*_/(2*y),M=2*Math.PI*x/(2*y),k=-Math.PI/2;k+=this.r.v;var I=this.data.d===3?-1:1;for(this.v._length=0,p=0;p<y;p+=1){g=b?T:S,d=b?w:M;var P=(m=b?_:x)*Math.cos(k),A=m*Math.sin(k),E=P===0&&A===0?0:A/Math.sqrt(P*P+A*A),F=P===0&&A===0?0:-P/Math.sqrt(P*P+A*A);P+=+this.p.v[0],A+=+this.p.v[1],this.v.setTripleAt(P,A,P-E*d*g*I,A-F*d*g*I,P+E*d*g*I,A+F*d*g*I,p,!0),b=!b,k+=v*I}},convertPolygonToPath:function(){var p,m=Math.floor(this.pt.v),g=2*Math.PI/m,d=this.or.v,y=this.os.v,v=2*Math.PI*d/(4*m),b=.5*-Math.PI,_=this.data.d===3?-1:1;for(b+=this.r.v,this.v._length=0,p=0;p<m;p+=1){var x=d*Math.cos(b),T=d*Math.sin(b),S=x===0&&T===0?0:T/Math.sqrt(x*x+T*T),w=x===0&&T===0?0:-x/Math.sqrt(x*x+T*T);x+=+this.p.v[0],T+=+this.p.v[1],this.v.setTripleAt(x,T,x-S*v*y*_,T-w*v*y*_,x+S*v*y*_,T+w*v*y*_,p,!0),b+=g*_}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],f),f}(),c=function(){function f(p,m){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=p,this.comp=p.comp,this.frameId=-1,this.d=m.d,this.initDynamicPropertyContainer(p),this.p=PropertyFactory.getProp(p,m.p,1,0,this),this.s=PropertyFactory.getProp(p,m.s,1,0,this),this.r=PropertyFactory.getProp(p,m.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return f.prototype={convertRectToPath:function(){var p=this.p.v[0],m=this.p.v[1],g=this.s.v[0]/2,d=this.s.v[1]/2,y=bmMin(g,d,this.r.v),v=y*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(p+g,m-d+y,p+g,m-d+y,p+g,m-d+v,0,!0),this.v.setTripleAt(p+g,m+d-y,p+g,m+d-v,p+g,m+d-y,1,!0),y!==0?(this.v.setTripleAt(p+g-y,m+d,p+g-y,m+d,p+g-v,m+d,2,!0),this.v.setTripleAt(p-g+y,m+d,p-g+v,m+d,p-g+y,m+d,3,!0),this.v.setTripleAt(p-g,m+d-y,p-g,m+d-y,p-g,m+d-v,4,!0),this.v.setTripleAt(p-g,m-d+y,p-g,m-d+v,p-g,m-d+y,5,!0),this.v.setTripleAt(p-g+y,m-d,p-g+y,m-d,p-g+v,m-d,6,!0),this.v.setTripleAt(p+g-y,m-d,p+g-v,m-d,p+g-y,m-d,7,!0)):(this.v.setTripleAt(p-g,m+d,p-g+v,m+d,p-g,m+d,2),this.v.setTripleAt(p-g,m-d,p-g,m-d+v,p-g,m-d,3))):(this.v.setTripleAt(p+g,m-d+y,p+g,m-d+v,p+g,m-d+y,0,!0),y!==0?(this.v.setTripleAt(p+g-y,m-d,p+g-y,m-d,p+g-v,m-d,1,!0),this.v.setTripleAt(p-g+y,m-d,p-g+v,m-d,p-g+y,m-d,2,!0),this.v.setTripleAt(p-g,m-d+y,p-g,m-d+y,p-g,m-d+v,3,!0),this.v.setTripleAt(p-g,m+d-y,p-g,m+d-v,p-g,m+d-y,4,!0),this.v.setTripleAt(p-g+y,m+d,p-g+y,m+d,p-g+v,m+d,5,!0),this.v.setTripleAt(p+g-y,m+d,p+g-v,m+d,p+g-y,m+d,6,!0),this.v.setTripleAt(p+g,m+d-y,p+g,m+d-y,p+g,m+d-v,7,!0)):(this.v.setTripleAt(p-g,m-d,p-g+v,m-d,p-g,m-d,1,!0),this.v.setTripleAt(p-g,m+d,p-g,m+d-v,p-g,m+d,2,!0),this.v.setTripleAt(p+g,m+d,p+g-v,m+d,p+g,m+d,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:r},extendPrototype([DynamicPropertyContainer],f),f}(),u={getShapeProp:function(f,p,m){var g;return m===3||m===4?g=(m===3?p.pt:p.ks).k.length?new o(f,p,m):new s(f,p,m):m===5?g=new c(f,p):m===6?g=new l(f,p):m===7&&(g=new h(f,p)),g.k&&f.addDynamicProperty(g),g},getConstructorFunction:function(){return s},getKeyframedConstructorFunction:function(){return o}};return u}(),Matrix=function(){var t=Math.cos,e=Math.sin,r=Math.tan,i=Math.round;function n(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function s(D){if(D===0)return this;var C=t(D),$=e(D);return this._t(C,-$,0,0,$,C,0,0,0,0,1,0,0,0,0,1)}function a(D){if(D===0)return this;var C=t(D),$=e(D);return this._t(1,0,0,0,0,C,-$,0,0,$,C,0,0,0,0,1)}function o(D){if(D===0)return this;var C=t(D),$=e(D);return this._t(C,0,$,0,0,1,0,0,-$,0,C,0,0,0,0,1)}function l(D){if(D===0)return this;var C=t(D),$=e(D);return this._t(C,-$,0,0,$,C,0,0,0,0,1,0,0,0,0,1)}function h(D,C){return this._t(1,C,D,1,0,0)}function c(D,C){return this.shear(r(D),r(C))}function u(D,C){var $=t(C),R=e(C);return this._t($,R,0,0,-R,$,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(D),1,0,0,0,0,1,0,0,0,0,1)._t($,-R,0,0,R,$,0,0,0,0,1,0,0,0,0,1)}function f(D,C,$){return $||$===0||($=1),D===1&&C===1&&$===1?this:this._t(D,0,0,0,0,C,0,0,0,0,$,0,0,0,0,1)}function p(D,C,$,R,q,U,Y,G,re,se,ie,Q,xe,ue,Ie,Se){return this.props[0]=D,this.props[1]=C,this.props[2]=$,this.props[3]=R,this.props[4]=q,this.props[5]=U,this.props[6]=Y,this.props[7]=G,this.props[8]=re,this.props[9]=se,this.props[10]=ie,this.props[11]=Q,this.props[12]=xe,this.props[13]=ue,this.props[14]=Ie,this.props[15]=Se,this}function m(D,C,$){return $=$||0,D!==0||C!==0||$!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,D,C,$,1):this}function g(D,C,$,R,q,U,Y,G,re,se,ie,Q,xe,ue,Ie,Se){var W=this.props;if(D===1&&C===0&&$===0&&R===0&&q===0&&U===1&&Y===0&&G===0&&re===0&&se===0&&ie===1&&Q===0)return W[12]=W[12]*D+W[15]*xe,W[13]=W[13]*U+W[15]*ue,W[14]=W[14]*ie+W[15]*Ie,W[15]*=Se,this._identityCalculated=!1,this;var qe=W[0],kt=W[1],Et=W[2],st=W[3],dt=W[4],at=W[5],Ve=W[6],ft=W[7],mt=W[8],Ft=W[9],lr=W[10],Ot=W[11],Sr=W[12],jn=W[13],Gn=W[14],Hn=W[15];return W[0]=qe*D+kt*q+Et*re+st*xe,W[1]=qe*C+kt*U+Et*se+st*ue,W[2]=qe*$+kt*Y+Et*ie+st*Ie,W[3]=qe*R+kt*G+Et*Q+st*Se,W[4]=dt*D+at*q+Ve*re+ft*xe,W[5]=dt*C+at*U+Ve*se+ft*ue,W[6]=dt*$+at*Y+Ve*ie+ft*Ie,W[7]=dt*R+at*G+Ve*Q+ft*Se,W[8]=mt*D+Ft*q+lr*re+Ot*xe,W[9]=mt*C+Ft*U+lr*se+Ot*ue,W[10]=mt*$+Ft*Y+lr*ie+Ot*Ie,W[11]=mt*R+Ft*G+lr*Q+Ot*Se,W[12]=Sr*D+jn*q+Gn*re+Hn*xe,W[13]=Sr*C+jn*U+Gn*se+Hn*ue,W[14]=Sr*$+jn*Y+Gn*ie+Hn*Ie,W[15]=Sr*R+jn*G+Gn*Q+Hn*Se,this._identityCalculated=!1,this}function d(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function y(D){for(var C=0;C<16;){if(D.props[C]!==this.props[C])return!1;C+=1}return!0}function v(D){var C;for(C=0;C<16;C+=1)D.props[C]=this.props[C];return D}function b(D){var C;for(C=0;C<16;C+=1)this.props[C]=D[C]}function _(D,C,$){return{x:D*this.props[0]+C*this.props[4]+$*this.props[8]+this.props[12],y:D*this.props[1]+C*this.props[5]+$*this.props[9]+this.props[13],z:D*this.props[2]+C*this.props[6]+$*this.props[10]+this.props[14]}}function x(D,C,$){return D*this.props[0]+C*this.props[4]+$*this.props[8]+this.props[12]}function T(D,C,$){return D*this.props[1]+C*this.props[5]+$*this.props[9]+this.props[13]}function S(D,C,$){return D*this.props[2]+C*this.props[6]+$*this.props[10]+this.props[14]}function w(){var D=this.props[0]*this.props[5]-this.props[1]*this.props[4],C=this.props[5]/D,$=-this.props[1]/D,R=-this.props[4]/D,q=this.props[0]/D,U=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/D,Y=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/D,G=new Matrix;return G.props[0]=C,G.props[1]=$,G.props[4]=R,G.props[5]=q,G.props[12]=U,G.props[13]=Y,G}function M(D){return this.getInverseMatrix().applyToPointArray(D[0],D[1],D[2]||0)}function k(D){var C,$=D.length,R=[];for(C=0;C<$;C+=1)R[C]=M(D[C]);return R}function I(D,C,$){var R=createTypedArray("float32",6);if(this.isIdentity())R[0]=D[0],R[1]=D[1],R[2]=C[0],R[3]=C[1],R[4]=$[0],R[5]=$[1];else{var q=this.props[0],U=this.props[1],Y=this.props[4],G=this.props[5],re=this.props[12],se=this.props[13];R[0]=D[0]*q+D[1]*Y+re,R[1]=D[0]*U+D[1]*G+se,R[2]=C[0]*q+C[1]*Y+re,R[3]=C[0]*U+C[1]*G+se,R[4]=$[0]*q+$[1]*Y+re,R[5]=$[0]*U+$[1]*G+se}return R}function P(D,C,$){return this.isIdentity()?[D,C,$]:[D*this.props[0]+C*this.props[4]+$*this.props[8]+this.props[12],D*this.props[1]+C*this.props[5]+$*this.props[9]+this.props[13],D*this.props[2]+C*this.props[6]+$*this.props[10]+this.props[14]]}function A(D,C){if(this.isIdentity())return D+","+C;var $=this.props;return Math.round(100*(D*$[0]+C*$[4]+$[12]))/100+","+Math.round(100*(D*$[1]+C*$[5]+$[13]))/100}function E(){for(var D=0,C=this.props,$="matrix3d(";D<16;)$+=i(1e4*C[D])/1e4,$+=D===15?")":",",D+=1;return $}function F(D){return D<1e-6&&D>0||D>-1e-6&&D<0?i(1e4*D)/1e4:D}function O(){var D=this.props;return"matrix("+F(D[0])+","+F(D[1])+","+F(D[4])+","+F(D[5])+","+F(D[12])+","+F(D[13])+")"}return function(){this.reset=n,this.rotate=s,this.rotateX=a,this.rotateY=o,this.rotateZ=l,this.skew=c,this.skewFromAxis=u,this.shear=h,this.scale=f,this.setTransform=p,this.translate=m,this.transform=g,this.applyToPoint=_,this.applyToX=x,this.applyToY=T,this.applyToZ=S,this.applyToPointArray=P,this.applyToTriplePoints=I,this.applyToPointStringified=A,this.toCSS=E,this.to2dCSS=O,this.clone=v,this.cloneFromProps=b,this.equals=y,this.inversePoints=k,this.inversePoint=M,this.getInverseMatrix=w,this._t=this.transform,this.isIdentity=d,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return(_typeof$3=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)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(t){setLocationHref(t)}function searchAnimations(){standalone===!0?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return standalone===!0&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if(typeof t=="string")switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return typeof navigator<"u"}function installPlugin(t,e){t==="expressions"&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r<e.length;r+=1){var i=e[r].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.10.0";var queryString="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)!=="object"&&(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=function(){var t={},e={};return t.registerModifier=function(r,i){e[r]||(e[r]=i)},t.getModifier=function(r,i,n){return new e[r](i,n)},t}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,r,i,n){var s=[];e<=1?s.push({s:t,e}):t>=1?s.push({s:t-1,e:e-1}):(s.push({s:t,e:1}),s.push({s:0,e:e-1}));var a,o,l=[],h=s.length;for(a=0;a<h;a+=1){var c,u;(o=s[a]).e*n<i||o.s*n>i+r||(c=o.s*n<=i?0:(o.s*n-i)/r,u=o.e*n>=i+r?1:(o.e*n-i)/r,l.push([c,u]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e<r;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,r,i,n;if(this._mdf||t){var s=this.o.v%360/360;if(s<0&&(s+=1),(e=this.s.v>1?1+s:this.s.v<0?0+s:this.s.v+s)>(r=this.e.v>1?1+s:this.e.v<0?0+s:this.e.v+s)){var a=e;e=r,r=a}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,l,h,c,u,f=this.shapes.length,p=0;if(r===e)for(n=0;n<f;n+=1)this.shapes[n].localShapeCollection.releaseShapes(),this.shapes[n].shape._mdf=!0,this.shapes[n].shape.paths=this.shapes[n].localShapeCollection,this._mdf&&(this.shapes[n].pathsData.length=0);else if(r===1&&e===0||r===0&&e===1){if(this._mdf)for(n=0;n<f;n+=1)this.shapes[n].pathsData.length=0,this.shapes[n].shape._mdf=!0}else{var m,g,d=[];for(n=0;n<f;n+=1)if((m=this.shapes[n]).shape._mdf||this._mdf||t||this.m===2){if(l=(i=m.shape.paths)._length,u=0,!m.shape._mdf&&m.pathsData.length)u=m.totalShapeLength;else{for(h=this.releasePathsData(m.pathsData),o=0;o<l;o+=1)c=bez.getSegmentsLength(i.shapes[o]),h.push(c),u+=c.totalLength;m.totalShapeLength=u,m.pathsData=h}p+=u,m.shape._mdf=!0}else m.shape.paths=m.localShapeCollection;var y,v=e,b=r,_=0;for(n=f-1;n>=0;n-=1)if((m=this.shapes[n]).shape._mdf){for((g=m.localShapeCollection).releaseShapes(),this.m===2&&f>1?(y=this.calculateShapeEdges(e,r,m.totalShapeLength,_,p),_+=m.totalShapeLength):y=[[v,b]],l=y.length,o=0;o<l;o+=1){v=y[o][0],b=y[o][1],d.length=0,b<=1?d.push({s:m.totalShapeLength*v,e:m.totalShapeLength*b}):v>=1?d.push({s:m.totalShapeLength*(v-1),e:m.totalShapeLength*(b-1)}):(d.push({s:m.totalShapeLength*v,e:m.totalShapeLength}),d.push({s:0,e:m.totalShapeLength*(b-1)}));var x=this.addShapes(m,d[0]);if(d[0].s!==d[0].e){if(d.length>1)if(m.shape.paths.shapes[m.shape.paths._length-1].c){var T=x.pop();this.addPaths(x,g),x=this.addShapes(m,d[1],T)}else this.addPaths(x,g),x=this.addShapes(m,d[1]);this.addPaths(x,g)}}m.shape.paths=g}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e.addShape(t[r])},TrimModifier.prototype.addSegment=function(t,e,r,i,n,s,a){n.setXYAt(e[0],e[1],"o",s),n.setXYAt(r[0],r[1],"i",s+1),a&&n.setXYAt(t[0],t[1],"v",s),n.setXYAt(i[0],i[1],"v",s+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,r,i){e.setXYAt(t[1],t[5],"o",r),e.setXYAt(t[2],t[6],"i",r+1),i&&e.setXYAt(t[0],t[4],"v",r),e.setXYAt(t[3],t[7],"v",r+1)},TrimModifier.prototype.addShapes=function(t,e,r){var i,n,s,a,o,l,h,c,u=t.pathsData,f=t.shape.paths.shapes,p=t.shape.paths._length,m=0,g=[],d=!0;for(r?(o=r._length,c=r._length):(r=shapePool.newElement(),o=0,c=0),g.push(r),i=0;i<p;i+=1){for(l=u[i].lengths,r.c=f[i].c,s=f[i].c?l.length:l.length+1,n=1;n<s;n+=1)if(m+(a=l[n-1]).addedLength<e.s)m+=a.addedLength,r.c=!1;else{if(m>e.e){r.c=!1;break}e.s<=m&&e.e>=m+a.addedLength?(this.addSegment(f[i].v[n-1],f[i].o[n-1],f[i].i[n],f[i].v[n],r,o,d),d=!1):(h=bez.getNewSegment(f[i].v[n-1],f[i].v[n],f[i].o[n-1],f[i].i[n],(e.s-m)/a.addedLength,(e.e-m)/a.addedLength,l[n-1]),this.addSegmentFromArray(h,r,o,d),d=!1,r.c=!1),m+=a.addedLength,o+=1}if(f[i].c&&l.length){if(a=l[n-1],m<=e.e){var y=l[n-1].addedLength;e.s<=m&&e.e>=m+y?(this.addSegment(f[i].v[n-1],f[i].o[n-1],f[i].i[0],f[i].v[0],r,o,d),d=!1):(h=bez.getNewSegment(f[i].v[n-1],f[i].v[0],f[i].o[n-1],f[i].i[0],(e.s-m)/y,(e.e-m)/y,l[n-1]),this.addSegmentFromArray(h,r,o,d),d=!1,r.c=!1)}else r.c=!1;m+=a.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[c][0],r.v[c][1],"i",c),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),m>e.e)break;i<p-1&&(r=shapePool.newElement(),d=!0,g.push(r),o=0)}return g},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var r=e/100,i=[0,0],n=t._length,s=0;for(s=0;s<n;s+=1)i[0]+=t.v[s][0],i[1]+=t.v[s][1];i[0]/=n,i[1]/=n;var a,o,l,h,c,u,f=shapePool.newElement();for(f.c=t.c,s=0;s<n;s+=1)a=t.v[s][0]+(i[0]-t.v[s][0])*r,o=t.v[s][1]+(i[1]-t.v[s][1])*r,l=t.o[s][0]+(i[0]-t.o[s][0])*-r,h=t.o[s][1]+(i[1]-t.o[s][1])*-r,c=t.i[s][0]+(i[0]-t.i[s][0])*-r,u=t.i[s][1]+(i[1]-t.i[s][1])*-r,f.setTripleAt(a,o,l,h,c,u,s);return f},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,r,i,n,s,a,o=this.shapes.length,l=this.amount.v;if(l!==0)for(r=0;r<o;r+=1){if(a=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,n=s.shape.paths._length,i=0;i<n;i+=1)a.addShape(this.processPath(e[i],l));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var t=[0,0];function e(r,i,n){if(this.elem=r,this.frameId=-1,this.propType="transform",this.data=i,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(n||r),i.p&&i.p.s?(this.px=PropertyFactory.getProp(r,i.p.x,0,0,this),this.py=PropertyFactory.getProp(r,i.p.y,0,0,this),i.p.z&&(this.pz=PropertyFactory.getProp(r,i.p.z,0,0,this))):this.p=PropertyFactory.getProp(r,i.p||{k:[0,0,0]},1,0,this),i.rx){if(this.rx=PropertyFactory.getProp(r,i.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(r,i.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(r,i.rz,0,degToRads,this),i.or.k[0].ti){var s,a=i.or.k.length;for(s=0;s<a;s+=1)i.or.k[s].to=null,i.or.k[s].ti=null}this.or=PropertyFactory.getProp(r,i.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(r,i.r||{k:0},0,degToRads,this);i.sk&&(this.sk=PropertyFactory.getProp(r,i.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(r,i.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(r,i.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(r,i.s||{k:[100,100,100]},1,.01,this),i.o?this.o=PropertyFactory.getProp(r,i.o,0,.01,r):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(r){var i=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||i,this.a&&r.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&r.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&r.skewFromAxis(-this.sk.v,this.sa.v),this.r?r.rotate(-this.r.v):r.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?r.translate(this.px.v,this.py.v,-this.pz.v):r.translate(this.px.v,this.py.v,0):r.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(r){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||r){var i;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var n,s;if(i=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(n=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/i,0),s=this.p.getValueAtTime(this.p.keyframes[0].t/i,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(n=this.p.pv,s=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){n=[],s=[];var a=this.px,o=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(n[0]=a.getValueAtTime((a.keyframes[0].t+.01)/i,0),n[1]=o.getValueAtTime((o.keyframes[0].t+.01)/i,0),s[0]=a.getValueAtTime(a.keyframes[0].t/i,0),s[1]=o.getValueAtTime(o.keyframes[0].t/i,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(n[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/i,0),n[1]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/i,0),s[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/i,0),s[1]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/i,0)):(n=[a.pv,o.pv],s[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/i,a.offsetTime),s[1]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/i,o.offsetTime))}else n=s=t;this.v.rotate(-Math.atan2(n[1]-s[1],n[0]-s[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(r){this._addDynamicProperty(r),this.elem.addDynamicProperty(r),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(r,i,n){return new e(r,i,n)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(t,e){return 1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e))}function floatZero(t){return Math.abs(t)<=1e-5}function lerp(t,e,r){return t*(1-r)+e*r}function lerpPoint(t,e,r){return[lerp(t[0],e[0],r),lerp(t[1],e[1],r)]}function quadRoots(t,e,r){if(t===0)return[];var i=e*e-4*t*r;if(i<0)return[];var n=-e/(2*t);if(i===0)return[n];var s=Math.sqrt(i)/(2*t);return[n-s,n+s]}function polynomialCoefficients(t,e,r,i){return[3*e-t-3*r+i,3*t-6*e+3*r,-3*t+3*e,t]}function singlePoint(t){return new PolynomialBezier(t,t,t,t,!1)}function PolynomialBezier(t,e,r,i,n){n&&pointEqual(t,e)&&(e=lerpPoint(t,i,1/3)),n&&pointEqual(r,i)&&(r=lerpPoint(t,i,2/3));var s=polynomialCoefficients(t[0],e[0],r[0],i[0]),a=polynomialCoefficients(t[1],e[1],r[1],i[1]);this.a=[s[0],a[0]],this.b=[s[1],a[1]],this.c=[s[2],a[2]],this.d=[s[3],a[3]],this.points=[t,e,r,i]}function extrema(t,e){var r=t.points[0][e],i=t.points[t.points.length-1][e];if(r>i){var n=i;i=r,r=n}for(var s=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),a=0;a<s.length;a+=1)if(s[a]>0&&s[a]<1){var o=t.point(s[a])[e];o<r?r=o:o>i&&(i=o)}return{min:r,max:i}}function intersectData(t,e,r){var i=t.boundingBox();return{cx:i.cx,cy:i.cy,width:i.width,height:i.height,bez:t,t:(e+r)/2,t1:e,t2:r}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return 2*Math.abs(t.cx-e.cx)<t.width+e.width&&2*Math.abs(t.cy-e.cy)<t.height+e.height}function intersectsImpl(t,e,r,i,n,s){if(boxIntersect(t,e))if(r>=s||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i)n.push([t.t,e.t]);else{var a=splitData(t),o=splitData(e);intersectsImpl(a[0],o[0],r+1,i,n,s),intersectsImpl(a[0],o[1],r+1,i,n,s),intersectsImpl(a[1],o[0],r+1,i,n,s),intersectsImpl(a[1],o[1],r+1,i,n,s)}}function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,r,i){var n=[t[0],t[1],1],s=[e[0],e[1],1],a=[r[0],r[1],1],o=[i[0],i[1],1],l=crossProduct(crossProduct(n,s),crossProduct(a,o));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(t,e,r){return[t[0]+Math.cos(e)*r,t[1]-Math.sin(e)*r]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}function setPoint(t,e,r,i,n,s,a){var o=r-Math.PI/2,l=r+Math.PI/2,h=e[0]+Math.cos(r)*i*n,c=e[1]-Math.sin(r)*i*n;t.setTripleAt(h,c,h+Math.cos(o)*s,c-Math.sin(o)*s,h+Math.cos(l)*a,c-Math.sin(l)*a,t.length())}function getPerpendicularVector(t,e){var r=[e[0]-t[0],e[1]-t[1]],i=.5*-Math.PI;return[Math.cos(i)*r[0]-Math.sin(i)*r[1],Math.sin(i)*r[0]+Math.cos(i)*r[1]]}function getProjectingAngle(t,e){var r=e===0?t.length()-1:e-1,i=(e+1)%t.length(),n=getPerpendicularVector(t.v[r],t.v[i]);return Math.atan2(0,1)-Math.atan2(n[1],n[0])}function zigZagCorner(t,e,r,i,n,s,a){var o=getProjectingAngle(e,r),l=e.v[r%e._length],h=e.v[r===0?e._length-1:r-1],c=e.v[(r+1)%e._length],u=s===2?Math.sqrt(Math.pow(l[0]-h[0],2)+Math.pow(l[1]-h[1],2)):0,f=s===2?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0;setPoint(t,e.v[r%e._length],o,a,i,f/(2*(n+1)),u/(2*(n+1)),s)}function zigZagSegment(t,e,r,i,n,s){for(var a=0;a<i;a+=1){var o=(a+1)/(i+1),l=n===2?Math.sqrt(Math.pow(e.points[3][0]-e.points[0][0],2)+Math.pow(e.points[3][1]-e.points[0][1],2)):0,h=e.normalAngle(o);setPoint(t,e.point(o),h,s,r,l/(2*(i+1)),l/(2*(i+1)),n),s=-s}return s}function linearOffset(t,e,r){var i=Math.atan2(e[0]-t[0],e[1]-t[1]);return[polarOffset(t,i,r),polarOffset(e,i,r)]}function offsetSegment(t,e){var r,i,n,s,a,o,l;r=(l=linearOffset(t.points[0],t.points[1],e))[0],i=l[1],n=(l=linearOffset(t.points[1],t.points[2],e))[0],s=l[1],a=(l=linearOffset(t.points[2],t.points[3],e))[0],o=l[1];var h=lineIntersection(r,i,n,s);h===null&&(h=i);var c=lineIntersection(a,o,n,s);return c===null&&(c=a),new PolynomialBezier(r,h,c,o)}function joinLines(t,e,r,i,n){var s=e.points[3],a=r.points[0];if(i===3||pointEqual(s,a))return s;if(i===2){var o=-e.tangentAngle(1),l=-r.tangentAngle(0)+Math.PI,h=lineIntersection(s,polarOffset(s,o+Math.PI/2,100),a,polarOffset(a,o+Math.PI/2,100)),c=h?pointDistance(h,s):pointDistance(s,a)/2,u=polarOffset(s,o,2*c*roundCorner);return t.setXYAt(u[0],u[1],"o",t.length()-1),u=polarOffset(a,l,2*c*roundCorner),t.setTripleAt(a[0],a[1],a[0],a[1],u[0],u[1],t.length()),a}var f=lineIntersection(pointEqual(s,e.points[2])?e.points[0]:e.points[2],s,a,pointEqual(a,r.points[1])?r.points[3]:r.points[1]);return f&&pointDistance(f,s)<n?(t.setTripleAt(f[0],f[1],f[0],f[1],f[0],f[1],t.length()),f):s}function getIntersection(t,e){var r=t.intersections(e);return r.length&&floatEqual(r[0][0],1)&&r.shift(),r.length?r[0]:null}function pruneSegmentIntersection(t,e){var r=t.slice(),i=e.slice(),n=getIntersection(t[t.length-1],e[0]);return n&&(r[t.length-1]=t[t.length-1].split(n[0])[0],i[0]=e[0].split(n[1])[1]),t.length>1&&e.length>1&&(n=getIntersection(t[0],e[e.length-1]))?[[t[0].split(n[0])[0]],[e[e.length-1].split(n[1])[1]]]:[r,i]}function pruneIntersections(t){for(var e,r=1;r<t.length;r+=1)e=pruneSegmentIntersection(t[r-1],t[r]),t[r-1]=e[0],t[r]=e[1];return t.length>1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var r,i,n,s,a=t.inflectionPoints();if(a.length===0)return[offsetSegment(t,e)];if(a.length===1||floatEqual(a[1],1))return r=(n=t.split(a[0]))[0],i=n[1],[offsetSegment(r,e),offsetSegment(i,e)];r=(n=t.split(a[0]))[0];var o=(a[1]-a[0])/(1-a[0]);return s=(n=n[1].split(o))[0],i=n[1],[offsetSegment(r,e),offsetSegment(s,e),offsetSegment(i,e)]}function OffsetPathModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",n=e.length,s=0;s<n;s+=1)switch(e[s].toLowerCase()){case"italic":i="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:i,weight:t.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,r,i,n,s){var a=s?-1:1,o=i.s.v[0]+(1-i.s.v[0])*(1-n),l=i.s.v[1]+(1-i.s.v[1])*(1-n);t.translate(i.p.v[0]*a*n,i.p.v[1]*a*n,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*a*n),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),r.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),r.scale(s?1/o:o,s?1/l:l),r.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,r,i){for(this.elem=t,this.arr=e,this.pos=r,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[r]);r>0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e]._processed=!1,t[e].ty==="gr"&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]._render=e,t[r].ty==="gr"&&this.changeGroupRender(t[r].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,r,i,n,s,a=!1;if(this._mdf||t){var o,l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var h={it:this.cloneElements(this._elements),ty:"gr"};h.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,h),this._groups.splice(0,0,h),this._currentCopies+=1}this.elem.reloadShapes(),a=!0}for(s=0,i=0;i<=this._groups.length-1;i+=1){if(o=s<l,this._groups[i]._render=o,this.changeGroupRender(this._groups[i].it,o),!o){var c=this.elemsData[i].it,u=c[c.length-1];u.transform.op.v!==0?(u.transform.op._mdf=!0,u.transform.op.v=0):u.transform.op._mdf=!1}s+=1}this._currentCopies=l;var f=this.o.v,p=f%1,m=f>0?Math.floor(f):Math.ceil(f),g=this.pMatrix.props,d=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(f>0){for(;_<m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),_+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),_+=p)}else if(f<0){for(;_>m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),_-=p)}for(i=this.data.m===1?0:this._currentCopies-1,n=this.data.m===1?1:-1,s=this._currentCopies;s;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),_!==0){for((i!==0&&n===1||i!==this._currentCopies-1&&n===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];_+=1,s-=1,i+=n}}else for(s=this._currentCopies,i=0,n=1;s;)r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,s-=1,i+=n;return a},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var r,i=shapePool.newElement();i.c=t.c;var n,s,a,o,l,h,c,u,f,p,m,g,d=t._length,y=0;for(r=0;r<d;r+=1)n=t.v[r],a=t.o[r],s=t.i[r],n[0]===a[0]&&n[1]===a[1]&&n[0]===s[0]&&n[1]===s[1]?r!==0&&r!==d-1||t.c?(o=r===0?t.v[d-1]:t.v[r-1],h=(l=Math.sqrt(Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2)))?Math.min(l/2,e)/l:0,c=m=n[0]+(o[0]-n[0])*h,u=g=n[1]-(n[1]-o[1])*h,f=c-(c-n[0])*roundCorner,p=u-(u-n[1])*roundCorner,i.setTripleAt(c,u,f,p,m,g,y),y+=1,o=r===d-1?t.v[0]:t.v[r+1],h=(l=Math.sqrt(Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2)))?Math.min(l/2,e)/l:0,c=f=n[0]+(o[0]-n[0])*h,u=p=n[1]+(o[1]-n[1])*h,m=c-(c-n[0])*roundCorner,g=u-(u-n[1])*roundCorner,i.setTripleAt(c,u,f,p,m,g,y),y+=1):(i.setTripleAt(n[0],n[1],a[0],a[1],s[0],s[1],y),y+=1):(i.setTripleAt(t.v[r][0],t.v[r][1],t.o[r][0],t.o[r][1],t.i[r][0],t.i[r][1],y),y+=1);return i},RoundCornersModifier.prototype.processShapes=function(t){var e,r,i,n,s,a,o=this.shapes.length,l=this.rd.v;if(l!==0)for(r=0;r<o;r+=1){if(a=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,n=s.shape.paths._length,i=0;i<n;i+=1)a.addShape(this.processPath(e[i],l));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(t){return[((this.a[0]*t+this.b[0])*t+this.c[0])*t+this.d[0],((this.a[1]*t+this.b[1])*t+this.c[1])*t+this.d[1]]},PolynomialBezier.prototype.derivative=function(t){return[(3*t*this.a[0]+2*this.b[0])*t+this.c[0],(3*t*this.a[1]+2*this.b[1])*t+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(t){var e=this.derivative(t);return Math.atan2(e[1],e[0])},PolynomialBezier.prototype.normalAngle=function(t){var e=this.derivative(t);return Math.atan2(e[0],e[1])},PolynomialBezier.prototype.inflectionPoints=function(){var t=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(t))return[];var e=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/t,r=e*e-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/t;if(r<0)return[];var i=Math.sqrt(r);return floatZero(i)?i>0&&i<1?[e]:[]:[e-i,e+i].filter(function(n){return n>0&&n<1})},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),r=lerpPoint(this.points[1],this.points[2],t),i=lerpPoint(this.points[2],this.points[3],t),n=lerpPoint(e,r,t),s=lerpPoint(r,i,t),a=lerpPoint(n,s,t);return[new PolynomialBezier(this.points[0],e,n,a,!0),new PolynomialBezier(a,s,i,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}},PolynomialBezier.prototype.intersections=function(t,e,r){e===void 0&&(e=2),r===void 0&&(r=7);var i=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,i,r),i},PolynomialBezier.shapeSegment=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[r],t.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[r],t.i[r],t.o[e],t.v[e],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0},ZigZagModifier.prototype.processPath=function(t,e,r,i){var n=t._length,s=shapePool.newElement();if(s.c=t.c,t.c||(n-=1),n===0)return s;var a=-1,o=PolynomialBezier.shapeSegment(t,0);zigZagCorner(s,t,0,e,r,i,a);for(var l=0;l<n;l+=1)a=zigZagSegment(s,o,e,r,i,-a),o=l!==n-1||t.c?PolynomialBezier.shapeSegment(t,(l+1)%n):null,zigZagCorner(s,t,l+1,e,r,i,a);return s},ZigZagModifier.prototype.processShapes=function(t){var e,r,i,n,s,a,o=this.shapes.length,l=this.amplitude.v,h=Math.max(0,Math.round(this.frequency.v)),c=this.pointsType.v;if(l!==0)for(r=0;r<o;r+=1){if(a=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,n=s.shape.paths._length,i=0;i<n;i+=1)a.addShape(this.processPath(e[i],l,h,c));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this.miterLimit=PropertyFactory.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(t,e,r,i){var n=shapePool.newElement();n.c=t.c;var s,a,o,l=t.length();t.c||(l-=1);var h=[];for(s=0;s<l;s+=1)o=PolynomialBezier.shapeSegment(t,s),h.push(offsetSegmentSplit(o,e));if(!t.c)for(s=l-1;s>=0;s-=1)o=PolynomialBezier.shapeSegmentInverted(t,s),h.push(offsetSegmentSplit(o,e));h=pruneIntersections(h);var c=null,u=null;for(s=0;s<h.length;s+=1){var f=h[s];for(u&&(c=joinLines(n,u,f[0],r,i)),u=f[f.length-1],a=0;a<f.length;a+=1)o=f[a],c&&pointEqual(o.points[0],c)?n.setXYAt(o.points[1][0],o.points[1][1],"o",n.length()-1):n.setTripleAt(o.points[0][0],o.points[0][1],o.points[1][0],o.points[1][1],o.points[0][0],o.points[0][1],n.length()),n.setTripleAt(o.points[3][0],o.points[3][1],o.points[3][0],o.points[3][1],o.points[2][0],o.points[2][1],n.length()),c=o.points[3]}return h.length&&joinLines(n,u,h[0][0],r,i),n},OffsetPathModifier.prototype.processShapes=function(t){var e,r,i,n,s,a,o=this.shapes.length,l=this.amount.v,h=this.miterLimit.v,c=this.lineJoin;if(l!==0)for(r=0;r<o;r+=1){if(a=(s=this.shapes[r]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,n=s.shape.paths._length,i=0;i<n;i+=1)a.addShape(this.processPath(e[i],l,c,h));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],i=[65039,8205];function n(o,l){var h=createTag("span");h.setAttribute("aria-hidden",!0),h.style.fontFamily=l;var c=createTag("span");c.innerText="giItT1WQy@!-/#",h.style.position="absolute",h.style.left="-10000px",h.style.top="-10000px",h.style.fontSize="300px",h.style.fontVariant="normal",h.style.fontStyle="normal",h.style.fontWeight="normal",h.style.letterSpacing="0",h.appendChild(c),document.body.appendChild(h);var u=c.offsetWidth;return c.style.fontFamily=function(f){var p,m=f.split(","),g=m.length,d=[];for(p=0;p<g;p+=1)m[p]!=="sans-serif"&&m[p]!=="monospace"&&d.push(m[p]);return d.join(",")}(o)+", "+l,{node:c,w:u,parent:h}}function s(o,l){var h,c=document.body&&l?"svg":"canvas",u=getFontProperties(o);if(c==="svg"){var f=createNS("text");f.style.fontSize="100px",f.setAttribute("font-family",o.fFamily),f.setAttribute("font-style",u.style),f.setAttribute("font-weight",u.weight),f.textContent="1",o.fClass?(f.style.fontFamily="inherit",f.setAttribute("class",o.fClass)):f.style.fontFamily=o.fFamily,l.appendChild(f),h=f}else{var p=new OffscreenCanvas(500,500).getContext("2d");p.font=u.style+" "+u.weight+" 100px "+o.fFamily,h=p}return{measureText:function(m){return c==="svg"?(h.textContent=m,h.getComputedTextLength()):h.measureText(m).width}}}var a=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return a.isModifier=function(o,l){var h=o.toString(16)+l.toString(16);return r.indexOf(h)!==-1},a.isZeroWidthJoiner=function(o,l){return l?o===i[0]&&l===i[1]:o===i[1]},a.isCombinedCharacter=function(o){return e.indexOf(o)!==-1},a.prototype={addChars:function(o){if(o){var l;this.chars||(this.chars=[]);var h,c,u=o.length,f=this.chars.length;for(l=0;l<u;l+=1){for(h=0,c=!1;h<f;)this.chars[h].style===o[l].style&&this.chars[h].fFamily===o[l].fFamily&&this.chars[h].ch===o[l].ch&&(c=!0),h+=1;c||(this.chars.push(o[l]),f+=1)}}},addFonts:function(o,l){if(o){if(this.chars)return this.isLoaded=!0,void(this.fonts=o.list);if(!document.body)return this.isLoaded=!0,o.list.forEach(function(b){b.helper=s(b),b.cache={}}),void(this.fonts=o.list);var h,c=o.list,u=c.length,f=u;for(h=0;h<u;h+=1){var p,m,g=!0;if(c[h].loaded=!1,c[h].monoCase=n(c[h].fFamily,"monospace"),c[h].sansCase=n(c[h].fFamily,"sans-serif"),c[h].fPath){if(c[h].fOrigin==="p"||c[h].origin===3){if((p=document.querySelectorAll('style[f-forigin="p"][f-family="'+c[h].fFamily+'"], style[f-origin="3"][f-family="'+c[h].fFamily+'"]')).length>0&&(g=!1),g){var d=createTag("style");d.setAttribute("f-forigin",c[h].fOrigin),d.setAttribute("f-origin",c[h].origin),d.setAttribute("f-family",c[h].fFamily),d.type="text/css",d.innerText="@font-face {font-family: "+c[h].fFamily+"; font-style: normal; src: url('"+c[h].fPath+"');}",l.appendChild(d)}}else if(c[h].fOrigin==="g"||c[h].origin===1){for(p=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),m=0;m<p.length;m+=1)p[m].href.indexOf(c[h].fPath)!==-1&&(g=!1);if(g){var y=createTag("link");y.setAttribute("f-forigin",c[h].fOrigin),y.setAttribute("f-origin",c[h].origin),y.type="text/css",y.rel="stylesheet",y.href=c[h].fPath,document.body.appendChild(y)}}else if(c[h].fOrigin==="t"||c[h].origin===2){for(p=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),m=0;m<p.length;m+=1)c[h].fPath===p[m].src&&(g=!1);if(g){var v=createTag("link");v.setAttribute("f-forigin",c[h].fOrigin),v.setAttribute("f-origin",c[h].origin),v.setAttribute("rel","stylesheet"),v.setAttribute("href",c[h].fPath),l.appendChild(v)}}}else c[h].loaded=!0,f-=1;c[h].helper=s(c[h],l),c[h].cache={},this.fonts.push(c[h])}f===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(o,l,h){for(var c=0,u=this.chars.length;c<u;){if(this.chars[c].ch===o&&this.chars[c].style===l&&this.chars[c].fFamily===h)return this.chars[c];c+=1}return(typeof o=="string"&&o.charCodeAt(0)!==13||!o)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",o,l,h)),t},getFontByName:function(o){for(var l=0,h=this.fonts.length;l<h;){if(this.fonts[l].fName===o)return this.fonts[l];l+=1}return this.fonts[0]},measureText:function(o,l,h){var c=this.getFontByName(l),u=o.charCodeAt(0);if(!c.cache[u+1]){var f=c.helper;if(o===" "){var p=f.measureText("|"+o+"|"),m=f.measureText("||");c.cache[u+1]=(p-m)/100}else c.cache[u+1]=f.measureText(o)/100}return c.cache[u+1]*h},checkLoadedFonts:function(){var o,l,h,c=this.fonts.length,u=c;for(o=0;o<c;o+=1)this.fonts[o].loaded?u-=1:this.fonts[o].fOrigin==="n"||this.fonts[o].origin===0?this.fonts[o].loaded=!0:(l=this.fonts[o].monoCase.node,h=this.fonts[o].monoCase.w,l.offsetWidth!==h?(u-=1,this.fonts[o].loaded=!0):(l=this.fonts[o].sansCase.node,h=this.fonts[o].sansCase.w,l.offsetWidth!==h&&(u-=1,this.fonts[o].loaded=!0)),this.fonts[o].loaded&&(this.fonts[o].sansCase.parent.parentNode.removeChild(this.fonts[o].sansCase.parent),this.fonts[o].monoCase.parent.parentNode.removeChild(this.fonts[o].monoCase.parent)));u!==0&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},a}();function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){this.renderableComponents.indexOf(t)===-1&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){this.renderableComponents.indexOf(t)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return blendModeEnums[t]||""}),blendModeEnums;function SliderEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function AngleEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function ColorEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function PointEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,1,0,r)}function LayerIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function MaskIndexEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function CheckboxEffect(t,e,r){this.p=PropertyFactory.getProp(e,t.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var r,i=t.ef||[];this.effectElements=[];var n,s=i.length;for(r=0;r<s;r+=1)n=new GroupEffect(i[r],e),this.effectElements.push(n)}function GroupEffect(t,e){this.init(t,e)}function BaseElement(){}function FrameElement(){}function FootageElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,r)}function AudioElement(t,e,r){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,r),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,t.au&&t.au.lv?t.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}function TransformElement(){}function MaskElement(t,e,r){this.data=t,this.element=e,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,n,s=this.globalData.defs,a=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(a),this.solidPath="";var o,l,h,c,u,f,p=this.masksProperties,m=0,g=[],d=createElementID(),y="clipPath",v="clip-path";for(i=0;i<a;i+=1)if((p[i].mode!=="a"&&p[i].mode!=="n"||p[i].inv||p[i].o.k!==100||p[i].o.x)&&(y="mask",v="mask"),p[i].mode!=="s"&&p[i].mode!=="i"||m!==0?h=null:((h=createNS("rect")).setAttribute("fill","#ffffff"),h.setAttribute("width",this.element.comp.data.w||0),h.setAttribute("height",this.element.comp.data.h||0),g.push(h)),n=createNS("path"),p[i].mode==="n")this.viewData[i]={op:PropertyFactory.getProp(this.element,p[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,p[i],3),elem:n,lastPath:""},s.appendChild(n);else{var b;if(m+=1,n.setAttribute("fill",p[i].mode==="s"?"#000000":"#ffffff"),n.setAttribute("clip-rule","nonzero"),p[i].x.k!==0?(y="mask",v="mask",f=PropertyFactory.getProp(this.element,p[i].x,0,null,this.element),b=createElementID(),(c=createNS("filter")).setAttribute("id",b),(u=createNS("feMorphology")).setAttribute("operator","erode"),u.setAttribute("in","SourceGraphic"),u.setAttribute("radius","0"),c.appendChild(u),s.appendChild(c),n.setAttribute("stroke",p[i].mode==="s"?"#000000":"#ffffff")):(u=null,f=null),this.storedData[i]={elem:n,x:f,expan:u,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},p[i].mode==="i"){l=g.length;var _=createNS("g");for(o=0;o<l;o+=1)_.appendChild(g[o]);var x=createNS("mask");x.setAttribute("mask-type","alpha"),x.setAttribute("id",d+"_"+m),x.appendChild(n),s.appendChild(x),_.setAttribute("mask","url("+getLocationHref()+"#"+d+"_"+m+")"),g.length=0,g.push(_)}else g.push(n);p[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:n,lastPath:"",op:PropertyFactory.getProp(this.element,p[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,p[i],3),invRect:h},this.viewData[i].prop.k||this.drawPath(p[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(y),a=g.length,i=0;i<a;i+=1)this.maskElement.appendChild(g[i]);m>0&&(this.maskElement.setAttribute("id",d),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+d+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var r;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,n=this.data.ef.length,s=this.data.ef;for(r=0;r<n;r+=1){switch(i=null,s[r].ty){case 0:i=new SliderEffect(s[r],e,this);break;case 1:i=new AngleEffect(s[r],e,this);break;case 2:i=new ColorEffect(s[r],e,this);break;case 3:i=new PointEffect(s[r],e,this);break;case 4:case 7:i=new CheckboxEffect(s[r],e,this);break;case 10:i=new LayerIndexEffect(s[r],e,this);break;case 11:i=new MaskIndexEffect(s[r],e,this);break;case 5:i=new EffectsManager(s[r],e,this);break;default:i=new NoValueEffect(s[r],e,this)}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if(this.data.masksProperties[t].mode!=="n"&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},initExpressions:function(){var t=getExpressionInterfaces();if(t){var e=t("layer"),r=t("effects"),i=t("shape"),n=t("text"),s=t("comp");this.layerInterface=e(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var a=r.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(a),this.data.ty===0||this.data.xt?this.compInterface=s(this):this.data.ty===4?(this.layerInterface.shapeInterface=i(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=n(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,r){this.globalData=e,this.comp=r,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var r,i=this.dynamicProperties.length;for(r=0;r<i;r+=1)(e||this._isParent&&this.dynamicProperties[r].propType==="transform")&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&this.dynamicProperties.push(t)}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var t=getExpressionInterfaces();if(t){var e=t("footage");this.layerInterface=e(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}this._volume=this.lv.v[0];var r=this._volume*this._volumeMultiplier;this._previousVolume!==r&&(this._previousVolume=r,this.audio.volume(r))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var r,i=t.length,n=this.layers.length;for(e=0;e<i;e+=1)for(r=0;r<n;){if(this.layers[r].id===t[e].id){this.layers[r]=t[e];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,r){for(var i=this.elements,n=this.layers,s=0,a=n.length;s<a;)n[s].ind==e&&(i[s]&&i[s]!==!0?(r.push(i[s]),i[s].setAsParent(),n[s].parent!==void 0?this.buildElementParenting(t,n[s].parent,r):t.setHierarchy(r)):(this.buildItem(s),this.addPendingElement(t))),s+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,r=t.length;for(e=0;e<r;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.getElementByPath=function(t){var e,r=t.shift();if(typeof r=="number")e=this.elements[r];else{var i,n=this.elements.length;for(i=0;i<n;i+=1)if(this.elements[i].data.nm===r){e=this.elements[i];break}}return t.length===0?e:e.getElementByPath(t)},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,r=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<i;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),r=0;r<i;r+=1)t=this.hierarchy[r].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var r,i=!0,n=this.comp;i;)n.finalTransform?(n.data.hasMask&&e.splice(0,0,n.finalTransform),n=n.comp):i=!1;var s,a=e.length;for(r=0;r<a;r+=1)s=e[r].mat.applyToPointArray(0,0,0),t=[t[0]-s[0],t[1]-s[1],0];return t},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,r=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),this.masksProperties[e].mode!=="n"&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var n=this.storedData[e].expan;this.storedData[e].x.v<0?(this.storedData[e].lastOperator!=="erode"&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[e].filterId+")")),n.setAttribute("radius",-this.storedData[e].x.v)):(this.storedData[e].lastOperator!=="dilate"&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,r){var i,n,s=" M"+e.v[0][0]+","+e.v[0][1];for(n=e._length,i=1;i<n;i+=1)s+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&n>1&&(s+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==s){var a="";r.elem&&(e.c&&(a=t.inv?this.solidPath+s:s),r.elem.setAttribute("d",a)),r.lastPath=s}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};return t.createFilter=function(e,r){var i=createNS("filter");return i.setAttribute("id",e),r!==!0&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%")),i},t.createAlphaToLuminanceFilter=function(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),e},t}(),featureSupport=function(){var t={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),t}(),registeredEffects={},idPrefix="filter_result_";function SVGEffects(t){var e,r,i="SourceGraphic",n=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),o=0;for(this.filters=[],e=0;e<n;e+=1){r=null;var l=t.data.ef[e].ty;registeredEffects[l]&&(r=new registeredEffects[l].effect(a,t.effectsManager.effectElements[e],t,idPrefix+o,i),i=idPrefix+o,registeredEffects[l].countsAsEffect&&(o+=1)),r&&this.filters.push(r)}o&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function registerEffect(t,e,r){registeredEffects[t]={effect:e,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(t){var e,r=this.filters.length;for(e=0;e<r;e+=1)this.filters[e].renderFrame(t)},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t=null;if(this.data.td){this.matteMasks={};var e=createNS("symbol");e.setAttribute("id",this.layerId);var r=createNS("g");r.appendChild(this.layerElement),e.appendChild(r),t=r,this.globalData.defs.appendChild(e)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var i=createNS("clipPath"),n=createNS("path");n.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var s=createElementID();if(i.setAttribute("id",s),i.appendChild(n),this.globalData.defs.appendChild(i),this.checkMasks()){var a=createNS("g");a.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),a.appendChild(this.layerElement),this.transformedElement=a,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},getMatte:function(t){if(!this.matteMasks[t]){var e,r,i,n,s=this.layerId+"_"+t;if(t===1||t===3){var a=createNS("mask");a.setAttribute("id",s),a.setAttribute("mask-type",t===3?"luminance":"alpha"),(i=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),a.appendChild(i),this.globalData.defs.appendChild(a),featureSupport.maskType||t!==1||(a.setAttribute("mask-type","luminance"),e=createElementID(),r=filtersFactory.createFilter(e),this.globalData.defs.appendChild(r),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(n=createNS("g")).appendChild(i),a.appendChild(n),n.setAttribute("filter","url("+getLocationHref()+"#"+e+")"))}else if(t===2){var o=createNS("mask");o.setAttribute("id",s),o.setAttribute("mask-type","alpha");var l=createNS("g");o.appendChild(l),e=createElementID(),r=filtersFactory.createFilter(e);var h=createNS("feComponentTransfer");h.setAttribute("in","SourceGraphic"),r.appendChild(h);var c=createNS("feFuncA");c.setAttribute("type","table"),c.setAttribute("tableValues","1.0 0.0"),h.appendChild(c),this.globalData.defs.appendChild(r);var u=createNS("rect");u.setAttribute("width",this.comp.data.w),u.setAttribute("height",this.comp.data.h),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("fill","#ffffff"),u.setAttribute("opacity","0"),l.setAttribute("filter","url("+getLocationHref()+"#"+e+")"),l.appendChild(u),(i=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(i),featureSupport.maskType||(o.setAttribute("mask-type","luminance"),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),n=createNS("g"),l.appendChild(u),n.appendChild(this.layerElement),l.appendChild(n)),this.globalData.defs.appendChild(o)}this.matteMasks[t]=s}return this.matteMasks[t]},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(t){var e,r=this.shapeModifiers.length;for(e=0;e<r;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r<i;){if(e[r].elem===t)return e[r].pos;r+=1}return 0},addProcessedElement:function(t,e){for(var r=this.processedElements,i=r.length;i;)if(r[i-=1].elem===t)return void(r[i].pos=e);r.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,r){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=r,this.lvl=e,this._isAnimated=!!r.k;for(var i=0,n=t.length;i<n;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=t.hd===!0,this.pElem=createNS("path"),this.msElem=null}function DashProperty(t,e,r,i){var n;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var s,a=e.length||0;for(n=0;n<a;n+=1)s=PropertyFactory.getProp(t,e[n].v,0,0,this),this.k=s.k||this.k,this.dataProps[n]={n:e[n].n,p:s};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=r}function SVGNoStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(t,e,r){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,r)}function SVGGradientStrokeStyleData(t,e,r){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,r){this.transform={mProps:t,op:e,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,r=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),e=0;e<r;e+=1)this.dataProps[e].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(t,e){for(var r=0,i=this.o.length/2;r<i;){if(Math.abs(t[4*r]-t[4*e+2*r])>.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,r,i,n=4*this.data.p;for(e=0;e<n;e+=1)r=e%4==0?100:255,i=Math.round(this.prop.v[e]*r),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(n=this.prop.v.length,e=4*this.data.p;e<n;e+=1)r=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,r){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,e),this.setGradientOpacity(e,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var r=createElementID(),i=createNS(e.t===1?"linearGradient":"radialGradient");i.setAttribute("id",r),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var n,s,a,o=[];for(a=4*e.g.p,s=0;s<a;s+=4)n=createNS("stop"),i.appendChild(n),o.push(n);t.setAttribute(e.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=i,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var r,i,n,s=createNS("mask"),a=createNS("path");s.appendChild(a);var o=createElementID(),l=createElementID();s.setAttribute("id",l);var h=createNS(t.t===1?"linearGradient":"radialGradient");h.setAttribute("id",o),h.setAttribute("spreadMethod","pad"),h.setAttribute("gradientUnits","userSpaceOnUse"),n=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var c=this.stops;for(i=4*t.g.p;i<n;i+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),h.appendChild(r),c.push(r);a.setAttribute(t.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),t.ty==="gs"&&(a.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),a.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),t.lj===1&&a.setAttribute("stroke-miterlimit",t.ml)),this.of=h,this.ms=s,this.ost=c,this.maskId=l,e.msElem=a}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(t,e,r,i){if(e===0)return"";var n,s=t.o,a=t.i,o=t.v,l=" M"+i.applyToPointStringified(o[0][0],o[0][1]);for(n=1;n<e;n+=1)l+=" C"+i.applyToPointStringified(s[n-1][0],s[n-1][1])+" "+i.applyToPointStringified(a[n][0],a[n][1])+" "+i.applyToPointStringified(o[n][0],o[n][1]);return r&&e&&(l+=" C"+i.applyToPointStringified(s[n-1][0],s[n-1][1])+" "+i.applyToPointStringified(a[0][0],a[0][1])+" "+i.applyToPointStringified(o[0][0],o[0][1]),l+="z"),l},SVGElementsRenderer=function(){var t=new Matrix,e=new Matrix;function r(h,c,u){(u||c.transform.op._mdf)&&c.transform.container.setAttribute("opacity",c.transform.op.v),(u||c.transform.mProps._mdf)&&c.transform.container.setAttribute("transform",c.transform.mProps.v.to2dCSS())}function i(){}function n(h,c,u){var f,p,m,g,d,y,v,b,_,x,T,S=c.styles.length,w=c.lvl;for(y=0;y<S;y+=1){if(g=c.sh._mdf||u,c.styles[y].lvl<w){for(b=e.reset(),x=w-c.styles[y].lvl,T=c.transformers.length-1;!g&&x>0;)g=c.transformers[T].mProps._mdf||g,x-=1,T-=1;if(g)for(x=w-c.styles[y].lvl,T=c.transformers.length-1;x>0;)_=c.transformers[T].mProps.v.props,b.transform(_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[14],_[15]),x-=1,T-=1}else b=t;if(p=(v=c.sh.paths)._length,g){for(m="",f=0;f<p;f+=1)(d=v.shapes[f])&&d._length&&(m+=buildShapeString(d,d._length,d.c,b));c.caches[y]=m}else m=c.caches[y];c.styles[y].d+=h.hd===!0?"":m,c.styles[y]._mdf=g||c.styles[y]._mdf}}function s(h,c,u){var f=c.style;(c.c._mdf||u)&&f.pElem.setAttribute("fill","rgb("+bmFloor(c.c.v[0])+","+bmFloor(c.c.v[1])+","+bmFloor(c.c.v[2])+")"),(c.o._mdf||u)&&f.pElem.setAttribute("fill-opacity",c.o.v)}function a(h,c,u){o(h,c,u),l(h,c,u)}function o(h,c,u){var f,p,m,g,d,y=c.gf,v=c.g._hasOpacity,b=c.s.v,_=c.e.v;if(c.o._mdf||u){var x=h.ty==="gf"?"fill-opacity":"stroke-opacity";c.style.pElem.setAttribute(x,c.o.v)}if(c.s._mdf||u){var T=h.t===1?"x1":"cx",S=T==="x1"?"y1":"cy";y.setAttribute(T,b[0]),y.setAttribute(S,b[1]),v&&!c.g._collapsable&&(c.of.setAttribute(T,b[0]),c.of.setAttribute(S,b[1]))}if(c.g._cmdf||u){f=c.cst;var w=c.g.c;for(m=f.length,p=0;p<m;p+=1)(g=f[p]).setAttribute("offset",w[4*p]+"%"),g.setAttribute("stop-color","rgb("+w[4*p+1]+","+w[4*p+2]+","+w[4*p+3]+")")}if(v&&(c.g._omdf||u)){var M=c.g.o;for(m=(f=c.g._collapsable?c.cst:c.ost).length,p=0;p<m;p+=1)g=f[p],c.g._collapsable||g.setAttribute("offset",M[2*p]+"%"),g.setAttribute("stop-opacity",M[2*p+1])}if(h.t===1)(c.e._mdf||u)&&(y.setAttribute("x2",_[0]),y.setAttribute("y2",_[1]),v&&!c.g._collapsable&&(c.of.setAttribute("x2",_[0]),c.of.setAttribute("y2",_[1])));else if((c.s._mdf||c.e._mdf||u)&&(d=Math.sqrt(Math.pow(b[0]-_[0],2)+Math.pow(b[1]-_[1],2)),y.setAttribute("r",d),v&&!c.g._collapsable&&c.of.setAttribute("r",d)),c.e._mdf||c.h._mdf||c.a._mdf||u){d||(d=Math.sqrt(Math.pow(b[0]-_[0],2)+Math.pow(b[1]-_[1],2)));var k=Math.atan2(_[1]-b[1],_[0]-b[0]),I=c.h.v;I>=1?I=.99:I<=-1&&(I=-.99);var P=d*I,A=Math.cos(k+c.a.v)*P+b[0],E=Math.sin(k+c.a.v)*P+b[1];y.setAttribute("fx",A),y.setAttribute("fy",E),v&&!c.g._collapsable&&(c.of.setAttribute("fx",A),c.of.setAttribute("fy",E))}}function l(h,c,u){var f=c.style,p=c.d;p&&(p._mdf||u)&&p.dashStr&&(f.pElem.setAttribute("stroke-dasharray",p.dashStr),f.pElem.setAttribute("stroke-dashoffset",p.dashoffset[0])),c.c&&(c.c._mdf||u)&&f.pElem.setAttribute("stroke","rgb("+bmFloor(c.c.v[0])+","+bmFloor(c.c.v[1])+","+bmFloor(c.c.v[2])+")"),(c.o._mdf||u)&&f.pElem.setAttribute("stroke-opacity",c.o.v),(c.w._mdf||u)&&(f.pElem.setAttribute("stroke-width",c.w.v),f.msElem&&f.msElem.setAttribute("stroke-width",c.w.v))}return{createRenderFunction:function(h){switch(h.ty){case"fl":return s;case"gf":return o;case"gs":return a;case"st":return l;case"sh":case"el":case"rc":case"sr":return n;case"tr":return r;case"no":return i;default:return null}}}}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function LetterProps(t,e,r,i,n,s){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=n,this.p=s,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,n=this.shapes.length,s=this.stylesList.length,a=[],o=!1;for(r=0;r<s;r+=1){for(i=this.stylesList[r],o=!1,a.length=0,t=0;t<n;t+=1)(e=this.shapes[t]).styles.indexOf(i)!==-1&&(a.push(e),o=e._isAnimated||o);a.length>1&&o&&this.setShapesAsAnimated(a)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var r,i=new SVGStyleData(t,e),n=i.pElem;return t.ty==="st"?r=new SVGStrokeStyleData(this,t,i):t.ty==="fl"?r=new SVGFillStyleData(this,t,i):t.ty==="gf"||t.ty==="gs"?(r=new(t.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),n.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))):t.ty==="no"&&(r=new SVGNoStyleData(this,t,i)),t.ty!=="st"&&t.ty!=="gs"||(n.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),n.setAttribute("fill-opacity","0"),t.lj===1&&n.setAttribute("stroke-miterlimit",t.ml)),t.r===2&&n.setAttribute("fill-rule","evenodd"),t.ln&&n.setAttribute("id",t.ln),t.cl&&n.setAttribute("class",t.cl),t.bm&&(n.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var r=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(r,r.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,r){var i=4;t.ty==="rc"?i=5:t.ty==="el"?i=6:t.ty==="sr"&&(i=7);var n=new SVGShapeData(e,r,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(n),this.addShapeToModifiers(n),this.addToAnimatedContents(t,n),n},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var r=0,i=this.animatedContents.length;r<i;){if(this.animatedContents[r].element===e)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,r=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||r.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,r,i,n,s,a){var o,l,h,c,u,f,p=[].concat(s),m=t.length-1,g=[],d=[];for(o=m;o>=0;o-=1){if((f=this.searchProcessedElement(t[o]))?e[o]=r[f-1]:t[o]._render=a,t[o].ty==="fl"||t[o].ty==="st"||t[o].ty==="gf"||t[o].ty==="gs"||t[o].ty==="no")f?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],n),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),g.push(e[o].style);else if(t[o].ty==="gr"){if(f)for(h=e[o].it.length,l=0;l<h;l+=1)e[o].prevViewData[l]=e[o].it[l];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,n+1,p,a),t[o]._render&&e[o].gr.parentNode!==i&&i.appendChild(e[o].gr)}else t[o].ty==="tr"?(f||(e[o]=this.createTransformElement(t[o],i)),c=e[o].transform,p.push(c)):t[o].ty==="sh"||t[o].ty==="rc"||t[o].ty==="el"||t[o].ty==="sr"?(f||(e[o]=this.createShapeElement(t[o],p,n)),this.setElementStyles(e[o])):t[o].ty==="tm"||t[o].ty==="rd"||t[o].ty==="ms"||t[o].ty==="pb"||t[o].ty==="zz"||t[o].ty==="op"?(f?(u=e[o]).closed=!1:((u=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=u,this.shapeModifiers.push(u)),d.push(u)):t[o].ty==="rp"&&(f?(u=e[o]).closed=!0:(u=ShapeModifiers.getModifier(t[o].ty),e[o]=u,u.init(this,t,o,e),this.shapeModifiers.push(u),a=!1),d.push(u));this.addProcessedElement(t[o],o+1)}for(m=g.length,o=0;o<m;o+=1)g[o].closed=!0;for(m=d.length,o=0;o<m;o+=1)d[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,r=this.animatedContents.length;for(t=0;t<r;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&e.data!==!0&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(t,e,r,i,n,s){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var a=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,a=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,a=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,a=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,a=!0),this.m!==n&&(this.m=n,this._mdf.m=!0,a=!0),!s.length||this.p[0]===s[0]&&this.p[1]===s[1]&&this.p[4]===s[4]&&this.p[5]===s[5]&&this.p[12]===s[12]&&this.p[13]===s[13]||(this.p=s,this._mdf.p=!0,a=!0),a},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var n=this.effectsSequence.length,s=t||this.data.d.k[this.keysIndex].s;for(i=0;i<n;i+=1)s=r!==this.keysIndex?this.effectsSequence[i](s,s.t):this.effectsSequence[i](this.currentData,s.t);e!==s&&this.setCurrentData(s),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,r=0,i=t.length;r<=i-1&&!(r===i-1||t[r+1].t>e);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],n=0,s=t.length,a=!1;n<s;)e=t.charCodeAt(n),FontManager.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(n):e>=55296&&e<=56319?(r=t.charCodeAt(n+1))>=56320&&r<=57343?(a||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(n,2),a=!1):i.push(t.substr(n,2)),n+=1):i.push(t.charAt(n)):e>56319?(r=t.charCodeAt(n+1),FontManager.isZeroWidthJoiner(e,r)?(a=!0,i[i.length-1]+=t.substr(n,2),n+=1):i.push(t.charAt(n))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(n),a=!0):i.push(t.charAt(n)),n+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,n,s,a,o,l=this.elem.globalData.fontManager,h=this.data,c=[],u=0,f=h.m.g,p=0,m=0,g=0,d=[],y=0,v=0,b=l.getFontByName(t.f),_=0,x=getFontProperties(b);t.fWeight=x.weight,t.fStyle=x.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var T,S=t.tr/1e3*t.finalSize;if(t.sz)for(var w,M,k=!0,I=t.sz[0],P=t.sz[1];k;){w=0,y=0,r=(M=this.buildFinalText(t.t)).length,S=t.tr/1e3*t.finalSize;var A=-1;for(e=0;e<r;e+=1)T=M[e].charCodeAt(0),i=!1,M[e]===" "?A=e:T!==13&&T!==3||(y=0,i=!0,w+=t.finalLineHeight||1.2*t.finalSize),l.chars?(o=l.getCharData(M[e],b.fStyle,b.fFamily),_=i?0:o.w*t.finalSize/100):_=l.measureText(M[e],t.f,t.finalSize),y+_>I&&M[e]!==" "?(A===-1?r+=1:e=A,w+=t.finalLineHeight||1.2*t.finalSize,M.splice(e,A===e?1:0,"\r"),A=-1,y=0):(y+=_,y+=S);w+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&P<w?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=M,r=t.finalText.length,k=!1)}y=-S,_=0;var E,F=0;for(e=0;e<r;e+=1)if(i=!1,(T=(E=t.finalText[e]).charCodeAt(0))===13||T===3?(F=0,d.push(y),v=y>v?y:v,y=-2*S,n="",i=!0,g+=1):n=E,l.chars?(o=l.getCharData(E,b.fStyle,l.getFontByName(t.f).fFamily),_=i?0:o.w*t.finalSize/100):_=l.measureText(n,t.f,t.finalSize),E===" "?F+=_+S:(y+=_+S+F,F=0),c.push({l:_,an:_,add:p,n:i,anIndexes:[],val:n,line:g,animatorJustifyOffset:0}),f==2){if(p+=_,n===""||n===" "||e===r-1){for(n!==""&&n!==" "||(p-=_);m<=e;)c[m].an=p,c[m].ind=u,c[m].extra=_,m+=1;u+=1,p=0}}else if(f==3){if(p+=_,n===""||e===r-1){for(n===""&&(p-=_);m<=e;)c[m].an=p,c[m].ind=u,c[m].extra=_,m+=1;p=0,u+=1}}else c[u].ind=u,c[u].extra=0,u+=1;if(t.l=c,v=y>v?y:v,d.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=d;var O,D,C,$,R=h.a;a=R.length;var q=[];for(s=0;s<a;s+=1){for((O=R[s]).a.sc&&(t.strokeColorAnim=!0),O.a.sw&&(t.strokeWidthAnim=!0),(O.a.fc||O.a.fh||O.a.fs||O.a.fb)&&(t.fillColorAnim=!0),$=0,C=O.s.b,e=0;e<r;e+=1)(D=c[e]).anIndexes[s]=$,(C==1&&D.val!==""||C==2&&D.val!==""&&D.val!==" "||C==3&&(D.n||D.val==" "||e==r-1)||C==4&&(D.n||e==r-1))&&(O.s.rn===1&&q.push($),$+=1);h.a[s].s.totalChars=$;var U,Y=-1;if(O.s.rn===1)for(e=0;e<r;e+=1)Y!=(D=c[e]).anIndexes[s]&&(Y=D.anIndexes[s],U=q.splice(Math.floor(Math.random()*q.length),1)[0]),D.anIndexes[s]=U}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=e===void 0?this.keysIndex:e;var r=this.copyData({},this.data.d.k[e].s);r=this.copyData(r,t),this.data.d.k[e].s=r,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var t=Math.max,e=Math.min,r=Math.floor;function i(n,s){this._currentTextLength=-1,this.k=!1,this.data=s,this.elem=n,this.comp=n.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(n),this.s=PropertyFactory.getProp(n,s.s||{k:0},0,0,this),this.e="e"in s?PropertyFactory.getProp(n,s.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(n,s.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(n,s.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(n,s.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(n,s.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(n,s.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(n){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var s=0,a=0,o=1,l=1;this.ne.v>0?s=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?o=1-this.xe.v/100:l=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(s,a,o,l).get,c=0,u=this.finalS,f=this.finalE,p=this.data.sh;if(p===2)c=h(c=f===u?n>=f?1:0:t(0,e(.5/(f-u)+(n-u)/(f-u),1)));else if(p===3)c=h(c=f===u?n>=f?0:1:1-t(0,e(.5/(f-u)+(n-u)/(f-u),1)));else if(p===4)f===u?c=0:(c=t(0,e(.5/(f-u)+(n-u)/(f-u),1)))<.5?c*=2:c=1-2*(c-.5),c=h(c);else if(p===5){if(f===u)c=0;else{var m=f-u,g=-m/2+(n=e(t(0,n+.5-u),f-u)),d=m/2;c=Math.sqrt(1-g*g/(d*d))}c=h(c)}else p===6?(f===u?c=0:(n=e(t(0,n+.5-u),f-u),c=(1+Math.cos(Math.PI+2*Math.PI*n/(f-u)))/2),c=h(c)):(n>=r(u)&&(c=t(0,e(n-u<0?e(f,1)-(u-n):f-n,1))),c=h(c));if(this.sm.v!==100){var y=.01*this.sm.v;y===0&&(y=1e-8);var v=.5-.5*y;c<v?c=0:(c=(c-v)/y)>1&&(c=1)}return c*this.a.v},getValue:function(n){this.iterateDynamicProperties(),this._mdf=n||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,n&&this.data.r===2&&(this.e.v=this._currentTextLength);var s=this.data.r===2?1:100/this.data.totalChars,a=this.o.v/s,o=this.s.v/s+a,l=this.e.v/s+a;if(o>l){var h=o;o=l,l=h}this.finalS=o,this.finalE=l}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(n,s,a){return new i(n,s,a)}}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},n=PropertyFactory.getProp,s=e.a;this.a={r:s.r?n(t,s.r,0,degToRads,r):i,rx:s.rx?n(t,s.rx,0,degToRads,r):i,ry:s.ry?n(t,s.ry,0,degToRads,r):i,sk:s.sk?n(t,s.sk,0,degToRads,r):i,sa:s.sa?n(t,s.sa,0,degToRads,r):i,s:s.s?n(t,s.s,1,.01,r):i,a:s.a?n(t,s.a,1,0,r):i,o:s.o?n(t,s.o,0,.01,r):i,p:s.p?n(t,s.p,1,0,r):i,sw:s.sw?n(t,s.sw,0,0,r):i,sc:s.sc?n(t,s.sc,1,0,r):i,fc:s.fc?n(t,s.fc,1,0,r):i,fh:s.fh?n(t,s.fh,0,0,r):i,fs:s.fs?n(t,s.fs,0,.01,r):i,fb:s.fb?n(t,s.fb,0,.01,r):i,t:s.t?n(t,s.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<r;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,i,n,s,a,o,l,h,c,u,f,p,m,g,d,y,v,b,_,x=this._moreOptions.alignment.v,T=this._animatorsData,S=this._textData,w=this.mHelper,M=this._renderType,k=this.renderedLetters.length,I=t.l;if(this._hasMaskedPath){if(_=this._pathData.m,!this._pathData.n||this._pathData._mdf){var P,A=_.v;for(this._pathData.r.v&&(A=A.reverse()),a={tLength:0,segments:[]},s=A._length-1,y=0,n=0;n<s;n+=1)P=bez.buildBezierData(A.v[n],A.v[n+1],[A.o[n][0]-A.v[n][0],A.o[n][1]-A.v[n][1]],[A.i[n+1][0]-A.v[n+1][0],A.i[n+1][1]-A.v[n+1][1]]),a.tLength+=P.segmentLength,a.segments.push(P),y+=P.segmentLength;n=s,_.v.c&&(P=bez.buildBezierData(A.v[n],A.v[0],[A.o[n][0]-A.v[n][0],A.o[n][1]-A.v[n][1]],[A.i[0][0]-A.v[0][0],A.i[0][1]-A.v[0][1]]),a.tLength+=P.segmentLength,a.segments.push(P),y+=P.segmentLength),this._pathData.pi=a}if(a=this._pathData.pi,o=this._pathData.f.v,f=0,u=1,h=0,c=!0,g=a.segments,o<0&&_.v.c)for(a.tLength<Math.abs(o)&&(o=-Math.abs(o)%a.tLength),u=(m=g[f=g.length-1].points).length-1;o<0;)o+=m[u].partialLength,(u-=1)<0&&(u=(m=g[f-=1].points).length-1);p=(m=g[f].points)[u-1],d=(l=m[u]).partialLength}s=I.length,r=0,i=0;var E,F,O,D,C,$=1.2*t.finalSize*.714,R=!0;O=T.length;var q,U,Y,G,re,se,ie,Q,xe,ue,Ie,Se,W=-1,qe=o,kt=f,Et=u,st=-1,dt="",at=this.defaultPropsArray;if(t.j===2||t.j===1){var Ve=0,ft=0,mt=t.j===2?-.5:-1,Ft=0,lr=!0;for(n=0;n<s;n+=1)if(I[n].n){for(Ve&&(Ve+=ft);Ft<n;)I[Ft].animatorJustifyOffset=Ve,Ft+=1;Ve=0,lr=!0}else{for(F=0;F<O;F+=1)(E=T[F].a).t.propType&&(lr&&t.j===2&&(ft+=E.t.v*mt),(C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars)).length?Ve+=E.t.v*C[0]*mt:Ve+=E.t.v*C*mt);lr=!1}for(Ve&&(Ve+=ft);Ft<n;)I[Ft].animatorJustifyOffset=Ve,Ft+=1}for(n=0;n<s;n+=1){if(w.reset(),G=1,I[n].n)r=0,i+=t.yOffset,i+=R?1:0,o=qe,R=!1,this._hasMaskedPath&&(u=Et,p=(m=g[f=kt].points)[u-1],d=(l=m[u]).partialLength,h=0),dt="",Ie="",xe="",Se="",at=this.defaultPropsArray;else{if(this._hasMaskedPath){if(st!==I[n].line){switch(t.j){case 1:o+=y-t.lineWidths[I[n].line];break;case 2:o+=(y-t.lineWidths[I[n].line])/2}st=I[n].line}W!==I[n].ind&&(I[W]&&(o+=I[W].extra),o+=I[n].an/2,W=I[n].ind),o+=x[0]*I[n].an*.005;var Ot=0;for(F=0;F<O;F+=1)(E=T[F].a).p.propType&&((C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars)).length?Ot+=E.p.v[0]*C[0]:Ot+=E.p.v[0]*C),E.a.propType&&((C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars)).length?Ot+=E.a.v[0]*C[0]:Ot+=E.a.v[0]*C);for(c=!0,this._pathData.a.v&&(o=.5*I[0].an+(y-this._pathData.f.v-.5*I[0].an-.5*I[I.length-1].an)*W/(s-1),o+=this._pathData.f.v);c;)h+d>=o+Ot||!m?(v=(o+Ot-h)/l.partialLength,U=p.point[0]+(l.point[0]-p.point[0])*v,Y=p.point[1]+(l.point[1]-p.point[1])*v,w.translate(-x[0]*I[n].an*.005,-x[1]*$*.01),c=!1):m&&(h+=l.partialLength,(u+=1)>=m.length&&(u=0,g[f+=1]?m=g[f].points:_.v.c?(u=0,m=g[f=0].points):(h-=l.partialLength,m=null)),m&&(p=l,d=(l=m[u]).partialLength));q=I[n].an/2-I[n].add,w.translate(-q,0,0)}else q=I[n].an/2-I[n].add,w.translate(-q,0,0),w.translate(-x[0]*I[n].an*.005,-x[1]*$*.01,0);for(F=0;F<O;F+=1)(E=T[F].a).t.propType&&(C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars),r===0&&t.j===0||(this._hasMaskedPath?C.length?o+=E.t.v*C[0]:o+=E.t.v*C:C.length?r+=E.t.v*C[0]:r+=E.t.v*C));for(t.strokeWidthAnim&&(se=t.sw||0),t.strokeColorAnim&&(re=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(ie=[t.fc[0],t.fc[1],t.fc[2]]),F=0;F<O;F+=1)(E=T[F].a).a.propType&&((C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars)).length?w.translate(-E.a.v[0]*C[0],-E.a.v[1]*C[1],E.a.v[2]*C[2]):w.translate(-E.a.v[0]*C,-E.a.v[1]*C,E.a.v[2]*C));for(F=0;F<O;F+=1)(E=T[F].a).s.propType&&((C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars)).length?w.scale(1+(E.s.v[0]-1)*C[0],1+(E.s.v[1]-1)*C[1],1):w.scale(1+(E.s.v[0]-1)*C,1+(E.s.v[1]-1)*C,1));for(F=0;F<O;F+=1){if(E=T[F].a,C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars),E.sk.propType&&(C.length?w.skewFromAxis(-E.sk.v*C[0],E.sa.v*C[1]):w.skewFromAxis(-E.sk.v*C,E.sa.v*C)),E.r.propType&&(C.length?w.rotateZ(-E.r.v*C[2]):w.rotateZ(-E.r.v*C)),E.ry.propType&&(C.length?w.rotateY(E.ry.v*C[1]):w.rotateY(E.ry.v*C)),E.rx.propType&&(C.length?w.rotateX(E.rx.v*C[0]):w.rotateX(E.rx.v*C)),E.o.propType&&(C.length?G+=(E.o.v*C[0]-G)*C[0]:G+=(E.o.v*C-G)*C),t.strokeWidthAnim&&E.sw.propType&&(C.length?se+=E.sw.v*C[0]:se+=E.sw.v*C),t.strokeColorAnim&&E.sc.propType)for(Q=0;Q<3;Q+=1)C.length?re[Q]+=(E.sc.v[Q]-re[Q])*C[0]:re[Q]+=(E.sc.v[Q]-re[Q])*C;if(t.fillColorAnim&&t.fc){if(E.fc.propType)for(Q=0;Q<3;Q+=1)C.length?ie[Q]+=(E.fc.v[Q]-ie[Q])*C[0]:ie[Q]+=(E.fc.v[Q]-ie[Q])*C;E.fh.propType&&(ie=C.length?addHueToRGB(ie,E.fh.v*C[0]):addHueToRGB(ie,E.fh.v*C)),E.fs.propType&&(ie=C.length?addSaturationToRGB(ie,E.fs.v*C[0]):addSaturationToRGB(ie,E.fs.v*C)),E.fb.propType&&(ie=C.length?addBrightnessToRGB(ie,E.fb.v*C[0]):addBrightnessToRGB(ie,E.fb.v*C))}}for(F=0;F<O;F+=1)(E=T[F].a).p.propType&&(C=T[F].s.getMult(I[n].anIndexes[F],S.a[F].s.totalChars),this._hasMaskedPath?C.length?w.translate(0,E.p.v[1]*C[0],-E.p.v[2]*C[1]):w.translate(0,E.p.v[1]*C,-E.p.v[2]*C):C.length?w.translate(E.p.v[0]*C[0],E.p.v[1]*C[1],-E.p.v[2]*C[2]):w.translate(E.p.v[0]*C,E.p.v[1]*C,-E.p.v[2]*C));if(t.strokeWidthAnim&&(xe=se<0?0:se),t.strokeColorAnim&&(ue="rgb("+Math.round(255*re[0])+","+Math.round(255*re[1])+","+Math.round(255*re[2])+")"),t.fillColorAnim&&t.fc&&(Ie="rgb("+Math.round(255*ie[0])+","+Math.round(255*ie[1])+","+Math.round(255*ie[2])+")"),this._hasMaskedPath){if(w.translate(0,-t.ls),w.translate(0,x[1]*$*.01+i,0),this._pathData.p.v){b=(l.point[1]-p.point[1])/(l.point[0]-p.point[0]);var Sr=180*Math.atan(b)/Math.PI;l.point[0]<p.point[0]&&(Sr+=180),w.rotate(-Sr*Math.PI/180)}w.translate(U,Y,0),o-=x[0]*I[n].an*.005,I[n+1]&&W!==I[n+1].ind&&(o+=I[n].an/2,o+=.001*t.tr*t.finalSize)}else{switch(w.translate(r,i,0),t.ps&&w.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:w.translate(I[n].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[I[n].line]),0,0);break;case 2:w.translate(I[n].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[I[n].line])/2,0,0)}w.translate(0,-t.ls),w.translate(q,0,0),w.translate(x[0]*I[n].an*.005,x[1]*$*.01,0),r+=I[n].l+.001*t.tr*t.finalSize}M==="html"?dt=w.toCSS():M==="svg"?dt=w.to2dCSS():at=[w.props[0],w.props[1],w.props[2],w.props[3],w.props[4],w.props[5],w.props[6],w.props[7],w.props[8],w.props[9],w.props[10],w.props[11],w.props[12],w.props[13],w.props[14],w.props[15]],Se=G}k<=n?(D=new LetterProps(Se,xe,ue,Ie,dt,at),this.renderedLetters.push(D),k+=1,this.lettersChangedFlag=!0):(D=this.renderedLetters[n],this.lettersChangedFlag=D.update(Se,xe,ue,Ie,dt,at)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(t,e,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,r),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var r,i,n=e.length,s="";for(r=0;r<n;r+=1)e[r].ty==="sh"&&(i=e[r].ks.k,s+=buildShapeString(i,i.i.length,!0,t));return s},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,r,i,n){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[r])/2,0,0)}e.translate(i,n,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,r){this.textSpans=[],this.renderType="svg",this.initElement(t,e,r)}function ISolidElement(t,e,r){this.initElement(t,e,r)}function NullElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initFrame(),this.initTransform(t,e,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(t,e,r){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(e&&e.title){var i=createNS("title"),n=createElementID();i.setAttribute("id",n),i.textContent=e.title,this.svgElement.appendChild(i),r+=n}if(e&&e.description){var s=createNS("desc"),a=createElementID();s.setAttribute("id",a),s.textContent=e.description,this.svgElement.appendChild(s),r+=" "+a}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&e.hideOnTransparent===!1),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"},width:e&&e.width,height:e&&e.height,runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function CVContextData(){var t;for(this.saved=[],this.cArrPos=0,this.cTr=new Matrix,this.cO=1,this.savedOp=createTypedArray("float32",15),t=0;t<15;t+=1)this.saved[t]=createTypedArray("float32",16);this._length=15}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}function CVEffects(){}function CVMaskElement(t,e){var r;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,n=!1;for(r=0;r<i;r+=1)this.masksProperties[r].mode!=="n"&&(n=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);this.hasMasks=n,n&&this.element.addRenderableComponent(this)}function CVBaseElement(){}function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var n,s=4;e.ty==="rc"?s=5:e.ty==="el"?s=6:e.ty==="sr"&&(s=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,s,t);var a,o=r.length;for(n=0;n<o;n+=1)r[n].closed||(a={transforms:i.addTransformSequence(r[n].transforms),trNodes:[]},this.styledShapes.push(a),r[n].elements.push(a))}function CVShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,r)}function CVTextElement(t,e,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,r)}function CVImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,r)}function CVSolidElement(t,e,r){this.initElement(t,e,r)}function CanvasRendererBase(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||e.clearCanvas===void 0||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||""},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function CVCompElement(t,e,r){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||e.clearCanvas===void 0||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||"",runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas"}function HBaseElement(){}function HSolidElement(t,e,r){this.initElement(t,e,r)}function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,r)}function HCameraElement(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initHierarchy();var i=PropertyFactory.getProp;if(this.pe=i(this,t.pe,0,0,this),t.ks.p.s?(this.px=i(this,t.ks.p.x,1,0,this),this.py=i(this,t.ks.p.y,1,0,this),this.pz=i(this,t.ks.p.z,1,0,this)):this.p=i(this,t.ks.p,1,0,this),t.ks.a&&(this.a=i(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var n,s=t.ks.or.k.length;for(n=0;n<s;n+=1)t.ks.or.k[n].to=null,t.ks.or.k[n].ti=null}this.or=i(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=i(this,t.ks.rx,0,degToRads,this),this.ry=i(this,t.ks.ry,0,degToRads,this),this.rz=i(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(t,e,r){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,r)}function HybridRendererBase(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&e.hideOnTransparent===!1),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(t,e,r){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,r),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&e.hideOnTransparent===!1),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"},runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,r=t.length,i=[],n="";e<r;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(n),n=""):n+=t[e],e+=1;return i.push(n),i},SVGTextLottieElement.prototype.buildShapeData=function(t,e){if(t.shapes&&t.shapes.length){var r=t.shapes[0];if(r.it){var i=r.it[r.it.length-1];i.s&&(i.s.k[0]=e,i.s.k[1]=e)}}return t},SVGTextLottieElement.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var i=this.globalData.fontManager.getFontByName(r.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var n=r.fWeight,s=r.fStyle;this.layerElement.setAttribute("font-style",s),this.layerElement.setAttribute("font-weight",n)}this.layerElement.setAttribute("aria-label",r.t);var a,o=r.l||[],l=!!this.globalData.fontManager.chars;e=o.length;var h=this.mHelper,c=this.data.singleShape,u=0,f=0,p=!0,m=.001*r.tr*r.finalSize;if(!c||l||r.sz){var g,d=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!l||!c||t===0){if(a=d>t?this.textSpans[t].span:createNS(l?"g":"text"),d<=t){if(a.setAttribute("stroke-linecap","butt"),a.setAttribute("stroke-linejoin","round"),a.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=a,l){var y=createNS("g");a.appendChild(y),this.textSpans[t].childSpan=y}this.textSpans[t].span=a,this.layerElement.appendChild(a)}a.style.display="inherit"}if(h.reset(),c&&(o[t].n&&(u=-m,f+=r.yOffset,f+=p?1:0,p=!1),this.applyTextPropertiesToMatrix(r,h,o[t].line,u,f),u+=o[t].l||0,u+=m),l){var v;if((g=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t===1)v=new SVGCompElement(g.data,this.globalData,this);else{var b=emptyShapeData;g.data&&g.data.shapes&&(b=this.buildShapeData(g.data,r.finalSize)),v=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[t].glyph){var _=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(_.layerElement),_.destroy()}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),g.t===1&&this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else c&&a.setAttribute("transform","translate("+h.props[12]+","+h.props[13]+")"),a.textContent=o[t].val,a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}c&&a&&a.setAttribute("d","")}else{var x=this.textContainer,T="start";switch(r.j){case 1:T="end";break;case 2:T="middle";break;default:T="start"}x.setAttribute("text-anchor",T),x.setAttribute("letter-spacing",m);var S=this.buildTextContents(r.finalText);for(e=S.length,f=r.ps?r.ps[1]+r.ascent:0,t=0;t<e;t+=1)(a=this.textSpans[t].span||createNS("tspan")).textContent=S[t],a.setAttribute("x",0),a.setAttribute("y",f),a.style.display="inherit",x.appendChild(a),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=a,f+=r.finalLineHeight;this.layerElement.appendChild(x)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e,r=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<r;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if((!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var r,i,n,s=this.textAnimator.renderedLetters,a=this.textProperty.currentData.l;for(e=a.length,t=0;t<e;t+=1)a[t].n||(r=s[t],i=this.textSpans[t].span,(n=this.textSpans[t].glyph)&&n.renderFrame(),r._mdf.m&&i.setAttribute("transform",r.m),r._mdf.o&&i.setAttribute("opacity",r.o),r._mdf.sw&&i.setAttribute("stroke-width",r.sw),r._mdf.sc&&i.setAttribute("stroke",r.sc),r._mdf.fc&&i.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var r=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var n=createElementID();r.setAttribute("id",n),r.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+n+")"),e.appendChild(r),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(t){var e=0,r=this.layers.length;for(e=0;e<r;e+=1)if(this.layers[e].ind===t)return e;return-1},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&this.layers[t].ty!==99){e[t]=!0;var r=this.createItem(this.layers[t]);if(e[t]=r,getExpressionsPlugin()&&(this.layers[t].ty===0&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,t),this.layers[t].tt){var i="tp"in this.layers[t]?this.findIndexByInd(this.layers[t].tp):t-1;if(i===-1)return;if(this.elements[i]&&this.elements[i]!==!0){var n=e[i].getMatte(this.layers[t].tt);r.setMatte(n)}else this.buildItem(i),this.addPendingElement(r)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,r=this.elements.length;e<r;){if(this.elements[e]===t){var i="tp"in t.data?this.findIndexByInd(t.data.tp):e-1,n=this.elements[i].getMatte(this.layers[e].tt);t.setMatte(n);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;t===null?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=r-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<r;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){for(var i,n=0;n<e;)this.elements[n]&&this.elements[n]!==!0&&this.elements[n].getBaseElement()&&(i=this.elements[n].getBaseElement()),n+=1;i?this.layerElement.insertBefore(r,i):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,r){this.initFrame(),this.initBaseData(t,e,r),this.initTransform(t,e,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var r,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var r=0;for(r=this._length;r<t;r+=1)this.saved[r]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},ShapeTransformManager.prototype={addTransformSequence:function(t){var e,r=t.length,i="_";for(e=0;e<r;e+=1)i+=t[e].transform.key+"_";var n=this.sequences[i];return n||(n={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=n,this.sequenceList.push(n)),n},processSequence:function(t,e){for(var r,i=0,n=t.transforms.length,s=e;i<n&&!e;){if(t.transforms[i].transform.mProps._mdf){s=!0;break}i+=1}if(s)for(t.finalTransform.reset(),i=n-1;i>=0;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=s},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e<r;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVEffects.prototype.renderFrame=function(){},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,r,i,n=this.element.finalTransform.mat,s=this.element.canvasContext,a=this.masksProperties.length;for(s.beginPath(),t=0;t<a;t+=1)if(this.masksProperties[t].mode!=="n"){var o;this.masksProperties[t].inv&&(s.moveTo(0,0),s.lineTo(this.element.globalData.compSize.w,0),s.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),s.lineTo(0,this.element.globalData.compSize.h),s.lineTo(0,0)),i=this.viewData[t].v,e=n.applyToPointArray(i.v[0][0],i.v[0][1],0),s.moveTo(e[0],e[1]);var l=i._length;for(o=1;o<l;o+=1)r=n.applyToTriplePoints(i.o[o-1],i.i[o],i.v[o]),s.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=n.applyToTriplePoints(i.o[o-1],i.i[0],i.v[0]),s.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),s.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=this.data.ty===0;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var r={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:t.hd===!0},i={};if(t.ty==="fl"||t.ty==="st"?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(r.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):t.ty!=="gf"&&t.ty!=="gs"||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),t.ty==="st"||t.ty==="gs"){if(r.lc=lineCapEnum[t.lc||2],r.lj=lineJoinEnum[t.lj||2],t.lj==1&&(r.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(r.wi=i.w.v),t.d){var n=new DashProperty(this,t.d,"canvas",this);i.d=n,i.d.k||(r.da=i.d.dashArray,r.do=i.d.dashoffset[0])}}else r.r=t.r===2?"evenodd":"nonzero";return this.stylesList.push(r),i.style=r,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,r=this.stylesList.length;for(e=0;e<r;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,r=t.length;for(e=0;e<r;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,r,i,n){var s,a,o,l,h,c,u=t.length-1,f=[],p=[],m=[].concat(n);for(s=u;s>=0;s-=1){if((l=this.searchProcessedElement(t[s]))?e[s]=r[l-1]:t[s]._shouldRender=i,t[s].ty==="fl"||t[s].ty==="st"||t[s].ty==="gf"||t[s].ty==="gs")l?e[s].style.closed=!1:e[s]=this.createStyleElement(t[s],m),f.push(e[s].style);else if(t[s].ty==="gr"){if(l)for(o=e[s].it.length,a=0;a<o;a+=1)e[s].prevViewData[a]=e[s].it[a];else e[s]=this.createGroupElement(t[s]);this.searchShapes(t[s].it,e[s].it,e[s].prevViewData,i,m)}else t[s].ty==="tr"?(l||(c=this.createTransformElement(t[s]),e[s]=c),m.push(e[s]),this.addTransformToStyleList(e[s])):t[s].ty==="sh"||t[s].ty==="rc"||t[s].ty==="el"||t[s].ty==="sr"?l||(e[s]=this.createShapeElement(t[s])):t[s].ty==="tm"||t[s].ty==="rd"||t[s].ty==="pb"||t[s].ty==="zz"||t[s].ty==="op"?(l?(h=e[s]).closed=!1:((h=ShapeModifiers.getModifier(t[s].ty)).init(this,t[s]),e[s]=h,this.shapeModifiers.push(h)),p.push(h)):t[s].ty==="rp"&&(l?(h=e[s]).closed=!0:(h=ShapeModifiers.getModifier(t[s].ty),e[s]=h,h.init(this,t,s,e),this.shapeModifiers.push(h),i=!1),p.push(h));this.addProcessedElement(t[s],s+1)}for(this.removeTransformFromStyleList(),this.closeStyles(f),u=p.length,s=0;s<u;s+=1)p[s].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,r,i,n,s,a,o,l,h=this.stylesList.length,c=this.globalData.renderer,u=this.globalData.canvasContext;for(t=0;t<h;t+=1)if(((o=(l=this.stylesList[t]).type)!=="st"&&o!=="gs"||l.wi!==0)&&l.data._shouldRender&&l.coOp!==0&&this.globalData.currentGlobalAlpha!==0){for(c.save(),s=l.elements,o==="st"||o==="gs"?(u.strokeStyle=o==="st"?l.co:l.grd,u.lineWidth=l.wi,u.lineCap=l.lc,u.lineJoin=l.lj,u.miterLimit=l.ml||0):u.fillStyle=o==="fl"?l.co:l.grd,c.ctxOpacity(l.coOp),o!=="st"&&o!=="gs"&&u.beginPath(),c.ctxTransform(l.preTransforms.finalTransform.props),r=s.length,e=0;e<r;e+=1){for(o!=="st"&&o!=="gs"||(u.beginPath(),l.da&&(u.setLineDash(l.da),u.lineDashOffset=l.do)),n=(a=s[e].trNodes).length,i=0;i<n;i+=1)a[i].t==="m"?u.moveTo(a[i].p[0],a[i].p[1]):a[i].t==="c"?u.bezierCurveTo(a[i].pts[0],a[i].pts[1],a[i].pts[2],a[i].pts[3],a[i].pts[4],a[i].pts[5]):u.closePath();o!=="st"&&o!=="gs"||(u.stroke(),l.da&&u.setLineDash(this.dashResetter))}o!=="st"&&o!=="gs"&&u.fill(l.r),c.restore()}},CVShapeElement.prototype.renderShape=function(t,e,r,i){var n,s;for(s=t,n=e.length-1;n>=0;n-=1)e[n].ty==="tr"?(s=r[n].transform,this.renderShapeTransform(t,s)):e[n].ty==="sh"||e[n].ty==="el"||e[n].ty==="rc"||e[n].ty==="sr"?this.renderPath(e[n],r[n]):e[n].ty==="fl"?this.renderFill(e[n],r[n],s):e[n].ty==="st"?this.renderStroke(e[n],r[n],s):e[n].ty==="gf"||e[n].ty==="gs"?this.renderGradientFill(e[n],r[n],s):e[n].ty==="gr"?this.renderShape(s,e[n].it,r[n].it):e[n].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,n,s=t.trNodes,a=e.paths,o=a._length;s.length=0;var l=t.transforms.finalTransform;for(n=0;n<o;n+=1){var h=a.shapes[n];if(h&&h.v){for(i=h._length,r=1;r<i;r+=1)r===1&&s.push({t:"m",p:l.applyToPointArray(h.v[0][0],h.v[0][1],0)}),s.push({t:"c",pts:l.applyToTriplePoints(h.o[r-1],h.i[r],h.v[r])});i===1&&s.push({t:"m",p:l.applyToPointArray(h.v[0][0],h.v[0][1],0)}),h.c&&i&&(s.push({t:"c",pts:l.applyToTriplePoints(h.o[r-1],h.i[0],h.v[0])}),s.push({t:"z"}))}}t.trNodes=s}},CVShapeElement.prototype.renderPath=function(t,e){if(t.hd!==!0&&t._shouldRender){var r,i=e.styledShapes.length;for(r=0;r<i;r+=1)this.renderStyledShape(e.styledShapes[r],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,r){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,r){var i,n=e.style;if(!n.grd||e.g._mdf||e.s._mdf||e.e._mdf||t.t!==1&&(e.h._mdf||e.a._mdf)){var s,a=this.globalData.canvasContext,o=e.s.v,l=e.e.v;if(t.t===1)i=a.createLinearGradient(o[0],o[1],l[0],l[1]);else{var h=Math.sqrt(Math.pow(o[0]-l[0],2)+Math.pow(o[1]-l[1],2)),c=Math.atan2(l[1]-o[1],l[0]-o[0]),u=e.h.v;u>=1?u=.99:u<=-1&&(u=-.99);var f=h*u,p=Math.cos(c+e.a.v)*f+o[0],m=Math.sin(c+e.a.v)*f+o[1];i=a.createRadialGradient(p,m,0,o[0],o[1],h)}var g=t.g.p,d=e.g.c,y=1;for(s=0;s<g;s+=1)e.g._hasOpacity&&e.g._collapsable&&(y=e.g.o[2*s+1]),i.addColorStop(d[4*s]/100,"rgba("+d[4*s+1]+","+d[4*s+2]+","+d[4*s+3]+","+y+")");n.grd=i}n.coOp=e.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(t,e,r){var i=e.style,n=e.d;n&&(n._mdf||this._isFirstFrame)&&(i.da=n.dashArray,i.do=n.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*r.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var r=!1;t.sc&&(r=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,n,s,a,o,l,h,c,u,f,p,m,g=this.globalData.fontManager.getFontByName(t.f),d=t.l,y=this.mHelper;this.stroke=r,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,n=t.finalText.length;var v=this.data.singleShape,b=.001*t.tr*t.finalSize,_=0,x=0,T=!0,S=0;for(i=0;i<n;i+=1){a=(s=this.globalData.fontManager.getCharData(t.finalText[i],g.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&s.data||{},y.reset(),v&&d[i].n&&(_=-b,x+=t.yOffset,x+=T?1:0,T=!1),u=(h=a.shapes?a.shapes[0].it:[]).length,y.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,y,d[i].line,_,x),p=createSizedArray(u-1);var w=0;for(c=0;c<u;c+=1)if(h[c].ty==="sh"){for(l=h[c].ks.k.i.length,f=h[c].ks.k,m=[],o=1;o<l;o+=1)o===1&&m.push(y.applyToX(f.v[0][0],f.v[0][1],0),y.applyToY(f.v[0][0],f.v[0][1],0)),m.push(y.applyToX(f.o[o-1][0],f.o[o-1][1],0),y.applyToY(f.o[o-1][0],f.o[o-1][1],0),y.applyToX(f.i[o][0],f.i[o][1],0),y.applyToY(f.i[o][0],f.i[o][1],0),y.applyToX(f.v[o][0],f.v[o][1],0),y.applyToY(f.v[o][0],f.v[o][1],0));m.push(y.applyToX(f.o[o-1][0],f.o[o-1][1],0),y.applyToY(f.o[o-1][0],f.o[o-1][1],0),y.applyToX(f.i[0][0],f.i[0][1],0),y.applyToY(f.i[0][0],f.i[0][1],0),y.applyToX(f.v[0][0],f.v[0][1],0),y.applyToY(f.v[0][0],f.v[0][1],0)),p[w]=m,w+=1}v&&(_+=d[i].l,_+=b),this.textSpans[S]?this.textSpans[S].elem=p:this.textSpans[S]={elem:p},S+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,r,i,n,s,a=this.canvasContext;a.font=this.values.fValue,a.lineCap="butt",a.lineJoin="miter",a.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,l=this.textAnimator.renderedLetters,h=this.textProperty.currentData.l;e=h.length;var c,u,f=null,p=null,m=null;for(t=0;t<e;t+=1)if(!h[t].n){if((o=l[t])&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(o.p),this.globalData.renderer.ctxOpacity(o.o)),this.fill){for(o&&o.fc?f!==o.fc&&(f=o.fc,a.fillStyle=o.fc):f!==this.values.fill&&(f=this.values.fill,a.fillStyle=this.values.fill),i=(c=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(s=(u=c[r]).length,this.globalData.canvasContext.moveTo(u[0],u[1]),n=2;n<s;n+=6)this.globalData.canvasContext.bezierCurveTo(u[n],u[n+1],u[n+2],u[n+3],u[n+4],u[n+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(o&&o.sw?m!==o.sw&&(m=o.sw,a.lineWidth=o.sw):m!==this.values.sWidth&&(m=this.values.sWidth,a.lineWidth=this.values.sWidth),o&&o.sc?p!==o.sc&&(p=o.sc,a.strokeStyle=o.sc):p!==this.values.stroke&&(p=this.values.stroke,a.strokeStyle=this.values.stroke),i=(c=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(s=(u=c[r]).length,this.globalData.canvasContext.moveTo(u[0],u[1]),n=2;n<s;n+=6)this.globalData.canvasContext.bezierCurveTo(u[n],u[n+1],u[n+2],u[n+3],u[n+4],u[n+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}o&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,r,i=t.getContext("2d"),n=this.img.width,s=this.img.height,a=n/s,o=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;a>o&&l==="xMidYMid slice"||a<o&&l!=="xMidYMid slice"?e=(r=s)*o:r=(e=n)/o,i.drawImage(this.img,(n-e)/2,(s-r)/2,e,r,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRendererBase.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(t){if(t[0]!==1||t[1]!==0||t[4]!==0||t[5]!==1||t[12]!==0||t[13]!==0)if(this.renderConfig.clearCanvas){this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.contextData.cTr.cloneFromProps(this.transformMat.props);var r=this.contextData.cTr.props;this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])}else this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRendererBase.prototype.ctxOpacity=function(t){if(!this.renderConfig.clearCanvas)return this.canvasContext.globalAlpha*=t<0?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO);this.contextData.cO*=t<0?0:t,this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO)},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(t){if(this.renderConfig.clearCanvas){t&&this.canvasContext.save();var e,r=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i=this.contextData.saved[this.contextData.cArrPos];for(e=0;e<16;e+=1)i[e]=r[e];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1}else this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(t){if(this.renderConfig.clearCanvas){t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,r=this.contextData.saved[this.contextData.cArrPos],i=this.contextData.cTr.props;for(e=0;e<16;e+=1)i[e]=r[e];this.canvasContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13]),r=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=r,this.globalData.currentGlobalAlpha!==r&&(this.canvasContext.globalAlpha=r,this.globalData.currentGlobalAlpha=r)}else this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var r="0px 0px 0px";e.transformOrigin=r,e.mozTransformOrigin=r,e.webkitTransformOrigin=r,e["-webkit-transform"]=r,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(t,e){var r,i,n,s;if(this.reset(),t?(r=t,i=e,this.canvasContext.canvas.width=r,this.canvasContext.canvas.height=i):(this.animationItem.wrapper&&this.animationItem.container?(r=this.animationItem.wrapper.offsetWidth,i=this.animationItem.wrapper.offsetHeight):(r=this.canvasContext.canvas.width,i=this.canvasContext.canvas.height),this.canvasContext.canvas.width=r*this.renderConfig.dpr,this.canvasContext.canvas.height=i*this.renderConfig.dpr),this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var a=this.renderConfig.preserveAspectRatio.split(" "),o=a[1]||"meet",l=a[0]||"xMidYMid",h=l.substr(0,4),c=l.substr(4);n=r/i,(s=this.transformCanvas.w/this.transformCanvas.h)>n&&o==="meet"||s<n&&o==="slice"?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx=h==="xMid"&&(s<n&&o==="meet"||s>n&&o==="slice")?(r-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:h==="xMax"&&(s<n&&o==="meet"||s>n&&o==="slice")?(r-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty=c==="YMid"&&(s>n&&o==="meet"||s<n&&o==="slice")?(i-this.transformCanvas.h*(r/this.transformCanvas.w))/2*this.renderConfig.dpr:c==="YMax"&&(s>n&&o==="meet"||s<n&&o==="slice")?(i-this.transformCanvas.h*(r/this.transformCanvas.w))*this.renderConfig.dpr:0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||this.renderConfig.clearCanvas!==!0||e)&&!this.destroyed&&t!==-1){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r<i;r+=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&this.layers[t].ty!==99){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)e=t[r].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var r,i,n,s,a,o=t.sh.v,l=t.transformers,h=o._length;if(!(h<=1)){for(r=0;r<h-1;r+=1)i=this.getTransformedPoint(l,o.v[r]),n=this.getTransformedPoint(l,o.o[r]),s=this.getTransformedPoint(l,o.i[r+1]),a=this.getTransformedPoint(l,o.v[r+1]),this.checkBounds(i,n,s,a,e);o.c&&(i=this.getTransformedPoint(l,o.v[r]),n=this.getTransformedPoint(l,o.o[r]),s=this.getTransformedPoint(l,o.i[0]),a=this.getTransformedPoint(l,o.v[0]),this.checkBounds(i,n,s,a,e))}},HShapeElement.prototype.checkBounds=function(t,e,r,i,n){this.getBoundsOfCurve(t,e,r,i);var s=this.shapeBoundingBox;n.x=bmMin(s.left,n.x),n.xMax=bmMax(s.right,n.xMax),n.y=bmMin(s.top,n.y),n.yMax=bmMax(s.bottom,n.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,r,i){for(var n,s,a,o,l,h,c,u=[[t[0],i[0]],[t[1],i[1]]],f=0;f<2;++f)s=6*t[f]-12*e[f]+6*r[f],n=-3*t[f]+9*e[f]-9*r[f]+3*i[f],a=3*e[f]-3*t[f],s|=0,a|=0,(n|=0)===0&&s===0||(n===0?(o=-a/s)>0&&o<1&&u[f].push(this.calculateF(o,t,e,r,i,f)):(l=s*s-4*a*n)>=0&&((h=(-s+bmSqrt(l))/(2*n))>0&&h<1&&u[f].push(this.calculateF(h,t,e,r,i,f)),(c=(-s-bmSqrt(l))/(2*n))>0&&c<1&&u[f].push(this.calculateF(c,t,e,r,i,f))));this.shapeBoundingBox.left=bmMin.apply(null,u[0]),this.shapeBoundingBox.top=bmMin.apply(null,u[1]),this.shapeBoundingBox.right=bmMax.apply(null,u[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,u[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,n,s){return bmPow(1-t,3)*e[s]+3*bmPow(1-t,2)*t*r[s]+3*(1-t)*bmPow(t,2)*i[s]+bmPow(t,3)*n[s]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;r<i;r+=1)t[r]&&t[r].sh?this.calculateShapeBoundingBox(t[r],e):t[r]&&t[r].it?this.calculateBoundingBox(t[r].it,e):t[r]&&t[r].style&&t[r].w&&this.expandStrokeBoundingBox(t[r].w,e)},HShapeElement.prototype.expandStrokeBoundingBox=function(t,e){var r=0;if(t.keyframes){for(var i=0;i<t.keyframes.length;i+=1){var n=t.keyframes[i].s;n>r&&(r=n)}r*=t.mult}else r=t.v*t.mult;e.x-=r,e.xMax+=r,e.y-=r,e.yMax+=r},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var r=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),r=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),r=!0),r||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,n="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=n,i.webkitTransform=n}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,r=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=r,e.color=r,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i,n,s=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",s.fClass)this.innerElem.className=s.fClass;else{e.fontFamily=s.fFamily;var a=t.fWeight,o=t.fStyle;e.fontStyle=o,e.fontWeight=a}var l,h,c,u=t.l;n=u.length;var f,p=this.mHelper,m="",g=0;for(i=0;i<n;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[g]?l=this.textPaths[g]:((l=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),l.setAttribute("stroke-linejoin",lineJoinEnum[2]),l.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[g]?c=(h=this.textSpans[g]).children[0]:((h=createTag("div")).style.lineHeight=0,(c=createNS("svg")).appendChild(l),styleDiv(h)))):this.isMasked?l=this.textPaths[g]?this.textPaths[g]:createNS("text"):this.textSpans[g]?(h=this.textSpans[g],l=this.textPaths[g]):(styleDiv(h=createTag("span")),styleDiv(l=createTag("span")),h.appendChild(l)),this.globalData.fontManager.chars){var d,y=this.globalData.fontManager.getCharData(t.finalText[i],s.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(d=y?y.data:null,p.reset(),d&&d.shapes&&d.shapes.length&&(f=d.shapes[0].it,p.scale(t.finalSize/100,t.finalSize/100),m=this.createPathShape(p,f),l.setAttribute("d",m)),this.isMasked)this.innerElem.appendChild(l);else{if(this.innerElem.appendChild(h),d&&d.shapes){document.body.appendChild(c);var v=c.getBBox();c.setAttribute("width",v.width+2),c.setAttribute("height",v.height+2),c.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=c.style,_="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=_,b.webkitTransform=_,u[i].yOffset=v.y-1}else c.setAttribute("width",1),c.setAttribute("height",1);h.appendChild(c)}}else if(l.textContent=u[i].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(l);else{this.innerElem.appendChild(h);var x=l.style,T="translate3d(0,"+-t.finalSize/1.2+"px,0)";x.transform=T,x.webkitTransform=T}this.isMasked?this.textSpans[g]=l:this.textSpans[g]=h,this.textSpans[g].style.display="block",this.textPaths[g]=l,g+=1}for(;g<this.textSpans.length;)this.textSpans[g].style.display="none",g+=1},HTextElement.prototype.renderInnerContent=function(){var t;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var r,i,n,s,a,o=0,l=this.textAnimator.renderedLetters,h=this.textProperty.currentData.l;for(i=h.length,r=0;r<i;r+=1)h[r].n?o+=1:(s=this.textSpans[r],a=this.textPaths[r],n=l[o],o+=1,n._mdf.m&&(this.isMasked?s.setAttribute("transform",n.m):(s.style.webkitTransform=n.m,s.style.transform=n.m)),s.style.opacity=n.o,n.sw&&n._mdf.sw&&a.setAttribute("stroke-width",n.sw),n.sc&&n._mdf.sc&&a.setAttribute("stroke",n.sc),n.fc&&n._mdf.fc&&(a.setAttribute("fill",n.fc),a.style.color=n.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var c=this.innerElem.getBBox();if(this.currentBBox.w!==c.width&&(this.currentBBox.w=c.width,this.svgElement.setAttribute("width",c.width)),this.currentBBox.h!==c.height&&(this.currentBBox.h=c.height,this.svgElement.setAttribute("height",c.height)),this.currentBBox.w!==c.width+2||this.currentBBox.h!==c.height+2||this.currentBBox.x!==c.x-1||this.currentBBox.y!==c.y-1){this.currentBBox.w=c.width+2,this.currentBBox.h=c.height+2,this.currentBBox.x=c.x-1,this.currentBBox.y=c.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var u="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=u,t.webkitTransform=u}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,r,i,n=this.comp.threeDElements.length;for(t=0;t<n;t+=1)if((e=this.comp.threeDElements[t]).type==="3d"){r=e.perspectiveElem.style,i=e.container.style;var s=this.pe.v+"px",a="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=s,r.webkitPerspective=s,i.transformOrigin="0px 0px 0px",i.mozTransformOrigin="0px 0px 0px",i.webkitTransformOrigin="0px 0px 0px",r.transform=a,r.webkitTransform=a}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,r=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)r=this.hierarchy[t].finalTransform.mProp._mdf||r;if(r||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;t>=0;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var n;n=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var s=Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2)+Math.pow(n[2],2)),a=[n[0]/s,n[1]/s,n[2]/s],o=Math.sqrt(a[2]*a[2]+a[0]*a[0]),l=Math.atan2(a[1],o),h=Math.atan2(a[0],-a[2]);this.mat.rotateY(h).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var c=!this._prevMat.equals(this.mat);if((c||this.pe._mdf)&&this.comp.threeDElements){var u,f,p;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if((u=this.comp.threeDElements[t]).type==="3d"){if(c){var m=this.mat.toCSS();(p=u.container.style).transform=m,p.webkitTransform=m}this.pe._mdf&&((f=u.perspectiveElem.style).perspective=this.pe.v+"px",f.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(t,e){var r=t.getBaseElement();if(r){var i=this.layers[e];if(i.ddd&&this.supports3d)this.addTo3dContainer(r,e);else if(this.threeDElements)this.addTo3dContainer(r,e);else{for(var n,s,a=0;a<e;)this.elements[a]&&this.elements[a]!==!0&&this.elements[a].getBaseElement&&(s=this.elements[a],n=(this.layers[a].ddd?this.getThreeDContainerByPos(a):s.getBaseElement())||n),a+=1;n?i.ddd&&this.supports3d||this.layerElement.insertBefore(r,n):i.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRendererBase.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRendererBase.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(t){for(var e=0,r=this.threeDElements.length;e<r;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r,i,n=createTag("div");styleDiv(n);var s=createTag("div");if(styleDiv(s),e==="3d"){(r=n.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px",r.webkitTransformOrigin="50% 50%",r.mozTransformOrigin="50% 50%",r.transformOrigin="50% 50%";var a="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=s.style).transform=a,i.webkitTransform=a}n.appendChild(s);var o={container:s,perspectiveElem:n,startPos:t,endPos:t,type:e};return this.threeDElements.push(o),o},HybridRendererBase.prototype.build3dContainers=function(){var t,e,r=this.layers.length,i="";for(t=0;t<r;t+=1)this.layers[t].ddd&&this.layers[t].ty!==3?(i!=="3d"&&(i="3d",e=this.createThreeDContainer(t,"3d")),e.endPos=Math.max(e.endPos,t)):(i!=="2d"&&(i="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t));for(t=(r=this.threeDElements.length)-1;t>=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;r<i;){if(e<=this.threeDElements[r].endPos){for(var n,s=this.threeDElements[r].startPos;s<e;)this.elements[s]&&this.elements[s].getBaseElement&&(n=this.elements[s].getBaseElement()),s+=1;n?this.threeDElements[r].container.insertBefore(t,n):this.threeDElements[r].container.appendChild(t);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(t){var e=createTag("div"),r=this.animationItem.wrapper,i=e.style;i.width=t.w+"px",i.height=t.h+"px",this.resizerElem=e,styleDiv(e),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),r.appendChild(e),i.overflow="hidden";var n=createNS("svg");n.setAttribute("width","1"),n.setAttribute("height","1"),styleDiv(n),this.resizerElem.appendChild(n);var s=createNS("defs");n.appendChild(s),this.data=t,this.setupGlobalData(t,n),this.globalData.defs=s,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var t,e,r,i,n=this.animationItem.wrapper.offsetWidth,s=this.animationItem.wrapper.offsetHeight,a=n/s;this.globalData.compSize.w/this.globalData.compSize.h>a?(t=n/this.globalData.compSize.w,e=n/this.globalData.compSize.w,r=0,i=(s-this.globalData.compSize.h*(n/this.globalData.compSize.w))/2):(t=s/this.globalData.compSize.h,e=s/this.globalData.compSize.h,r=(n-this.globalData.compSize.w*(s/this.globalData.compSize.h))/2,i=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+i+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,r=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t<i;t+=1){var n=this.threeDElements[t].perspectiveElem.style;n.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(r,2))+"px",n.perspective=n.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(t){var e,r=t.length,i=createTag("div");for(e=0;e<r;e+=1)if(t[e].xt){var n=this.createComp(t[e],i,this.globalData.comp,null);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var r,i=0;i<e;)this.elements[i]&&this.elements[i].getBaseElement&&(r=this.elements[i].getBaseElement()),i+=1;r?this.layerElement.insertBefore(t,r):this.layerElement.appendChild(t)},HCompElement.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};var CompExpressionInterface=function(t){function e(r){for(var i=0,n=t.layers.length;i<n;){if(t.layers[i].nm===r||t.layers[i].ind===r)return t.elements[i].layerInterface;i+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e},Expressions=function(){var t={};return t.initExpressions=function(e){var r=0,i=[];e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=function(){r+=1},e.renderer.globalData.popExpression=function(){(r-=1)===0&&function(){var n,s=i.length;for(n=0;n<s;n+=1)i[n].release();i.length=0}()},e.renderer.globalData.registerExpressionProperty=function(n){i.indexOf(n)===-1&&i.push(n)}},t}(),MaskManagerInterface=function(){function t(e,r){this._mask=e,this._data=r}return Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(e){var r,i=createSizedArray(e.viewData.length),n=e.viewData.length;for(r=0;r<n;r+=1)i[r]=new t(e.viewData[r],e.masksProperties[r]);return function(s){for(r=0;r<n;){if(e.masksProperties[r].nm===s)return i[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function r(n,s,a){Object.defineProperty(n,"velocity",{get:function(){return s.getVelocityAtTime(s.comp.currentFrame)}}),n.numKeys=s.keyframes?s.keyframes.length:0,n.key=function(o){if(!n.numKeys)return 0;var l="";l="s"in s.keyframes[o-1]?s.keyframes[o-1].s:"e"in s.keyframes[o-2]?s.keyframes[o-2].e:s.keyframes[o-2].s;var h=a==="unidimensional"?new Number(l):Object.assign({},l);return h.time=s.keyframes[o-1].t/s.elem.comp.globalData.frameRate,h.value=a==="unidimensional"?l[0]:l,h},n.valueAtTime=s.getValueAtTime,n.speedAtTime=s.getSpeedAtTime,n.velocityAtTime=s.getVelocityAtTime,n.propertyGroup=s.propertyGroup}function i(){return t}return function(n){return n?n.propType==="unidimensional"?function(s){s&&"pv"in s||(s=t);var a=1/s.mult,o=s.pv*a,l=new Number(o);return l.value=o,r(l,s,"unidimensional"),function(){return s.k&&s.getValue(),o=s.v*a,l.value!==o&&((l=new Number(o)).value=o,r(l,s,"unidimensional")),l}}(n):function(s){s&&"pv"in s||(s=e);var a=1/s.mult,o=s.data&&s.data.l||s.pv.length,l=createTypedArray("float32",o),h=createTypedArray("float32",o);return l.value=h,r(l,s,"multidimensional"),function(){s.k&&s.getValue();for(var c=0;c<o;c+=1)h[c]=s.v[c]*a,l[c]=h[c];return l}}(n):i}}(),TransformExpressionInterface=function(t){function e(a){switch(a){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var r,i,n,s;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?s=ExpressionPropertyInterface(t.p):(r=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(n=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?s():[r(),i(),n?n():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},LayerExpressionInterface=function(){function t(h){var c=new Matrix;return h!==void 0?this._elem.finalTransform.mProp.getValueAtTime(h).clone(c):this._elem.finalTransform.mProp.applyToMatrix(c),c}function e(h,c){var u=this.getMatrix(c);return u.props[12]=0,u.props[13]=0,u.props[14]=0,this.applyPoint(u,h)}function r(h,c){var u=this.getMatrix(c);return this.applyPoint(u,h)}function i(h,c){var u=this.getMatrix(c);return u.props[12]=0,u.props[13]=0,u.props[14]=0,this.invertPoint(u,h)}function n(h,c){var u=this.getMatrix(c);return this.invertPoint(u,h)}function s(h,c){if(this._elem.hierarchy&&this._elem.hierarchy.length){var u,f=this._elem.hierarchy.length;for(u=0;u<f;u+=1)this._elem.hierarchy[u].finalTransform.mProp.applyToMatrix(h)}return h.applyToPointArray(c[0],c[1],c[2]||0)}function a(h,c){if(this._elem.hierarchy&&this._elem.hierarchy.length){var u,f=this._elem.hierarchy.length;for(u=0;u<f;u+=1)this._elem.hierarchy[u].finalTransform.mProp.applyToMatrix(h)}return h.inversePoint(c)}function o(h){var c=new Matrix;if(c.reset(),this._elem.finalTransform.mProp.applyToMatrix(c),this._elem.hierarchy&&this._elem.hierarchy.length){var u,f=this._elem.hierarchy.length;for(u=0;u<f;u+=1)this._elem.hierarchy[u].finalTransform.mProp.applyToMatrix(c);return c.inversePoint(h)}return c.inversePoint(h)}function l(){return[1,1,1,1]}return function(h){var c;function u(p){switch(p){case"ADBE Root Vectors Group":case"Contents":case 2:return u.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return c;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return u.effect;case"ADBE Text Properties":return u.textInterface;default:return null}}u.getMatrix=t,u.invertPoint=a,u.applyPoint=s,u.toWorld=r,u.toWorldVec=e,u.fromWorld=n,u.fromWorldVec=i,u.toComp=r,u.fromComp=o,u.sampleImage=l,u.sourceRectAtTime=h.sourceRectAtTime.bind(h),u._elem=h;var f=getDescriptor(c=TransformExpressionInterface(h.finalTransform.mProp),"anchorPoint");return Object.defineProperties(u,{hasParent:{get:function(){return h.hierarchy.length}},parent:{get:function(){return h.hierarchy[0].layerInterface}},rotation:getDescriptor(c,"rotation"),scale:getDescriptor(c,"scale"),position:getDescriptor(c,"position"),opacity:getDescriptor(c,"opacity"),anchorPoint:f,anchor_point:f,transform:{get:function(){return c}},active:{get:function(){return h.isInRange}}}),u.startTime=h.data.st,u.index=h.data.ind,u.source=h.data.refId,u.height=h.data.ty===0?h.data.h:100,u.width=h.data.ty===0?h.data.w:100,u.inPoint=h.data.ip/h.comp.globalData.frameRate,u.outPoint=h.data.op/h.comp.globalData.frameRate,u._name=h.data.nm,u.registerMaskInterface=function(p){u.mask=new MaskManagerInterface(p,h)},u.registerEffectsInterface=function(p){u.effect=p},u}}(),propertyGroupFactory=function(t,e){return function(r){return(r=r===void 0?1:r)<=0?t:e(r-1)}},PropertyInterface=function(t,e){var r={_name:t};return function(i){return(i=i===void 0?1:i)<=0?r:e(i-1)}},EffectsExpressionInterface=function(){function t(r,i,n,s){function a(u){for(var f=r.ef,p=0,m=f.length;p<m;){if(u===f[p].nm||u===f[p].mn||u===f[p].ix)return f[p].ty===5?h[p]:h[p]();p+=1}throw new Error}var o,l=propertyGroupFactory(a,n),h=[],c=r.ef.length;for(o=0;o<c;o+=1)r.ef[o].ty===5?h.push(t(r.ef[o],i.effectElements[o],i.effectElements[o].propertyGroup,s)):h.push(e(i.effectElements[o],r.ef[o].ty,s,l));return r.mn==="ADBE Color Control"&&Object.defineProperty(a,"color",{get:function(){return h[0]()}}),Object.defineProperties(a,{numProperties:{get:function(){return r.np}},_name:{value:r.nm},propertyGroup:{value:l}}),a.enabled=r.en!==0,a.active=a.enabled,a}function e(r,i,n,s){var a=ExpressionPropertyInterface(r.p);return r.p.setGroupProperty&&r.p.setGroupProperty(PropertyInterface("",s)),function(){return i===10?n.comp.compInterface(r.p.v):a()}}return{createEffectsInterface:function(r,i){if(r.effectsManager){var n,s=[],a=r.data.ef,o=r.effectsManager.effectElements.length;for(n=0;n<o;n+=1)s.push(t(a[n],r.effectsManager.effectElements[n],i,r));var l=r.data.ef||[],h=function(c){for(n=0,o=l.length;n<o;){if(c===l[n].nm||c===l[n].mn||c===l[n].ix)return s[n];n+=1}return null};return Object.defineProperty(h,"numProperties",{get:function(){return l.length}}),h}return null}}}(),ShapePathInterface=function(t,e,r){var i=e.sh;function n(a){return a==="Shape"||a==="shape"||a==="Path"||a==="path"||a==="ADBE Vector Shape"||a===2?n.path:null}var s=propertyGroupFactory(n,r);return i.setGroupProperty(PropertyInterface("Path",s)),Object.defineProperties(n,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:r}}),n},ShapeExpressionInterface=function(){function t(p,m,g){var d,y=[],v=p?p.length:0;for(d=0;d<v;d+=1)p[d].ty==="gr"?y.push(e(p[d],m[d],g)):p[d].ty==="fl"?y.push(r(p[d],m[d],g)):p[d].ty==="st"?y.push(s(p[d],m[d],g)):p[d].ty==="tm"?y.push(a(p[d],m[d],g)):p[d].ty==="tr"||(p[d].ty==="el"?y.push(l(p[d],m[d],g)):p[d].ty==="sr"?y.push(h(p[d],m[d],g)):p[d].ty==="sh"?y.push(ShapePathInterface(p[d],m[d],g)):p[d].ty==="rc"?y.push(c(p[d],m[d],g)):p[d].ty==="rd"?y.push(u(p[d],m[d],g)):p[d].ty==="rp"?y.push(f(p[d],m[d],g)):p[d].ty==="gf"?y.push(i(p[d],m[d],g)):y.push(n(p[d],m[d])));return y}function e(p,m,g){var d=function(b){switch(b){case"ADBE Vectors Group":case"Contents":case 2:return d.content;default:return d.transform}};d.propertyGroup=propertyGroupFactory(d,g);var y=function(b,_,x){var T,S=function(M){for(var k=0,I=T.length;k<I;){if(T[k]._name===M||T[k].mn===M||T[k].propertyIndex===M||T[k].ix===M||T[k].ind===M)return T[k];k+=1}return typeof M=="number"?T[M-1]:null};S.propertyGroup=propertyGroupFactory(S,x),T=t(b.it,_.it,S.propertyGroup),S.numProperties=T.length;var w=o(b.it[b.it.length-1],_.it[_.it.length-1],S.propertyGroup);return S.transform=w,S.propertyIndex=b.cix,S._name=b.nm,S}(p,m,d.propertyGroup),v=o(p.it[p.it.length-1],m.it[m.it.length-1],d.propertyGroup);return d.content=y,d.transform=v,Object.defineProperty(d,"_name",{get:function(){return p.nm}}),d.numProperties=p.np,d.propertyIndex=p.ix,d.nm=p.nm,d.mn=p.mn,d}function r(p,m,g){function d(y){return y==="Color"||y==="color"?d.color:y==="Opacity"||y==="opacity"?d.opacity:null}return Object.defineProperties(d,{color:{get:ExpressionPropertyInterface(m.c)},opacity:{get:ExpressionPropertyInterface(m.o)},_name:{value:p.nm},mn:{value:p.mn}}),m.c.setGroupProperty(PropertyInterface("Color",g)),m.o.setGroupProperty(PropertyInterface("Opacity",g)),d}function i(p,m,g){function d(y){return y==="Start Point"||y==="start point"?d.startPoint:y==="End Point"||y==="end point"?d.endPoint:y==="Opacity"||y==="opacity"?d.opacity:null}return Object.defineProperties(d,{startPoint:{get:ExpressionPropertyInterface(m.s)},endPoint:{get:ExpressionPropertyInterface(m.e)},opacity:{get:ExpressionPropertyInterface(m.o)},type:{get:function(){return"a"}},_name:{value:p.nm},mn:{value:p.mn}}),m.s.setGroupProperty(PropertyInterface("Start Point",g)),m.e.setGroupProperty(PropertyInterface("End Point",g)),m.o.setGroupProperty(PropertyInterface("Opacity",g)),d}function n(){return function(){return null}}function s(p,m,g){var d,y=propertyGroupFactory(T,g),v=propertyGroupFactory(x,y);function b(S){Object.defineProperty(x,p.d[S].nm,{get:ExpressionPropertyInterface(m.d.dataProps[S].p)})}var _=p.d?p.d.length:0,x={};for(d=0;d<_;d+=1)b(d),m.d.dataProps[d].p.setGroupProperty(v);function T(S){return S==="Color"||S==="color"?T.color:S==="Opacity"||S==="opacity"?T.opacity:S==="Stroke Width"||S==="stroke width"?T.strokeWidth:null}return Object.defineProperties(T,{color:{get:ExpressionPropertyInterface(m.c)},opacity:{get:ExpressionPropertyInterface(m.o)},strokeWidth:{get:ExpressionPropertyInterface(m.w)},dash:{get:function(){return x}},_name:{value:p.nm},mn:{value:p.mn}}),m.c.setGroupProperty(PropertyInterface("Color",y)),m.o.setGroupProperty(PropertyInterface("Opacity",y)),m.w.setGroupProperty(PropertyInterface("Stroke Width",y)),T}function a(p,m,g){function d(v){return v===p.e.ix||v==="End"||v==="end"?d.end:v===p.s.ix?d.start:v===p.o.ix?d.offset:null}var y=propertyGroupFactory(d,g);return d.propertyIndex=p.ix,m.s.setGroupProperty(PropertyInterface("Start",y)),m.e.setGroupProperty(PropertyInterface("End",y)),m.o.setGroupProperty(PropertyInterface("Offset",y)),d.propertyIndex=p.ix,d.propertyGroup=g,Object.defineProperties(d,{start:{get:ExpressionPropertyInterface(m.s)},end:{get:ExpressionPropertyInterface(m.e)},offset:{get:ExpressionPropertyInterface(m.o)},_name:{value:p.nm}}),d.mn=p.mn,d}function o(p,m,g){function d(v){return p.a.ix===v||v==="Anchor Point"?d.anchorPoint:p.o.ix===v||v==="Opacity"?d.opacity:p.p.ix===v||v==="Position"?d.position:p.r.ix===v||v==="Rotation"||v==="ADBE Vector Rotation"?d.rotation:p.s.ix===v||v==="Scale"?d.scale:p.sk&&p.sk.ix===v||v==="Skew"?d.skew:p.sa&&p.sa.ix===v||v==="Skew Axis"?d.skewAxis:null}var y=propertyGroupFactory(d,g);return m.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",y)),m.transform.mProps.p.setGroupProperty(PropertyInterface("Position",y)),m.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",y)),m.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",y)),m.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",y)),m.transform.mProps.sk&&(m.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",y)),m.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",y))),m.transform.op.setGroupProperty(PropertyInterface("Opacity",y)),Object.defineProperties(d,{opacity:{get:ExpressionPropertyInterface(m.transform.mProps.o)},position:{get:ExpressionPropertyInterface(m.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(m.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(m.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(m.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(m.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(m.transform.mProps.sa)},_name:{value:p.nm}}),d.ty="tr",d.mn=p.mn,d.propertyGroup=g,d}function l(p,m,g){function d(b){return p.p.ix===b?d.position:p.s.ix===b?d.size:null}var y=propertyGroupFactory(d,g);d.propertyIndex=p.ix;var v=m.sh.ty==="tm"?m.sh.prop:m.sh;return v.s.setGroupProperty(PropertyInterface("Size",y)),v.p.setGroupProperty(PropertyInterface("Position",y)),Object.defineProperties(d,{size:{get:ExpressionPropertyInterface(v.s)},position:{get:ExpressionPropertyInterface(v.p)},_name:{value:p.nm}}),d.mn=p.mn,d}function h(p,m,g){function d(b){return p.p.ix===b?d.position:p.r.ix===b?d.rotation:p.pt.ix===b?d.points:p.or.ix===b||b==="ADBE Vector Star Outer Radius"?d.outerRadius:p.os.ix===b?d.outerRoundness:!p.ir||p.ir.ix!==b&&b!=="ADBE Vector Star Inner Radius"?p.is&&p.is.ix===b?d.innerRoundness:null:d.innerRadius}var y=propertyGroupFactory(d,g),v=m.sh.ty==="tm"?m.sh.prop:m.sh;return d.propertyIndex=p.ix,v.or.setGroupProperty(PropertyInterface("Outer Radius",y)),v.os.setGroupProperty(PropertyInterface("Outer Roundness",y)),v.pt.setGroupProperty(PropertyInterface("Points",y)),v.p.setGroupProperty(PropertyInterface("Position",y)),v.r.setGroupProperty(PropertyInterface("Rotation",y)),p.ir&&(v.ir.setGroupProperty(PropertyInterface("Inner Radius",y)),v.is.setGroupProperty(PropertyInterface("Inner Roundness",y))),Object.defineProperties(d,{position:{get:ExpressionPropertyInterface(v.p)},rotation:{get:ExpressionPropertyInterface(v.r)},points:{get:ExpressionPropertyInterface(v.pt)},outerRadius:{get:ExpressionPropertyInterface(v.or)},outerRoundness:{get:ExpressionPropertyInterface(v.os)},innerRadius:{get:ExpressionPropertyInterface(v.ir)},innerRoundness:{get:ExpressionPropertyInterface(v.is)},_name:{value:p.nm}}),d.mn=p.mn,d}function c(p,m,g){function d(b){return p.p.ix===b?d.position:p.r.ix===b?d.roundness:p.s.ix===b||b==="Size"||b==="ADBE Vector Rect Size"?d.size:null}var y=propertyGroupFactory(d,g),v=m.sh.ty==="tm"?m.sh.prop:m.sh;return d.propertyIndex=p.ix,v.p.setGroupProperty(PropertyInterface("Position",y)),v.s.setGroupProperty(PropertyInterface("Size",y)),v.r.setGroupProperty(PropertyInterface("Rotation",y)),Object.defineProperties(d,{position:{get:ExpressionPropertyInterface(v.p)},roundness:{get:ExpressionPropertyInterface(v.r)},size:{get:ExpressionPropertyInterface(v.s)},_name:{value:p.nm}}),d.mn=p.mn,d}function u(p,m,g){function d(b){return p.r.ix===b||b==="Round Corners 1"?d.radius:null}var y=propertyGroupFactory(d,g),v=m;return d.propertyIndex=p.ix,v.rd.setGroupProperty(PropertyInterface("Radius",y)),Object.defineProperties(d,{radius:{get:ExpressionPropertyInterface(v.rd)},_name:{value:p.nm}}),d.mn=p.mn,d}function f(p,m,g){function d(b){return p.c.ix===b||b==="Copies"?d.copies:p.o.ix===b||b==="Offset"?d.offset:null}var y=propertyGroupFactory(d,g),v=m;return d.propertyIndex=p.ix,v.c.setGroupProperty(PropertyInterface("Copies",y)),v.o.setGroupProperty(PropertyInterface("Offset",y)),Object.defineProperties(d,{copies:{get:ExpressionPropertyInterface(v.c)},offset:{get:ExpressionPropertyInterface(v.o)},_name:{value:p.nm}}),d.mn=p.mn,d}return function(p,m,g){var d;function y(v){if(typeof v=="number")return(v=v===void 0?1:v)===0?g:d[v-1];for(var b=0,_=d.length;b<_;){if(d[b]._name===v)return d[b];b+=1}return null}return y.propertyGroup=propertyGroupFactory(y,function(){return g}),d=t(p,m,y.propertyGroup),y.numProperties=d.length,y._name="Contents",y}}(),TextExpressionInterface=function(t){var e;function r(i){switch(i){case"ADBE Text Document":return r.sourceText;default:return null}}return Object.defineProperty(r,"sourceText",{get:function(){t.textProperty.getValue();var i=t.textProperty.currentData.t;return i!==void 0&&(t.textProperty.currentData.t=void 0,(e=new String(i)).value=i||new String(i)),e}}),r};function _typeof$2(t){return(_typeof$2=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)}var FootageInterface=(dataInterfaceFactory=function(t){function e(r){return r==="Outline"?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(r){var i="",n=r.getFootageData();function s(a){if(n[a])return i=a,_typeof$2(n=n[a])==="object"?s:n;var o=a.indexOf(i);if(o!==-1){var l=parseInt(a.substr(o+i.length),10);return _typeof$2(n=n[l])==="object"?s:n}return""}return function(){return i="",n=r.getFootageData(),s}}(t),e},function(t){function e(r){return r==="Data"?e.dataInterface:null}return e._name="Data",e.dataInterface=dataInterfaceFactory(t),e}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(t){return interfaces[t]||null}function _typeof$1(t){return(_typeof$1=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 seedRandom(t,e){var r=this,i=e.pow(256,6),n=e.pow(2,52),s=2*n;function a(c){var u,f=c.length,p=this,m=0,g=p.i=p.j=0,d=p.S=[];for(f||(c=[f++]);m<256;)d[m]=m++;for(m=0;m<256;m++)d[m]=d[g=255&g+c[m%f]+(u=d[m])],d[g]=u;p.g=function(y){for(var v,b=0,_=p.i,x=p.j,T=p.S;y--;)v=T[_=255&_+1],b=256*b+T[255&(T[_]=T[x=255&x+v])+(T[x]=v)];return p.i=_,p.j=x,b}}function o(c,u){return u.i=c.i,u.j=c.j,u.S=c.S.slice(),u}function l(c,u){for(var f,p=c+"",m=0;m<p.length;)u[255&m]=255&(f^=19*u[255&m])+p.charCodeAt(m++);return h(u)}function h(c){return String.fromCharCode.apply(0,c)}e.seedrandom=function(c,u,f){var p=[],m=l(function y(v,b){var _,x=[],T=_typeof$1(v);if(b&&T=="object")for(_ in v)try{x.push(y(v[_],b-1))}catch{}return x.length?x:T=="string"?v:v+"\0"}((u=u===!0?{entropy:!0}:u||{}).entropy?[c,h(t)]:c===null?function(){try{var y=new Uint8Array(256);return(r.crypto||r.msCrypto).getRandomValues(y),h(y)}catch{var v=r.navigator,b=v&&v.plugins;return[+new Date,r,b,r.screen,h(t)]}}():c,3),p),g=new a(p),d=function(){for(var y=g.g(6),v=i,b=0;y<n;)y=256*(y+b),v*=256,b=g.g(1);for(;y>=s;)y/=2,v/=2,b>>>=1;return(y+b)/v};return d.int32=function(){return 0|g.g(4)},d.quick=function(){return g.g(4)/4294967296},d.double=d,l(h(g.S),t),(u.pass||f||function(y,v,b,_){return _&&(_.S&&o(_,g),y.state=function(){return o(g,{})}),b?(e.random=y,v):y})(d,m,"global"in u?u.global:this==e,u.state)},l(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof(t){return(_typeof=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)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return t==="number"||t==="boolean"||t==="string"||e instanceof Number}function $bm_neg(t){var e=_typeof(t);if(e==="number"||e==="boolean"||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,n=[];for(r=0;r<i;r+=1)n[r]=-t[r];return n}return t.propType?t.v:-t}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var r=_typeof(t),i=_typeof(e);if(r==="string"||i==="string"||isNumerable(r,t)&&isNumerable(i,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var n=0,s=t.length,a=e.length,o=[];n<s||n<a;)(typeof t[n]=="number"||t[n]instanceof Number)&&(typeof e[n]=="number"||e[n]instanceof Number)?o[n]=t[n]+e[n]:o[n]=e[n]===void 0?t[n]:t[n]||e[n],n+=1;return o}return 0}var add=sum;function sub(t,e){var r=_typeof(t),i=_typeof(e);if(isNumerable(r,t)&&isNumerable(i,e))return r==="string"&&(t=parseInt(t,10)),i==="string"&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(r,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var n=0,s=t.length,a=e.length,o=[];n<s||n<a;)(typeof t[n]=="number"||t[n]instanceof Number)&&(typeof e[n]=="number"||e[n]instanceof Number)?o[n]=t[n]-e[n]:o[n]=e[n]===void 0?t[n]:t[n]||e[n],n+=1;return o}return 0}function mul(t,e){var r,i,n,s=_typeof(t),a=_typeof(e);if(isNumerable(s,t)&&isNumerable(a,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(a,e)){for(n=t.length,r=createTypedArray("float32",n),i=0;i<n;i+=1)r[i]=t[i]*e;return r}if(isNumerable(s,t)&&$bm_isInstanceOfArray(e)){for(n=e.length,r=createTypedArray("float32",n),i=0;i<n;i+=1)r[i]=t*e[i];return r}return 0}function div(t,e){var r,i,n,s=_typeof(t),a=_typeof(e);if(isNumerable(s,t)&&isNumerable(a,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(a,e)){for(n=t.length,r=createTypedArray("float32",n),i=0;i<n;i+=1)r[i]=t[i]/e;return r}if(isNumerable(s,t)&&$bm_isInstanceOfArray(e)){for(n=e.length,r=createTypedArray("float32",n),i=0;i<n;i+=1)r[i]=t/e[i];return r}return 0}function mod(t,e){return typeof t=="string"&&(t=parseInt(t,10)),typeof e=="string"&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,r){if(e>r){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if(typeof t=="number"||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),n=0;for(r=0;r<i;r+=1)n+=Math.pow(e[r]-t[r],2);return Math.sqrt(n)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,r,i=t[0],n=t[1],s=t[2],a=Math.max(i,n,s),o=Math.min(i,n,s),l=(a+o)/2;if(a===o)e=0,r=0;else{var h=a-o;switch(r=l>.5?h/(2-a-o):h/(a+o),a){case i:e=(n-s)/h+(n<s?6:0);break;case n:e=(s-i)/h+2;break;case s:e=(i-n)/h+4}e/=6}return[e,r,l,t[3]]}function hue2rgb(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,n=t[0],s=t[1],a=t[2];if(s===0)e=a,i=a,r=a;else{var o=a<.5?a*(1+s):a+s-a*s,l=2*a-o;e=hue2rgb(l,o,n+1/3),r=hue2rgb(l,o,n),i=hue2rgb(l,o,n-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,n){if(i!==void 0&&n!==void 0||(i=e,n=r,e=0,r=1),r<e){var s=r;r=e,e=s}if(t<=e)return i;if(t>=r)return n;var a,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(n-i)*o;var l=i.length,h=createTypedArray("float32",l);for(a=0;a<l;a+=1)h[a]=i[a]+(n[a]-i[a])*o;return h}function random(t,e){if(e===void 0&&(t===void 0?(t=0,e=1):(e=t,t=void 0)),e.length){var r,i=e.length;t||(t=createTypedArray("float32",i));var n=createTypedArray("float32",i),s=BMMath.random();for(r=0;r<i;r+=1)n[r]=t[r]+s*(e[r]-t[r]);return n}return t===void 0&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,r,i){var n,s=t.length,a=shapePool.newElement();a.setPathData(!!i,s);var o,l,h=[0,0];for(n=0;n<s;n+=1)o=e&&e[n]?e[n]:h,l=r&&r[n]?r[n]:h,a.setTripleAt(t[n][0],t[n][1],l[0]+t[n][0],l[1]+t[n][1],o[0]+t[n][0],o[1]+t[n][1],n,!0);return a}function initiateExpression(elem,data,property){function noOp(t){return t}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=function(t,e){var r,i,n=this.pv.length?this.pv.length:1,s=createTypedArray("float32",n),a=Math.floor(5*time);for(r=0,i=0;r<a;){for(i=0;i<n;i+=1)s[i]+=-e+2*e*BMMath.random();r+=1}var o=5*time,l=o-Math.floor(o),h=createTypedArray("float32",n);if(n>1){for(i=0;i<n;i+=1)h[i]=this.pv[i]+s[i]+(-e+2*e*BMMath.random())*l;return h}return this.pv+s[0]+(-e+2*e*BMMath.random())*l}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,i,0]}function easeOut(t,e,r,i,n){return applyEase(easeOutBez,t,e,r,i,n)}function easeIn(t,e,r,i,n){return applyEase(easeInBez,t,e,r,i,n)}function ease(t,e,r,i,n){return applyEase(easeInOutBez,t,e,r,i,n)}function applyEase(t,e,r,i,n,s){n===void 0?(n=r,s=i):e=(e-r)/(i-r),e>1?e=1:e<0&&(e=0);var a=t(e);if($bm_isInstanceOfArray(n)){var o,l=n.length,h=createTypedArray("float32",l);for(o=0;o<l;o+=1)h[o]=(s[o]-n[o])*a+n[o];return h}return(s-n)*a+n}function nearestKey(t){var e,r,i,n=data.k.length;if(data.k.length&&typeof data.k[0]!="number")if(r=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,i=data.k[0].t;else{for(e=0;e<n-1;e+=1){if(t===data.k[e].t){r=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(r=e+2,i=data.k[e+1].t):(r=e+1,i=data.k[e].t);break}}r===-1&&(r=e+1,i=data.k[e].t)}else r=0,i=0;var s={};return s.index=r,s.time=i/elem.comp.globalData.frameRate,s}function key(t){var e,r,i;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var n=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=n.length,r=0;r<i;r+=1)e[r]=n[r],e.value[r]=n[r];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||t===0||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return typeof value=="string"?e===void 0?value.substring(t):value.substring(t,e):""}function substr(t,e){return typeof value=="string"?e===void 0?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=t===0?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType!==4||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath],ob}(),expressionHelpers={searchExpressions:function(t,e,r){e.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(t,e,r).bind(r)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),r=this.getValueAtTime(t+-.01),i=0;if(e.length){var n;for(n=0;n<e.length;n+=1)i+=Math.pow(r[n]-e[n],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(this.vel!==void 0)return this.vel;var e,r,i=this.getValueAtTime(t),n=this.getValueAtTime(t+-.001);if(i.length)for(e=createTypedArray("float32",i.length),r=0;r<i.length;r+=1)e[r]=(n[r]-i[r])/-.001;else e=(n-i)/-.001;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};function addPropertyDecorator(){function t(u,f,p){if(!this.k||!this.keyframes)return this.pv;u=u?u.toLowerCase():"";var m,g,d,y,v,b=this.comp.renderedFrame,_=this.keyframes,x=_[_.length-1].t;if(b<=x)return this.pv;if(p?g=x-(m=f?Math.abs(x-this.elem.comp.globalData.frameRate*f):Math.max(0,x-this.elem.data.ip)):((!f||f>_.length-1)&&(f=_.length-1),m=x-(g=_[_.length-1-f].t)),u==="pingpong"){if(Math.floor((b-g)/m)%2!=0)return this.getValueAtTime((m-(b-g)%m+g)/this.comp.globalData.frameRate,0)}else{if(u==="offset"){var T=this.getValueAtTime(g/this.comp.globalData.frameRate,0),S=this.getValueAtTime(x/this.comp.globalData.frameRate,0),w=this.getValueAtTime(((b-g)%m+g)/this.comp.globalData.frameRate,0),M=Math.floor((b-g)/m);if(this.pv.length){for(y=(v=new Array(T.length)).length,d=0;d<y;d+=1)v[d]=(S[d]-T[d])*M+w[d];return v}return(S-T)*M+w}if(u==="continue"){var k=this.getValueAtTime(x/this.comp.globalData.frameRate,0),I=this.getValueAtTime((x-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(y=(v=new Array(k.length)).length,d=0;d<y;d+=1)v[d]=k[d]+(k[d]-I[d])*((b-x)/this.comp.globalData.frameRate)/5e-4;return v}return k+(b-x)/.001*(k-I)}}return this.getValueAtTime(((b-g)%m+g)/this.comp.globalData.frameRate,0)}function e(u,f,p){if(!this.k)return this.pv;u=u?u.toLowerCase():"";var m,g,d,y,v,b=this.comp.renderedFrame,_=this.keyframes,x=_[0].t;if(b>=x)return this.pv;if(p?g=x+(m=f?Math.abs(this.elem.comp.globalData.frameRate*f):Math.max(0,this.elem.data.op-x)):((!f||f>_.length-1)&&(f=_.length-1),m=(g=_[f].t)-x),u==="pingpong"){if(Math.floor((x-b)/m)%2==0)return this.getValueAtTime(((x-b)%m+x)/this.comp.globalData.frameRate,0)}else{if(u==="offset"){var T=this.getValueAtTime(x/this.comp.globalData.frameRate,0),S=this.getValueAtTime(g/this.comp.globalData.frameRate,0),w=this.getValueAtTime((m-(x-b)%m+x)/this.comp.globalData.frameRate,0),M=Math.floor((x-b)/m)+1;if(this.pv.length){for(y=(v=new Array(T.length)).length,d=0;d<y;d+=1)v[d]=w[d]-(S[d]-T[d])*M;return v}return w-(S-T)*M}if(u==="continue"){var k=this.getValueAtTime(x/this.comp.globalData.frameRate,0),I=this.getValueAtTime((x+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(y=(v=new Array(k.length)).length,d=0;d<y;d+=1)v[d]=k[d]+(k[d]-I[d])*(x-b)/.001;return v}return k+(k-I)*(x-b)/.001}}return this.getValueAtTime((m-((x-b)%m+x))/this.comp.globalData.frameRate,0)}function r(u,f){if(!this.k)return this.pv;if(u=.5*(u||.4),(f=Math.floor(f||5))<=1)return this.pv;var p,m,g=this.comp.renderedFrame/this.comp.globalData.frameRate,d=g-u,y=f>1?(g+u-d)/(f-1):1,v=0,b=0;for(p=this.pv.length?createTypedArray("float32",this.pv.length):0;v<f;){if(m=this.getValueAtTime(d+v*y),this.pv.length)for(b=0;b<this.pv.length;b+=1)p[b]+=m[b];else p+=m;v+=1}if(this.pv.length)for(b=0;b<this.pv.length;b+=1)p[b]/=f;else p/=f;return p}function i(u){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var f=this._transformCachingAtTime.v;if(f.cloneFromProps(this.pre.props),this.appliedTransformations<1){var p=this.a.getValueAtTime(u);f.translate(-p[0]*this.a.mult,-p[1]*this.a.mult,p[2]*this.a.mult)}if(this.appliedTransformations<2){var m=this.s.getValueAtTime(u);f.scale(m[0]*this.s.mult,m[1]*this.s.mult,m[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var g=this.sk.getValueAtTime(u),d=this.sa.getValueAtTime(u);f.skewFromAxis(-g*this.sk.mult,d*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var y=this.r.getValueAtTime(u);f.rotate(-y*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var v=this.rz.getValueAtTime(u),b=this.ry.getValueAtTime(u),_=this.rx.getValueAtTime(u),x=this.or.getValueAtTime(u);f.rotateZ(-v*this.rz.mult).rotateY(b*this.ry.mult).rotateX(_*this.rx.mult).rotateZ(-x[2]*this.or.mult).rotateY(x[1]*this.or.mult).rotateX(x[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var T=this.px.getValueAtTime(u),S=this.py.getValueAtTime(u);if(this.data.p.z){var w=this.pz.getValueAtTime(u);f.translate(T*this.px.mult,S*this.py.mult,-w*this.pz.mult)}else f.translate(T*this.px.mult,S*this.py.mult,0)}else{var M=this.p.getValueAtTime(u);f.translate(M[0]*this.p.mult,M[1]*this.p.mult,-M[2]*this.p.mult)}return f}function n(){return this.v.clone(new Matrix)}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(u,f,p){var m=s(u,f,p);return m.dynamicProperties.length?m.getValueAtTime=i.bind(m):m.getValueAtTime=n.bind(m),m.setGroupProperty=expressionHelpers.setGroupProperty,m};var a=PropertyFactory.getProp;PropertyFactory.getProp=function(u,f,p,m,g){var d=a(u,f,p,m,g);d.kf?d.getValueAtTime=expressionHelpers.getValueAtTime.bind(d):d.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(d),d.setGroupProperty=expressionHelpers.setGroupProperty,d.loopOut=t,d.loopIn=e,d.smooth=r,d.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(d),d.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(d),d.numKeys=f.a===1?f.k.length:0,d.propertyIndex=f.ix;var y=0;return p!==0&&(y=createTypedArray("float32",f.a===1?f.k[0].s.length:f.k.length)),d._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:y},expressionHelpers.searchExpressions(u,f,d),d.k&&g.addDynamicProperty(d),d};var o=ShapePropertyFactory.getConstructorFunction(),l=ShapePropertyFactory.getKeyframedConstructorFunction();function h(){}h.prototype={vertices:function(u,f){this.k&&this.getValue();var p,m=this.v;f!==void 0&&(m=this.getValueAtTime(f,0));var g=m._length,d=m[u],y=m.v,v=createSizedArray(g);for(p=0;p<g;p+=1)v[p]=u==="i"||u==="o"?[d[p][0]-y[p][0],d[p][1]-y[p][1]]:[d[p][0],d[p][1]];return v},points:function(u){return this.vertices("v",u)},inTangents:function(u){return this.vertices("i",u)},outTangents:function(u){return this.vertices("o",u)},isClosed:function(){return this.v.c},pointOnPath:function(u,f){var p=this.v;f!==void 0&&(p=this.getValueAtTime(f,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(p));for(var m,g=this._segmentsLength,d=g.lengths,y=g.totalLength*u,v=0,b=d.length,_=0;v<b;){if(_+d[v].addedLength>y){var x=v,T=p.c&&v===b-1?0:v+1,S=(y-_)/d[v].addedLength;m=bez.getPointInSegment(p.v[x],p.v[T],p.o[x],p.i[T],S,d[v]);break}_+=d[v].addedLength,v+=1}return m||(m=p.c?[p.v[0][0],p.v[0][1]]:[p.v[p._length-1][0],p.v[p._length-1][1]]),m},vectorOnPath:function(u,f,p){u==1?u=this.v.c:u==0&&(u=.999);var m=this.pointOnPath(u,f),g=this.pointOnPath(u+.001,f),d=g[0]-m[0],y=g[1]-m[1],v=Math.sqrt(Math.pow(d,2)+Math.pow(y,2));return v===0?[0,0]:p==="tangent"?[d/v,y/v]:[-y/v,d/v]},tangentOnPath:function(u,f){return this.vectorOnPath(u,f,"tangent")},normalOnPath:function(u,f){return this.vectorOnPath(u,f,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([h],o),extendPrototype([h],l),l.prototype.getValueAtTime=function(u){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),u*=this.elem.globalData.frameRate,(u-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<u?this._caching.lastIndex:0,this._cachingAtTime.lastTime=u,this.interpolateShape(u,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},l.prototype.initiateExpression=ExpressionManager.initiateExpression;var c=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(u,f,p,m,g){var d=c(u,f,p,m,g);return d.propertyIndex=f.ix,d.lock=!1,p===3?expressionHelpers.searchExpressions(u,f.pt,d):p===4&&expressionHelpers.searchExpressions(u,f.ks,d),d.k&&u.addDynamicProperty(d),d}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(t,e){var r=this.calculateExpression(e);if(t.t!==r){var i={};return this.copyData(i,t),i.t=r.toString(),i.__complete=!1,i}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}function SVGComposableEffect(){}function SVGTintFilter(t,e,r,i,n){this.filterManager=e;var s=createNS("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),s.setAttribute("result",i+"_tint_1"),t.appendChild(s),(s=createNS("feColorMatrix")).setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),s.setAttribute("result",i+"_tint_2"),t.appendChild(s),this.matrixFilter=s;var a=this.createMergeNode(i,[n,i+"_tint_1",i+"_tint_2"]);t.appendChild(a)}function SVGFillFilter(t,e,r,i){this.filterManager=e;var n=createNS("feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),n.setAttribute("result",i),t.appendChild(n),this.matrixFilter=n}function SVGStrokeEffect(t,e,r){this.initialized=!1,this.filterManager=e,this.elem=r,this.paths=[]}function SVGTritoneFilter(t,e,r,i){this.filterManager=e;var n=createNS("feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","linearRGB"),n.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),t.appendChild(n);var s=createNS("feComponentTransfer");s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("result",i),this.matrixFilter=s;var a=createNS("feFuncR");a.setAttribute("type","table"),s.appendChild(a),this.feFuncR=a;var o=createNS("feFuncG");o.setAttribute("type","table"),s.appendChild(o),this.feFuncG=o;var l=createNS("feFuncB");l.setAttribute("type","table"),s.appendChild(l),this.feFuncB=l,t.appendChild(s)}function SVGProLevelsFilter(t,e,r,i){this.filterManager=e;var n=this.filterManager.effectElements,s=createNS("feComponentTransfer");(n[10].p.k||n[10].p.v!==0||n[11].p.k||n[11].p.v!==1||n[12].p.k||n[12].p.v!==1||n[13].p.k||n[13].p.v!==0||n[14].p.k||n[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",s)),(n[17].p.k||n[17].p.v!==0||n[18].p.k||n[18].p.v!==1||n[19].p.k||n[19].p.v!==1||n[20].p.k||n[20].p.v!==0||n[21].p.k||n[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",s)),(n[24].p.k||n[24].p.v!==0||n[25].p.k||n[25].p.v!==1||n[26].p.k||n[26].p.v!==1||n[27].p.k||n[27].p.v!==0||n[28].p.k||n[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",s)),(n[31].p.k||n[31].p.v!==0||n[32].p.k||n[32].p.v!==1||n[33].p.k||n[33].p.v!==1||n[34].p.k||n[34].p.v!==0||n[35].p.k||n[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",s)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s)),(n[3].p.k||n[3].p.v!==0||n[4].p.k||n[4].p.v!==1||n[5].p.k||n[5].p.v!==1||n[6].p.k||n[6].p.v!==0||n[7].p.k||n[7].p.v!==1)&&((s=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("result",i),t.appendChild(s),this.feFuncRComposed=this.createFeFunc("feFuncR",s),this.feFuncGComposed=this.createFeFunc("feFuncG",s),this.feFuncBComposed=this.createFeFunc("feFuncB",s))}function SVGDropShadowEffect(t,e,r,i,n){var s=e.container.globalData.renderConfig.filterSize,a=e.data.fs||s;t.setAttribute("x",a.x||s.x),t.setAttribute("y",a.y||s.y),t.setAttribute("width",a.width||s.width),t.setAttribute("height",a.height||s.height),this.filterManager=e;var o=createNS("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",i+"_drop_shadow_1"),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,t.appendChild(o);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",i+"_drop_shadow_1"),l.setAttribute("result",i+"_drop_shadow_2"),this.feOffset=l,t.appendChild(l);var h=createNS("feFlood");h.setAttribute("flood-color","#00ff00"),h.setAttribute("flood-opacity","1"),h.setAttribute("result",i+"_drop_shadow_3"),this.feFlood=h,t.appendChild(h);var c=createNS("feComposite");c.setAttribute("in",i+"_drop_shadow_3"),c.setAttribute("in2",i+"_drop_shadow_2"),c.setAttribute("operator","in"),c.setAttribute("result",i+"_drop_shadow_4"),t.appendChild(c);var u=this.createMergeNode(i,[i+"_drop_shadow_4",n]);t.appendChild(u)}SVGComposableEffect.prototype={createMergeNode:function(t,e){var r,i,n=createNS("feMerge");for(n.setAttribute("result",t),i=0;i<e.length;i+=1)(r=createNS("feMergeNode")).setAttribute("in",e[i]),n.appendChild(r),n.appendChild(r);return n}},extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",r[0]-e[0]+" 0 0 0 "+e[0]+" "+(r[1]-e[1])+" 0 0 0 "+e[1]+" "+(r[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,r,i,n=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(this.filterManager.effectElements[1].p.v===1?(i=this.elem.maskManager.masksProperties.length,r=0):i=(r=this.filterManager.effectElements[0].p.v-1)+1,(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);r<i;r+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:r});if(this.filterManager.effectElements[10].p.v===3){var s=createNS("mask"),a=createElementID();s.setAttribute("id",a),s.setAttribute("mask-type","alpha"),s.appendChild(e),this.elem.globalData.defs.appendChild(s);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+a+")");n[0];)o.appendChild(n[0]);this.elem.layerElement.appendChild(o),this.masker=s,e.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(n=this.elem.layerElement.children||this.elem.layerElement.childNodes;n.length;)this.elem.layerElement.removeChild(n[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var r,i,n=this.paths.length;for(e=0;e<n;e+=1)if(this.paths[e].m!==-1&&(r=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||r.prop._mdf)&&i.setAttribute("d",r.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var s;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var a=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=i.getTotalLength();s="0 0 0 "+l*a+" ";var h,c=l*(o-a),u=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,f=Math.floor(c/u);for(h=0;h<f;h+=1)s+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";s+="0 "+10*l+" 0 0"}else s="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",s)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(t||this.filterManager.effectElements[3].p._mdf)){var p=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*p[0])+","+bmFloor(255*p[1])+","+bmFloor(255*p[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,n=i[0]+" "+r[0]+" "+e[0],s=i[1]+" "+r[1]+" "+e[1],a=i[2]+" "+r[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",n),this.feFuncG.setAttribute("tableValues",s),this.feFuncB.setAttribute("tableValues",a)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var r=createNS(t);return r.setAttribute("type","table"),e.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(t,e,r,i,n){for(var s,a,o=0,l=Math.min(t,e),h=Math.max(t,e),c=Array.call(null,{length:256}),u=0,f=n-i,p=e-t;o<=256;)a=(s=o/256)<=l?p<0?n:i:s>=h?p<0?i:n:i+f*Math.pow((s-t)/p,1/r),c[u]=a,u+=1,o+=256/255;return c.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,n=r*Math.cos(i),s=r*Math.sin(i);this.feOffset.setAttribute("dx",n),this.feOffset.setAttribute("dy",s)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(t,e,r,i){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var n=createNS("feGaussianBlur");n.setAttribute("result",i),t.appendChild(n),this.feGaussianBlur=n}return SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e<r;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var r=t.layerElement.parentNode;if(r){for(var i,n=r.children,s=0,a=n.length;s<a&&n[s]!==t.layerElement;)s+=1;s<=a-2&&(i=n[s+1]);var o=createNS("use");o.setAttribute("href","#"+e),i?r.insertBefore(o,i):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var r=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var n=t.globalData.defs;n.appendChild(i);var s=createNS("symbol");s.setAttribute("id",r),this.replaceInParent(e,r),s.appendChild(e.layerElement),n.appendChild(s);var a=createNS("use");a.setAttribute("href","#"+r),i.appendChild(a),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,r=0,i=e.length;r<i;)e[r]&&e[r].data.ind===t&&this.setElementAsMask(this.elem,e[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,i=r==3?0:e,n=r==2?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+n);var s=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",s)}},registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect(20,SVGTintFilter,!0),registerEffect(21,SVGFillFilter,!0),registerEffect(22,SVGStrokeEffect,!1),registerEffect(23,SVGTritoneFilter,!0),registerEffect(24,SVGProLevelsFilter,!0),registerEffect(25,SVGDropShadowEffect,!0),registerEffect(28,SVGMatte3Effect,!1),registerEffect(29,SVGGaussianBlurEffect,!0),lottie})}),Kc,lg=Zm(Kc||(Kc=bi([`
38
38
  * {
39
39
  box-sizing: border-box;
40
40
  }
@@ -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
- `]))),Gc={},Ym=function(t,e,r,i,n){var s=new Worker(Gc[e]||(Gc[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},ue=Uint8Array,Xe=Uint16Array,Mi=Uint32Array,Di=new ue([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Fi=new ue([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yn=new ue([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Eu=function(t,e){for(var r=new Xe(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Mi(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]},Pu=Eu(Di,2),Jo=Pu[0],Rs=Pu[1];Jo[28]=258,Rs[258]=28;for(Po=Eu(Fi,0),Xo=Po[0],Ls=Po[1],Pi=new Xe(32768),ye=0;ye<32768;++ye)Kt=(43690&ye)>>>1|(21845&ye)<<1,Kt=(52428&Kt)>>>2|(13107&Kt)<<2,Kt=(61680&Kt)>>>4|(3855&Kt)<<4,Pi[ye]=((65280&Kt)>>>8|(255&Kt)<<8)>>>1;var Kt,Po,Xo,Ls,Pi,ye;for(bt=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[Pi[f]>>>h]=c}else for(o=new Xe(n),s=0;s<n;++s)e[s]&&(o[s]=Pi[l[e[s]-1]++]>>>15-e[s]);return o},jt=new ue(288),ye=0;ye<144;++ye)jt[ye]=8;var bt,jt,ye;for(ye=144;ye<256;++ye)jt[ye]=9;var ye;for(ye=256;ye<280;++ye)jt[ye]=7;var ye;for(ye=280;ye<288;++ye)jt[ye]=8;var ye;for(Ur=new ue(32),ye=0;ye<32;++ye)Ur[ye]=5;var Ur,ye,Au=bt(jt,9,0),Cu=bt(jt,9,1),Tu=bt(Ur,5,0),Iu=bt(Ur,5,1),Ss=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},ks=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&e)},vn=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?Mi:ue)(r-e);return i.set(t.subarray(e,r)),i},J1={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},Mu=["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"],K=function(t,e,r){var i=new Error(e||Mu[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,K),!r)throw i;return i},bn=function(t,e,r){var i=t.length;if(!i||r&&r.f&&!r.l)return e||new ue(0);var n=!e||r,s=!r||r.i;r||(r={}),e||(e=new ue(3*i));var a=function(ne){var re=e.length;if(ne>re){var Q=new ue(Math.max(2*re,ne));Q.set(e),e=Q}},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=vn(l)+4)-4]|t[I-3]<<8,y=I+d;if(y>i){s&&K(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=Cu,u=Iu,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 ue(_),T=new ue(19),S=0;S<b;++S)T[yn[S]]=Tt(t,l+3*S,7);l+=3*b;var w=Ss(T),M=(1<<w)-1,k=bt(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=Ss(F),p=Ss(O),c=bt(F,f,1),u=bt(O,p,1)}else K(1);if(l>m){s&&K(0);break}}n&&a(h+131072);for(var D=(1<<f)-1,C=(1<<p)-1,$=l;;$=l){var R=(A=c[ks(t,l)&D])>>>4;if((l+=15&A)>m){s&&K(0);break}if(A||K(2),R<256)e[h++]=R;else{if(R==256){$=l,c=null;break}var q=R-254;if(R>264){var U=Di[S=R-257];q=Tt(t,l,(1<<U)-1)+Jo[S],l+=U}var Y=u[ks(t,l)&C],G=Y>>>4;if(Y||K(3),l+=15&Y,O=Xo[G],G>3&&(U=Fi[G],O+=ks(t,l)&(1<<U)-1,l+=U),l>m){s&&K(0);break}n&&a(h+131072);for(var te=h+q;h<te;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=te}}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)},Nt=function(t,e,r){r<<=7&e;var i=e/8|0;t[i]|=r,t[i+1]|=r>>>8},bi=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},Es=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[rr,0];if(n==1){var a=new ue(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=Bs(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 ue(p),m]},Bs=function(t,e,r){return t.s==-1?Math.max(Bs(t.l,e,r+1),Bs(t.r,e,r+1)):e[t.s]=r},Oo=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]},_i=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},Vs=function(t,e,r){var i=r.length,n=vn(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)},$o=function(t,e,r,i,n,s,a,o,l,h,c){Nt(e,c++,r),++n[256];for(var u=Es(n,15),f=u[0],p=u[1],m=Es(s,15),g=m[0],d=m[1],y=Oo(f),v=y[0],b=y[1],_=Oo(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=Es(S,7),k=M[0],I=M[1],P=19;P>4&&!k[yn[P-1]];--P);var A,E,F,O,D=h+5<<3,C=_i(n,jt)+_i(s,Ur)+a,$=_i(n,f)+_i(s,g)+a+14+3*P+_i(S,k)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return Vs(e,c,t.subarray(l,l+h));if(Nt(e,c,1+($<C)),c+=2,$<C){A=bt(f,p,0),E=f,F=bt(g,d,0),O=g;var R=bt(k,I,0);for(Nt(e,c,b-257),Nt(e,c+5,T-1),Nt(e,c+10,P-4),c+=14,w=0;w<P;++w)Nt(e,c+3*w,k[yn[w]]);c+=3*P;for(var q=[v,x],U=0;U<2;++U){var Y=q[U];for(w=0;w<Y.length;++w){var G=31&Y[w];Nt(e,c,R[G]),c+=k[G],G>15&&(Nt(e,c,Y[w]>>>5&127),c+=Y[w]>>>12)}}}else A=Au,E=jt,F=Tu,O=Ur;for(w=0;w<o;++w)if(i[w]>255){G=i[w]>>>18&31,bi(e,c,A[G+257]),c+=E[G+257],G>7&&(Nt(e,c,i[w]>>>23&31),c+=Di[G]);var te=31&i[w];bi(e,c,F[te]),c+=O[te],te>3&&(bi(e,c,i[w]>>>5&8191),c+=Fi[te])}else bi(e,c,A[i[w]]),c+=E[i[w]];return bi(e,c,A[256]),c+E[256]},Du=new Mi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),rr=new ue(0),Fu=function(t,e,r,i,n,s){var a=t.length,o=new ue(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=Vs(l,h+1,t.subarray(c,u))}else{for(var f=Du[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(xe){return(t[xe]^t[xe+1]<<v^t[xe+2]<<b)&g},x=new Mi(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=$o(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,R=m,q=E-F&32767;if(O>2&&A==_(c-q))for(var U=Math.min(p,O)-1,Y=Math.min(32767,c),G=Math.min(258,O);q<=Y&&--R&&E!=F;){if(t[c+C]==t[c+C-q]){for(var te=0;te<G&&t[c+te]==t[c+te-q];++te);if(te>C){if(C=te,$=q,te>U)break;var ne=Math.min(q,te-2),re=0;for(D=0;D<ne;++D){var Q=c-q+D+32768&32767,we=Q-d[Q]+32768&32767;we>re&&(re=we,F=Q)}}}q+=(E=F)-(F=d[E])+32768&32767}if($){x[k++]=268435456|Rs[C]<<18|Ls[$];var ce=31&Rs[C],Ce=31&Ls[$];M+=Di[ce]+Fi[Ce],++T[257+ce],++S[Ce],I=c+C,++w}else x[k++]=t[c],++T[t[c]]}}h=$o(t,l,s,x,T,S,M,k,P,c-P,h),!s&&7&h&&(h=Vs(l,h+1,rr))}return It(o,0,i+vn(h)+n)},Ou=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}(),Oi=function(){var t=-1;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=Ou[255&r^e[i]]^r>>>8;t=r},d:function(){return~t}}},Ko=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}}},Zr=function(t,e,r,i,n){return Fu(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)},_n=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},Hc=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]},_s=[],Jm=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},$u=function(t,e,r,i){var n;if(!_s[r]){for(var s="",a={},o=t.length-1,l=0;l<o;++l)s=(n=Hc(t[l],s,a))[0],a=n[1];_s[r]=Hc(t[o],s,a)}var h=_n({},_s[r][1]);return Ym(_s[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",r,h,Jm(h),i)},$i=function(){return[ue,Xe,Mi,Di,Fi,yn,Jo,Xo,Cu,Iu,Pi,Mu,bt,Ss,Tt,ks,vn,It,K,bn,wn,gr,Qo]},Ri=function(){return[ue,Xe,Mi,Di,Fi,yn,Rs,Ls,Au,jt,Tu,Ur,Pi,Du,rr,bt,Nt,bi,Es,Bs,Oo,_i,Vs,$o,vn,It,Fu,Zr,Hs,gr]},Ru=function(){return[el,rl,_e,Oi,Ou]},Lu=function(){return[tl,zu]},Bu=function(){return[il,_e,Ko]},Vu=function(){return[Nu]},gr=function(t){return postMessage(t,[t.buffer])},Qo=function(t){return t&&t.size&&new ue(t.size)},Li=function(t,e,r,i,n,s){var a=$u(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])}},Bi=function(t,e,r,i,n){var s,a=$u(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||K(5),s&&e.ondata(K(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},Me=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},Ao=function(t,e){return Me(t,e)+4294967296*Me(t,e+4)},_e=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},el=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&&_e(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)}},tl=function(t){t[0]==31&&t[1]==139&&t[2]==8||K(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)},zu=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},rl=function(t){return 10+(t.filename&&t.filename.length+1||0)},il=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)},Nu=function(t){((15&t[0])!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&K(6,"invalid zlib data"),32&t[1]&&K(6,"invalid zlib data: preset dictionaries not supported")};function nl(t,e){return e||typeof t!="function"||(e=t,t={}),this.ondata=e,t}var ir=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(Zr(e,this.o,0,0,!r),r)},t.prototype.push=function(e,r){this.ondata||K(5),this.d&&K(4),this.d=r,this.p(e,r||!1)},t}(),Xm=function(){return function(t,e){Bi([Ri,function(){return[Mt,ir]}],this,nl.call(this,t,e),function(r){var i=new ir(r.data);onmessage=Mt(i)},6)}}();function Km(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Li(t,e,[Ri],function(i){return gr(Hs(i.data[0],i.data[1]))},0,r)}function Hs(t,e){return Zr(t,e||{},0,0)}var _t=function(){function t(e){this.s={},this.p=new ue(0),this.ondata=e}return t.prototype.e=function(e){this.ondata||K(5),this.d&&K(4);var r=this.p.length,i=new ue(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=bn(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}(),ju=function(){return function(t){this.ondata=t,Bi([$i,function(){return[Mt,_t]}],this,0,function(){var e=new _t;onmessage=Mt(e)},7)}}();function Gu(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Li(t,e,[$i],function(i){return gr(wn(i.data[0],Qo(i.data[1])))},1,r)}function wn(t,e){return bn(t,e)}var qc=function(){function t(e,r){this.c=Oi(),this.l=0,this.v=1,ir.call(this,e,r)}return t.prototype.push=function(e,r){ir.prototype.push.call(this,e,r)},t.prototype.p=function(e,r){this.c.p(e),this.l+=e.length;var i=Zr(e,this.o,this.v&&rl(this.o),r&&8,!r);this.v&&(el(i,this.o),this.v=0),r&&(_e(i,i.length-8,this.c.d()),_e(i,i.length-4,this.l)),this.ondata(i,r)},t}(),X1=function(){return function(t,e){Bi([Ri,Ru,function(){return[Mt,ir,qc]}],this,nl.call(this,t,e),function(r){var i=new qc(r.data);onmessage=Mt(i)},8)}}();function K1(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Li(t,e,[Ri,Ru,function(){return[Uc]}],function(i){return gr(Uc(i.data[0],i.data[1]))},2,r)}function Uc(t,e){e||(e={});var r=Oi(),i=t.length;r.p(t);var n=Zr(t,e,rl(e),8),s=n.length;return el(n,e),_e(n,s-8,r.d()),_e(n,s-4,i),n}var Ro=function(){function t(e){this.v=1,_t.call(this,e)}return t.prototype.push=function(e,r){if(_t.prototype.e.call(this,e),this.v){var i=this.p.length>3?tl(this.p):4;if(i>=this.p.length&&!r)return;this.p=this.p.subarray(i),this.v=0}r&&(this.p.length<8&&K(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),_t.prototype.c.call(this,r)},t}(),Qm=function(){return function(t){this.ondata=t,Bi([$i,Lu,function(){return[Mt,_t,Ro]}],this,0,function(){var e=new Ro;onmessage=Mt(e)},9)}}();function eg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Li(t,e,[$i,Lu,function(){return[Lo]}],function(i){return gr(Lo(i.data[0]))},3,r)}function Lo(t,e){return bn(t.subarray(tl(t),-8),e||new ue(zu(t)))}var Wc=function(){function t(e,r){this.c=Ko(),this.v=1,ir.call(this,e,r)}return t.prototype.push=function(e,r){ir.prototype.push.call(this,e,r)},t.prototype.p=function(e,r){this.c.p(e);var i=Zr(e,this.o,this.v&&2,r&&4,!r);this.v&&(il(i,this.o),this.v=0),r&&_e(i,i.length-4,this.c.d()),this.ondata(i,r)},t}(),Q1=function(){return function(t,e){Bi([Ri,Bu,function(){return[Mt,ir,Wc]}],this,nl.call(this,t,e),function(r){var i=new Wc(r.data);onmessage=Mt(i)},10)}}();function eb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Li(t,e,[Ri,Bu,function(){return[Zc]}],function(i){return gr(Zc(i.data[0],i.data[1]))},4,r)}function Zc(t,e){e||(e={});var r=Ko();r.p(t);var i=Zr(t,e,2,4);return il(i,e),_e(i,i.length-4,r.d()),i}var Bo=function(){function t(e){this.v=1,_t.call(this,e)}return t.prototype.push=function(e,r){if(_t.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&&K(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),_t.prototype.c.call(this,r)},t}(),tg=function(){return function(t){this.ondata=t,Bi([$i,Vu,function(){return[Mt,_t,Bo]}],this,0,function(){var e=new Bo;onmessage=Mt(e)},11)}}();function rg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Li(t,e,[$i,Vu,function(){return[Vo]}],function(i){return gr(Vo(i.data[0],Qo(i.data[1])))},5,r)}function Vo(t,e){return bn((Nu(t),t.subarray(2,-4)),e)}var ig=function(){function t(e){this.G=Ro,this.I=_t,this.Z=Bo,this.ondata=e}return t.prototype.push=function(e,r){if(this.ondata||K(5),this.s)this.s.push(e,r);else{if(this.p&&this.p.length){var i=new ue(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}(),tb=function(){function t(e){this.G=Qm,this.I=ju,this.Z=tg,this.ondata=e}return t.prototype.push=function(e,r){ig.prototype.push.call(this,e,r)},t}();function rb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),t[0]==31&&t[1]==139&&t[2]==8?eg(t,e,r):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?Gu(t,e,r):rg(t,e,r)}function ib(t,e){return t[0]==31&&t[1]==139&&t[2]==8?Lo(t,e):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?wn(t,e):Vo(t,e)}var sl=function(t,e,r,i){for(var n in t){var s=t[n],a=e+n,o=i;Array.isArray(s)&&(o=_n(i,s[1]),s=s[0]),s instanceof ue?r[a]=[s,o]:(r[a+="/"]=[new ue(0),o],sl(s,a,r,i))}},Yc=typeof TextEncoder<"u"&&new TextEncoder,zo=typeof TextDecoder<"u"&&new TextDecoder,Hu=0;try{zo.decode(rr,{stream:!0}),Hu=1}catch(t){}var qu=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)}},nb=function(){function t(e){this.ondata=e,Hu?this.t=new TextDecoder:this.p=rr}return t.prototype.push=function(e,r){if(this.ondata||K(5),r=!!r,this.t)return this.ondata(this.t.decode(e,{stream:!0}),r),void(r&&(this.t.decode().length&&K(8),this.t=null));this.p||K(4);var i=new ue(this.p.length+e.length);i.set(this.p),i.set(e,this.p.length);var n=qu(i),s=n[0],a=n[1];r?(a.length&&K(8),this.p=null):this.p=a,this.ondata(s,r)},t}(),sb=function(){function t(e){this.ondata=e}return t.prototype.push=function(e,r){this.ondata||K(5),this.d&&K(4),this.ondata(Wr(e),this.d=r||!1)},t}();function Wr(t,e){if(e){for(var r=new ue(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}if(Yc)return Yc.encode(t);var n=t.length,s=new ue(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 ue(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 pn(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(zo)return zo.decode(t);var n=qu(t),s=n[0];return n[1].length&&K(8),s}var Uu=function(t){return t==1?3:t<6?2:t==9?1:0},Wu=function(t,e){return e+30+it(t,e+26)+it(t,e+28)},Zu=function(t,e,r){var i=it(t,e+28),n=pn(t.subarray(e+46,e+46+i),!(2048&it(t,e+8))),s=e+46+i,a=Me(t,e+20),o=r&&a==4294967295?Yu(t,s):[a,Me(t,e+24),Me(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]},Yu=function(t,e){for(;it(t,e)!=1;e+=4+it(t,e+2));return[Ao(t,e+12),Ao(t,e+4),Ao(t,e+20)]},mr=function(t){var e=0;if(t)for(var r in t){var i=t[r].length;i>65535&&K(9),e+=i+4}return e},Ai=function(t,e,r,i,n,s,a,o){var l=i.length,h=r.extra,c=o&&o.length,u=mr(h);_e(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)&&K(10),_e(t,e,p<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>>1),e+=4,s!=-1&&(_e(t,e,r.crc),_e(t,e+4,s<0?-s-2:s),_e(t,e+8,r.size)),_e(t,e+12,l),_e(t,e+14,u),e+=16,a!=null&&(_e(t,e,c),_e(t,e+6,r.attrs),_e(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;_e(t,e,+m),_e(t,e+2,d),t.set(g,e+4),e+=4+d}return c&&(t.set(o,e),e+=c),e},al=function(t,e,r,i,n){_e(t,e,101010256),_e(t,e+8,r),_e(t,e+10,r),_e(t,e+12,i),_e(t,e+16,n)},zs=function(){function t(e){this.filename=e,this.c=Oi(),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||K(5),this.c.p(e),this.size+=e.length,r&&(this.crc=this.c.d()),this.process(e,r||!1)},t}(),ab=function(){function t(e,r){var i=this;r||(r={}),zs.call(this,e),this.d=new ir(r,function(n,s){i.ondata(null,n,s)}),this.compression=8,this.flag=Uu(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){zs.prototype.push.call(this,e,r)},t}(),lb=function(){function t(e,r){var i=this;r||(r={}),zs.call(this,e),this.d=new Xm(r,function(n,s,a){i.ondata(n,s,a)}),this.compression=8,this.flag=Uu(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){zs.prototype.push.call(this,e,r)},t}(),hb=function(){function t(e){this.ondata=e,this.u=[],this.d=1}return t.prototype.add=function(e){var r=this;if(this.ondata||K(5),2&this.d)this.ondata(K(4+8*(1&this.d),0,1),null,!1);else{var i=Wr(e.filename),n=i.length,s=e.comment,a=s&&Wr(s),o=n!=e.filename.length||a&&s.length!=a.length,l=n+mr(e.extra)+30;n>65535&&this.ondata(K(11,0,1),null,!1);var h=new ue(l);Ai(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=_n(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 ue(16);_e(b,0,134695760),_e(b,4,e.crc),_e(b,8,g),_e(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(K(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+mr(h.extra)+(h.o?h.o.length:0);for(var a=new ue(i+22),o=0,l=this.u;o<l.length;o++){var h=l[o];Ai(a,e,h,h.f,h.u,-h.c-2,r,h.o),e+=46+h.f.length+mr(h.extra)+(h.o?h.o.length:0),r+=h.b}al(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 cb(t,e,r){r||(r=e,e={}),typeof r!="function"&&K(7);var i={};sl(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){Ns(function(){r(d,y)})};Ns(function(){f=r});var p=function(){var d=new ue(o+22),y=a,v=o-a;o=0;for(var b=0;b<l;++b){var _=h[b];try{var x=_.c.length;Ai(d,o,_,_.f,_.u,x);var T=30+_.f.length+mr(_.extra),S=o+T;d.set(_.c,S),Ai(d,a,_,_.f,_.u,x,o,_.m),a+=16+T+(_.m?_.m.length:0),o=S+x}catch(w){return f(w,null)}}al(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=Oi(),T=b.length;x.p(b);var S=Wr(y),w=S.length,M=_.comment,k=M&&Wr(M),I=k&&k.length,P=mr(_.extra),A=_.level==0?0:8,E=function(F,O){if(F)u(),f(F,null);else{var D=O.length;h[d]=_n(_,{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(K(11,0,1),null),A)if(T<16e4)try{E(null,Hs(b,_))}catch(F){E(F,null)}else c.push(Km(b,_,E));else E(null,b)},g=0;g<l;++g)m(g);return u}function ub(t,e){e||(e={});var r={},i=[];sl(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=Wr(a)).length,f=h.comment,p=f&&Wr(f),m=p&&p.length,g=mr(h.extra);u>65535&&K(11);var d=c?Hs(l,h):l,y=d.length,v=Oi();v.p(l),i.push(_n(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 ue(s+22),_=n,x=s-n,T=0;T<i.length;++T){var S=i[T];Ai(b,S.o,S,S.f,S.u,S.c.length);var w=30+S.f.length+mr(S.extra);b.set(S.c,S.o+w),Ai(b,n,S,S.f,S.u,S.c.length,S.o,S.m),n+=16+w+(S.m?S.m.length:0)}return al(b,n,i.length,x,_),b}var ng=function(){function t(){}return t.prototype.push=function(e,r){this.ondata(null,e,r)},t.compression=0,t}(),pb=function(){function t(){var e=this;this.i=new _t(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}(),db=function(){function t(e,r){var i=this;r<32e4?this.i=new _t(function(n,s){i.ondata(null,n,s)}):(this.i=new ju(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}(),fb=function(){function t(e){this.onfile=e,this.k=[],this.o={0:ng},this.p=rr}return t.prototype.push=function(e,r){var i=this;if(this.onfile||K(5),this.p||K(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 ue(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=Me(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=Me(h,o+18),I=Me(h,o+22),P=pn(h.subarray(o+30,o+=30+T),!_);k==4294967295?(d=x?[-2]:Yu(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||K(5),k){var E=i.o[b];E||A.ondata(K(14,"unknown compression type "+b,1),null,!1),(M=k<0?new E(P):new E(P,k,I)).ondata=function(C,$,R){A.ondata(C,$,R)};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(rr,!0)}else A.ondata(null,rr,!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=rr,u<0){var g=a?h.subarray(0,l-12-(u==-2&&8)-(Me(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&&K(13),this.p=null)},t.prototype.register=function(e){this.o[e.compression]=e},t}(),Ns=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(t){t()};function sg(t,e,r){r||(r=e,e={}),typeof r!="function"&&K(7);var i=[],n=function(){for(var d=0;d<i.length;++d)i[d]()},s={},a=function(d,y){Ns(function(){r(d,y)})};Ns(function(){a=r});for(var o=t.length-22;Me(t,o)!=101010256;--o)if(!o||t.length-o>65558)return a(K(13,0,1),null),n;var l=it(t,o+8);if(l){var h=l,c=Me(t,o+16),u=c==4294967295||h==65535;if(u){var f=Me(t,o-12);(u=Me(t,f)==101075792)&&(h=l=Me(t,f+32),c=Me(t,f+48))}for(var p=e&&e.filter,m=function(d){var y=Zu(t,c,u),v=y[0],b=y[1],_=y[2],x=y[3],T=y[4],S=y[5],w=Wu(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,wn(k,new ue(_)))}catch(I){M(I,null)}else i.push(Gu(k,{size:_},M))}else M(K(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 mb(t,e){for(var r={},i=t.length-22;Me(t,i)!=101010256;--i)(!i||t.length-i>65558)&&K(13);var n=it(t,i+8);if(!n)return{};var s=Me(t,i+16),a=s==4294967295||n==65535;if(a){var o=Me(t,i-12);(a=Me(t,o)==101075792)&&(n=Me(t,o+32),s=Me(t,o+48))}for(var l=e&&e.filter,h=0;h<n;++h){var c=Zu(t,s,a),u=c[0],f=c[1],p=c[2],m=c[3],g=c[4],d=c[5],y=Wu(t,d);s=g,l&&!l({name:m,size:f,originalSize:p,compression:u})||(u?u==8?r[m]=wn(t.subarray(y,y+f),new ue(p)):K(14,"unknown compression type "+u):r[m]=It(t,y,y+f))}return r}var ag="@dotlottie/player-component",og="1.4.2",lg="dotlottie animation player web component.",hg="dist/dotlottie-player.js",cg="dist/dotlottie-player.esm.js",ug="dist/dotlottie-player.esm.d.ts",pg="https://dotlottie.com/players",dg="https://github.com/dotlottie/player-component.git",fg="https://github.com/dotlottie/player-component/issues",mg="Jawish Hameed <jawish@lottiefiles.com>",gg="MIT",yg={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)"},vg={"@rollup/plugin-json":"^6.0.0",fflate:"^0.7.3",lit:"^2.4.1","lottie-web":"^5.10.0",tsup:"^6.1.3"},bg={"@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"},_g=["dist"],wg=["dotlottie","animation","web component","component","lit-element","player"],xg=["> 3%"],Sg={access:"public"},kg={extends:"@istanbuljs/nyc-config-typescript",all:!0},Jc={name:ag,version:og,description:lg,main:hg,module:cg,types:ug,homepage:pg,repository:dg,bugs:fg,author:mg,license:gg,scripts:yg,dependencies:vg,devDependencies:bg,files:_g,keywords:wg,browserslist:xg,publishConfig:Sg,nyc:kg},lt=t=>new Error("[dotLottie-player-component] ".concat(t)),Xc=t=>{let e="[dotLottie-player-component] ".concat(t);console.error(e)},Co=t=>{let e="[dotLottie-player-component] ".concat(t);console.warn(e)},Kc,Qc,eu,tu,ru,ke,Qt,Ne;(function(t){t.Loading="loading",t.Playing="playing",t.Paused="paused",t.Stopped="stopped",t.Frozen="frozen",t.Error="error"})(ke||(ke={})),function(t){t.Normal="normal",t.Bounce="bounce"}(Qt||(Qt={})),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"}(Ne||(Ne={}));var iu="dotlottie-player",je=class t extends Gr{constructor(){super(),this.mode=Qt.Normal,this.autoplay=!1,this.background="transparent",this.controls=!1,this.direction=1,this.hover=!1,this.renderer="svg",this.speed=1,this.currentState=ke.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):(Co("loop must be a positive integer or a boolean"),!1)}_onVisibilityChange(){document.hidden&&this.currentState===ke.Playing?this.freeze():this.currentState===ke.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)=>{sg(new Uint8Array(r),(h,c)=>{h&&l(h),o(c)})}),a;if(s["manifest.json"]){let o=pn(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(pn(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(pn(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=ke.Error,this.dispatchEvent(new CustomEvent(Ne.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:Co("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:Co("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(Ne.Load)),this._lottie.addEventListener("enterFrame",()=>{this.seeker=this._lottie.currentFrame/this._lottie.totalFrames*100,this.dispatchEvent(new CustomEvent(Ne.Frame,{detail:{frame:this._lottie.currentFrame,seeker:this.seeker}}))}),this._lottie.addEventListener("complete",()=>{if(this.currentState===ke.Playing){if((!this._loop||this._count&&this._counter>=this._count)&&(this.dispatchEvent(new CustomEvent(Ne.Complete)),this.mode!==Qt.Bounce||this._lottie.currentFrame===0))return;this.mode===Qt.Bounce?(this._count&&(this._counter+=.5),setTimeout(()=>{this.dispatchEvent(new CustomEvent(Ne.Loop)),this.currentState===ke.Playing&&(this._lottie.setDirection(-1*this._lottie.playDirection),this._lottie.play())},this.intermission)):(this._count&&(this._counter+=1),window.setTimeout(()=>{this.dispatchEvent(new CustomEvent(Ne.Loop)),this.currentState===ke.Playing&&(this.direction===-1?(this.seek("99%"),this.play()):(this._lottie.stop(),this.play()))},this.intermission))}else this.dispatchEvent(new CustomEvent(Ne.Complete))}),this._lottie.addEventListener("DOMLoaded",()=>{this.dispatchEvent(new CustomEvent(Ne.Ready))}),this._lottie.addEventListener("data_ready",()=>{this.dispatchEvent(new CustomEvent(Ne.Load))}),this._lottie.addEventListener("data_failed",()=>{this.currentState=ke.Error,this.dispatchEvent(new CustomEvent(Ne.Error))}),this.container.addEventListener("mouseenter",()=>{this.hover&&this.currentState!==ke.Playing&&this.play()}),this.container.addEventListener("mouseleave",()=>{this.hover&&this.currentState===ke.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"?Qt.Normal:Qt.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"?Qt.Normal:Qt.Bounce:this[u]=f)}}else this._loadManifestOptions(this._activeAnimationIndex);this._lottie=Wm.loadAnimation(Object.assign(Object.assign({},n),{animationData:a!==null?a:s}))}catch(s){return this.currentState=ke.Error,this.dispatchEvent(new CustomEvent(Ne.Error)),void console.error(s)}if(!this._lottie)throw this.currentState=ke.Error,this.dispatchEvent(new CustomEvent(Ne.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(Jc.dependencies["lottie-web"]),dotLottiePlayerVersion:"".concat(Jc.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=ke.Playing,void this.dispatchEvent(new CustomEvent(Ne.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})):Xc("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})):Xc("Animation not found at index: ".concat(e)))}}}pause(){this._lottie&&(this._lottie.pause(),this.currentState=ke.Paused,this.dispatchEvent(new CustomEvent(Ne.Pause)))}stop(){this._lottie&&(this._counter=0,this._lottie.stop(),this.direction===-1&&this._lottie.goToAndStop(this._lottie.totalFrames,!0),this.currentState=ke.Stopped,this.dispatchEvent(new CustomEvent(Ne.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===ke.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=ke.Frozen,this.dispatchEvent(new CustomEvent(Ne.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===ke.Playing?this.pause():this.play()}toggleLooping(){let e=!this._loop;this.setLooping(e.toString())}static get styles(){return Zm}async firstUpdated(){"IntersectionObserver"in window&&(this._io=new IntersectionObserver(e=>{e[0].isIntersecting?this.currentState===ke.Frozen&&this.play():this.currentState===ke.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(Ne.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===ke.Playing,r=this.currentState===ke.Paused,i=this.currentState===ke.Stopped;return bs(Kc||(Kc=vi([`
195
+ `]))),Qc={},hg=function(t,e,r,i,n){var s=new Worker(Qc[e]||(Qc[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,Di=Uint32Array,Fi=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]),Oi=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]),vn=new de([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),$u=function(t,e){for(var r=new Xe(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Di(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]},Ru=$u(Fi,2),sl=Ru[0],Bs=Ru[1];sl[28]=258,Bs[258]=28;for($o=$u(Oi,0),al=$o[0],Vs=$o[1],Ai=new Xe(32768),be=0;be<32768;++be)Qt=(43690&be)>>>1|(21845&be)<<1,Qt=(52428&Qt)>>>2|(13107&Qt)<<2,Qt=(61680&Qt)>>>4|(3855&Qt)<<4,Ai[be]=((65280&Qt)>>>8|(255&Qt)<<8)>>>1;var Qt,$o,al,Vs,Ai,be;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[Ai[f]>>>h]=c}else for(o=new Xe(n),s=0;s<n;++s)e[s]&&(o[s]=Ai[l[e[s]-1]++]>>>15-e[s]);return o},jt=new de(288),be=0;be<144;++be)jt[be]=8;var _t,jt,be;for(be=144;be<256;++be)jt[be]=9;var be;for(be=256;be<280;++be)jt[be]=7;var be;for(be=280;be<288;++be)jt[be]=8;var be;for(Wr=new de(32),be=0;be<32;++be)Wr[be]=5;var Wr,be,Lu=_t(jt,9,0),Bu=_t(jt,9,1),Vu=_t(Wr,5,0),Nu=_t(Wr,5,1),Es=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},Ps=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&e)},bn=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?Di:de)(r-e);return i.set(t.subarray(e,r)),i},ub={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"],K=function(t,e,r){var i=new Error(e||zu[t]);if(i.code=t,Error.captureStackTrace&&Error.captureStackTrace(i,K),!r)throw i;return i},_n=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 Q=new de(Math.max(2*ie,se));Q.set(e),e=Q}},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=bn(l)+4)-4]|t[I-3]<<8,y=I+d;if(y>i){s&&K(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=Bu,u=Nu,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[vn[S]]=Tt(t,l+3*S,7);l+=3*b;var w=Es(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=Es(F),p=Es(O),c=_t(F,f,1),u=_t(O,p,1)}else K(1);if(l>m){s&&K(0);break}}n&&a(h+131072);for(var D=(1<<f)-1,C=(1<<p)-1,$=l;;$=l){var R=(A=c[Ps(t,l)&D])>>>4;if((l+=15&A)>m){s&&K(0);break}if(A||K(2),R<256)e[h++]=R;else{if(R==256){$=l,c=null;break}var q=R-254;if(R>264){var U=Fi[S=R-257];q=Tt(t,l,(1<<U)-1)+sl[S],l+=U}var Y=u[Ps(t,l)&C],G=Y>>>4;if(Y||K(3),l+=15&Y,O=al[G],G>3&&(U=Oi[G],O+=Ps(t,l)&(1<<U)-1,l+=U),l>m){s&&K(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},_i=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},As=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=Ns(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]},Ns=function(t,e,r){return t.s==-1?Math.max(Ns(t.l,e,r+1),Ns(t.r,e,r+1)):e[t.s]=r},Go=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]},wi=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},zs=function(t,e,r){var i=r.length,n=bn(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)},Ho=function(t,e,r,i,n,s,a,o,l,h,c){zt(e,c++,r),++n[256];for(var u=As(n,15),f=u[0],p=u[1],m=As(s,15),g=m[0],d=m[1],y=Go(f),v=y[0],b=y[1],_=Go(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=As(S,7),k=M[0],I=M[1],P=19;P>4&&!k[vn[P-1]];--P);var A,E,F,O,D=h+5<<3,C=wi(n,jt)+wi(s,Wr)+a,$=wi(n,f)+wi(s,g)+a+14+3*P+wi(S,k)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return zs(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 R=_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[vn[w]]);c+=3*P;for(var q=[v,x],U=0;U<2;++U){var Y=q[U];for(w=0;w<Y.length;++w){var G=31&Y[w];zt(e,c,R[G]),c+=k[G],G>15&&(zt(e,c,Y[w]>>>5&127),c+=Y[w]>>>12)}}}else A=Lu,E=jt,F=Vu,O=Wr;for(w=0;w<o;++w)if(i[w]>255){G=i[w]>>>18&31,_i(e,c,A[G+257]),c+=E[G+257],G>7&&(zt(e,c,i[w]>>>23&31),c+=Fi[G]);var re=31&i[w];_i(e,c,F[re]),c+=O[re],re>3&&(_i(e,c,i[w]>>>5&8191),c+=Oi[re])}else _i(e,c,A[i[w]]),c+=E[i[w]];return _i(e,c,A[256]),c+E[256]},ju=new Di([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ir=new de(0),Gu=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=zs(l,h+1,t.subarray(c,u))}else{for(var f=ju[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(Se){return(t[Se]^t[Se+1]<<v^t[Se+2]<<b)&g},x=new Di(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=Ho(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,R=m,q=E-F&32767;if(O>2&&A==_(c-q))for(var U=Math.min(p,O)-1,Y=Math.min(32767,c),G=Math.min(258,O);q<=Y&&--R&&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 Q=c-q+D+32768&32767,xe=Q-d[Q]+32768&32767;xe>ie&&(ie=xe,F=Q)}}}q+=(E=F)-(F=d[E])+32768&32767}if($){x[k++]=268435456|Bs[C]<<18|Vs[$];var ue=31&Bs[C],Ie=31&Vs[$];M+=Fi[ue]+Oi[Ie],++T[257+ue],++S[Ie],I=c+C,++w}else x[k++]=t[c],++T[t[c]]}}h=Ho(t,l,s,x,T,S,M,k,P,c-P,h),!s&&7&h&&(h=zs(l,h+1,ir))}return It(o,0,i+bn(h)+n)},Hu=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}(),$i=function(){var t=-1;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=Hu[255&r^e[i]]^r>>>8;t=r},d:function(){return~t}}},ol=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}}},Yr=function(t,e,r,i,n){return Gu(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)},wn=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},eu=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]},xs=[],cg=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},qu=function(t,e,r,i){var n;if(!xs[r]){for(var s="",a={},o=t.length-1,l=0;l<o;++l)s=(n=eu(t[l],s,a))[0],a=n[1];xs[r]=eu(t[o],s,a)}var h=wn({},xs[r][1]);return hg(xs[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",r,h,cg(h),i)},Ri=function(){return[de,Xe,Di,Fi,Oi,vn,sl,al,Bu,Nu,Ai,zu,_t,Es,Tt,Ps,bn,It,K,_n,xn,yr,ll]},Li=function(){return[de,Xe,Di,Fi,Oi,vn,Bs,Vs,Lu,jt,Vu,Wr,Ai,ju,ir,_t,zt,_i,As,Ns,Go,wi,zs,Ho,bn,It,Gu,Yr,Us,yr]},Uu=function(){return[hl,ul,we,$i,Hu]},Wu=function(){return[cl,Ju]},Zu=function(){return[pl,we,ol]},Yu=function(){return[Xu]},yr=function(t){return postMessage(t,[t.buffer])},ll=function(t){return t&&t.size&&new de(t.size)},Bi=function(t,e,r,i,n,s){var a=qu(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])}},Vi=function(t,e,r,i,n){var s,a=qu(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||K(5),s&&e.ondata(K(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},Ro=function(t,e){return Fe(t,e)+4294967296*Fe(t,e+4)},we=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},hl=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&&we(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)}},cl=function(t){t[0]==31&&t[1]==139&&t[2]==8||K(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)},Ju=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},ul=function(t){return 10+(t.filename&&t.filename.length+1||0)},pl=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)},Xu=function(t){((15&t[0])!=8||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&K(6,"invalid zlib data"),32&t[1]&&K(6,"invalid zlib data: preset dictionaries not supported")};function dl(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(Yr(e,this.o,0,0,!r),r)},t.prototype.push=function(e,r){this.ondata||K(5),this.d&&K(4),this.d=r,this.p(e,r||!1)},t}(),ug=function(){return function(t,e){Vi([Li,function(){return[Mt,nr]}],this,dl.call(this,t,e),function(r){var i=new nr(r.data);onmessage=Mt(i)},6)}}();function pg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Bi(t,e,[Li],function(i){return yr(Us(i.data[0],i.data[1]))},0,r)}function Us(t,e){return Yr(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||K(5),this.d&&K(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=_n(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}(),Ku=function(){return function(t){this.ondata=t,Vi([Ri,function(){return[Mt,wt]}],this,0,function(){var e=new wt;onmessage=Mt(e)},7)}}();function Qu(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Bi(t,e,[Ri],function(i){return yr(xn(i.data[0],ll(i.data[1])))},1,r)}function xn(t,e){return _n(t,e)}var tu=function(){function t(e,r){this.c=$i(),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=Yr(e,this.o,this.v&&ul(this.o),r&&8,!r);this.v&&(hl(i,this.o),this.v=0),r&&(we(i,i.length-8,this.c.d()),we(i,i.length-4,this.l)),this.ondata(i,r)},t}(),pb=function(){return function(t,e){Vi([Li,Uu,function(){return[Mt,nr,tu]}],this,dl.call(this,t,e),function(r){var i=new tu(r.data);onmessage=Mt(i)},8)}}();function db(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Bi(t,e,[Li,Uu,function(){return[ru]}],function(i){return yr(ru(i.data[0],i.data[1]))},2,r)}function ru(t,e){e||(e={});var r=$i(),i=t.length;r.p(t);var n=Yr(t,e,ul(e),8),s=n.length;return hl(n,e),we(n,s-8,r.d()),we(n,s-4,i),n}var qo=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?cl(this.p):4;if(i>=this.p.length&&!r)return;this.p=this.p.subarray(i),this.v=0}r&&(this.p.length<8&&K(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),wt.prototype.c.call(this,r)},t}(),dg=function(){return function(t){this.ondata=t,Vi([Ri,Wu,function(){return[Mt,wt,qo]}],this,0,function(){var e=new qo;onmessage=Mt(e)},9)}}();function fg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Bi(t,e,[Ri,Wu,function(){return[Uo]}],function(i){return yr(Uo(i.data[0]))},3,r)}function Uo(t,e){return _n(t.subarray(cl(t),-8),e||new de(Ju(t)))}var iu=function(){function t(e,r){this.c=ol(),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=Yr(e,this.o,this.v&&2,r&&4,!r);this.v&&(pl(i,this.o),this.v=0),r&&we(i,i.length-4,this.c.d()),this.ondata(i,r)},t}(),fb=function(){return function(t,e){Vi([Li,Zu,function(){return[Mt,nr,iu]}],this,dl.call(this,t,e),function(r){var i=new iu(r.data);onmessage=Mt(i)},10)}}();function mb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Bi(t,e,[Li,Zu,function(){return[nu]}],function(i){return yr(nu(i.data[0],i.data[1]))},4,r)}function nu(t,e){e||(e={});var r=ol();r.p(t);var i=Yr(t,e,2,4);return pl(i,e),we(i,i.length-4,r.d()),i}var Wo=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&&K(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),wt.prototype.c.call(this,r)},t}(),mg=function(){return function(t){this.ondata=t,Vi([Ri,Yu,function(){return[Mt,wt,Wo]}],this,0,function(){var e=new Wo;onmessage=Mt(e)},11)}}();function gg(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),Bi(t,e,[Ri,Yu,function(){return[Zo]}],function(i){return yr(Zo(i.data[0],ll(i.data[1])))},5,r)}function Zo(t,e){return _n((Xu(t),t.subarray(2,-4)),e)}var yg=function(){function t(e){this.G=qo,this.I=wt,this.Z=Wo,this.ondata=e}return t.prototype.push=function(e,r){if(this.ondata||K(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}(),gb=function(){function t(e){this.G=dg,this.I=Ku,this.Z=mg,this.ondata=e}return t.prototype.push=function(e,r){yg.prototype.push.call(this,e,r)},t}();function yb(t,e,r){return r||(r=e,e={}),typeof r!="function"&&K(7),t[0]==31&&t[1]==139&&t[2]==8?fg(t,e,r):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?Qu(t,e,r):gg(t,e,r)}function vb(t,e){return t[0]==31&&t[1]==139&&t[2]==8?Uo(t,e):(15&t[0])!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?xn(t,e):Zo(t,e)}var fl=function(t,e,r,i){for(var n in t){var s=t[n],a=e+n,o=i;Array.isArray(s)&&(o=wn(i,s[1]),s=s[0]),s instanceof de?r[a]=[s,o]:(r[a+="/"]=[new de(0),o],fl(s,a,r,i))}},su=typeof TextEncoder<"u"&&new TextEncoder,Yo=typeof TextDecoder<"u"&&new TextDecoder,ep=0;try{Yo.decode(ir,{stream:!0}),ep=1}catch(t){}var tp=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)}},bb=function(){function t(e){this.ondata=e,ep?this.t=new TextDecoder:this.p=ir}return t.prototype.push=function(e,r){if(this.ondata||K(5),r=!!r,this.t)return this.ondata(this.t.decode(e,{stream:!0}),r),void(r&&(this.t.decode().length&&K(8),this.t=null));this.p||K(4);var i=new de(this.p.length+e.length);i.set(this.p),i.set(e,this.p.length);var n=tp(i),s=n[0],a=n[1];r?(a.length&&K(8),this.p=null):this.p=a,this.ondata(s,r)},t}(),_b=function(){function t(e){this.ondata=e}return t.prototype.push=function(e,r){this.ondata||K(5),this.d&&K(4),this.ondata(Zr(e),this.d=r||!1)},t}();function Zr(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(su)return su.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 dn(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(Yo)return Yo.decode(t);var n=tp(t),s=n[0];return n[1].length&&K(8),s}var rp=function(t){return t==1?3:t<6?2:t==9?1:0},ip=function(t,e){return e+30+it(t,e+26)+it(t,e+28)},np=function(t,e,r){var i=it(t,e+28),n=dn(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?sp(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]},sp=function(t,e){for(;it(t,e)!=1;e+=4+it(t,e+2));return[Ro(t,e+12),Ro(t,e+4),Ro(t,e+20)]},gr=function(t){var e=0;if(t)for(var r in t){var i=t[r].length;i>65535&&K(9),e+=i+4}return e},Ci=function(t,e,r,i,n,s,a,o){var l=i.length,h=r.extra,c=o&&o.length,u=gr(h);we(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)&&K(10),we(t,e,p<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>>1),e+=4,s!=-1&&(we(t,e,r.crc),we(t,e+4,s<0?-s-2:s),we(t,e+8,r.size)),we(t,e+12,l),we(t,e+14,u),e+=16,a!=null&&(we(t,e,c),we(t,e+6,r.attrs),we(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;we(t,e,+m),we(t,e+2,d),t.set(g,e+4),e+=4+d}return c&&(t.set(o,e),e+=c),e},ml=function(t,e,r,i,n){we(t,e,101010256),we(t,e+8,r),we(t,e+10,r),we(t,e+12,i),we(t,e+16,n)},js=function(){function t(e){this.filename=e,this.c=$i(),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||K(5),this.c.p(e),this.size+=e.length,r&&(this.crc=this.c.d()),this.process(e,r||!1)},t}(),wb=function(){function t(e,r){var i=this;r||(r={}),js.call(this,e),this.d=new nr(r,function(n,s){i.ondata(null,n,s)}),this.compression=8,this.flag=rp(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){js.prototype.push.call(this,e,r)},t}(),xb=function(){function t(e,r){var i=this;r||(r={}),js.call(this,e),this.d=new ug(r,function(n,s,a){i.ondata(n,s,a)}),this.compression=8,this.flag=rp(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){js.prototype.push.call(this,e,r)},t}(),Sb=function(){function t(e){this.ondata=e,this.u=[],this.d=1}return t.prototype.add=function(e){var r=this;if(this.ondata||K(5),2&this.d)this.ondata(K(4+8*(1&this.d),0,1),null,!1);else{var i=Zr(e.filename),n=i.length,s=e.comment,a=s&&Zr(s),o=n!=e.filename.length||a&&s.length!=a.length,l=n+gr(e.extra)+30;n>65535&&this.ondata(K(11,0,1),null,!1);var h=new de(l);Ci(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=wn(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);we(b,0,134695760),we(b,4,e.crc),we(b,8,g),we(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(K(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+gr(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];Ci(a,e,h,h.f,h.u,-h.c-2,r,h.o),e+=46+h.f.length+gr(h.extra)+(h.o?h.o.length:0),r+=h.b}ml(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 kb(t,e,r){r||(r=e,e={}),typeof r!="function"&&K(7);var i={};fl(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){Gs(function(){r(d,y)})};Gs(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;Ci(d,o,_,_.f,_.u,x);var T=30+_.f.length+gr(_.extra),S=o+T;d.set(_.c,S),Ci(d,a,_,_.f,_.u,x,o,_.m),a+=16+T+(_.m?_.m.length:0),o=S+x}catch(w){return f(w,null)}}ml(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=$i(),T=b.length;x.p(b);var S=Zr(y),w=S.length,M=_.comment,k=M&&Zr(M),I=k&&k.length,P=gr(_.extra),A=_.level==0?0:8,E=function(F,O){if(F)u(),f(F,null);else{var D=O.length;h[d]=wn(_,{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(K(11,0,1),null),A)if(T<16e4)try{E(null,Us(b,_))}catch(F){E(F,null)}else c.push(pg(b,_,E));else E(null,b)},g=0;g<l;++g)m(g);return u}function Eb(t,e){e||(e={});var r={},i=[];fl(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=Zr(a)).length,f=h.comment,p=f&&Zr(f),m=p&&p.length,g=gr(h.extra);u>65535&&K(11);var d=c?Us(l,h):l,y=d.length,v=$i();v.p(l),i.push(wn(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];Ci(b,S.o,S,S.f,S.u,S.c.length);var w=30+S.f.length+gr(S.extra);b.set(S.c,S.o+w),Ci(b,n,S,S.f,S.u,S.c.length,S.o,S.m),n+=16+w+(S.m?S.m.length:0)}return ml(b,n,i.length,x,_),b}var vg=function(){function t(){}return t.prototype.push=function(e,r){this.ondata(null,e,r)},t.compression=0,t}(),Pb=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}(),Ab=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 Ku(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}(),Cb=function(){function t(e){this.onfile=e,this.k=[],this.o={0:vg},this.p=ir}return t.prototype.push=function(e,r){var i=this;if(this.onfile||K(5),this.p||K(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=dn(h.subarray(o+30,o+=30+T),!_);k==4294967295?(d=x?[-2]:sp(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||K(5),k){var E=i.o[b];E||A.ondata(K(14,"unknown compression type "+b,1),null,!1),(M=k<0?new E(P):new E(P,k,I)).ondata=function(C,$,R){A.ondata(C,$,R)};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&&K(13),this.p=null)},t.prototype.register=function(e){this.o[e.compression]=e},t}(),Gs=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(t){t()};function bg(t,e,r){r||(r=e,e={}),typeof r!="function"&&K(7);var i=[],n=function(){for(var d=0;d<i.length;++d)i[d]()},s={},a=function(d,y){Gs(function(){r(d,y)})};Gs(function(){a=r});for(var o=t.length-22;Fe(t,o)!=101010256;--o)if(!o||t.length-o>65558)return a(K(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=np(t,c,u),v=y[0],b=y[1],_=y[2],x=y[3],T=y[4],S=y[5],w=ip(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,xn(k,new de(_)))}catch(I){M(I,null)}else i.push(Qu(k,{size:_},M))}else M(K(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 Tb(t,e){for(var r={},i=t.length-22;Fe(t,i)!=101010256;--i)(!i||t.length-i>65558)&&K(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=np(t,s,a),u=c[0],f=c[1],p=c[2],m=c[3],g=c[4],d=c[5],y=ip(t,d);s=g,l&&!l({name:m,size:f,originalSize:p,compression:u})||(u?u==8?r[m]=xn(t.subarray(y,y+f),new de(p)):K(14,"unknown compression type "+u):r[m]=It(t,y,y+f))}return r}var _g="@dotlottie/player-component",wg="1.4.2",xg="dotlottie animation player web component.",Sg="dist/dotlottie-player.js",kg="dist/dotlottie-player.esm.js",Eg="dist/dotlottie-player.esm.d.ts",Pg="https://dotlottie.com/players",Ag="https://github.com/dotlottie/player-component.git",Cg="https://github.com/dotlottie/player-component/issues",Tg="Jawish Hameed <jawish@lottiefiles.com>",Ig="MIT",Mg={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)"},Dg={"@rollup/plugin-json":"^6.0.0",fflate:"^0.7.3",lit:"^2.4.1","lottie-web":"^5.10.0",tsup:"^6.1.3"},Fg={"@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"},Og=["dist"],$g=["dotlottie","animation","web component","component","lit-element","player"],Rg=["> 3%"],Lg={access:"public"},Bg={extends:"@istanbuljs/nyc-config-typescript",all:!0},au={name:_g,version:wg,description:xg,main:Sg,module:kg,types:Eg,homepage:Pg,repository:Ag,bugs:Cg,author:Tg,license:Ig,scripts:Mg,dependencies:Dg,devDependencies:Fg,files:Og,keywords:$g,browserslist:Rg,publishConfig:Lg,nyc:Bg},lt=t=>new Error("[dotLottie-player-component] ".concat(t)),ou=t=>{let e="[dotLottie-player-component] ".concat(t);console.error(e)},Lo=t=>{let e="[dotLottie-player-component] ".concat(t);console.warn(e)},lu,hu,cu,uu,pu,Ee,er,je;(function(t){t.Loading="loading",t.Playing="playing",t.Paused="paused",t.Stopped="stopped",t.Frozen="frozen",t.Error="error"})(Ee||(Ee={})),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 du="dotlottie-player",Ge=class t extends Hr{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=Ee.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):(Lo("loop must be a positive integer or a boolean"),!1)}_onVisibilityChange(){document.hidden&&this.currentState===Ee.Playing?this.freeze():this.currentState===Ee.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)=>{bg(new Uint8Array(r),(h,c)=>{h&&l(h),o(c)})}),a;if(s["manifest.json"]){let o=dn(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(dn(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(dn(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=Ee.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:Lo("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:Lo("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===Ee.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===Ee.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===Ee.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=Ee.Error,this.dispatchEvent(new CustomEvent(je.Error))}),this.container.addEventListener("mouseenter",()=>{this.hover&&this.currentState!==Ee.Playing&&this.play()}),this.container.addEventListener("mouseleave",()=>{this.hover&&this.currentState===Ee.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=og.loadAnimation(Object.assign(Object.assign({},n),{animationData:a!==null?a:s}))}catch(s){return this.currentState=Ee.Error,this.dispatchEvent(new CustomEvent(je.Error)),void console.error(s)}if(!this._lottie)throw this.currentState=Ee.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(au.dependencies["lottie-web"]),dotLottiePlayerVersion:"".concat(au.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=Ee.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})):ou("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})):ou("Animation not found at index: ".concat(e)))}}}pause(){this._lottie&&(this._lottie.pause(),this.currentState=Ee.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=Ee.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===Ee.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=Ee.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===Ee.Playing?this.pause():this.play()}toggleLooping(){let e=!this._loop;this.setLooping(e.toString())}static get styles(){return lg}async firstUpdated(){"IntersectionObserver"in window&&(this._io=new IntersectionObserver(e=>{e[0].isIntersecting?this.currentState===Ee.Frozen&&this.play():this.currentState===Ee.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===Ee.Playing,r=this.currentState===Ee.Paused,i=this.currentState===Ee.Stopped;return ws(lu||(lu=bi([`
196
196
  <div id="lottie-controls" aria-label="lottie-animation-controls" class="toolbar">
197
197
  <button
198
198
  id="lottie-play-button"
@@ -249,33 +249,33 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
249
249
  </svg>
250
250
  </button>
251
251
  </div>
252
- `])),this.togglePlay,e||r?"active":"",bs(e?Qc||(Qc=vi([`
252
+ `])),this.togglePlay,e||r?"active":"",ws(e?hu||(hu=bi([`
253
253
  <svg width="24" height="24" aria-hidden="true" focusable="false">
254
254
  <path d="M14.016 5.016H18v13.969h-3.984V5.016zM6 18.984V5.015h3.984v13.969H6z" />
255
255
  </svg>
256
- `])):eu||(eu=vi([`
256
+ `])):cu||(cu=bi([`
257
257
  <svg width="24" height="24" aria-hidden="true" focusable="false">
258
258
  <path d="M8.016 5.016L18.985 12 8.016 18.984V5.015z" />
259
259
  </svg>
260
- `]))),this.stop,i?"active":"",this.seeker,this._handleSeekChange,()=>{this._prevState=this.currentState,this.freeze()},()=>{this._prevState===ke.Playing&&this.play(),this.seek(this._lottie.currentFrame)},this.seeker,this.toggleLooping,this._loop?"active":"")}render(){let e=this.controls?"main controls":"main",r=this.controls?"animation controls":"animation";return bs(tu||(tu=vi([`
260
+ `]))),this.stop,i?"active":"",this.seeker,this._handleSeekChange,()=>{this._prevState=this.currentState,this.freeze()},()=>{this._prevState===Ee.Playing&&this.play(),this.seek(this._lottie.currentFrame)},this.seeker,this.toggleLooping,this._loop?"active":"")}render(){let e=this.controls?"main controls":"main",r=this.controls?"animation controls":"animation";return ws(uu||(uu=bi([`
261
261
  <div id="animation-container" class=`,` lang="en" role="img">
262
262
  <div id="animation" class=`,' style="background:',`;">
263
263
  `,`
264
264
  </div>
265
265
  `,`
266
266
  </div>
267
- `])),e,r,this.background,this.currentState===ke.Error?bs(ru||(ru=vi([' <div class="error">\u26A0\uFE0F</div> ']))):void 0,this.controls?this.renderControls():void 0)}};tt([jm(".animation")],je.prototype,"container",void 0),tt([rt()],je.prototype,"mode",void 0),tt([rt({type:Boolean})],je.prototype,"autoplay",void 0),tt([rt({type:String})],je.prototype,"background",void 0),tt([rt({type:Boolean})],je.prototype,"controls",void 0),tt([rt({type:Number})],je.prototype,"direction",void 0),tt([rt({type:Boolean})],je.prototype,"hover",void 0),tt([rt({type:String})],je.prototype,"loop",void 0),tt([rt({type:String})],je.prototype,"renderer",void 0),tt([rt({type:Number})],je.prototype,"speed",void 0),tt([rt({type:String})],je.prototype,"src",void 0),tt([rt({type:String})],je.prototype,"currentState",void 0),tt([rt()],je.prototype,"seeker",void 0),tt([rt()],je.prototype,"intermission",void 0),tt([rt({type:String})],je.prototype,"activeAnimationId",void 0),customElements.get(iu)||zm(iu)(je);var qs,xn=class extends ze(Te){constructor(){super();Se(this,"render",()=>fe`
267
+ `])),e,r,this.background,this.currentState===Ee.Error?ws(pu||(pu=bi([' <div class="error">\u26A0\uFE0F</div> ']))):void 0,this.controls?this.renderControls():void 0)}};tt([rg(".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(du)||eg(du)(Ge);var Ws,Sn=class extends De(Ae){constructor(){super();ye(this,"render",()=>pe`
268
268
  <button class="leading-0 relative inline-block h-14 w-14 rounded-full shadow-xl">
269
269
  <!-- -->
270
- ${z(this,qs).call(this)}
270
+ ${N(this,Ws).call(this)}
271
271
  </button>
272
- `);se(this,qs,()=>fe`
272
+ `);ee(this,Ws,()=>pe`
273
273
  <div class="h-full w-full rounded-full bg-slate-800 text-sm text-white transition-transform hover:scale-105 active:scale-90">
274
274
  <div class="${this.dialogShown?"invisible opacity-0":"visible opacity-100"} absolute bottom-0 left-0 right-0 top-0 inline-flex items-center justify-center transition-opacity">
275
- ${this.bubbleImageURL?fe`
275
+ ${this.bubbleImageURL?pe`
276
276
  <!-- -->
277
277
  <img class="h-full w-full rounded-full" src="${this.bubbleImageURL}" />
278
- `:fe`
278
+ `:pe`
279
279
  <!-- -->
280
280
  <dotlottie-player autoplay loop mode="normal" src="https://assets5.lottiefiles.com/dotlotties/dlf10_hISLmVmo2x.lottie"></dotlottie-player>
281
281
  `}
@@ -286,23 +286,23 @@ 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=""}};qs=new WeakMap,Se(xn,"styles",ja`
289
+ `);this.dialogShown=!1,this.bubbleImageURL=""}};Ws=new WeakMap,ye(Sn,"styles",Xa`
290
290
  :host {
291
291
  line-height: 0;
292
292
  }
293
- `),Se(xn,"properties",{dialogShown:{type:Boolean,attribute:"dialog-shown"},bubbleImageURL:{type:String,attribute:"bubble-image-url"}});customElements.define("mw-bubble",xn);function Eg(t){return!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&t.keyCode==13}var Ws,Ju,Zs,Xu,Ys,Ku,Js,Qu,Xs,ep,Us=class extends ze(Te){constructor(){super();se(this,Ws);se(this,Zs);se(this,Ys);se(this,Js);se(this,Xs);Se(this,"render",()=>fe`
294
- <form class="flex items-center space-x-4 border-t bg-white px-4" @submit="${de(this,Ys,Ku)}">
293
+ `),ye(Sn,"properties",{dialogShown:{type:Boolean,attribute:"dialog-shown"},bubbleImageURL:{type:String,attribute:"bubble-image-url"}});customElements.define("mw-bubble",Sn);function Vg(t){return!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&t.keyCode==13}var Ys,ap,Js,op,Xs,lp,Ks,hp,Qs,cp,Zs=class extends De(Ae){constructor(){super();ee(this,Ys);ee(this,Js);ee(this,Xs);ee(this,Ks);ee(this,Qs);ye(this,"render",()=>pe`
294
+ <form class="flex items-center space-x-4 border-t bg-white px-4" @submit="${ce(this,Xs,lp)}">
295
295
  <!-- text input -->
296
- <textarea name="input" @keydown="${de(this,Zs,Xu)}" 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>
296
+ <textarea name="input" @keydown="${ce(this,Js,op)}" 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>
297
297
 
298
298
  <!-- send/cancel button -->
299
299
  <div class="py-2">
300
300
  <button type="submit" class="select-none">
301
- ${this.disabled?fe`
301
+ ${this.disabled?pe`
302
302
  <svg class="hover:bg-[${this.config.color}]/80 inline-block h-8 w-8 rounded-full bg-[${this.config.color}] fill-current p-2 text-white transition-colors" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
303
303
  <path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" />
304
304
  </svg>
305
- `:fe`
305
+ `:pe`
306
306
  <svg class="hover:bg-[${this.config.color}]/80 inline-block h-8 w-8 rounded-full bg-[${this.config.color}] fill-current p-2 text-white transition-colors" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
307
307
  <path d="m4.01 6.03 7.51 3.22-7.52-1 .01-2.22m7.5 8.72L4 17.97v-2.22l7.51-1M2.01 3 2 10l15 2-15 2 .01 7L23 12 2.01 3z" />
308
308
  </svg>
@@ -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}};Ws=new WeakSet,Ju=function(){return this.shadowRoot?.querySelector("button")},Zs=new WeakSet,Xu=function(r){Eg(r)&&(r.preventDefault(),this.disabled||z(this,Ws,Ju)?.click())},Ys=new WeakSet,Ku=function(r){if(r.preventDefault(),this.disabled){de(this,Xs,ep).call(this);return}let i=r.target?.input,n=i.value;n&&(i.value="",de(this,Js,Qu).call(this,n))},Js=new WeakSet,Qu=function(r){let i={value:r};this.dispatchEvent(new CustomEvent("mw-submit",{detail:i}))},Xs=new WeakSet,ep=function(){let r={};this.dispatchEvent(new CustomEvent("mw-cancel",{detail:r}))},Se(Us,"properties",{disabled:{type:Boolean},config:{type:Object}});customElements.define("mw-chat-input",Us);var Sn=class extends pr{constructor(e){if(super(e),this.et=Ie,e.type!==di.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Ie||e==null)return this.ft=void 0,this.et=e;if(e===yt)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:[]}}};Sn.directiveName="unsafeHTML",Sn.resultType=1;var Vi=fi(Sn);var Ks=class extends ze(Te){constructor(){super(),this.side="assistant",this.config}render(){switch(this.side){case"user":return fe`
313
+ `);this.disabled=!1,this.config}};Ys=new WeakSet,ap=function(){return this.shadowRoot?.querySelector("button")},Js=new WeakSet,op=function(r){Vg(r)&&(r.preventDefault(),this.disabled||N(this,Ys,ap)?.click())},Xs=new WeakSet,lp=function(r){if(r.preventDefault(),this.disabled){ce(this,Qs,cp).call(this);return}let i=r.target?.input,n=i.value;n&&(i.value="",ce(this,Ks,hp).call(this,n))},Ks=new WeakSet,hp=function(r){let i={value:r};this.dispatchEvent(new CustomEvent("mw-submit",{detail:i}))},Qs=new WeakSet,cp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-cancel",{detail:r}))},ye(Zs,"properties",{disabled:{type:Boolean},config:{type:Object}});customElements.define("mw-chat-input",Zs);var kn=class extends dr{constructor(e){if(super(e),this.et=Me,e.type!==fi.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:[]}}};kn.directiveName="unsafeHTML",kn.resultType=1;var Ni=mi(kn);var ea=class extends De(Ae){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
  <!--
@@ -321,14 +321,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
321
321
  </div>
322
322
  </div>
323
323
  </div>
324
- `;case"assistant":return fe`
324
+ `;case"assistant":return pe`
325
325
  <div class="mr-8 flex justify-start">
326
326
  <div class="flex max-w-full space-x-2">
327
327
  <!--
328
328
  mt-[9px] because the message is 50px tall, the icon is 32px tall, we want to center it
329
329
  -->
330
330
  <div class="mt-[9px] h-8 w-8 flex-shrink-0 flex-grow-0 overflow-hidden rounded-full">
331
- ${this.config.logoSvg?Vi(this.config.logoSvg):fe`<img class="h-full w-full bg-white object-cover" src="${this.config.logoUrl||""}" alt="Logo" />`}
331
+ ${this.config.logoSvg?Ni(this.config.logoSvg):pe`<img class="h-full w-full bg-white object-cover" src="${this.config.logoUrl||""}" alt="Logo" />`}
332
332
  </div>
333
333
 
334
334
  <!--
@@ -339,11 +339,11 @@ 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}`)}}};Se(Ks,"properties",{side:{type:String},config:{type:Object}});customElements.define("mw-chat-message",Ks);var ea,tp,ta,rp,Qs=class extends ze(Te){constructor(){super();se(this,ea);se(this,ta);Se(this,"render",()=>fe`
342
+ `;default:throw new Error(`unknown side: ${this.side}`)}}};ye(ea,"properties",{side:{type:String},config:{type:Object}});customElements.define("mw-chat-message",ea);var ra,up,ia,pp,ta=class extends De(Ae){constructor(){super();ee(this,ra);ee(this,ia);ye(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">
346
- ${this.config.logoSvg?Vi(this.config.logoSvg):fe`<img class="h-full w-full bg-white object-cover" src="${this.config.logoUrl||""}" alt="Logo" />`}
346
+ ${this.config.logoSvg?Ni(this.config.logoSvg):pe`<img class="h-full w-full bg-white object-cover" src="${this.config.logoUrl||""}" alt="Logo" />`}
347
347
  </div>
348
348
  </mw-pulse-dot>
349
349
 
@@ -355,19 +355,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
355
355
 
356
356
  <div class="flex-grow"></div>
357
357
 
358
- <button @click=${de(this,ta,rp)} class="${this.messages>0?"inline-flex":"hidden"} items-center justify-center rounded-lg bg-gray-100 p-3 text-gray-400 transition-colors hover:bg-gray-50">
358
+ <button @click=${ce(this,ia,pp)} class="${this.messages>0?"inline-flex":"hidden"} items-center justify-center rounded-lg bg-gray-100 p-3 text-gray-400 transition-colors hover:bg-gray-50">
359
359
  <!-- -->
360
360
  <p class="inline-flex h-6 w-6 items-center justify-center">
361
361
  <span class="text-[11px] font-medium leading-[15px]">NEW<br />CHAT</span>
362
362
  </p>
363
363
  </button>
364
364
 
365
- <button @click=${de(this,ea,tp)} class="inline-flex items-center justify-center rounded-lg bg-gray-100 p-3 text-gray-400 transition-colors hover:bg-gray-50 sm:hidden">
365
+ <button @click=${ce(this,ra,up)} class="inline-flex items-center justify-center rounded-lg bg-gray-100 p-3 text-gray-400 transition-colors hover:bg-gray-50 sm:hidden">
366
366
  <!-- -->
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}};ea=new WeakSet,tp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-close",{detail:r}))},ta=new WeakSet,rp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-delete-history",{detail:r}))},Se(Qs,"properties",{config:{type:Object},messages:{type:Number}});customElements.define("mw-header",Qs);var ol=class extends ze(Te){constructor(){super(...arguments);Se(this,"render",()=>fe`
370
+ `);this.config,this.messages=0}};ra=new WeakSet,up=function(){let r={};this.dispatchEvent(new CustomEvent("mw-close",{detail:r}))},ia=new WeakSet,pp=function(){let r={};this.dispatchEvent(new CustomEvent("mw-delete-history",{detail:r}))},ye(ta,"properties",{config:{type:Object},messages:{type:Number}});customElements.define("mw-header",ta);var gl=class extends De(Ae){constructor(){super(...arguments);ye(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,25 @@ 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",ol);var ll=class extends ze(Te){constructor(){super(...arguments);Se(this,"render",()=>fe`
382
+ `)}};customElements.define("mw-loading",gl);var En,na=class{constructor(e,r,i){ee(this,En,void 0);ye(this,"delay");ye(this,"callback");this.delay=r,this.callback=i,e.addController(this)}hostConnected(){ke(this,En,setTimeout(()=>this.callback(),this.delay))}hostDisconnected(){clearTimeout(N(this,En))}};En=new WeakMap;var aa,Gt,oa,dp,la,fp,ha,mp,sa=class extends De(Ae){constructor(){super();ee(this,oa);ee(this,la);ee(this,ha);ee(this,aa,void 0);ee(this,Gt,!1);this.position={},this.aiName="Molin AI",this.dialogShown=!1,this.popupDelayMs=5e3,this.popupText="Hello there. How can we help?"}render(){return pe`
383
+ <!-- shadow backdrop -->
384
+ <div class="${N(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
+
386
+ <!-- popup itself -->
387
+ <div class="${N(this,Gt)?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${Object.keys(this.position).join(" ")} group fixed bottom-0 left-0 right-0 z-[99999999] overflow-visible rounded-t-2xl bg-white p-4 text-left font-sans text-[16px] leading-normal text-gray-800 shadow-2xl transition-all sm:left-auto sm:top-auto sm:h-auto sm:w-[300px] sm:rounded-2xl" @click="${ce(this,ha,mp)}">
388
+ <!-- close button -->
389
+ <button class="absolute right-2 inline-flex h-6 w-6 items-center justify-center rounded-full bg-gray-300 bg-opacity-50 text-center font-sans shadow-none duration-300 ease-in-out hover:scale-105 hover:text-gray-700 focus:outline-none sm:-top-2 sm:opacity-0 sm:shadow sm:transition-opacity sm:group-hover:opacity-100" @click="${ce(this,la,fp)}" aria-label="Close dialog">×</button>
390
+
391
+ <!-- popup text -->
392
+ <div class="mb-8 text-center sm:mb-0">
393
+ <h1 class="py-2.5 text-left font-display text-lg font-bold sm:hidden">Chat with ${this.aiName}</h1>
394
+ <p class="select-none py-2.5 text-left font-sans text-gray-800 sm:py-0">${this.popupText}</p>
395
+ <button class="mt-4 w-full rounded-full bg-[#601feb] px-5 py-2.5 text-center font-sans text-sm font-medium text-white transition sm:hidden" type="submit">Chat with ${this.aiName}</button>
396
+ </div>
397
+
398
+ <mw-powered-by class="sm:hidden"></mw-powered-by>
399
+ </div>
400
+ `}updated(r){let i=r.has("dialogShown"),n=this.dialogShown;i&&n===!0&&N(this,Gt)&&(ke(this,Gt,!1),this.requestUpdate())}firstUpdated(){ke(this,aa,new na(this,this.popupDelayMs,()=>{this.dialogShown||ce(this,oa,dp).call(this)}))}};aa=new WeakMap,Gt=new WeakMap,oa=new WeakSet,dp=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)}),ke(this,Gt,!0),this.requestUpdate()},la=new WeakSet,fp=function(r){r.preventDefault(),r.stopPropagation(),ke(this,Gt,!1),this.requestUpdate()},ha=new WeakSet,mp=function(){ke(this,Gt,!1),this.dispatchEvent(new CustomEvent("popup-chat-open",{})),this.requestUpdate()},ye(sa,"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",sa);var yl=class extends De(Ae){constructor(){super(...arguments);ye(this,"render",()=>pe`
383
401
  <p class="flex items-center justify-center space-x-1 text-xs text-gray-400">
384
402
  <span class="pointer-events-none">Powered by</span>
385
403
  <a class="inline-flex items-center space-x-1 text-gray-600 underline" href="https://molin.ai/" target="_blank">
@@ -396,50 +414,55 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
396
414
  <span>Molin AI</span>
397
415
  </a>
398
416
  </p>
399
- `)}};customElements.define("mw-powered-by",ll);var ia,ip,ra=class extends ze(Te){constructor(){super();se(this,ia);this.color="sky-500",this.animated=!1,this.position="top-right"}render(){return fe`
417
+ `)}};customElements.define("mw-powered-by",yl);var ua,gp,ca=class extends De(Ae){constructor(){super();ee(this,ua);this.color="sky-500",this.animated=!1,this.position="top-right"}render(){return pe`
400
418
  <span class="relative inline-flex">
401
419
  <slot></slot>
402
- <span class="${z(this,ia,ip)} pointer-events-none absolute flex h-3 w-3">
420
+ <span class="${N(this,ua,gp)} pointer-events-none absolute flex h-3 w-3">
403
421
  <span class="bg-${this.color} absolute inline-flex h-3 w-3 animate-ping rounded-full opacity-75"></span>
404
422
  <span class="bg-${this.color} relative inline-flex h-3 w-3 rounded-full"></span>
405
423
  </span>
406
424
  </span>
407
- `}};ia=new WeakSet,ip=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""}},Se(ra,"properties",{color:{type:String,attribute:"color"},animated:{type:Boolean,attribute:"animated"},position:{type:String,attribute:"position"}});customElements.define("mw-pulse-dot",ra);var np=fi(class extends pr{constructor(t){var e;if(super(t),t.type!==di.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 yt}});var kn,ht,Bt,En,hl,na=class{constructor(e,r){se(this,En);se(this,kn,void 0);se(this,ht,void 0);se(this,Bt,void 0);if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");Le(this,kn,e),z(this,kn).addController(this),Le(this,ht,r)}reconnect(e){Le(this,ht,e),z(this,Bt)?.close(),Le(this,Bt,de(this,En,hl).call(this))}hostConnected(){Le(this,Bt,de(this,En,hl).call(this))}hostDisconnected(){z(this,Bt)?.close(),Le(this,Bt,void 0)}send(e){z(this,Bt)?.send(e)}close(){z(this,Bt)?.close(1e3,"new_chat")}render(e={}){switch(z(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?.()}}};kn=new WeakMap,ht=new WeakMap,Bt=new WeakMap,En=new WeakSet,hl=function(){let e=new WebSocket(z(this,ht).url());return z(this,ht).onClose&&(e.onclose=z(this,ht).onClose),z(this,ht).onOpen&&(e.onopen=z(this,ht).onOpen),z(this,ht).onError&&(e.onerror=z(this,ht).onError),z(this,ht).onMessage&&(e.onmessage=z(this,ht).onMessage),e};var Gt,Ke,Yr,zi,Pn,Ni,sa,An,cl,Cn,ul,Tn,pl,In,dl,oa,sp,aa=class{constructor(e,r){se(this,Ni);se(this,An);se(this,Cn);se(this,Tn);se(this,In);se(this,oa);se(this,Gt,void 0);se(this,Ke,void 0);se(this,Yr,void 0);se(this,zi,!1);Se(this,"isStreaming",!1);Se(this,"messages",[]);Se(this,"conversationId","");se(this,Pn,0);e.addController(this),Le(this,Gt,e),Le(this,Ke,r),Le(this,Yr,new na(e,{url:()=>z(this,Ke).url(this.conversationId,{}),onOpen:i=>de(this,An,cl).call(this,i),onMessage:i=>de(this,Cn,ul).call(this,JSON.parse(i.data)),onError:i=>de(this,Tn,pl).call(this,i),onClose:i=>de(this,In,dl).call(this,i)}))}sendUserInput(e){de(this,Ni,sa).call(this,{type:"USER_INPUT",value:e},{expectStreaming:!0})}sendUserCancel(){de(this,Ni,sa).call(this,{type:"USER_CANCEL"})}reconnect(){Wl(this,Pn)._++,setTimeout(()=>{z(this,Ke).onReconnect?.(),z(this,Yr).reconnect({url:()=>z(this,Ke).url(this.conversationId,{resume:!0}),onOpen:e=>de(this,An,cl).call(this,e),onMessage:e=>de(this,Cn,ul).call(this,JSON.parse(e.data)),onError:e=>de(this,Tn,pl).call(this,e),onClose:e=>de(this,In,dl).call(this,e)})},1e3*z(this,Pn))}hostConnected(){let e=z(this,Ke).restoreConversationState?.()||{conversationId:crypto.randomUUID(),messages:[]};this.messages=e.messages,this.conversationId=e.conversationId,Le(this,zi,!0)}hostDisconnected(){Le(this,zi,!1)}reset(){z(this,Yr).close(),z(this,Ke).onReset?.(),this.isStreaming=!1,this.messages=[],this.conversationId=crypto.randomUUID(),z(this,Gt).requestUpdate()}};Gt=new WeakMap,Ke=new WeakMap,Yr=new WeakMap,zi=new WeakMap,Pn=new WeakMap,Ni=new WeakSet,sa=function(e,{expectStreaming:r=!1}={}){r&&(this.isStreaming=!0,z(this,Gt).requestUpdate()),z(this,Yr).send(JSON.stringify(e))},An=new WeakSet,cl=function(e){this.messages.length>0&&setTimeout(()=>{de(this,Ni,sa).call(this,{type:"RESUME",messages:de(this,oa,sp).call(this)})},10)},Cn=new WeakSet,ul=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages.push(e.message),z(this,Gt).requestUpdate(),z(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),z(this,Gt).requestUpdate(),z(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`);z(this,Ke).persistConversationState?.(this.conversationId,this.messages),this.isStreaming=!1,z(this,Gt).requestUpdate(),z(this,Ke).onMessageDone?.(e);break}case"ERROR":{z(this,Ke).onMessageError?.(e);break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},Tn=new WeakSet,pl=function(e){z(this,Ke).onError?.(e)},In=new WeakSet,dl=function(e){this.isStreaming=!1,z(this,Gt).requestUpdate(),z(this,zi)&&this.reconnect(),z(this,Ke).onClose?.()},oa=new WeakSet,sp=function(){return this.messages.map(({id:e,role:r,content:i,timestamp:n})=>({id:e,role:r,content:i,timestamp:n}))};function ap(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 he(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ap(Object(r),!0).forEach(function(i){Z(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ap(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function bl(t){return bl=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},bl(t)}function Oe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function op(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 $e(t,e,r){return e&&op(t.prototype,e),r&&op(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Op(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&&_l(t,e)}function va(t){return va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},va(t)}function _l(t,e){return _l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_l(t,e)}function Pg(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 Ag(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 $p(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=va(t);if(e){var n=va(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return Ag(this,r)}}function Bn(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)||Ll(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
408
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function wl(t){return function(e){if(Array.isArray(e))return xl(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||Ll(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
409
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ll(t,e){if(t){if(typeof t=="string")return xl(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)?xl(t,e):void 0}}function xl(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 Qr(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ll(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.
410
- 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 ei={DEBUG:!1,LIB_VERSION:"1.87.6"},Cg=Array.isArray,Rp=Object.prototype,Lp=Rp.hasOwnProperty,Vn=Rp.toString,Ze=Cg||function(t){return Vn.call(t)==="[object Array]"},lp=function(t){return Vn.call(t)==="[object Uint8Array]"},ti=function(t){try{return/^\s*\bfunction\b/.test(t)}catch{return!1}},wr=function(t){return t===Object(t)&&!Ze(t)},Tg=function(t){if(wr(t)){for(var e in t)if(Lp.call(t,e))return!1;return!0}return!1},pe=function(t){return t===void 0},wt=function(t){return Vn.call(t)=="[object String]"},Ut=function(t){return t===null},sr=function(t){return Vn.call(t)=="[object Number]"},Sl=function(t){return Vn.call(t)==="[object Boolean]"},Bp=Array.prototype,hp=Bp.forEach,cp=Bp.indexOf,J=typeof window<"u"?window:{},Ig=J.navigator||{userAgent:""},De=J.document||{},ct=Ig.userAgent,up="[PostHog.js]",N={_log:function(t){if((ei.DEBUG||J.POSTHOG_DEBUG)&&!pe(J.console)&&J.console){for(var e=("__rrweb_original__"in J.console[t])?J.console[t].__rrweb_original__:J.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,[up].concat(i))}},info:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];N._log.apply(N,["log"].concat(e))},warn:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];N._log.apply(N,["warn"].concat(e))},error:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];N._log.apply(N,["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,[up].concat(r))},uninitializedWarning:function(t){N.error("You must initialize PostHog before calling ".concat(t))}},Bl={},kl=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function Ui(t,e,r){if(Ze(t)){if(hp&&t.forEach===hp)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)===Bl)return}}}function Ee(t,e,r){if(!Ut(t)&&!pe(t)){if(Ze(t))return Ui(t,e,r);for(var i in t)if(Lp.call(t,i)&&e.call(r,t[i],i)===Bl)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 Ui(r,function(n){for(var s in n)n[s]!==void 0&&(t[s]=n[s])}),t};function ve(t,e){return t.indexOf(e)!==-1}var Vp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},pp=function(t){try{return t()}catch{return}},zp=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){N.critical("Implementation error. Please turn on debug and contact support@posthog.com."),N.critical(n)}}},El=function(t){var e={};return Ee(t,function(r,i){wt(r)&&r.length>0&&(e[i]=r)}),e},Mg=["$performance_raw"];function Dg(t,e){return r=t,i=function(s,a){return a&&Mg.indexOf(a)>-1?s:wt(s)&&!Ut(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),Ze(a)?(l=[],Ui(a,function(h){l.push(s(h))})):(l={},Ee(a,function(h,c){n.has(h)||(l[c]=s(h,c))})),l);var l}(r);var r,i,n}function Vl(t){var e,r,i,n,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,h="",c=[];if(!t)return t;t=Fg(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 Fg=function(t){var e,r,i,n,s="";for(e=r=0,i=(t=(t+"").replace(/\r\n/g,`
425
+ `}};ua=new WeakSet,gp=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""}},ye(ca,"properties",{color:{type:String,attribute:"color"},animated:{type:Boolean,attribute:"animated"},position:{type:String,attribute:"position"}});customElements.define("mw-pulse-dot",ca);var yp=mi(class extends dr{constructor(t){var e;if(super(t),t.type!==fi.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 vl=t=>t??Me;var Pn,ht,Bt,An,bl,pa=class{constructor(e,r){ee(this,An);ee(this,Pn,void 0);ee(this,ht,void 0);ee(this,Bt,void 0);if(!e)throw new Error("host is required");if(!r)throw new Error("config is required");ke(this,Pn,e),N(this,Pn).addController(this),ke(this,ht,r)}reconnect(e){ke(this,ht,e),N(this,Bt)?.close(),ke(this,Bt,ce(this,An,bl).call(this))}hostConnected(){ke(this,Bt,ce(this,An,bl).call(this))}hostDisconnected(){N(this,Bt)?.close(),ke(this,Bt,void 0)}send(e){N(this,Bt)?.send(e)}close(){N(this,Bt)?.close(1e3,"new_chat")}render(e={}){switch(N(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?.()}}};Pn=new WeakMap,ht=new WeakMap,Bt=new WeakMap,An=new WeakSet,bl=function(){let e=new WebSocket(N(this,ht).url());return N(this,ht).onClose&&(e.onclose=N(this,ht).onClose),N(this,ht).onOpen&&(e.onopen=N(this,ht).onOpen),N(this,ht).onError&&(e.onerror=N(this,ht).onError),N(this,ht).onMessage&&(e.onmessage=N(this,ht).onMessage),e};var Ht,Ke,Jr,zi,Cn,ji,da,Tn,_l,In,wl,Mn,xl,Dn,Sl,ma,vp,fa=class{constructor(e,r){ee(this,ji);ee(this,Tn);ee(this,In);ee(this,Mn);ee(this,Dn);ee(this,ma);ee(this,Ht,void 0);ee(this,Ke,void 0);ee(this,Jr,void 0);ee(this,zi,!1);ye(this,"isStreaming",!1);ye(this,"messages",[]);ye(this,"conversationId","");ee(this,Cn,0);e.addController(this),ke(this,Ht,e),ke(this,Ke,r),ke(this,Jr,new pa(e,{url:()=>N(this,Ke).url(this.conversationId,{}),onOpen:i=>ce(this,Tn,_l).call(this,i),onMessage:i=>ce(this,In,wl).call(this,JSON.parse(i.data)),onError:i=>ce(this,Mn,xl).call(this,i),onClose:i=>ce(this,Dn,Sl).call(this,i)}))}sendUserInput(e){ce(this,ji,da).call(this,{type:"USER_INPUT",value:e},{expectStreaming:!0})}sendUserCancel(){ce(this,ji,da).call(this,{type:"USER_CANCEL"})}reconnect(){ih(this,Cn)._++,setTimeout(()=>{N(this,Ke).onReconnect?.(),N(this,Jr).reconnect({url:()=>N(this,Ke).url(this.conversationId,{resume:!0}),onOpen:e=>ce(this,Tn,_l).call(this,e),onMessage:e=>ce(this,In,wl).call(this,JSON.parse(e.data)),onError:e=>ce(this,Mn,xl).call(this,e),onClose:e=>ce(this,Dn,Sl).call(this,e)})},1e3*N(this,Cn))}hostConnected(){let e=N(this,Ke).restoreConversationState?.()||{conversationId:crypto.randomUUID(),messages:[]};this.messages=e.messages,this.conversationId=e.conversationId,ke(this,zi,!0)}hostDisconnected(){ke(this,zi,!1)}reset(){N(this,Jr).close(),N(this,Ke).onReset?.(),this.isStreaming=!1,this.messages=[],this.conversationId=crypto.randomUUID(),N(this,Ht).requestUpdate()}};Ht=new WeakMap,Ke=new WeakMap,Jr=new WeakMap,zi=new WeakMap,Cn=new WeakMap,ji=new WeakSet,da=function(e,{expectStreaming:r=!1}={}){r&&(this.isStreaming=!0,N(this,Ht).requestUpdate()),N(this,Jr).send(JSON.stringify(e))},Tn=new WeakSet,_l=function(e){this.messages.length>0&&setTimeout(()=>{ce(this,ji,da).call(this,{type:"RESUME",messages:ce(this,ma,vp).call(this)})},10)},In=new WeakSet,wl=function(e){switch(e.type){case"NEW_MESSAGE":{this.messages.push(e.message),N(this,Ht).requestUpdate(),N(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),N(this,Ht).requestUpdate(),N(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`);N(this,Ke).persistConversationState?.(this.conversationId,this.messages),this.isStreaming=!1,N(this,Ht).requestUpdate(),N(this,Ke).onMessageDone?.(e);break}case"ERROR":{N(this,Ke).onMessageError?.(e);break}default:console.warn(`Unknown message type: ${JSON.stringify(e)}`)}},Mn=new WeakSet,xl=function(e){N(this,Ke).onError?.(e)},Dn=new WeakSet,Sl=function(e){this.isStreaming=!1,N(this,Ht).requestUpdate(),N(this,zi)&&this.reconnect(),N(this,Ke).onClose?.()},ma=new WeakSet,vp=function(){return this.messages.map(({id:e,role:r,content:i,timestamp:n})=>({id:e,role:r,content:i,timestamp:n}))};function bp(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 he(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bp(Object(r),!0).forEach(function(i){Z(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bp(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Tl(t){return Tl=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},Tl(t)}function Re(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _p(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&&_p(t.prototype,e),r&&_p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wp(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&&Il(t,e)}function Pa(t){return Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pa(t)}function Il(t,e){return Il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Il(t,e)}function Ng(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 zg(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 Zp(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=Pa(t);if(e){var n=Pa(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return zg(this,r)}}function Nn(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)||Wl(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
426
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ml(t){return function(e){if(Array.isArray(e))return Dl(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||Wl(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
427
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Wl(t,e){if(t){if(typeof t=="string")return Dl(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)?Dl(t,e):void 0}}function Dl(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 ei(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Wl(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 ti={DEBUG:!1,LIB_VERSION:"1.87.6"},jg=Array.isArray,Yp=Object.prototype,Jp=Yp.hasOwnProperty,zn=Yp.toString,Ye=jg||function(t){return zn.call(t)==="[object Array]"},wp=function(t){return zn.call(t)==="[object Uint8Array]"},ri=function(t){try{return/^\s*\bfunction\b/.test(t)}catch{return!1}},xr=function(t){return t===Object(t)&&!Ye(t)},Gg=function(t){if(xr(t)){for(var e in t)if(Jp.call(t,e))return!1;return!0}return!1},fe=function(t){return t===void 0},xt=function(t){return zn.call(t)=="[object String]"},Wt=function(t){return t===null},ar=function(t){return zn.call(t)=="[object Number]"},Fl=function(t){return zn.call(t)==="[object Boolean]"},Xp=Array.prototype,xp=Xp.forEach,Sp=Xp.indexOf,J=typeof window<"u"?window:{},Hg=J.navigator||{userAgent:""},Oe=J.document||{},ct=Hg.userAgent,kp="[PostHog.js]",z={_log:function(t){if((ti.DEBUG||J.POSTHOG_DEBUG)&&!fe(J.console)&&J.console){for(var e=("__rrweb_original__"in J.console[t])?J.console[t].__rrweb_original__:J.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,[kp].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,[kp].concat(r))},uninitializedWarning:function(t){z.error("You must initialize PostHog before calling ".concat(t))}},Zl={},Ol=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function Wi(t,e,r){if(Ye(t)){if(xp&&t.forEach===xp)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)===Zl)return}}}function Pe(t,e,r){if(!Wt(t)&&!fe(t)){if(Ye(t))return Wi(t,e,r);for(var i in t)if(Jp.call(t,i)&&e.call(r,t[i],i)===Zl)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 Wi(r,function(n){for(var s in n)n[s]!==void 0&&(t[s]=n[s])}),t};function _e(t,e){return t.indexOf(e)!==-1}var Kp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},Ep=function(t){try{return t()}catch{return}},Qp=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)}}},$l=function(t){var e={};return Pe(t,function(r,i){xt(r)&&r.length>0&&(e[i]=r)}),e},qg=["$performance_raw"];function Ug(t,e){return r=t,i=function(s,a){return a&&qg.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=[],Wi(a,function(h){l.push(s(h))})):(l={},Pe(a,function(h,c){n.has(h)||(l[c]=s(h,c))})),l);var l}(r);var r,i,n}function Yl(t){var e,r,i,n,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,h="",c=[];if(!t)return t;t=Wg(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 Wg=function(t){var e,r,i,n,s="";for(e=r=0,i=(t=(t+"").replace(/\r\n/g,`
411
429
  `).replace(/\r/g,`
412
- `)).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),Ut(o)||(r>e&&(s+=t.substring(e,r)),s+=o,e=r=n+1)}return r>e&&(s+=t.substring(e,t.length)),s},Og=["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"],$g=function(t,e){if(!t)return!1;var r=t.toLowerCase();return Og.concat(e||[]).some(function(i){var n=i.toLowerCase();return r.includes?r.includes(n):r.indexOf(n)!==-1})},On=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;ti(c)&&(f=c(u));var m=h.call(l,u);return f!==!1&&m!==!1||(p=!1),p}}}(e,i,o)}else N.error("No valid element provided to register_event")}}();function $n(t,e){var r=function(){var i=De.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=De.querySelectorAll("body > script");s.length>0?(n=s[0].parentNode)===null||n===void 0||n.insertBefore(i,s[0]):De.body.appendChild(i)};De.body?r():De.addEventListener("DOMContentLoaded",r)}function ba(t){switch(bl(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 da(t)&&!jp(t)&&t.childNodes&&t.childNodes.length&&Ee(t.childNodes,function(r){Np(r)&&r.textContent&&(e+=kl(r.textContent).split(/(\s+)/).filter(ji).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),kl(e)}function dp(t){return!!t&&t.nodeType===1}function Kr(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function Np(t){return!!t&&t.nodeType===3}function fp(t){return!!t&&t.nodeType===11}var fl=["a","button","form","input","select","textarea","label"];function da(t){for(var e=t;e.parentNode&&!Kr(e,"body");e=e.parentNode){var r=ba(e).split(" ");if(ve(r,"ph-sensitive")||ve(r,"ph-no-capture"))return!1}if(ve(ba(t).split(" "),"ph-include"))return!0;var i=t.type||"";if(wt(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var n=t.name||t.id||"";return!(wt(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 jp(t){return!!(Kr(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||Kr(t,"select")||Kr(t,"textarea")||t.getAttribute("contenteditable")==="true")}function ji(t){return!(Ut(t)||pe(t)||wt(t)&&(t=kl(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 mp(t){var e=_a(t);return ji(e="".concat(e," ").concat(Gp(t)).trim())?e:""}function Gp(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Ee(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(Gp(r)).trim())}catch(s){N.error(s)}}),e}var Rg=function(){function t(e){Oe(this,t),this.clicks=[],this.enabled=e}return $e(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}(),Hp="$people_distinct_id",fa="__alias",Fn="__timers",gp="$autocapture_disabled_server_side",Pl="$session_recording_enabled_server_side",yp="$console_log_recording_enabled_server_side",vp="$session_recording_recorder_version_server_side",wa="$sesid",ma="$session_is_sampled",Gi="$enabled_feature_flags",Al="$early_access_features",Hi="$stored_person_properties",br="$stored_group_properties",Cl="$surveys",xa="$flag_call_reported",Tl="$user_state",Il="$posthog_quota_limited",Lg=[Hp,fa,"__cmpns",Fn,Pl,wa,Gi,Tl,Il,Al,br,Hi,Cl,xa];function ml(t,e){return e.length>t?e.slice(0,t)+"...":e}var _r={_initializedTokens:[],_isDisabledServerSide:null,_isAutocaptureEnabled:!1,_setIsAutocaptureEnabled:function(t){var e,r=Ut(this._isDisabledServerSide)?!((e=t.persistence)===null||e===void 0||!e.props[gp]):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&&!dp(e));return e},_getAugmentPropertiesFromElement:function(t){if(!da(t))return{};var e={};return Ee(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&&ji(n)&&(e[i]=n)}}),e},_getPropertiesFromElement:function(t,e,r){var i,n=t.tagName.toLowerCase(),s={tag_name:n};fl.indexOf(n)>-1&&!r&&(n.toLowerCase()==="a"||n.toLowerCase()==="button"?s.$el_text=ml(1024,mp(t)):s.$el_text=ml(1024,_a(t)));var a=ba(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;Ee(t.attributes,function(u){var f;jp(t)&&["name","id","class"].indexOf(u.name)===-1||o!=null&&o.includes(u.name)||!e&&ji(u.value)&&(f=u.name,!wt(f)||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")&&(s["attr__"+u.name]=ml(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 Ee(document.querySelectorAll(t.css_selector),function(r){var i;["input","select"].indexOf(r.tagName.toLowerCase())>-1?i=r.value:r.textContent&&(i=r.textContent),ji(i)&&e.push(i)}),e.join(", ")},_getCustomProperties:function(t){var e=this,r={};return Ee(this._customProperties,function(i){Ee(i.event_selectors,function(n){Ee(document.querySelectorAll(n),function(s){ve(t,s)&&da(s)&&(r[i.name]=e._extractCustomPropertyValue(i))})})}),r},_getEventTarget:function(t){return pe(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(Np(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||Kr(g,"html")||!dp(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&&!Kr(k,"body");)if(fp(k.parentNode))w.push(k.parentNode.host),k=k.parentNode.host;else{if(!(M=k.parentNode||!1))break;if(fl.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"&&(fl.indexOf(A)>-1||g.getAttribute("contenteditable")==="true")}}(s,t,this.config)){for(var a,o,l=[s],h=s;h.parentNode&&!Kr(h,"body");)fp(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(Ee(l,function(g){var d=da(g);g.tagName.toLowerCase()==="a"&&(c=g.getAttribute("href"),c=d&&ji(c)&&c),ve(ba(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=mp(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)};On(document,"submit",r,!1,!0),On(document,"change",r,!1,!0),On(document,"click",r,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(t){var e;Sl(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 Rg(t.config.rageclick)},afterDecideResponse:function(t,e){var r=e.config.token;this._initializedTokens.indexOf(r)>-1?N.info('autocapture already initialized for token "'+r+'"'):(e.persistence&&e.persistence.register(Z({},gp,!!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=pe(e)?10:e,r=pe(r)?10:r;for(var i=0,n=0;n<t.length;n++)i+=t.charCodeAt(n);return i%e<r},isBrowserSupported:function(){return ti(document.querySelectorAll)}};(function(t){for(var e in t)ti(t[e])&&(t[e]=t[e].bind(t))})(_r),function(t){for(var e in t)ti(t[e])&&(t[e]=zp(t[e]))}(_r);var gl="$active_feature_flags",la="$override_feature_flags",bp="$feature_flag_payloads",_p=function(t){var e,r={},i=Qr(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=Bn(e.value,2),s=n[0],a=n[1];a&&(r[s]=a)}}catch(o){i.e(o)}finally{i.f()}return r},Bg=function(){function t(e){Oe(this,t),this.instance=e,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return $e(t,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(Gi),r=this.instance.get_property(la);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||(N.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:r,finalFlags:i}),this._override_warning=!0),i}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(bp)||{}}},{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(Hi),n=this.instance.get_property(br),s=Vl(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(xa)||{};return(r.send_event||!("send_event"in r))&&(!(e in a)||!a[e].includes(s))&&(Ze(a[e])?a[e].push(s):a[e]=[s],(i=this.instance.persistence)===null||i===void 0||i.register(Z({},xa,a)),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:n})),n}N.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);N.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(Ze(l)){var c,u={};if(l)for(var f=0;f<l.length;f++)u[l[f]]=!0;s&&s.register((Z(c={},gl,l),Z(c,Gi,u),c))}else{var p,m=l,g=h;n.errorsWhileComputingFlags&&(m=he(he({},a),m),g=he(he({},o),g)),s&&s.register((Z(p={},gl,Object.keys(_p(m))),Z(p,Gi,m||{}),Z(p,bp,g||{}),p))}})(e,this.instance.persistence,r,i),this._fireFeatureFlagsCallbacks()}}},{key:"override",value:function(e){if(!this.instance.__loaded||!this.instance.persistence)return N.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,e===!1)this.instance.persistence.unregister(la);else if(Ze(e)){for(var r={},i=0;i<e.length;i++)r[e[i]]=!0;this.instance.persistence.register(Z({},la,r))}else this.instance.persistence.register(Z({},la,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=Z({},"$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=he(he({},this.getFlagVariants()),{},Z({},e,r));(i=this.instance.persistence)===null||i===void 0||i.register((Z(n={},gl,Object.keys(_p(a))),Z(n,Gi,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(Al);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(Z({},Al,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(Hi)||{};this.instance.register(Z({},Hi,he(he({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(Hi)}},{key:"setGroupPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(br)||{};Object.keys(i).length!==0&&Object.keys(i).forEach(function(n){i[n]=he(he({},i[n]),e[n]),delete e[n]}),this.instance.register(Z({},br,he(he({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(e){if(e){var r=this.instance.get_property(br)||{};this.instance.register(Z({},br,he(he({},r),{},Z({},e,{}))))}else this.instance.unregister(br)}}]),t}(),Vg=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,ar={is_supported:function(){return!0},error:function(t){N.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(ar.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(Vg),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{ar.set(t,"",-1,e)}catch{return}}},yl=null,Fe={is_supported:function(){if(!Ut(yl))return yl;var t=!0;if(pe(window))t=!1;else try{var e="__mplssupport__";Fe.set(e,"xyz"),Fe.get(e)!=='"xyz"'&&(t=!1),Fe.remove(e)}catch{t=!1}return t||N.error("localStorage unsupported; falling back to cookie store"),yl=t,t},error:function(t){N.error("localStorage error: "+t)},get:function(t){try{return window.localStorage.getItem(t)}catch(e){Fe.error(e)}return null},parse:function(t){try{return JSON.parse(Fe.get(t))||{}}catch{}return null},set:function(t,e){try{window.localStorage.setItem(t,JSON.stringify(e))}catch(r){Fe.error(r)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(e){Fe.error(e)}}},zg=["distinct_id",wa,ma],Ml=he(he({},Fe),{},{parse:function(t){try{var e={};try{e=ar.parse(t)||{}}catch{}var r=Qe(e,JSON.parse(Fe.get(t)||"{}"));return Fe.set(t,r),r}catch{}return null},set:function(t,e,r,i,n){try{Fe.set(t,e);var s={};zg.forEach(function(a){e[a]&&(s[a]=e[a])}),Object.keys(s).length&&ar.set(t,s,r,i,n)}catch(a){Fe.error(a)}},remove:function(t,e){try{window.localStorage.removeItem(t),ar.remove(t,e)}catch(r){Fe.error(r)}}}),ha={},Ng={is_supported:function(){return!0},error:function(t){N.error("memoryStorage error: "+t)},get:function(t){return ha[t]||null},parse:function(t){return ha[t]||null},set:function(t,e){ha[t]=e},remove:function(t){delete ha[t]}},Jr=null,We={is_supported:function(){if(!Ut(Jr))return Jr;if(Jr=!0,pe(window))Jr=!1;else try{var t="__support__";We.set(t,"xyz"),We.get(t)!=='"xyz"'&&(Jr=!1),We.remove(t)}catch{Jr=!1}return Jr},error:function(t){N.error("sessionStorage error: ",t)},get:function(t){try{return window.sessionStorage.getItem(t)}catch(e){We.error(e)}return null},parse:function(t){try{return JSON.parse(We.get(t))||null}catch{}return null},set:function(t,e){try{window.sessionStorage.setItem(t,JSON.stringify(e))}catch(r){We.error(r)}},remove:function(t){try{window.sessionStorage.removeItem(t)}catch(e){We.error(e)}}},jg=["localhost","127.0.0.1"],Gg=function(t,e){return!!function(r){try{new RegExp(r)}catch{return!1}return!0}(e)&&new RegExp(e).test(t)},wp=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(!Ze(r)||r.length<2)return"";var a=r[1];try{a=decodeURIComponent(a)}catch{N.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},Sa=function(t,e){var r=t.match(new RegExp(e+"=([^&]*)"));return r?r[1]:null},qe={campaignParams:function(t){var e=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(t||[]),r={};return Ee(e,function(i){var n=wp(De.URL,i);n.length&&(r[i]=n)}),r},searchEngine:function(){var t=De.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=qe.searchEngine(),e=t!="yahoo"?"q":"p",r={};if(!Ut(t)){r.$search_engine=t;var i=wp(De.referrer,e);i.length&&(r.ph_keyword=i)}return r},browser:function(t,e,r){return e=e||"",r||ve(t," OPR/")?ve(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":ve(t,"IEMobile")||ve(t,"WPDesktop")?"Internet Explorer Mobile":ve(t,"SamsungBrowser/")?"Samsung Internet":ve(t,"Edge")||ve(t,"Edg/")?"Microsoft Edge":ve(t,"FBIOS")?"Facebook Mobile":ve(t,"Chrome")?"Chrome":ve(t,"CriOS")?"Chrome iOS":ve(t,"UCWEB")||ve(t,"UCBrowser")?"UC Browser":ve(t,"FxiOS")?"Firefox iOS":ve(e,"Apple")||function(i){return ve(i,"Safari")&&!ve(i,"Chrome")&&!ve(i,"Android")}(t)?ve(t,"Mobile")?"Mobile Safari":"Safari":ve(t,"Android")?"Android Mobile":ve(t,"Konqueror")||ve(t,"konqueror")?"Konqueror":ve(t,"Firefox")?"Firefox":ve(t,"MSIE")||ve(t,"Trident/")?"Internet Explorer":ve(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+)?)/]}[qe.browser(t,e,r)];if(pe(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 De.referrer||"$direct"},referringDomain:function(){if(!De.referrer)return"$direct";var t=De.createElement("a");return t.href=De.referrer,t.host},properties:function(){var t,e,r,i,n,s,a,o=qe.os(ct),l=o.os_name,h=o.os_version;return Qe(El({$os:l,$os_version:h,$browser:qe.browser(ct,navigator.vendor,window.opera),$device:qe.device(ct),$device_type:qe.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:qe.browserVersion(ct,navigator.vendor,window.opera),$browser_language:qe.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:ei.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Vp()/1e3})},people_properties:function(){var t=qe.os(ct),e=t.os_name,r=t.os_version;return Qe(El({$os:e,$os_version:r,$browser:qe.browser(ct,navigator.vendor,window.opera)}),{$browser_version:qe.browserVersion(ct,navigator.vendor,window.opera)})}},Hg=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],xp=function(){function t(e){Oe(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",Hg.indexOf(e.persistence.toLowerCase())===-1&&(N.critical("Unknown persistence type "+e.persistence+"; falling back to cookie"),e.persistence="cookie");var i=e.persistence.toLowerCase();i==="localstorage"&&Fe.is_supported()?this.storage=Fe:i==="localstorage+cookie"&&Ml.is_supported()?this.storage=Ml:i==="sessionstorage"&&We.is_supported()?this.storage=We:this.storage=i==="memory"?Ng:ar,this.user_state="anonymous",this.load(),this.update_config(e),this.save()}return $e(t,[{key:"properties",value:function(){var e={};return Ee(this.props,function(r,i){if(i===Gi&&wr(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,(Ut(a=Lg)?l:cp&&a.indexOf===cp?a.indexOf(o)!=-1:(Ee(a,function(h){if(l||(l=h===o))return Bl}),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(wr(e)){pe(r)&&(r="None"),this.expire_days=pe(i)?this.default_expiry:i;var s=!1;if(Ee(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(wr(e)){this.expire_days=pe(r)?this.default_expiry:r;var n=!1;if(Ee(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(qe.campaignParams(this.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(qe.searchInfo())}},{key:"update_referrer_info",value:function(){this.register({$referrer:this.props.$referrer||qe.referrer(),$referring_domain:this.props.$referring_domain||qe.referringDomain()})}},{key:"get_referrer_info",value:function(){return El({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(e){return Ee(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[Fn]||{};i[e]=r,this.props[Fn]=i,this.save()}},{key:"remove_event_timer",value:function(e){var r=(this.props[Fn]||{})[e];return pe(r)||(delete this.props[Fn][e],this.save()),r}},{key:"get_user_state",value:function(){return this.props[Tl]||"anonymous"}},{key:"set_user_state",value:function(e){this.props[Tl]=e,this.save()}},{key:"get_quota_limits",value:function(){return this.props[Il]||{}}},{key:"set_quota_limits",value:function(e){this.props[Il]=e,this.save()}}]),t}(),Sp=2,qg=4,qp=3,Ug=6,Wg=0,Zg="rrweb/console@1",qt,Yg=$e(function t(e){var r,i,n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Oe(this,t),Z(this,"bucketSize",100),Z(this,"refillRate",10),Z(this,"mutationBuckets",{}),Z(this,"loggedTracker",{}),Z(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]})}),Z(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]}),Z(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)}),Z(this,"throttleMutations",function(a){if(a.type!==qp||a.data.source!==Wg)return a;var o=a.data,l=n.numberOfChanges(o);o.attributes&&(o.attributes=o.attributes.filter(function(c){var u,f,p,m=Bn(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)}),Up=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}(Up||{}),Jg="/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"})(qt||(qt={}));var Xg=[qt.MouseMove,qt.MouseInteraction,qt.Scroll,qt.ViewportResize,qt.Input,qt.TouchMove,qt.MediaInteraction,qt.Drag],Kg=function(){function t(e){var r=this;if(Oe(this,t),Z(this,"_linkedFlagSeen",!1),Z(this,"_lastActivityTimestamp",Date.now()),Z(this,"isIdle",!1),Z(this,"_linkedFlag",null),Z(this,"_sampleRate",null),Z(this,"_minimumDuration",null),this.instance=e,this._captureStarted=!1,this._endpoint=Jg,this.stopRrweb=void 0,this.receivedDecide=!1,window.addEventListener("beforeunload",function(){r._flushBuffer()}),!this.instance.sessionManager)throw N.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 $e(t,[{key:"started",get:function(){return this._captureStarted}},{key:"sessionManager",get:function(){if(!this.instance.sessionManager)throw N.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 sr(this._sampleRate)?this.instance.get_property(ma):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(Pl),r=!this.instance.config.disable_session_recording;return e&&r}},{key:"isConsoleLogCaptureEnabled",get:function(){var e=!!this.instance.get_property(yp),r=this.instance.config.enable_recording_console_log;return r??e}},{key:"recordingVersion",get:function(){var e,r=this.instance.get_property(vp);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?wt(this._linkedFlag)&&!this._linkedFlagSeen?"buffering":Sl(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(sr(this._sampleRate)){var n,s=this.isSampled;i||!Sl(s)?n=Math.random()<this._sampleRate:n=s,n||N.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(Z({},ma,n))}else{var a;(a=this.instance.persistence)===null||a===void 0||a.register(Z({},ma,null))}}},{key:"afterDecideResponse",value:function(e){var r,i,n,s,a,o,l,h=this;this.instance.persistence&&this.instance.persistence.register((Z(l={},Pl,!!e.sessionRecording),Z(l,yp,(a=e.sessionRecording)===null||a===void 0?void 0:a.consoleLogRecordingEnabled),Z(l,vp,(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=pe(c)||Ut(c)?null:parseFloat(c);var u,f=(i=e.sessionRecording)===null||i===void 0?void 0:i.minimumDurationMilliseconds;if(this._minimumDuration=pe(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),sr(this._sampleRate)&&this.sessionManager.onSessionId(function(m){h.makeSamplingDecision(m)}),wt(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:Vp()})}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){this._startCapture()}},{key:"_startCapture",value:function(){var e=this;if(!pe(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?$n(this.instance.config.api_host+"/static/".concat(r,"?v=").concat(ei.LIB_VERSION),function(i){if(i)return N.error("Could not load ".concat(r),i);e._onScriptLoaded()}):this._onScriptLoaded()}}},{key:"_isInteractiveEvent",value:function(e){var r;return e.type===qp&&Xg.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,[Sp,qg].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 N.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=Bn(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 Yg(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");N.info(f,{node:u}),r.log("[PostHog Recorder] "+f,"warn")}}),this.stopRrweb=this.rrwebRecord(he({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){N.error("Could not add $pageview to rrweb session",p)}}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1):N.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"onRRwebEmit",value:function(e){if(e&&wr(e)){if(e.type===Up.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&&wr(o)&&o.type===Ug&&wr(o.data)&&o.data.plugin===Zg){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=sr(r)&&sr(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===Sp}})}}]),t}(),Ht={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},Qg=["first-input","navigation","paint","resource"],e0=["/s/","/e/"],t0=function(){function t(e){Oe(this,t),Z(this,"_forceAllowLocalhost",!1),this.instance=e}return $e(t,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var e,r,i=this;if(!this.observer)if(pe((e=window)===null||e===void 0||(r=e.PerformanceObserver)===null||r===void 0?void 0:r.supportedEntryTypes))N.info("[PerformanceObserver] not started because PerformanceObserver is not supported by this browser.");else if(!jg.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 Qg.includes(s)});n.forEach(function(s){var a;(a=i.observer)===null||a===void 0||a.observe({type:s,buffered:!0})})}catch(s){N.error("PostHog failed to start performance observer",s),this.stopObserving()}else N.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(e0.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[Ht.timeOrigin]=o,a[Ht.timestamp]=Math.floor(o+e.startTime),Ht)pe(s[l])||(a[Ht[l]]=s[l]);if(this.capturePerformanceEvent(a),r0(e)){var h,c=Qr(e.serverTiming||[]);try{for(c.s();!(h=c.n()).done;){var u,f=h.value;this.capturePerformanceEvent((Z(u={},Ht.timeOrigin,o),Z(u,Ht.timestamp,Math.floor(o+e.startTime)),Z(u,Ht.name,f.name),Z(u,Ht.duration,f.duration),Z(u,Ht.entryType,"serverTiming"),u))}}catch(p){c.e(p)}finally{c.f()}}}}},{key:"capturePerformanceEvent",value:function(e){var r,i=e[Ht.timestamp];(r=this.instance.sessionRecording)===null||r===void 0||r.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:e},timestamp:i})}}]),t}(),r0=function(t){return t.entryType==="navigation"||t.entryType==="resource"},i0=function(){function t(e){Oe(this,t),this.instance=e,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return $e(t,[{key:"call",value:function(){var e=this,r=Vl(JSON.stringify({token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(Hi),group_properties:this.instance.get_property(br),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 N.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),_r.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&&$n(this.instance.config.api_host+"/static/surveys.js",function(p){if(p)return N.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&&pe(l)&&$n(this.instance.config.api_host+"/static/exception-autocapture.js",function(p){if(p)return N.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=Qr(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,$n(d,function(y){y&&N.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&&N.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else N.error("Failed to fetch feature flags from PostHog.")}}]),t}(),n0=["https://app.posthog.com","https://eu.posthog.com"],s0=["source"],a0=J.location?Sa(J.location.hash,"__posthog")||Sa(location.hash,"state"):null,o0=function(){function t(e){Oe(this,t),this.instance=e}return $e(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(he({},r))}},{key:"maybeLoadToolbar",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.history;try{if(!r){try{J.localStorage.setItem("test","test"),J.localStorage.removeItem("test")}catch{return!1}r=J.localStorage}var n,s=a0||Sa(e.hash,"__posthog")||Sa(e.hash,"state"),a=s?pp(function(){return JSON.parse(atob(decodeURIComponent(s)))})||pp(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(J._postHogToolbarLoaded)return!1;J._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=!n0.includes(this.instance.config.api_host)&&this.instance.config.advanced_disable_toolbar_metrics,l=he(he({token:this.instance.config.token},e),{},{apiURL:i},o?{instrument:!1}:{});l.source;var h=Pg(l,s0);return J.localStorage.setItem("_postHogToolbarParams",JSON.stringify(h)),$n(a,function(c){c?N.error("Failed to load toolbar",c):(J.ph_load_toolbar||J.ph_load_editor)(l,r.instance)}),On(J,"turbolinks:load",function(){J._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]:J.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.history;return this.maybeLoadToolbar(e,r,i)}}]),t}(),l0="__ph_opt_in_out_";function h0(t,e){Zp(!0,t,e)}function c0(t,e){Zp(!1,t,e)}function u0(t,e){return Wp(t,e)==="1"}function kp(t,e){return!!function(r){if(r&&r.respectDnt){var i=r&&r.window||J,n=i.navigator||{},s=!1;return Ee([n.doNotTrack,n.msDoNotTrack,i.doNotTrack],function(a){ve([!0,1,"1","yes"],a)&&(s=!0)}),s}return!1}(e)||Wp(t,e)==="0"}function p0(t,e){zl(e=e||{}).remove(Nl(t,e),!!e.crossSubdomainCookie)}function zl(t){return(t=t||{}).persistenceType==="localStorage"?Fe:t.persistenceType==="localStorage+cookie"?Ml:ar}function Nl(t,e){return((e=e||{}).persistencePrefix||l0)+t}function Wp(t,e){return zl(e).get(Nl(t,e))}function Zp(t,e,r){wt(e)&&e.length?(zl(r=r||{}).set(Nl(e,r),t?1:0,sr(r.cookieExpiration)?r.cookieExpiration:null,r.crossSubdomainCookie,r.secureCookie),r.capture&&t&&r.capture(r.captureEventName||"$opt_in",r.captureProperties||{},{send_instantly:!0})):N.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token")}var Yp=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Oe(this,t),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=e}return $e(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}(),d0=function(t){Op(r,Yp);var e=$p(r);function r(i){var n,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3;return Oe(this,r),(n=e.call(this,s)).handlePollRequest=i,n}return $e(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;Ee(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(wl(s.filter(function(a){return a.url.indexOf("/e")===0})),wl(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,he(he({},h),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var i={};return Ee(this._event_queue,function(n){var s=n.url,a=n.data,o=n.options,l=(o?o._batchKey:null)||s;pe(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}(),xt=Uint8Array,nt=Uint16Array,Wi=Uint32Array,jl=new xt([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]),Gl=new xt([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]),Ep=new xt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Jp=function(t,e){for(var r=new nt(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Wi(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]},Xp=Jp(jl,2),f0=Xp[0],Dl=Xp[1];f0[28]=258,Dl[258]=28;for(Fl=Jp(Gl,0)[1],ka=new nt(32768),Ae=0;Ae<32768;++Ae)yr=(43690&Ae)>>>1|(21845&Ae)<<1,yr=(61680&(yr=(52428&yr)>>>2|(13107&yr)<<2))>>>4|(3855&yr)<<4,ka[Ae]=((65280&yr)>>>8|(255&yr)<<8)>>>1;var yr,Fl,ka,Ae,Rn=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[ka[u]>>>l]=h}else for(a=new nt(i),n=0;n<i;++n)a[n]=ka[o[t[n]-1]++]>>>15-t[n];return a},ri=new xt(288);for(Ae=0;Ae<144;++Ae)ri[Ae]=8;for(Ae=144;Ae<256;++Ae)ri[Ae]=9;for(Ae=256;Ae<280;++Ae)ri[Ae]=7;for(Ae=280;Ae<288;++Ae)ri[Ae]=8;var Ea=new xt(32);for(Ae=0;Ae<32;++Ae)Ea[Ae]=5;var Xr,m0=Rn(ri,9,0),g0=Rn(Ea,5,0),Kp=function(t){return(t/8>>0)+(7&t&&1)},Qp=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 Wi?Wi:xt)(r-e);return i.set(t.subarray(e,r)),i},nr=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8},Mn=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},vl=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 xt(0),0];if(n==1){var a=new xt(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=y0(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 xt(p),m]},y0=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},Pp=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]},Dn=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},ga=function(t,e,r){var i=r.length,n=Kp(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)},Ap=function(t,e,r,i,n,s,a,o,l,h,c){nr(e,c++,r),++n[256];for(var u=vl(n,15),f=u[0],p=u[1],m=vl(s,15),g=m[0],d=m[1],y=Pp(f),v=y[0],b=y[1],_=Pp(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=vl(S,7),k=M[0],I=M[1],P=19;P>4&&!k[Ep[P-1]];--P);var A,E,F,O,D=h+5<<3,C=Dn(n,ri)+Dn(s,Ea)+a,$=Dn(n,f)+Dn(s,g)+a+14+3*P+Dn(S,k)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return ga(e,c,t.subarray(l,l+h));if(nr(e,c,1+($<C)),c+=2,$<C){A=Rn(f,p,0),E=f,F=Rn(g,d,0),O=g;var R=Rn(k,I,0);for(nr(e,c,b-257),nr(e,c+5,T-1),nr(e,c+10,P-4),c+=14,w=0;w<P;++w)nr(e,c+3*w,k[Ep[w]]);c+=3*P;for(var q=[v,x],U=0;U<2;++U){var Y=q[U];for(w=0;w<Y.length;++w){var G=31&Y[w];nr(e,c,R[G]),c+=k[G],G>15&&(nr(e,c,Y[w]>>>5&127),c+=Y[w]>>>12)}}}else A=m0,E=ri,F=g0,O=Ea;for(w=0;w<o;++w)if(i[w]>255){G=i[w]>>>18&31,Mn(e,c,A[G+257]),c+=E[G+257],G>7&&(nr(e,c,i[w]>>>23&31),c+=jl[G]);var te=31&i[w];Mn(e,c,F[te]),c+=O[te],te>3&&(Mn(e,c,i[w]>>>5&8191),c+=Gl[te])}else Mn(e,c,A[i[w]]),c+=E[i[w]];return Mn(e,c,A[256]),c+E[256]},v0=new Wi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),b0=new xt(0),_0=function(){for(var t=new Wi(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),w0=function(){var t=4294967295;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=_0[255&r^e[i]]^r>>>8;t=r},d:function(){return 4294967295^t}}},x0=function(t,e,r,i,n){return function(s,a,o,l,h,c){var u=s.length,f=new xt(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=ga(p,m,s.subarray(g,d)):(p[g]=c,m=ga(p,m,s.subarray(g,u)))}else{for(var y=v0[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 Wi(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,R=T[C];if(x[$]=R,T[C]=$,O<=g){var q=u-g;if((A>7e3||F>24576)&&q>423){m=Ap(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 Y=2,G=0,te=b,ne=$-R&32767;if(q>2&&C==M(g-ne))for(var re=Math.min(v,q)-1,Q=Math.min(32767,g),we=Math.min(258,q);ne<=Q&&--te&&$!=R;){if(s[g+Y]==s[g+Y-ne]){for(var ce=0;ce<we&&s[g+ce]==s[g+ce-ne];++ce);if(ce>Y){if(Y=ce,G=ne,ce>re)break;var Ce=Math.min(ne,ce-2),xe=0;for(U=0;U<Ce;++U){var W=g-ne+U+32768&32767,He=W-x[W]+32768&32767;He>xe&&(xe=He,R=W)}}}ne+=($=R)-(R=x[$])+32768&32767}if(G){k[F++]=268435456|Dl[Y]<<18|Fl[G];var kt=31&Dl[Y],Et=31&Fl[G];E+=jl[kt]+Gl[Et],++I[257+kt],++P[Et],O=g+Y,++A}else k[F++]=s[g],++I[s[g]]}}m=Ap(s,p,c,k,I,P,E,F,D,g-D,m),c||(m=ga(p,m,b0))}return Qp(f,0,l+Kp(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)},Ol=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},S0=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&&Ol(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)}},k0=function(t){return 10+(t.filename&&t.filename.length+1||0)};function E0(t,e){e===void 0&&(e={});var r=w0(),i=t.length;r.p(t);var n=x0(t,e,k0(e),8),s=n.length;return S0(n,e),Ol(n,s-8,r.d()),Ol(n,s-4,i),n}function P0(t,e){var r=t.length;if(!e&&typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var i=new xt(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 xt(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 Qp(i,0,n)}(function(t){t.GZipJS="gzip-js",t.Base64="base64"})(Xr||(Xr={}));var ed=function(t,e,r){var i=e||{};i.ip=r.ip?1:0,i._=new Date().getTime().toString(),i.ver=ei.LIB_VERSION;var n=t.split("?");if(n.length>1){var s,a=Qr(n[1].split("&"));try{for(a.s();!(s=a.n()).done;){var o=s.value.split("=")[0];pe(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 Ee(h,function(m,g){pe(m)||pe(g)||g==="undefined"||(c=encodeURIComponent(m.toString()),u=encodeURIComponent(g),p[p.length]=u+"="+c)}),p.join(f)}(i)},Hl=function t(e,r){if(r.blob&&e.buffer)return new Blob([lp(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=Ze(e)||lp(e)?"data="+encodeURIComponent(e):"data="+encodeURIComponent(e.data),"compression"in e&&e.compression&&(n+="&compression="+e.compression),n);var n},td=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;sr(a)&&a>0&&(e=ed(e,{retry_count:a},{}));var f=new XMLHttpRequest;f.open(n.method||"GET",e,!0);var p=Hl(r,n);Ee(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 N.error(g)}s(m)}}else ti(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)},A0=18e5,C0=function(t){Op(r,Yp);var e=$p(r);function r(i,n){var s;return Oe(this,r),(s=e.call(this)).isPolling=!1,s.queue=[],s.areWeOnline=!0,s.onXHRError=i,s.rateLimiter=n,!pe(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 $e(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(A0,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)"),N.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=Qr(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=Qr(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))N.warn("[RetryQueue] is quota limited. Dropping request.");else try{window.navigator.sendBeacon(a,Hl(o,he(he({},l),{},{sendBeacon:!0})))}catch(h){N.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)||td({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 sr(t)&&isFinite(t)&&Math.floor(t)===t});var Cp="0123456789abcdef",T0=function(){function t(e){if(Oe(this,t),this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}return $e(t,[{key:"toString",value:function(){for(var e="",r=0;r<this.bytes.length;r++)e=e+Cp.charAt(this.bytes[r]>>>4)+Cp.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}(),I0=function(){function t(){Oe(this,t),Z(this,"timestamp",0),Z(this,"counter",0),Z(this,"random",new M0)}return $e(t,[{key:"generate",value:function(){var e=this.generateOrAbort();if(pe(e)){this.timestamp=0;var r=this.generateOrAbort();if(pe(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 T0.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}(),rd=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};!pe(J.crypto)&&crypto.getRandomValues&&(rd=function(t){return crypto.getRandomValues(t)});var Tp,M0=function(){function t(){Oe(this,t),Z(this,"buffer",new Uint32Array(8)),Z(this,"cursor",1/0)}return $e(t,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(rd(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),t}(),qi=function(){return D0().toString()},D0=function(){return(Tp||(Tp=new I0)).generate()},ca=1800,Ip=60,F0=864e5,O0=function(){function t(e,r,i,n){Oe(this,t),Z(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||qi,this._windowIdGenerator=n||qi;var s=e.persistence_name||e.token,a=e.session_idle_timeout_seconds||ca;if(sr(a)?a>ca?N.warn("session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):a<Ip&&N.warn("session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."):(N.warn("session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),a=ca),this._sessionTimeoutMs=1e3*Math.min(Math.max(a,Ip),ca),this._window_id_storage_key="ph_"+s+"_window_id",this._primary_window_exists_storage_key="ph_"+s+"_primary_window_exists",this._canUseSessionStorage()){var o=We.parse(this._window_id_storage_key),l=We.parse(this._primary_window_exists_storage_key);o&&!l?this._windowId=o:We.remove(this._window_id_storage_key),We.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return $e(t,[{key:"onSessionId",value:function(e){var r=this;return pe(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&&We.is_supported()}},{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&We.set(this._window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?We.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(Z({},wa,[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[wa];return Ze(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;J.addEventListener("beforeunload",function(){e._canUseSessionStorage()&&We.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=Bn(this._getSessionId(),3),n=i[0],s=i[1],a=i[2],o=this._getWindowId(),l=a&&a>0&&Math.abs(r-a)>F0,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}(),$0=$e(function t(e,r,i,n){Oe(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})}}),R0=function(t){Promise&&Promise.resolve||N.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")}}},L0=function(){function t(){var e=this;Oe(this,t),Z(this,"_hasSeenPageView",!1),Z(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 $e(t,[{key:"_createPageViewData",value:function(){return{pathname:J.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),he({$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 he({$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:ua(i/r,0,1),$prev_pageview_max_scroll:n,$prev_pageview_max_scroll_percentage:r<=1?1:ua(n/r,0,1),$prev_pageview_last_content:a,$prev_pageview_last_content_percentage:s<=1?1:ua(a/s,0,1),$prev_pageview_max_content:o,$prev_pageview_max_content_percentage:s<=1?1:ua(o/s,0,1)}}},{key:"startMeasuringScrollPosition",value:function(){J.addEventListener("scroll",this._updateScrollData),J.addEventListener("scrollend",this._updateScrollData),J.addEventListener("resize",this._updateScrollData)}},{key:"stopMeasuringScrollPosition",value:function(){J.removeEventListener("scroll",this._updateScrollData),J.removeEventListener("scrollend",this._updateScrollData),J.removeEventListener("resize",this._updateScrollData)}},{key:"_scrollHeight",value:function(){return Math.max(0,J.document.documentElement.scrollHeight-J.document.documentElement.clientHeight)}},{key:"_scrollY",value:function(){return J.scrollY||J.pageYOffset||J.document.documentElement.scrollTop||0}},{key:"_contentHeight",value:function(){return J.document.documentElement.scrollHeight||0}},{key:"_contentY",value:function(){var e=J.document.documentElement.clientHeight||0;return this._scrollY()+e}}]),t}();function ua(t,e,r){return Math.max(e,Math.min(t,r))}var Ln,ql,Ue,B0={icontains:function(t){return window.location.href.toLowerCase().indexOf(t.toLowerCase())>-1},regex:function(t){return Gg(window.location.href,t)},exact:function(t){return window.location.href===t}},V0=function(){function t(e){Oe(this,t),this.instance=e}return $e(t,[{key:"getSurveys",value:function(e){var r=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.instance.get_property(Cl);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(Z({},Cl,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||B0[(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}(),z0=6e4,N0=function(){function t(){var e=this;Oe(this,t),Z(this,"limits",{}),Z(this,"checkForLimiting",function(r){try{var i=r.responseText;if(!i||!i.length)return;(JSON.parse(i).quota_limited||[]).forEach(function(n){N.info("[RateLimiter] ".concat(n||"events"," is quota limited.")),e.limits[n]=new Date().getTime()+z0})}catch(n){return void N.error(n)}})}return $e(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"})(Ln||(Ln={}));var $l=function(){},pa={},ut="posthog",ya=J.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,id=!ya&&ct.indexOf("MSIE")===-1&&ct.indexOf("Mozilla")===-1,Mp=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=De?.location,r=e?.hostname,!!wt(r)&&r.split(".").slice(-2).join(".")!=="herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:$l,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:(J==null||(t=J.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;N.error(n)},get_device_id:function(i){return i},_onCapture:$l,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800}},Rl=function(t,e,r,i){var n,s=r!==ut&&Ue?r?Ue[r]:void 0:Ue,a={initComplete:!1,syncCode:!1},o=function(l){return function(h){a[l]||(a[l]=!0,a.initComplete&&a.syncCode&&i?.(h))}};if(s&&ql===Ln.INIT_MODULE)n=s;else{if(s&&!Ze(s))return void N.error("You have already initialized "+r);n=new Ul}return n._init(t,e,r,o("initComplete")),n.toolbar.maybeLoadToolbar(),n.sessionRecording=new Kg(n),n.sessionRecording.startRecordingIfEnabled(),n.webPerformance=new t0(n),n.webPerformance.startObservingIfEnabled(),n.config.__preview_measure_pageview_stats&&n.pageViewManager.startMeasuringScrollPosition(),n.__autocapture=n.config.autocapture,_r._setIsAutocaptureEnabled(n),_r._isAutocaptureEnabled&&(n.__autocapture=n.config.autocapture,_r.enabledForProject(n.config.token,100,100)?_r.isBrowserSupported()?_r.init(n):(n.__autocapture=!1,N.info("Disabling Automatic Event Collection because this browser is not supported")):(n.__autocapture=!1,N.info("Not in active bucket: disabling Automatic Event Collection."))),ei.DEBUG=ei.DEBUG||n.config.debug,!pe(s)&&Ze(s)&&(n._execute_array.call(n.people,s.people),n._execute_array(s)),o("syncCode")(n),n},Ul=function(){function t(){var e=this;Oe(this,t),this.config=Mp(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=$0,this.segmentIntegration=function(){return R0(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 Bg(this),this.toolbar=new o0(this),this.pageViewManager=new L0,this.surveys=new V0(this),this.rateLimiter=new N0,this.people={set:function(r,i,n){var s=wt(r)?Z({},r,i):r;e.setPersonProperties(s),n?.({})},set_once:function(r,i,n){var s=wt(r)?Z({},r,i):r;e.setPersonProperties(void 0,s),n?.({})}}}return $e(t,[{key:"init",value:function(e,r,i){if(pe(i))N.critical("You must name your new library: init(token, config, name)");else{if(i!==ut){var n=Rl(e,r,i,function(s){Ue[i]=s,s._loaded()});return Ue[i]=n,n}N.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({},Mp(),s,{name:a,token:e,callback_fn:(a===ut?a:ut+"."+a)+"._jsc"})),this._jsc=function(){},(J!=null&&(r=J.rrweb)!==null&&r!==void 0&&r.record||J!=null&&J.rrwebRecord)&&(this.__loaded_recorder_version=J==null||(l=J.rrweb)===null||l===void 0?void 0:l.version),this.persistence=new xp(this.config),this._requestQueue=new d0(this._handle_queued_event.bind(this)),this._retryQueue=new C0(this.config.on_xhr_error,this.rateLimiter),this.__captureHooks=[],this.__request_queue=[],this.sessionManager=new O0(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new xp(he(he({},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(qi()),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(qi());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_user_state("anonymous")}J.addEventListener&&J.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=Qr(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){N.critical("`loaded` function failed",r)}this._start_queue_if_opted_in(),this.config.capture_pageview&&this.capture("$pageview",{title:De.title},{send_instantly:!0}),e||(new i0(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()||Ui(this.__request_queue,function(r){e._send_request.apply(e,wl(r))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(e,r){if(pe(e))return null;if(ya)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||pa,$l)}},{key:"__compress_and_send_json_request",value:function(e,r,i,n){var s=function(h,c,u){return h===Xr.GZipJS?[E0(P0(c),{mtime:0}),he(he({},u),{},{blob:!0,urlQueryArgs:{compression:Xr.GZipJS}})]:[{data:Vl(c)},u]}(this.compression[Xr.GZipJS]?Xr.GZipJS:Xr.Base64,r,i),a=Bn(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(id)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||{}),ya||(i.method="GET");var a="sendBeacon"in J.navigator&&i.transport==="sendBeacon";if(e=ed(e,i.urlQueryArgs||{},{ip:this.config.ip}),a)try{J.navigator.sendBeacon(e,Hl(r,he(he({},i),{},{sendBeacon:!0})))}catch{}else if(ya)try{td({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){N.error(c)}else{var o,l=De.createElement("script");l.type="text/javascript",l.async=!0,l.defer=!0,l.src=e;var h=De.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=[];Ui(e,function(l){l&&(r=l[0],Ze(r)?a.push(l):ti(l)?l.call(i):Ze(l)&&r==="alias"?n.push(l):Ze(l)&&r.indexOf("capture")!==-1&&ti(i[r])?a.push(l):s.push(l))});var o=function(l,h){Ui(l,function(c){if(Ze(c[0])){var u=h;Ee(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]:pa;if(!this.__loaded||!this.sessionPersistence||!this._requestQueue)return N.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=kp(f,{respectDnt:p,persistenceType:m,persistencePrefix:g,window:d}))}catch(y){N.error("Unexpected error when checking capturing opt-out status: "+y)}return u}(this)){var n=(i=i||pa).transport;if(n&&(i.transport=n),!pe(e)&&wt(e)){if(!$g(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:qi(),event:e,properties:this._calculate_event_properties(e,r||{})};e==="$identify"&&(s.$set=i.$set,s.$set_once=i.$set_once),(s=Dg(s,i._noTruncate?null:this.config.properties_string_max_length)).timestamp=i.timestamp||new Date;var a=he(he({},s.properties.$set),s.$set);Tg(a)||this.setPersonPropertiesForFlags(a),N.info("send",s);var o=JSON.stringify(s),l=this.config.api_host+(i.endpoint||this.analyticsDefaultEndpoint),h=i!==pa;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 N.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),Ee(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=he({},r);if(n.token=this.config.token,e==="$snapshot"){var s=he(he({},this.persistence.properties()),this.sessionPersistence.properties());return n.distinct_id=s.distinct_id,n}var a=qe.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=De.title),e==="$performance_event"){var u=this.persistence.properties();return n.distinct_id=u.distinct_id,n.$current_url=a.$current_url,n}if(!pe(i)){var f=new Date().getTime()-i;n.$duration=parseFloat((f/1e3).toFixed(3))}n=Qe({},qe.properties(),this.persistence.properties(),this.sessionPersistence.properties(),n);var p=this.config.property_blacklist;Ze(p)?Ee(p,function(g){delete n[g]}):N.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(Z({},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 N.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(fa)&&(this.unregister(fa),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(xa))}else N.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:he(he({},n),{},Z({},e,r))}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:r,$group_set:i}),this.setGroupPropertiesForFlags(Z({},e,i))),n[e]===r||i||this.reloadFeatureFlags()}else N.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 N.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(qi());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(Hp)?(N.critical("Attempting to create alias for existing People user - aborting."),-2):(pe(r)&&(r=this.get_distinct_id()),e!==r?(this._register_single(fa,e),this.capture("$create_alias",{alias:e,distinct_id:r})):(N.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1))}},{key:"set_config",value:function(e){var r,i,n=he({},this.config);wr(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),Fe.is_supported()&&Fe.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(ei.DEBUG=!0),this.sessionRecording&&!pe(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"&&Fe.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&&!ar.get("ph_optout")||(ar.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||{}),Fe.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(h0,e),this._gdpr_update_persistence(e)}},{key:"opt_out_capturing",value:function(e){var r=Qe({clear_persistence:!0},e||{});this._gdpr_call_func(c0,r),this._gdpr_update_persistence(r)}},{key:"has_opted_in_capturing",value:function(e){return this._gdpr_call_func(u0,e)}},{key:"has_opted_out_capturing",value:function(e){return this._gdpr_call_func(kp,e)}},{key:"clear_opt_in_out_capturing",value:function(e){var r=Qe({enable_persistence:!0},e??{});this._gdpr_call_func(p0,r),this._gdpr_update_persistence(r)}},{key:"debug",value:function(e){e===!1?(J.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(J.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]]=zp(t.prototype[e[r]])})(Ul,["identify"]);var Dp,Fp,vr={},j0=function(){Ue.init=function(t,e,r){if(r)return Ue[r]||(Ue[r]=vr[r]=Rl(t||"",e||{},r,function(n){Ue[r]=vr[r]=n,n._loaded()})),Ue[r];var i=Ue;return vr[ut]?i=vr[ut]:t&&(i=Rl(t,e||{},ut,function(n){vr[ut]=n,n._loaded()}),vr[ut]=i),Ue=i,ql===Ln.INIT_SNIPPET&&(J[ut]=Ue),Ee(vr,function(n,s){s!==ut&&(Ue[s]=n)}),i}},G0=function(){function t(){t.done||(t.done=!0,id=!1,Ee(vr,function(e){e._dom_loaded()}))}De.addEventListener&&(De.readyState==="complete"?t():De.addEventListener("DOMContentLoaded",t,!1)),On(J,"load",t,!0)};(function(t){t.Popover="popover",t.API="api"})(Dp||(Dp={})),function(t){t.Open="open",t.MultipleChoice="multiple_choice",t.SingleChoice="single_choice",t.Rating="rating",t.Link="link"}(Fp||(Fp={}));var nd=(ql=Ln.INIT_MODULE,Ue=new Ul,j0(),Ue.init(),G0(),Ue);var sd=nd.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 St(t,e){if(!sd)throw new Error("Failed to initialize PostHog");sd.capture(t,e)}var Zi,Aa,Dt,Ye,Ca,ad,Ta,od,Ia,ld,Ma,hd,Da,cd,Fa,ud,Oa,pd,Pa=class extends ze(Te){constructor(){super();se(this,Zi);se(this,Ca);se(this,Ta);se(this,Ia);se(this,Ma);se(this,Da);se(this,Fa);se(this,Oa);se(this,Dt,new aa(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),St("ShopAssistant: error",{widgetId:this.widgetId,error:"websocket onError"})},onClose:()=>{},onNewMessage:r=>{r.role==="assistant"&&St("ShopAssistant: user received bot message (streaming started)",{widgetId:this.widgetId,message:r})},onUpdateMessage:r=>{},onMessageDone:r=>{let i={...z(this,Dt)?.messages.find(n=>n.id===r.message?.id)};Object.assign(i,r.message),i.role==="assistant"&&St("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&&z(this,Ye)&&alert(r.message),St("ShopAssistant: error",{widgetId:this.widgetId,error:"websocket ERROR message type: "+r.message})},persistConversationState:(r,i)=>{let n={conversationId:r,messages:i};localStorage.setItem(z(this,Zi,Aa),JSON.stringify(n))},restoreConversationState:()=>{try{let r=JSON.parse(localStorage.getItem(z(this,Zi,Aa))||"{}");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(z(this,Zi,Aa))}}));se(this,Ye,!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(([s,a])=>a).map(([s,a])=>`${s}-[${a}]`).reduce((s,a)=>(s[a]=!0,s),{}),i={bottom:"72px"},n=Object.entries(this.config.bubble.position).filter(([s,a])=>a).map(([s,a])=>`sm:${s}-[calc(${[i[s],a].filter(o=>!!o).join("+")})]`).reduce((s,a)=>(s[a]=!0,s),{});return fe`
413
- <mw-bubble class="${np(r)} fixed z-[99999999]" @click=${de(this,Ia,ld)} ?dialog-shown="${z(this,Ye)}" bubble-image-url="${this.config.bubble?.imageUrl||""}"></mw-bubble>
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},Zg=["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"],Yg=function(t,e){if(!t)return!1;var r=t.toLowerCase();return Zg.concat(e||[]).some(function(i){var n=i.toLowerCase();return r.includes?r.includes(n):r.indexOf(n)!==-1})},Rn=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;ri(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 Ln(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 Aa(t){switch(Tl(t.className)){case"string":return t.className;case"object":return("baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";default:return""}}function Ca(t){var e="";return wa(t)&&!td(t)&&t.childNodes&&t.childNodes.length&&Pe(t.childNodes,function(r){ed(r)&&r.textContent&&(e+=Ol(r.textContent).split(/(\s+)/).filter(Gi).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),Ol(e)}function Pp(t){return!!t&&t.nodeType===1}function Qr(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function ed(t){return!!t&&t.nodeType===3}function Ap(t){return!!t&&t.nodeType===11}var kl=["a","button","form","input","select","textarea","label"];function wa(t){for(var e=t;e.parentNode&&!Qr(e,"body");e=e.parentNode){var r=Aa(e).split(" ");if(_e(r,"ph-sensitive")||_e(r,"ph-no-capture"))return!1}if(_e(Aa(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 td(t){return!!(Qr(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||Qr(t,"select")||Qr(t,"textarea")||t.getAttribute("contenteditable")==="true")}function Gi(t){return!(Wt(t)||fe(t)||xt(t)&&(t=Ol(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 Cp(t){var e=Ca(t);return Gi(e="".concat(e," ").concat(rd(t)).trim())?e:""}function rd(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Pe(t.childNodes,function(r){var i;if(r&&((i=r.tagName)===null||i===void 0?void 0:i.toLowerCase())==="span")try{var n=Ca(r);e="".concat(e," ").concat(n).trim(),r.childNodes&&r.childNodes.length&&(e="".concat(e," ").concat(rd(r)).trim())}catch(s){z.error(s)}}),e}var Jg=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}(),id="$people_distinct_id",xa="__alias",$n="__timers",Tp="$autocapture_disabled_server_side",Rl="$session_recording_enabled_server_side",Ip="$console_log_recording_enabled_server_side",Mp="$session_recording_recorder_version_server_side",Ta="$sesid",Sa="$session_is_sampled",Hi="$enabled_feature_flags",Ll="$early_access_features",qi="$stored_person_properties",_r="$stored_group_properties",Bl="$surveys",Ia="$flag_call_reported",Vl="$user_state",Nl="$posthog_quota_limited",Xg=[id,xa,"__cmpns",$n,Rl,Ta,Hi,Vl,Nl,Ll,_r,qi,Bl,Ia];function El(t,e){return e.length>t?e.slice(0,t)+"...":e}var wr={_initializedTokens:[],_isDisabledServerSide:null,_isAutocaptureEnabled:!1,_setIsAutocaptureEnabled:function(t){var e,r=Wt(this._isDisabledServerSide)?!((e=t.persistence)===null||e===void 0||!e.props[Tp]):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&&!Pp(e));return e},_getAugmentPropertiesFromElement:function(t){if(!wa(t))return{};var e={};return Pe(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&&Gi(n)&&(e[i]=n)}}),e},_getPropertiesFromElement:function(t,e,r){var i,n=t.tagName.toLowerCase(),s={tag_name:n};kl.indexOf(n)>-1&&!r&&(n.toLowerCase()==="a"||n.toLowerCase()==="button"?s.$el_text=El(1024,Cp(t)):s.$el_text=El(1024,Ca(t)));var a=Aa(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;Pe(t.attributes,function(u){var f;td(t)&&["name","id","class"].indexOf(u.name)===-1||o!=null&&o.includes(u.name)||!e&&Gi(u.value)&&(f=u.name,!xt(f)||f.substring(0,10)!=="_ngcontent"&&f.substring(0,7)!=="_nghost")&&(s["attr__"+u.name]=El(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 Pe(document.querySelectorAll(t.css_selector),function(r){var i;["input","select"].indexOf(r.tagName.toLowerCase())>-1?i=r.value:r.textContent&&(i=r.textContent),Gi(i)&&e.push(i)}),e.join(", ")},_getCustomProperties:function(t){var e=this,r={};return Pe(this._customProperties,function(i){Pe(i.event_selectors,function(n){Pe(document.querySelectorAll(n),function(s){_e(t,s)&&wa(s)&&(r[i.name]=e._extractCustomPropertyValue(i))})})}),r},_getEventTarget:function(t){return fe(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(ed(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||Qr(g,"html")||!Pp(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&&!Qr(k,"body");)if(Ap(k.parentNode))w.push(k.parentNode.host),k=k.parentNode.host;else{if(!(M=k.parentNode||!1))break;if(kl.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"&&(kl.indexOf(A)>-1||g.getAttribute("contenteditable")==="true")}}(s,t,this.config)){for(var a,o,l=[s],h=s;h.parentNode&&!Qr(h,"body");)Ap(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(Pe(l,function(g){var d=wa(g);g.tagName.toLowerCase()==="a"&&(c=g.getAttribute("href"),c=d&&Gi(c)&&c),_e(Aa(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=Cp(s):u[0].$el_text=Ca(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)};Rn(document,"submit",r,!1,!0),Rn(document,"change",r,!1,!0),Rn(document,"click",r,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(t){var e;Fl(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 Jg(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(Z({},Tp,!!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=fe(e)?10:e,r=fe(r)?10:r;for(var i=0,n=0;n<t.length;n++)i+=t.charCodeAt(n);return i%e<r},isBrowserSupported:function(){return ri(document.querySelectorAll)}};(function(t){for(var e in t)ri(t[e])&&(t[e]=t[e].bind(t))})(wr),function(t){for(var e in t)ri(t[e])&&(t[e]=Qp(t[e]))}(wr);var Pl="$active_feature_flags",ga="$override_feature_flags",Dp="$feature_flag_payloads",Fp=function(t){var e,r={},i=ei(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=Nn(e.value,2),s=n[0],a=n[1];a&&(r[s]=a)}}catch(o){i.e(o)}finally{i.f()}return r},Kg=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(Hi),r=this.instance.get_property(ga);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(Dp)||{}}},{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(qi),n=this.instance.get_property(_r),s=Yl(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(Ia)||{};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(Z({},Ia,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((Z(c={},Pl,l),Z(c,Hi,u),c))}else{var p,m=l,g=h;n.errorsWhileComputingFlags&&(m=he(he({},a),m),g=he(he({},o),g)),s&&s.register((Z(p={},Pl,Object.keys(Fp(m))),Z(p,Hi,m||{}),Z(p,Dp,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(ga);else if(Ye(e)){for(var r={},i=0;i<e.length;i++)r[e[i]]=!0;this.instance.persistence.register(Z({},ga,r))}else this.instance.persistence.register(Z({},ga,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=Z({},"$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=he(he({},this.getFlagVariants()),{},Z({},e,r));(i=this.instance.persistence)===null||i===void 0||i.register((Z(n={},Pl,Object.keys(Fp(a))),Z(n,Hi,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(Ll);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(Z({},Ll,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(qi)||{};this.instance.register(Z({},qi,he(he({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(qi)}},{key:"setGroupPropertiesForFlags",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.instance.get_property(_r)||{};Object.keys(i).length!==0&&Object.keys(i).forEach(function(n){i[n]=he(he({},i[n]),e[n]),delete e[n]}),this.instance.register(Z({},_r,he(he({},i),e))),r&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(e){if(e){var r=this.instance.get_property(_r)||{};this.instance.register(Z({},_r,he(he({},r),{},Z({},e,{}))))}else this.instance.unregister(_r)}}]),t}(),Qg=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,or={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(or.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(Qg),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{or.set(t,"",-1,e)}catch{return}}},Al=null,$e={is_supported:function(){if(!Wt(Al))return Al;var t=!0;if(fe(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"),Al=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)}}},e0=["distinct_id",Ta,Sa],zl=he(he({},$e),{},{parse:function(t){try{var e={};try{e=or.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={};e0.forEach(function(a){e[a]&&(s[a]=e[a])}),Object.keys(s).length&&or.set(t,s,r,i,n)}catch(a){$e.error(a)}},remove:function(t,e){try{window.localStorage.removeItem(t),or.remove(t,e)}catch(r){$e.error(r)}}}),ya={},t0={is_supported:function(){return!0},error:function(t){z.error("memoryStorage error: "+t)},get:function(t){return ya[t]||null},parse:function(t){return ya[t]||null},set:function(t,e){ya[t]=e},remove:function(t){delete ya[t]}},Xr=null,Ze={is_supported:function(){if(!Wt(Xr))return Xr;if(Xr=!0,fe(window))Xr=!1;else try{var t="__support__";Ze.set(t,"xyz"),Ze.get(t)!=='"xyz"'&&(Xr=!1),Ze.remove(t)}catch{Xr=!1}return Xr},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)}}},r0=["localhost","127.0.0.1"],i0=function(t,e){return!!function(r){try{new RegExp(r)}catch{return!1}return!0}(e)&&new RegExp(e).test(t)},Op=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," ")},Ma=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 Pe(e,function(i){var n=Op(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=Op(Oe.referrer,e);i.length&&(r.ph_keyword=i)}return r},browser:function(t,e,r){return e=e||"",r||_e(t," OPR/")?_e(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":_e(t,"IEMobile")||_e(t,"WPDesktop")?"Internet Explorer Mobile":_e(t,"SamsungBrowser/")?"Samsung Internet":_e(t,"Edge")||_e(t,"Edg/")?"Microsoft Edge":_e(t,"FBIOS")?"Facebook Mobile":_e(t,"Chrome")?"Chrome":_e(t,"CriOS")?"Chrome iOS":_e(t,"UCWEB")||_e(t,"UCBrowser")?"UC Browser":_e(t,"FxiOS")?"Firefox iOS":_e(e,"Apple")||function(i){return _e(i,"Safari")&&!_e(i,"Chrome")&&!_e(i,"Android")}(t)?_e(t,"Mobile")?"Mobile Safari":"Safari":_e(t,"Android")?"Android Mobile":_e(t,"Konqueror")||_e(t,"konqueror")?"Konqueror":_e(t,"Firefox")?"Firefox":_e(t,"MSIE")||_e(t,"Trident/")?"Internet Explorer":_e(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(fe(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($l({$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:ti.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Kp()/1e3})},people_properties:function(){var t=Ue.os(ct),e=t.os_name,r=t.os_version;return Qe($l({$os:e,$os_version:r,$browser:Ue.browser(ct,navigator.vendor,window.opera)}),{$browser_version:Ue.browserVersion(ct,navigator.vendor,window.opera)})}},n0=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],$p=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",n0.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"?t0:or,this.user_state="anonymous",this.load(),this.update_config(e),this.save()}return Le(t,[{key:"properties",value:function(){var e={};return Pe(this.props,function(r,i){if(i===Hi&&xr(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=Xg)?l:Sp&&a.indexOf===Sp?a.indexOf(o)!=-1:(Pe(a,function(h){if(l||(l=h===o))return Zl}),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(xr(e)){fe(r)&&(r="None"),this.expire_days=fe(i)?this.default_expiry:i;var s=!1;if(Pe(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(xr(e)){this.expire_days=fe(r)?this.default_expiry:r;var n=!1;if(Pe(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 $l({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(e){return Pe(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[$n]||{};i[e]=r,this.props[$n]=i,this.save()}},{key:"remove_event_timer",value:function(e){var r=(this.props[$n]||{})[e];return fe(r)||(delete this.props[$n][e],this.save()),r}},{key:"get_user_state",value:function(){return this.props[Vl]||"anonymous"}},{key:"set_user_state",value:function(e){this.props[Vl]=e,this.save()}},{key:"get_quota_limits",value:function(){return this.props[Nl]||{}}},{key:"set_quota_limits",value:function(e){this.props[Nl]=e,this.save()}}]),t}(),Rp=2,s0=4,nd=3,a0=6,o0=0,l0="rrweb/console@1",Ut,h0=Le(function t(e){var r,i,n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Re(this,t),Z(this,"bucketSize",100),Z(this,"refillRate",10),Z(this,"mutationBuckets",{}),Z(this,"loggedTracker",{}),Z(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]})}),Z(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]}),Z(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)}),Z(this,"throttleMutations",function(a){if(a.type!==nd||a.data.source!==o0)return a;var o=a.data,l=n.numberOfChanges(o);o.attributes&&(o.attributes=o.attributes.filter(function(c){var u,f,p,m=Nn(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)}),sd=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}(sd||{}),c0="/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 u0=[Ut.MouseMove,Ut.MouseInteraction,Ut.Scroll,Ut.ViewportResize,Ut.Input,Ut.TouchMove,Ut.MediaInteraction,Ut.Drag],p0=function(){function t(e){var r=this;if(Re(this,t),Z(this,"_linkedFlagSeen",!1),Z(this,"_lastActivityTimestamp",Date.now()),Z(this,"isIdle",!1),Z(this,"_linkedFlag",null),Z(this,"_sampleRate",null),Z(this,"_minimumDuration",null),this.instance=e,this._captureStarted=!1,this._endpoint=c0,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 ar(this._sampleRate)?this.instance.get_property(Sa):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(Rl),r=!this.instance.config.disable_session_recording;return e&&r}},{key:"isConsoleLogCaptureEnabled",get:function(){var e=!!this.instance.get_property(Ip),r=this.instance.config.enable_recording_console_log;return r??e}},{key:"recordingVersion",get:function(){var e,r=this.instance.get_property(Mp);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":Fl(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(ar(this._sampleRate)){var n,s=this.isSampled;i||!Fl(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(Z({},Sa,n))}else{var a;(a=this.instance.persistence)===null||a===void 0||a.register(Z({},Sa,null))}}},{key:"afterDecideResponse",value:function(e){var r,i,n,s,a,o,l,h=this;this.instance.persistence&&this.instance.persistence.register((Z(l={},Rl,!!e.sessionRecording),Z(l,Ip,(a=e.sessionRecording)===null||a===void 0?void 0:a.consoleLogRecordingEnabled),Z(l,Mp,(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=fe(c)||Wt(c)?null:parseFloat(c);var u,f=(i=e.sessionRecording)===null||i===void 0?void 0:i.minimumDurationMilliseconds;if(this._minimumDuration=fe(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),ar(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:Kp()})}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){this._startCapture()}},{key:"_startCapture",value:function(){var e=this;if(!fe(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?Ln(this.instance.config.api_host+"/static/".concat(r,"?v=").concat(ti.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===nd&&u0.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,[Rp,s0].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=Nn(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 h0(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(he({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&&xr(e)){if(e.type===sd.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&&xr(o)&&o.type===a0&&xr(o.data)&&o.data.plugin===l0){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=ar(r)&&ar(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===Rp}})}}]),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},d0=["first-input","navigation","paint","resource"],f0=["/s/","/e/"],m0=function(){function t(e){Re(this,t),Z(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(fe((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(!r0.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 d0.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(f0.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)fe(s[l])||(a[qt[l]]=s[l]);if(this.capturePerformanceEvent(a),g0(e)){var h,c=ei(e.serverTiming||[]);try{for(c.s();!(h=c.n()).done;){var u,f=h.value;this.capturePerformanceEvent((Z(u={},qt.timeOrigin,o),Z(u,qt.timestamp,Math.floor(o+e.startTime)),Z(u,qt.name,f.name),Z(u,qt.duration,f.duration),Z(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}(),g0=function(t){return t.entryType==="navigation"||t.entryType==="resource"},y0=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=Yl(JSON.stringify({token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(qi),group_properties:this.instance.get_property(_r),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),wr.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&&Ln(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&&fe(l)&&Ln(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=ei(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,Ln(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}(),v0=["https://app.posthog.com","https://eu.posthog.com"],b0=["source"],_0=J.location?Ma(J.location.hash,"__posthog")||Ma(location.hash,"state"):null,w0=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(he({},r))}},{key:"maybeLoadToolbar",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.history;try{if(!r){try{J.localStorage.setItem("test","test"),J.localStorage.removeItem("test")}catch{return!1}r=J.localStorage}var n,s=_0||Ma(e.hash,"__posthog")||Ma(e.hash,"state"),a=s?Ep(function(){return JSON.parse(atob(decodeURIComponent(s)))})||Ep(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(J._postHogToolbarLoaded)return!1;J._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=!v0.includes(this.instance.config.api_host)&&this.instance.config.advanced_disable_toolbar_metrics,l=he(he({token:this.instance.config.token},e),{},{apiURL:i},o?{instrument:!1}:{});l.source;var h=Ng(l,b0);return J.localStorage.setItem("_postHogToolbarParams",JSON.stringify(h)),Ln(a,function(c){c?z.error("Failed to load toolbar",c):(J.ph_load_toolbar||J.ph_load_editor)(l,r.instance)}),Rn(J,"turbolinks:load",function(){J._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]:J.location,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J.history;return this.maybeLoadToolbar(e,r,i)}}]),t}(),x0="__ph_opt_in_out_";function S0(t,e){od(!0,t,e)}function k0(t,e){od(!1,t,e)}function E0(t,e){return ad(t,e)==="1"}function Lp(t,e){return!!function(r){if(r&&r.respectDnt){var i=r&&r.window||J,n=i.navigator||{},s=!1;return Pe([n.doNotTrack,n.msDoNotTrack,i.doNotTrack],function(a){_e([!0,1,"1","yes"],a)&&(s=!0)}),s}return!1}(e)||ad(t,e)==="0"}function P0(t,e){Jl(e=e||{}).remove(Xl(t,e),!!e.crossSubdomainCookie)}function Jl(t){return(t=t||{}).persistenceType==="localStorage"?$e:t.persistenceType==="localStorage+cookie"?zl:or}function Xl(t,e){return((e=e||{}).persistencePrefix||x0)+t}function ad(t,e){return Jl(e).get(Xl(t,e))}function od(t,e,r){xt(e)&&e.length?(Jl(r=r||{}).set(Xl(e,r),t?1:0,ar(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 ld=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}(),A0=function(t){Wp(r,ld);var e=Zp(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;Pe(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(Ml(s.filter(function(a){return a.url.indexOf("/e")===0})),Ml(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,he(he({},h),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var i={};return Pe(this._event_queue,function(n){var s=n.url,a=n.data,o=n.options,l=(o?o._batchKey:null)||s;fe(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,Zi=Uint32Array,Kl=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]),Ql=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]),Bp=new St([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),hd=function(t,e){for(var r=new nt(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Zi(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]},cd=hd(Kl,2),C0=cd[0],jl=cd[1];C0[28]=258,jl[258]=28;for(Gl=hd(Ql,0)[1],Da=new nt(32768),Te=0;Te<32768;++Te)vr=(43690&Te)>>>1|(21845&Te)<<1,vr=(61680&(vr=(52428&vr)>>>2|(13107&vr)<<2))>>>4|(3855&vr)<<4,Da[Te]=((65280&vr)>>>8|(255&vr)<<8)>>>1;var vr,Gl,Da,Te,Bn=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[Da[u]>>>l]=h}else for(a=new nt(i),n=0;n<i;++n)a[n]=Da[o[t[n]-1]++]>>>15-t[n];return a},ii=new St(288);for(Te=0;Te<144;++Te)ii[Te]=8;for(Te=144;Te<256;++Te)ii[Te]=9;for(Te=256;Te<280;++Te)ii[Te]=7;for(Te=280;Te<288;++Te)ii[Te]=8;var Fa=new St(32);for(Te=0;Te<32;++Te)Fa[Te]=5;var Kr,T0=Bn(ii,9,0),I0=Bn(Fa,5,0),ud=function(t){return(t/8>>0)+(7&t&&1)},pd=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 Zi?Zi:St)(r-e);return i.set(t.subarray(e,r)),i},sr=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8},Fn=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},Cl=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=M0(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]},M0=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},Vp=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]},On=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},ka=function(t,e,r){var i=r.length,n=ud(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)},Np=function(t,e,r,i,n,s,a,o,l,h,c){sr(e,c++,r),++n[256];for(var u=Cl(n,15),f=u[0],p=u[1],m=Cl(s,15),g=m[0],d=m[1],y=Vp(f),v=y[0],b=y[1],_=Vp(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=Cl(S,7),k=M[0],I=M[1],P=19;P>4&&!k[Bp[P-1]];--P);var A,E,F,O,D=h+5<<3,C=On(n,ii)+On(s,Fa)+a,$=On(n,f)+On(s,g)+a+14+3*P+On(S,k)+(2*S[16]+3*S[17]+7*S[18]);if(D<=C&&D<=$)return ka(e,c,t.subarray(l,l+h));if(sr(e,c,1+($<C)),c+=2,$<C){A=Bn(f,p,0),E=f,F=Bn(g,d,0),O=g;var R=Bn(k,I,0);for(sr(e,c,b-257),sr(e,c+5,T-1),sr(e,c+10,P-4),c+=14,w=0;w<P;++w)sr(e,c+3*w,k[Bp[w]]);c+=3*P;for(var q=[v,x],U=0;U<2;++U){var Y=q[U];for(w=0;w<Y.length;++w){var G=31&Y[w];sr(e,c,R[G]),c+=k[G],G>15&&(sr(e,c,Y[w]>>>5&127),c+=Y[w]>>>12)}}}else A=T0,E=ii,F=I0,O=Fa;for(w=0;w<o;++w)if(i[w]>255){G=i[w]>>>18&31,Fn(e,c,A[G+257]),c+=E[G+257],G>7&&(sr(e,c,i[w]>>>23&31),c+=Kl[G]);var re=31&i[w];Fn(e,c,F[re]),c+=O[re],re>3&&(Fn(e,c,i[w]>>>5&8191),c+=Ql[re])}else Fn(e,c,A[i[w]]),c+=E[i[w]];return Fn(e,c,A[256]),c+E[256]},D0=new Zi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F0=new St(0),O0=function(){for(var t=new Zi(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),$0=function(){var t=4294967295;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=O0[255&r^e[i]]^r>>>8;t=r},d:function(){return 4294967295^t}}},R0=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=ka(p,m,s.subarray(g,d)):(p[g]=c,m=ka(p,m,s.subarray(g,u)))}else{for(var y=D0[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 Zi(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,R=T[C];if(x[$]=R,T[C]=$,O<=g){var q=u-g;if((A>7e3||F>24576)&&q>423){m=Np(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 Y=2,G=0,re=b,se=$-R&32767;if(q>2&&C==M(g-se))for(var ie=Math.min(v,q)-1,Q=Math.min(32767,g),xe=Math.min(258,q);se<=Q&&--re&&$!=R;){if(s[g+Y]==s[g+Y-se]){for(var ue=0;ue<xe&&s[g+ue]==s[g+ue-se];++ue);if(ue>Y){if(Y=ue,G=se,ue>ie)break;var Ie=Math.min(se,ue-2),Se=0;for(U=0;U<Ie;++U){var W=g-se+U+32768&32767,qe=W-x[W]+32768&32767;qe>Se&&(Se=qe,R=W)}}}se+=($=R)-(R=x[$])+32768&32767}if(G){k[F++]=268435456|jl[Y]<<18|Gl[G];var kt=31&jl[Y],Et=31&Gl[G];E+=Kl[kt]+Ql[Et],++I[257+kt],++P[Et],O=g+Y,++A}else k[F++]=s[g],++I[s[g]]}}m=Np(s,p,c,k,I,P,E,F,D,g-D,m),c||(m=ka(p,m,F0))}return pd(f,0,l+ud(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)},Hl=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},L0=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&&Hl(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)}},B0=function(t){return 10+(t.filename&&t.filename.length+1||0)};function V0(t,e){e===void 0&&(e={});var r=$0(),i=t.length;r.p(t);var n=R0(t,e,B0(e),8),s=n.length;return L0(n,e),Hl(n,s-8,r.d()),Hl(n,s-4,i),n}function N0(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 pd(i,0,n)}(function(t){t.GZipJS="gzip-js",t.Base64="base64"})(Kr||(Kr={}));var dd=function(t,e,r){var i=e||{};i.ip=r.ip?1:0,i._=new Date().getTime().toString(),i.ver=ti.LIB_VERSION;var n=t.split("?");if(n.length>1){var s,a=ei(n[1].split("&"));try{for(a.s();!(s=a.n()).done;){var o=s.value.split("=")[0];fe(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 Pe(h,function(m,g){fe(m)||fe(g)||g==="undefined"||(c=encodeURIComponent(m.toString()),u=encodeURIComponent(g),p[p.length]=u+"="+c)}),p.join(f)}(i)},eh=function t(e,r){if(r.blob&&e.buffer)return new Blob([wp(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)||wp(e)?"data="+encodeURIComponent(e):"data="+encodeURIComponent(e.data),"compression"in e&&e.compression&&(n+="&compression="+e.compression),n);var n},fd=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;ar(a)&&a>0&&(e=dd(e,{retry_count:a},{}));var f=new XMLHttpRequest;f.open(n.method||"GET",e,!0);var p=eh(r,n);Pe(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 ri(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)},z0=18e5,j0=function(t){Wp(r,ld);var e=Zp(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,!fe(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(z0,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=ei(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=ei(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,eh(o,he(he({},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)||fd({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 ar(t)&&isFinite(t)&&Math.floor(t)===t});var zp="0123456789abcdef",G0=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+zp.charAt(this.bytes[r]>>>4)+zp.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}(),H0=function(){function t(){Re(this,t),Z(this,"timestamp",0),Z(this,"counter",0),Z(this,"random",new q0)}return Le(t,[{key:"generate",value:function(){var e=this.generateOrAbort();if(fe(e)){this.timestamp=0;var r=this.generateOrAbort();if(fe(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 G0.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}(),md=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};!fe(J.crypto)&&crypto.getRandomValues&&(md=function(t){return crypto.getRandomValues(t)});var jp,q0=function(){function t(){Re(this,t),Z(this,"buffer",new Uint32Array(8)),Z(this,"cursor",1/0)}return Le(t,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(md(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),t}(),Ui=function(){return U0().toString()},U0=function(){return(jp||(jp=new H0)).generate()},va=1800,Gp=60,W0=864e5,Z0=function(){function t(e,r,i,n){Re(this,t),Z(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||Ui,this._windowIdGenerator=n||Ui;var s=e.persistence_name||e.token,a=e.session_idle_timeout_seconds||va;if(ar(a)?a>va?z.warn("session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):a<Gp&&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=va),this._sessionTimeoutMs=1e3*Math.min(Math.max(a,Gp),va),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 fe(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(Z({},Ta,[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[Ta];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;J.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=Nn(this._getSessionId(),3),n=i[0],s=i[1],a=i[2],o=this._getWindowId(),l=a&&a>0&&Math.abs(r-a)>W0,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}(),Y0=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})}}),J0=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")}}},X0=function(){function t(){var e=this;Re(this,t),Z(this,"_hasSeenPageView",!1),Z(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:J.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),he({$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 he({$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:ba(i/r,0,1),$prev_pageview_max_scroll:n,$prev_pageview_max_scroll_percentage:r<=1?1:ba(n/r,0,1),$prev_pageview_last_content:a,$prev_pageview_last_content_percentage:s<=1?1:ba(a/s,0,1),$prev_pageview_max_content:o,$prev_pageview_max_content_percentage:s<=1?1:ba(o/s,0,1)}}},{key:"startMeasuringScrollPosition",value:function(){J.addEventListener("scroll",this._updateScrollData),J.addEventListener("scrollend",this._updateScrollData),J.addEventListener("resize",this._updateScrollData)}},{key:"stopMeasuringScrollPosition",value:function(){J.removeEventListener("scroll",this._updateScrollData),J.removeEventListener("scrollend",this._updateScrollData),J.removeEventListener("resize",this._updateScrollData)}},{key:"_scrollHeight",value:function(){return Math.max(0,J.document.documentElement.scrollHeight-J.document.documentElement.clientHeight)}},{key:"_scrollY",value:function(){return J.scrollY||J.pageYOffset||J.document.documentElement.scrollTop||0}},{key:"_contentHeight",value:function(){return J.document.documentElement.scrollHeight||0}},{key:"_contentY",value:function(){var e=J.document.documentElement.clientHeight||0;return this._scrollY()+e}}]),t}();function ba(t,e,r){return Math.max(e,Math.min(t,r))}var Vn,th,We,K0={icontains:function(t){return window.location.href.toLowerCase().indexOf(t.toLowerCase())>-1},regex:function(t){return i0(window.location.href,t)},exact:function(t){return window.location.href===t}},Q0=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(Bl);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(Z({},Bl,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||K0[(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}(),ey=6e4,ty=function(){function t(){var e=this;Re(this,t),Z(this,"limits",{}),Z(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()+ey})}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"})(Vn||(Vn={}));var ql=function(){},_a={},ut="posthog",Ea=J.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,gd=!Ea&&ct.indexOf("MSIE")===-1&&ct.indexOf("Mozilla")===-1,Hp=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:ql,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:(J==null||(t=J.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:ql,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800}},Ul=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&&th===Vn.INIT_MODULE)n=s;else{if(s&&!Ye(s))return void z.error("You have already initialized "+r);n=new rh}return n._init(t,e,r,o("initComplete")),n.toolbar.maybeLoadToolbar(),n.sessionRecording=new p0(n),n.sessionRecording.startRecordingIfEnabled(),n.webPerformance=new m0(n),n.webPerformance.startObservingIfEnabled(),n.config.__preview_measure_pageview_stats&&n.pageViewManager.startMeasuringScrollPosition(),n.__autocapture=n.config.autocapture,wr._setIsAutocaptureEnabled(n),wr._isAutocaptureEnabled&&(n.__autocapture=n.config.autocapture,wr.enabledForProject(n.config.token,100,100)?wr.isBrowserSupported()?wr.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."))),ti.DEBUG=ti.DEBUG||n.config.debug,!fe(s)&&Ye(s)&&(n._execute_array.call(n.people,s.people),n._execute_array(s)),o("syncCode")(n),n},rh=function(){function t(){var e=this;Re(this,t),this.config=Hp(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=Y0,this.segmentIntegration=function(){return J0(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 Kg(this),this.toolbar=new w0(this),this.pageViewManager=new X0,this.surveys=new Q0(this),this.rateLimiter=new ty,this.people={set:function(r,i,n){var s=xt(r)?Z({},r,i):r;e.setPersonProperties(s),n?.({})},set_once:function(r,i,n){var s=xt(r)?Z({},r,i):r;e.setPersonProperties(void 0,s),n?.({})}}}return Le(t,[{key:"init",value:function(e,r,i){if(fe(i))z.critical("You must name your new library: init(token, config, name)");else{if(i!==ut){var n=Ul(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({},Hp(),s,{name:a,token:e,callback_fn:(a===ut?a:ut+"."+a)+"._jsc"})),this._jsc=function(){},(J!=null&&(r=J.rrweb)!==null&&r!==void 0&&r.record||J!=null&&J.rrwebRecord)&&(this.__loaded_recorder_version=J==null||(l=J.rrweb)===null||l===void 0?void 0:l.version),this.persistence=new $p(this.config),this._requestQueue=new A0(this._handle_queued_event.bind(this)),this._retryQueue=new j0(this.config.on_xhr_error,this.rateLimiter),this.__captureHooks=[],this.__request_queue=[],this.sessionManager=new Z0(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new $p(he(he({},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(Ui()),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(Ui());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_user_state("anonymous")}J.addEventListener&&J.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=ei(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 y0(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()||Wi(this.__request_queue,function(r){e._send_request.apply(e,Ml(r))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(e,r){if(fe(e))return null;if(Ea)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||_a,ql)}},{key:"__compress_and_send_json_request",value:function(e,r,i,n){var s=function(h,c,u){return h===Kr.GZipJS?[V0(N0(c),{mtime:0}),he(he({},u),{},{blob:!0,urlQueryArgs:{compression:Kr.GZipJS}})]:[{data:Yl(c)},u]}(this.compression[Kr.GZipJS]?Kr.GZipJS:Kr.Base64,r,i),a=Nn(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(gd)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||{}),Ea||(i.method="GET");var a="sendBeacon"in J.navigator&&i.transport==="sendBeacon";if(e=dd(e,i.urlQueryArgs||{},{ip:this.config.ip}),a)try{J.navigator.sendBeacon(e,eh(r,he(he({},i),{},{sendBeacon:!0})))}catch{}else if(Ea)try{fd({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=[];Wi(e,function(l){l&&(r=l[0],Ye(r)?a.push(l):ri(l)?l.call(i):Ye(l)&&r==="alias"?n.push(l):Ye(l)&&r.indexOf("capture")!==-1&&ri(i[r])?a.push(l):s.push(l))});var o=function(l,h){Wi(l,function(c){if(Ye(c[0])){var u=h;Pe(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]:_a;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=Lp(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||_a).transport;if(n&&(i.transport=n),!fe(e)&&xt(e)){if(!Yg(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:Ui(),event:e,properties:this._calculate_event_properties(e,r||{})};e==="$identify"&&(s.$set=i.$set,s.$set_once=i.$set_once),(s=Ug(s,i._noTruncate?null:this.config.properties_string_max_length)).timestamp=i.timestamp||new Date;var a=he(he({},s.properties.$set),s.$set);Gg(a)||this.setPersonPropertiesForFlags(a),z.info("send",s);var o=JSON.stringify(s),l=this.config.api_host+(i.endpoint||this.analyticsDefaultEndpoint),h=i!==_a;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),Pe(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=he({},r);if(n.token=this.config.token,e==="$snapshot"){var s=he(he({},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(!fe(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)?Pe(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(Z({},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(xa)&&(this.unregister(xa),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(Ia))}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:he(he({},n),{},Z({},e,r))}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:r,$group_set:i}),this.setGroupPropertiesForFlags(Z({},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(Ui());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(id)?(z.critical("Attempting to create alias for existing People user - aborting."),-2):(fe(r)&&(r=this.get_distinct_id()),e!==r?(this._register_single(xa,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=he({},this.config);xr(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&&(ti.DEBUG=!0),this.sessionRecording&&!fe(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&&!or.get("ph_optout")||(or.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(S0,e),this._gdpr_update_persistence(e)}},{key:"opt_out_capturing",value:function(e){var r=Qe({clear_persistence:!0},e||{});this._gdpr_call_func(k0,r),this._gdpr_update_persistence(r)}},{key:"has_opted_in_capturing",value:function(e){return this._gdpr_call_func(E0,e)}},{key:"has_opted_out_capturing",value:function(e){return this._gdpr_call_func(Lp,e)}},{key:"clear_opt_in_out_capturing",value:function(e){var r=Qe({enable_persistence:!0},e??{});this._gdpr_call_func(P0,r),this._gdpr_update_persistence(r)}},{key:"debug",value:function(e){e===!1?(J.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(J.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]]=Qp(t.prototype[e[r]])})(rh,["identify"]);var qp,Up,br={},ry=function(){We.init=function(t,e,r){if(r)return We[r]||(We[r]=br[r]=Ul(t||"",e||{},r,function(n){We[r]=br[r]=n,n._loaded()})),We[r];var i=We;return br[ut]?i=br[ut]:t&&(i=Ul(t,e||{},ut,function(n){br[ut]=n,n._loaded()}),br[ut]=i),We=i,th===Vn.INIT_SNIPPET&&(J[ut]=We),Pe(br,function(n,s){s!==ut&&(We[s]=n)}),i}},iy=function(){function t(){t.done||(t.done=!0,gd=!1,Pe(br,function(e){e._dom_loaded()}))}Oe.addEventListener&&(Oe.readyState==="complete"?t():Oe.addEventListener("DOMContentLoaded",t,!1)),Rn(J,"load",t,!0)};(function(t){t.Popover="popover",t.API="api"})(qp||(qp={})),function(t){t.Open="open",t.MultipleChoice="multiple_choice",t.SingleChoice="single_choice",t.Rating="rating",t.Link="link"}(Up||(Up={}));var yd=(th=Vn.INIT_MODULE,We=new rh,ry(),We.init(),iy(),We);var vd=yd.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(!vd)throw new Error("Failed to initialize PostHog");vd.capture(t,e)}var Yi,$a,Dt,Be,Ra,bd,La,_d,Ba,wd,Va,xd,Na,Sd,za,kd,ja,Ed,Ga,Pd,Oa=class extends De(Ae){constructor(){super();ee(this,Yi);ee(this,Ra);ee(this,La);ee(this,Ba);ee(this,Va);ee(this,Na);ee(this,za);ee(this,ja);ee(this,Ga);ee(this,Dt,new fa(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={...N(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&&N(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(N(this,Yi,$a),JSON.stringify(n))},restoreConversationState:()=>{try{let r=JSON.parse(localStorage.getItem(N(this,Yi,$a))||"{}");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(N(this,Yi,$a))}}));ee(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
+ <mw-bubble class="${yp(r)} fixed z-[99999999]" @click=${ce(this,Va,xd)} ?dialog-shown="${N(this,Be)}" bubble-image-url="${this.config.bubble?.imageUrl||""}"></mw-bubble>
414
432
 
415
- <div id="dialog" class="${z(this,Ye)?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${Object.keys(n).join(" ")} fixed bottom-0 left-0 right-0 top-0 z-[99999999] overflow-hidden bg-white font-sans text-[16px] leading-normal text-gray-800 subpixel-antialiased shadow-2xl transition-all sm:left-auto sm:top-auto sm:h-4/5 sm:max-h-[800px] sm:w-5/6 sm:max-w-[400px] sm:rounded-2xl 2xl:max-w-[420px]">
433
+ ${this.config.popup?.enabled?pe`
434
+ <!-- -->
435
+ <mw-popup .position="${s}" ai-name="${this.config.title}" ?dialog-shown="${N(this,Be)}" popup-delay-ms="${vl(this.config.popup?.delayMs)}" popup-text="${vl(this.config.popup?.text)}" @popup-chat-open="${ce(this,La,_d)}"></mw-popup>
436
+ `:""}
437
+
438
+ <div id="dialog" class="${N(this,Be)?"visible opacity-100 translate-y-0":"invisible opacity-0 translate-y-3"} ${Object.keys(n).join(" ")} fixed bottom-0 left-0 right-0 top-0 z-[99999999] overflow-hidden bg-white font-sans text-[16px] leading-normal text-gray-800 subpixel-antialiased shadow-2xl transition-all sm:left-auto sm:top-auto sm:h-4/5 sm:max-h-[800px] sm:w-5/6 sm:max-w-[400px] sm:rounded-2xl 2xl:max-w-[420px]">
416
439
  <div class="mx-auto flex h-full w-full max-w-4xl flex-col">
417
- <mw-header class="z-10 border-b bg-[${this.config.header.background}] text-lg" .messages="${z(this,Dt).messages.length}" .config="${this.config}" @mw-close="${de(this,Ma,hd)}" @mw-delete-history="${de(this,Da,cd)}"></mw-header>
440
+ <mw-header class="z-10 border-b bg-[${this.config.header.background}] text-lg" .messages="${N(this,Dt).messages.length}" .config="${this.config}" @mw-close="${ce(this,Na,Sd)}" @mw-delete-history="${ce(this,za,kd)}"></mw-header>
418
441
 
419
442
  <!-- this structure of 2 divs is required for the native scroll to bottom -->
420
443
  <div class="flex h-full flex-shrink flex-grow flex-col-reverse overflow-auto bg-[#FDFDFD] pt-4">
421
444
  <!-- this is the 2nd (inner) div that will natively scroll to bottom -->
422
445
  <div class="">
423
- ${nn(z(this,Dt)?.messages??[],s=>s.id,s=>fe`
424
- <mw-chat-message class="mx-4 mb-4 block" .config="${this.config}" side="${s.role}" @click="${de(this,Ca,ad)}">
446
+ ${sn(N(this,Dt)?.messages??[],a=>a.id,a=>pe`
447
+ <mw-chat-message class="mx-4 mb-4 block" .config="${this.config}" side="${a.role}" @click="${ce(this,Ra,bd)}">
425
448
  <div class="prose break-words text-inherit">
426
- ${s.content==="\xB7 \xB7 \xB7"?fe`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>`:s.content_html?Vi(s.content_html):fe`<p>${s.content}</p>`}
449
+ ${a.content==="\xB7 \xB7 \xB7"?pe`<mw-loading class="-mx-2 block h-8 max-h-[24px] w-8 fill-[${this.config.color}]"></mw-loading>`:a.content_html?Ni(a.content_html):pe`<p>${a.content}</p>`}
427
450
  </div>
428
451
  </mw-chat-message>
429
452
  `)}
430
453
  </div>
431
454
 
432
455
  <!-- chat background (show/hide display logic is handled inside depending on message count) -->
433
- <mw-background class="mx-auto max-w-sm flex-grow" messages="${z(this,Dt)?.messages?.length??0}" .config="${this.config}" @mw-example-click="${de(this,Ta,od)}"></mw-background>
456
+ <mw-background class="mx-auto max-w-sm flex-grow" messages="${N(this,Dt)?.messages?.length??0}" .config="${this.config}" @mw-example-click="${ce(this,Ba,wd)}"></mw-background>
434
457
  </div>
435
458
 
436
459
  <div class="flex-shrink-0 flex-grow-0 space-y-2 pb-2">
437
- <mw-chat-input @mw-submit="${de(this,Fa,ud)}" @mw-cancel="${de(this,Oa,pd)}" .config="${this.config}" ?disabled="${z(this,Dt)?.isStreaming??!0}"></mw-chat-input>
460
+ <mw-chat-input @mw-submit="${ce(this,ja,Ed)}" @mw-cancel="${ce(this,Ga,Pd)}" .config="${this.config}" ?disabled="${N(this,Dt)?.isStreaming??!0}"></mw-chat-input>
438
461
  <mw-powered-by></mw-powered-by>
439
462
  </div>
440
463
  </div>
441
464
  </div>
442
- `}openChat(){z(this,Ye)||(Le(this,Ye,!0),this.requestUpdate(),St("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:z(this,Ye)?"open":"close"}))}closeChat(){z(this,Ye)&&(Le(this,Ye,!1),this.requestUpdate(),St("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:z(this,Ye)?"open":"close"}))}injectConfig(r){this.config=r,this.requestUpdate()}};Zi=new WeakSet,Aa=function(){if(!this.widgetId)throw new Error("widgetId is required");return`_molin_${this.widgetId}`},Dt=new WeakMap,Ye=new WeakMap,Ca=new WeakSet,ad=function(r){let i=r.target;i&&i instanceof HTMLAnchorElement&&i.tagName==="A"&&St("ShopAssistant: user clicked link",{widgetId:this.widgetId,url:i.href})},Ta=new WeakSet,od=function(r){let i=r.detail.example;z(this,Dt)?.sendUserInput(i),St("ShopAssistant: user sent input",{widgetId:this.widgetId,text:i,example:!0})},Ia=new WeakSet,ld=function(){Le(this,Ye,!z(this,Ye)),this.requestUpdate(),St("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:z(this,Ye)?"open":"close"})},Ma=new WeakSet,hd=function(r){Le(this,Ye,!1),this.requestUpdate(),St("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:z(this,Ye)?"open":"close"})},Da=new WeakSet,cd=function(r){z(this,Dt)?.reset()},Fa=new WeakSet,ud=function(r){let i=r.detail.value;z(this,Dt)?.sendUserInput(i),St("ShopAssistant: user sent input",{widgetId:this.widgetId,text:i,example:!1})},Oa=new WeakSet,pd=function(r){z(this,Dt)?.sendUserCancel(),St("ShopAssistant: user canceled streaming",{widgetId:this.widgetId})},Se(Pa,"properties",{widgetId:{type:String,attribute:"widget"},config:{type:Object,attribute:!1}});customElements.define("molin-shop-ai",Pa);
465
+ `}openChat(){N(this,Be)||(ke(this,Be,!0),this.requestUpdate(),pt("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:N(this,Be)?"open":"close"}))}closeChat(){N(this,Be)&&(ke(this,Be,!1),this.requestUpdate(),pt("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"programmatic-method",state:N(this,Be)?"open":"close"}))}injectConfig(r){this.config=r,this.requestUpdate()}};Yi=new WeakSet,$a=function(){if(!this.widgetId)throw new Error("widgetId is required");return`_molin_${this.widgetId}`},Dt=new WeakMap,Be=new WeakMap,Ra=new WeakSet,bd=function(r){let i=r.target;i&&i instanceof HTMLAnchorElement&&i.tagName==="A"&&pt("ShopAssistant: user clicked link",{widgetId:this.widgetId,url:i.href})},La=new WeakSet,_d=function(){ke(this,Be,!0),this.requestUpdate(),pt("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"popup-click",state:N(this,Be)?"open":"close"})},Ba=new WeakSet,wd=function(r){let i=r.detail.example;N(this,Dt)?.sendUserInput(i),pt("ShopAssistant: user sent input",{widgetId:this.widgetId,text:i,example:!0})},Va=new WeakSet,xd=function(){ke(this,Be,!N(this,Be)),this.requestUpdate(),pt("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"bubble-toggle",state:N(this,Be)?"open":"close"})},Na=new WeakSet,Sd=function(r){ke(this,Be,!1),this.requestUpdate(),pt("ShopAssistant: user toggled window",{widgetId:this.widgetId,source:"top-right-close-button",state:N(this,Be)?"open":"close"})},za=new WeakSet,kd=function(r){N(this,Dt)?.reset()},ja=new WeakSet,Ed=function(r){let i=r.detail.value;N(this,Dt)?.sendUserInput(i),pt("ShopAssistant: user sent input",{widgetId:this.widgetId,text:i,example:!1})},Ga=new WeakSet,Pd=function(r){N(this,Dt)?.sendUserCancel(),pt("ShopAssistant: user canceled streaming",{widgetId:this.widgetId})},ye(Oa,"properties",{widgetId:{type:String,attribute:"widget"},config:{type:Object,attribute:!1}});customElements.define("molin-shop-ai",Oa);
443
466
  /*! Bundled license information:
444
467
 
445
468
  @lit/reactive-element/css-tag.js:
@@ -548,4 +571,11 @@ lit-html/directives/class-map.js:
548
571
  * Copyright 2018 Google LLC
549
572
  * SPDX-License-Identifier: BSD-3-Clause
550
573
  *)
574
+
575
+ lit-html/directives/if-defined.js:
576
+ (**
577
+ * @license
578
+ * Copyright 2018 Google LLC
579
+ * SPDX-License-Identifier: BSD-3-Clause
580
+ *)
551
581
  */